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

Insert Problem in Internal Table

Former Member
0 Likes
424

Hi

I have a situation like the below:

I want to populate an Internal Table with a few values from Standard Tables, like:

matnr, ersda and ernam from MARA

maktx from MAKT

ebeln, bstyp and bsart from EKKO.

I have a single internal table with different field names as well.

I mean, the fieldnames of the Standard table are different from the fieldnames of the Internal table.

How can I populate data? Urgent!

3 REPLIES 3
Read only

former_member404244
Active Contributor
0 Likes
402

Hi,

the length and type of internal table fields should match with stanard tables fields,then only u can write them in where condition.....plz check the same...

Regards,

Nagaraj

Read only

Former Member
0 Likes
402

Hi,

Declare 3 internal tables as below

IT_MARA with fields MATNR, ERSDA, ERNAM

IT_MAKT with fields MATNR, MAKTX

IT_EKKO with fields EBELN, MATNR

Now you have MATNR as the common field in all the tables.

Select Required data from MARA, MAKT, EKKO

Loop at EKKO table.

Read entry from MARA Internal table where MATNR = WA_EKKO-MATNR.

If entry exist move data to final internal table.

Read Entry from MAKT internal table where MATNR = WA_EKKO-MATNR.

If entry exist move data to final internal table.

Append Final Internal table

Endloop.

Regards,

Satish

Read only

Former Member
0 Likes
402

Tx