Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

how to insert data into table type -->

Former Member
0 Likes
2,298

Hi

i am working badi , here i found table type

i want insert data into this table CT_HDR_ADDITIONAL like HUHDR_ADD.

while running i have data

i want to insert 1 data into i field , for eg . to this CT_HDR_ADDITIONAL-EXIDV

how to do that

Hi

i am working badi , here i found table type

i want insert data into this table CT_HDR_ADDITIONAL like HUHDR_ADD.

while running i have data

i want to insert 1 data into i field , for eg . to this CT_HDR_ADDITIONAL-EXIDV

how to do that

4 REPLIES 4
Read only

Former Member
0 Likes
1,325

use

data : wa_itab like line of it_tabtype. " say it_tabtype is created from a table type.

now use wa_itab-field = 'value'.

append wa_itab to it_tabtype.

Read only

Former Member
0 Likes
1,325

Why cant i see a subject line for this thread? Anything wrong with my eyes?

Read only

0 Likes
1,325

neither me

may be because of that --->

Read only

Former Member
0 Likes
1,325

Hi

U need to define a workarea like the line of table type HUHDR_ADD, i.e. HUHDR_ADDITIONAL_DATA, and use it to loop the table:

 DATA: WA_CT_HDR_ADDITIONAL TYPE HUHDR_ADDITIONAL_DATA.

LOOP AT CT_HDR_ADDITIONAL INTO WA_CT_HDR_ADDITIONAL.
   WA_CT_HDR_ADDITIONAL-EXIDV = .....
   MODIFY CT_HDR_ADDITIONAL FROM WA_CT_HDR_ADDITIONAL.
ENDLOOP.

Max