‎2005 Nov 17 11:35 AM
Hi Friends,
I would like to know how to generate a goods movement report which has the select-options for material number,(plant & posting date )which are mandatory,movement type,material type,material group.
My output would contain:
plant,material no,description,unit ofmeasure,
openingstocks(qty & amt),goods receipts(qty & amt),goods issues(qty&amt),closing stocks(qty & amt). i would like if anybody could throw some light on this issue.
Thanks,
Vinay
‎2005 Nov 17 11:56 AM
‎2005 Nov 17 11:56 AM
‎2005 Nov 17 11:59 AM
Hi,
You can create Goods movement with the help of the following BAPI
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
GOODSMVT_HEADER = GOODSMVT_HEADER
GOODSMVT_CODE = GOODSMVT_CODE
TESTRUN = ' '
IMPORTING
GOODSMVT_HEADRET = GOODSMVT_HEADRET
MATERIALDOCUMENT =
MATDOCUMENTYEAR =
TABLES
GOODSMVT_ITEM = GOODSMVT_ITEM
GOODSMVT_SERIALNUMBER =
RETURN = IT_ERRMSG.
And regarding the population of all the BAPI structures,
Its clearly given in the BAPI FM Documentation.
You can have clear look at the Documentation.
‎2005 Nov 17 12:26 PM
hi,
To give goods movement report you can use MKPF and MSEG ( Material document) tables. this table will contain all your selection screen fields. Based on those values you can read all the goods movents details.
rajkumar abbu
‎2005 Nov 17 12:31 PM
HI Vinayak,
Here is a skeleton of the program you need to have
Start-of-selection.
Select data from MKPF and MSEG tables into internal tables based on the select options defined.
End-of-selection.
Write the report.
Regards,
Ravi
‎2005 Nov 17 3:03 PM
Hi,
Yoc can select the data from MKPF & MSEG base on the selection criteria you mention.
or used the FM BAPI_GOODSMVT_GETITEMS to get the details.
Thanks
Rajeev
‎2005 Nov 17 3:16 PM
Or you could just look at transaction MB51 as a great place to start.
Good luck!
Terry