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

regarding internal tables

Former Member
0 Likes
682

Hi i want to show out put as matnr menge(quantity) and costing lotsize(losgr).

i have menge and matnr in mseg table and losgr in marc table...how i can display these three in my final internal table...

Hi i want to show out put as matnr menge(quantity) and costing lotsize(losgr).

i have menge and matnr in mseg table and losgr in marc table...how i can display these three in my final internal table...

4 REPLIES 4
Read only

Former Member
0 Likes
640

hi..

first create an internal table with the final structure and writing the select query with inner join you can be able to display all those fields in ur internal table.

thanks

Ashu

Read only

Former Member
0 Likes
640

Hai,

Use Inner Join u ll get the answer.

SELECT AMENGE AMATNR B~LOSGR INTO CORRESPONDING FIELDS OF TABLE itab

FROM MSEG AS A INNER JOIN MARC AS B

ON A<common field in MSEG & MARC> = b<common field in MSEG & MARC>

Regards,

Padmam.

Read only

Former Member
0 Likes
640

Hi

Write a Query like this..

select matnr werks lgort lotsize from marc inti table it_marc where <Give All Cond.>

select mblnr zeite matnr menge from mseg inti table it_mseg for all entries in it_marc where matnr = it_marc-matnr and <give all cond>..

Check for duplicate here because matnr is not a key in mseg table. debug it and see it will be correct..

Reward All Helpfull Answers...........

Read only

Former Member
0 Likes
640

use for all entries... suppose you have got the value from mseg table in imseg.

now

declare imarc int table with matnr and losgr.

select matnr losgr into table imarc from marc for all entries in imseg where matnr = imseg-matnr.

now ..

declare ifinal for all the data you need.

loop at imseg.

move-corresponding imseg to ifinal.

read table imarc with key matnr = imseg-matnr.

ifinal-losgr = imarc-losgr.

<or you can use write dtatement to show the data here>

append ifinal.

clear ifinal.

endloop.

regards

shiba dutta