Application Development 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: 

Custom report to get MD04 but for n materials

marcoantonio_romerosanche
Active Participant
0 Kudos

Dear All...

Do you know if already exist a report that show same information than the MD04?

Is needed to put several material numbers and get the MD04 information to can do sorts, filters, download to excel.

Is like the MDLD transaction but instead to print it, have the ability to save it in a excel file.

The Idea is to have a customized report that can be run by 1 or more materials and show like a "photo" on how is MD04 now.

Have you a case like this?

How I can create that report?

Any idea?

9 REPLIES 9

0 Kudos

You can create the custom report and use bapi BAPI_MATERIAL_STOCK_REQ_LIST to get MD04 data.

Also check function module MD_STOCK_REQUIREMENTS_LIST_API. It can be helpfull

Regards

marcoantonio_romerosanche
Active Participant
0 Kudos

There is an example on how to use those 2 functions to make that report?

BAPI_MATERIAL_STOCK_REQ_LIST and the MD_STOCK_REQUIREMENTS_LIST_API.

0 Kudos

BAPI_MATERIAL_STOCK_REQ_LIST gives you all data of MD04.

MD_STOCK_REQUIREMENTS_LIST_API is a FM that is called inside BAPI_MATERIAL_STOCK_REQ_LIST and returns only details of a element (when you click magnifying glass icon in MD04).

You should test both FMs in SE37 transaction providing it a material and a plant(optional), and check what import data you need.

CALL FUNCTION 'MD_STOCK_REQUIREMENTS_LIST_API'

EXPORTING

MATNR = p_matnr

WERKS = p_werks

IMPORTING

E_MT61D = wa_mt61d

  • E_MDKP =

  • E_CM61M =

E_MDSTA = wa_mdsta

  • E_ERGBZ =

  • TABLES

  • MDPSX =

  • MDEZX =

  • MDSUX =

EXCEPTIONS

MATERIAL_PLANT_NOT_FOUND = 1

PLANT_NOT_FOUND = 2

OTHERS = 3.

This is a little example of the FM call.

Note that function modules only receive a single material, so in your report you must call the function as many times as materials you have and store return items in internal tables before you display them.

marcoantonio_romerosanche
Active Participant
0 Kudos

Thanks a lot for the information.!!!

0 Kudos

Dear Team ,

I used the above mentioned Function module/s but these default the results to Available Qty for all the list of materials.

Is there a way to have a report to see the Goods Receipt results for n materials through the Custom Report.

I have Quality Inspection (GR processing time) involved.

Available Date/Qty = GR Qty/ GR date + GR Processing days

0 Kudos

Dear Team ,

I used the above mentioned Function module/s but these default the results to Available Qty for all the list of materials.

Is there a way to have a report to see the Goods Receipt results for n materials through the Custom Report.

I have Quality Inspection (GR processing time) involved.

Available Date/Qty = GR Qty/ GR date + GR Processing days

0 Kudos

Dear Team ,

I used the above mentioned Function module/s but these default the results to Available Qty for all the list of materials.

Is there a way to have a report to see the Goods Receipt results for n materials through the Custom Report.

I have Quality Inspection (GR processing time) involved.

Available Date/Qty = GR Qty/ GR date + GR Processing days

0 Kudos

I have the same requirement. I need to see the MRP data by GR date, not AV date. Can someone tell us if ther is a parameter on the call that would return the MRP data by GR date?

0 Kudos

After calling the mentioned function modules, use FM MD_VF_TERMIN_SWITCH.

Regards,

Wiel Ramaekers