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

Steps to create a query

Former Member
0 Likes
445

Hi ,

i need to bulid a query for tc : mb51 , tables mch1 and mska , query is to pull a field licha on to mb51 transaction.May i know the steps pls..

Thxs,

vind.

Hi ,

i need to bulid a query for tc : mb51 , tables mch1 and mska , query is to pull a field licha on to mb51 transaction.May i know the steps pls..

Thxs,

vind.

1 REPLY 1
Read only

Former Member
0 Likes
399

Hi,

MB51 uses the data from MKPF and MSEG tables.

Take the MATNR CHARG and LIFNR fields from MSEG and pass them to MCH1 table to get the LICHA field.

If MSEG data is in Int table ITAB.

if not ITAB[] is initial.

select matnr charg lifnr licha from mch1 into table <itab2>

for all entries in ITAB where

matnr = itab-matnr and

charg = itab-charg and

lifnr = itab-lifnr.

endif.

Then read the licha with key fields and add into final data int table.

Regards,

Anji