SAP ABAP - Operations on Internal Table Watch more Videos at www.tutorialspoint.com/videot... Lecture By: Mr. Sanjo Thomas, Tutorials Point India Private Limited.
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 = '0000000258'." 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 = '0000000259'. "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.
Check out our trending course on SAP ABAP- bitly.ws/Eno4
Use coupon “CZcams 12” to get “FLAT 12%” OFF at checkout.
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 = '0000000258'." 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 = '0000000259'.
"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.
Despite the sound of the video for demo(2nd half) is not audible, it has a very useful info.
Absolutely brillant!!!
Thanks man....this is brilliant stuff...helped me alot
Awesome content and presentation
Thank you sir very useful to this video
Thanks! great!
SUPERRRRRRR EXPLANATION
very very useful
Thanks
Thanks bro ;)
Most of your videos during programming demo are mute.
Its very much difficult to understand them.
I tuned my device volume and youtube volume to max, it is still hard to listen to. If my environment is noisy, i can't hear it at all.
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?
where can i find lesson when you create zcustomreport ?
could you please share arrey fetch syntax video?
Is refresh usable for initialisation?
No Audio..😩
Audio is very very very very very WEAK.
Bro server istaraa. Miru. ABAP. PRICE
buy airpods if u want to hear the voice loudly
Can you please stop spaying "particular" a thousand times? It is so distracting and irritating.