MS04, MD04 for multiple materials (ALV Report)

642
Intelligent iot

MS04, MD04 for multiple materials (ALV Report)

Example ALV report use Call Function

Use Call function make to ALV report.

Purpose:

ALV report get result like MD04 or MS04 with parameter is multiple materials. Report use to check Receipt/ Requirement/ Consumption/ Schedule MRP/ Planned Order/ Goods Receipt MRP… etc…

Prerequisite:

  • Transaction Code: SE38, SE37, MS04, MD04
  • Function Module: (BAPI)  BAPI_MATERIAL_STOCK_REQ_LIST
  • Access Key to create program report: get Access key via Installaion Number and software Keygen R/3 or register SAP for User to generate Access Key (Recommend)

Step by step to create program:

Go to SE37 – Enter Function Module: BAPI_MATERIAL_STOCK_REQ_LIST

MD04 for multiple materials
MD04 for multiple materials

Click F8 to Test/Excute

Fill Parameter and Excute to get result of Function Module

MD04 for multiple materials
MD04 for multiple materials

Go to transaction code SE38, Create Program ZMD04.

MD04 for multiple materials

Copy code below & Paste to program.

Click Check to ensure all code is correct.

Note

If message from system when checking code is error. Use ‘ ZMD04.txt’ ( Attachment in this post ) >> replace all code by content in txt file. Main reason of error is ‘SPACE’ & ‘TAB’.

MD04 for multiple materials

Save & Test (Direct Processing) >> Active

How to change Selection Texts of Report

MD04 for multiple materials

MD04 for multiple materials

This is result !

MD04 for multiple materials MD04 for multiple materials

UPDATE

Add base unit column to report.

  • Declare MEINS 

TYPES MEINS TYPE MARA-MEINS.

  • Add this code to ‘Loop’ 

LS_VIEWMEINS LS_MATNRMEINS.

  • Add this code to FIELDCAT

WA_FIELDCAT-FIELDNAME = ‘MEINS’.
WA_FIELDCAT-SELTEXT_L = ‘Base Unit’.
WA_FIELDCAT-COL_POS = 3.
APPEND WA_FIELDCAT TO IT_FIELDCAT.

Check and Active again.

How to assign another program to transaction code. Similarly content in post SAP Query step by step.

LEAVE A REPLY

Please enter your comment!
Please enter your name here