SAP ABAP - Operations on Internal Table

preview_player
Показать описание
SAP ABAP - Operations on Internal Table
Lecture By: Mr. Sanjo Thomas, Tutorials Point India Private Limited.
Рекомендации по теме
Комментарии
Автор

Use coupon “YOUTUBE 12” to get “FLAT 12%” OFF at checkout.

TutorialsPoint_
Автор

Despite the sound of the video is quite crappy it has a very useful info.

Code:

types: begin of ty_kna1,
kunnr type kna1-kunnr,
name1 type kna1-name1,
land1 type kna1-land1,
ort01 type kna1-ort01,
end of ty_kna1.

data: i_kna1 type table of ty_kna1.
data: i_kna1_tmp type table of ty_kna1.
data: wa_kna1 type ty_kna1. "working area

" select kunnr name1 land1 ort01 from kna1 into table i_kna1 where land1 = 'US'.
select kunnr name1 land1 ort01 from kna1 into table i_kna1 up to 10 rows.

"1. append
wa_kna1-kunnr = '002'.
wa_kna1-name1 = 'US'.
wa_kna1-land1 = 'AAA'.
wa_kna1-ort01 = 'NewYol'.

append wa_kna1 to i_kna1. "appended to the last position

"2.
*insert wa_kna1 into i_kna1 index 6.
"3.
*sort i_kna1. "sort the table by the key. (in this case: knurr)
"sort i_kna1 by ort01.
"4.
"read table i_kna1 into wa_kna1 index 5.

"5.
*read table i_kna1 into wa_kna1 with key kunnr = BINARY SEARCH. Note: the field is 10 length.
*
* write: /
* wa_kna1-kunnr,
* wa_kna1-name1,
* wa_kna1-land1,
* wa_kna1-ort01.

"6.
"delete i_kna1 index 1. "the first line starts with index 1 (not zero)
"delete i_kna1 where kunnr =
"delete i_kna1 where land1 = 'US'.

"7.

"clear wa_kna1. "delete the working area
"refresh i_kna1. "delete the internal table
"free i_kna1. "delete both

"8
"append lines of i_kna1 from 3 to 5 to i_kna1_tmp.
insert lines of i_kna1 from 6 to 8 into i_kna1_tmp index 2.

if i_kna1_tmp is INITIAL.
write: 'Table is empty.'.

else.
loop at i_kna1_tmp into wa_kna1.
write: /
wa_kna1-kunnr,
wa_kna1-name1,
wa_kna1-land1,
wa_kna1-ort01.
endloop.

endif.



*if i_kna1 is INITIAL.
* write: 'la tabla esta vacia.'.
*
* else.
* loop at i_kna1 into wa_kna1.
* write: /
* wa_kna1-kunnr,
* wa_kna1-name1,
* wa_kna1-land1,
* wa_kna1-ort01.
* endloop.
*
* endif.

davidsanchez-buun
Автор

Despite the sound of the video for demo(2nd half) is not audible, it has a very useful info.

mallikarjunb
Автор

Thank you sir very useful to this video

harinishanmugam
Автор

Thanks man....this is brilliant stuff...helped me alot

shrikant
Автор

thank you, but what about if we have 31 in more than one row? will it display one by one or only one be displayed?

tarikudereje
Автор

Most of your videos during programming demo are mute.
Its very much difficult to understand them.

AshishSingh-usgl
Автор

where can i find lesson when you create zcustomreport ?

NexusLikeBabcia
Автор

could you please share arrey fetch syntax video?

sharvariambadkar
Автор

buy airpods if u want to hear the voice loudly

cryptomanmohan
Автор

Can you please stop spaying "particular" a thousand times? It is so distracting and irritating.

SAPISUUser