Application Development 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: 

Internal Table Line Operations

Former Member
0 Kudos

Hello Gurus,

I need to load an internal table.

There are 5 columns in the internal table.

All the columns of the internal table are constant values except 2 columns.

TransactionType - OrderNum - SequenceNum - MatNr - ExpeQty.

Only SequenceNum and Matnr columns vary all other columns have constant values.

SequenceNum should increase by one for each row. Matnr should be populated from MARD table for specific plant and storage location.

Transactiontype = AUD always

OrdrNum = Order1 always

ExpQty = 99999 always

Can someone explain the keywords to load the table as described.

Thanks in advance.

Regards,

Balu

2 REPLIES 2

Former Member
0 Kudos

Suppose you have all the required materials in an internal table called IT_MATNR.

Then :

l_counter = 1.

LOOP AT IT_MATNR INTO WA_MATNR.

wa_table-matnr = wa_matnr-matnr.

wa_table-seqnum = l_counter.

l_counter = l_counter + 1.

wa_table-transtype = 'AUD'.

wa_table-ordernum = 'Order1'.

wa_table-expqty = 999999.

APPEND wa_table to IT_TABLE.

ENDLOOP.

Now IT_TABLE will have the required entires.

0 Kudos

Thanks a ton Srihari.

Regards,

Balaji