‎2009 May 27 12:02 PM
Hi,
I need to extract from SAP all 551/552 movement types from jan 09 to date that have not been done through the upload process i.e MB10 and MB11 are not on the document.
Please assist with the code to so?
‎2009 May 27 12:46 PM
Hello Mpangib,
Try this code.
SELECT *
FROM mbew
INTO CORRESPONDING FIELDS OF TABLE i_mbew
WHERE bwkey = <variable>
* AND bwtar = ' '. "Valuation Type.
IF sy-subrc = 0.
SELECT *
FROM mseg
INTO CORRESPONDING FIELDS OF TABLE i_mseg
FOR ALL ENTRIES IN i_mbew
WHERE MJAHR = '2009'
* AND shkzg = 'S'. "Only Debit Account Will be Picked with 'S'.
AND bwart BETWEEN '551' and '552'.
* AND BWTAR = ' '. "Valuation Type.
Hope this helps.
Cheers,
Suvendu
‎2009 May 27 12:08 PM
Hi
I need to extract from SAP all 551/552 movement types from jan 09 to date that have not been done through the upload process i.e MB10 and MB11 are not on the document.
Use table join between MKPF and MSEG. Provide date as input and movement type as input to the select query.
E.g.
Select matnr bwart budat ..
from mseg as a inner join mkpf on aMBLNR = bMBLNR
where ( bwart = 551 or bwart = 552 )
and budat in s_budat
Hope this will help to solve your problem.
Regards,
Vijay
‎2009 May 27 12:46 PM
Hello Mpangib,
Try this code.
SELECT *
FROM mbew
INTO CORRESPONDING FIELDS OF TABLE i_mbew
WHERE bwkey = <variable>
* AND bwtar = ' '. "Valuation Type.
IF sy-subrc = 0.
SELECT *
FROM mseg
INTO CORRESPONDING FIELDS OF TABLE i_mseg
FOR ALL ENTRIES IN i_mbew
WHERE MJAHR = '2009'
* AND shkzg = 'S'. "Only Debit Account Will be Picked with 'S'.
AND bwart BETWEEN '551' and '552'.
* AND BWTAR = ' '. "Valuation Type.
Hope this helps.
Cheers,
Suvendu
‎2009 Jun 03 2:53 PM
Hi,
I still need assistance with this question, anyone to assist?