‎2019 May 10 8:48 PM
Hi,
iam new to sap abap...
My Requirement :
in plant analysis i got difference value of the matnr :5.19
i saw in mseg table but it is stored as lgort as blank in mard the only one location 39 for particular material
Exaample:
in mard select entries
Matnr-210004, lgort-39, pstat-D, lvorm=null, LFGJA=2012 ,LFMON=12, Labst,Umlme,insmeeinme,retme(All Field) =0.00
mseg table :
Matnr-210004, lgort-Blank, Bwart-303 ,DMBTR-5.19, SHKZA-S (This field i need to join)
MSEG-MJAHR = MARD-LFGJA
but mseg-mjahr not matched with mard LFGJA
how can i join the table,... is there any alternative table
please help me
‎2019 May 12 4:29 AM
Can you please post your code? It helps us understand the problem.
‎2019 May 12 5:48 AM
Hai sai,
I want to join mard table with mseg table to get dmbtr field value.
Key for two table is
MSEG-MJAHR = MARD-LFGJA
but for particular material number
mseg and lfgja value not matched......
In mseg table
For Matnr-210004 mjahr is 2017
dmbtr 14
In mard table
For Matnr-210004 mjahr is 2015
How can I join the table to get dmbtr?
Pls help me
‎2019 May 12 6:12 AM
SELECT SINGLE DMBTR FROM MSEG as G INTO DATA(lv_mseg) INNER JOIN MARD as D WHERE G~MJAHR = '2017' AND D~MJAHR = '2015' AND G~MATNR = D~MATNR AND G~WERKS = D~WERKS AND G~LGORT = D~LGORT ( All the fields that match ).
** Please excuse the syntax I do not have my computer with me. **
Use the comments button to respond. The answer button is only for providing answers.
‎2019 May 12 6:27 AM
Hi sai,
Thank for ur reply. But Here plant is input. Year is not input. How can I match these table when year is different in both table.
The above year is just an example.
‎2019 May 13 10:01 AM