SAP Reports / Programs

RMCAMUSE SAP ABAP Report - Safety stock calculation







RMCAMUSE is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). It is used for Sample Report for Generating Coding to Calculate the Safety Stock The report generated for a concrete info structure (&GSTRU) performs the following: Selects from the "fixed" characteristics of the info structure Choice of two versions Choice of two key figure fields Definition a date interval Selects (restricts set of values) the variable characteristics in the info structure (choice of specific materials, plants, etc...see full standard documentation available for this report. Also check out the submitted Comments related to this SAP report and the details below to see which OBJECTS it interacts with such as TABLES, FUNCTION MODULES, INCLUDES ETC.

If you would like to execute this report or see the full code listing simply enter RMCAMUSE into the relevant SAP transactions such as SE38 or SE80


ABAP code to call this SAP report using the submit statement

This report can be called from another progam/report simply by using the ABAP SUBMIT statement, see below for example ABAP code snipts of how to do this.






SUBMIT RMCAMUSE. "Basic submit
SUBMIT RMCAMUSE AND RETURN. "Return to original report after report execution complete
SUBMIT RMCAMUSE VIA SELECTION-SCREEN. "Display selection screen of submitted report to user
    See more syntax options for the ABAP SUBMIT statement


Text pool values


Selection Text: D_ARTYP = Industry sector
Selection Text: D_KUNNR = Customer number
Selection Text: D_MARKE = Brand
Selection Text: D_MATNR = Material number
Selection Text: D_REGIO = Sales market
Selection Text: D_VERPA = Size
Selection Text: KENNZ1 = Key fig. 1
Selection Text: KENNZ2 = Key fig. 2
Selection Text: KENNZAHL = Key figure
Selection Text: KUNDENNR = Customer number
Selection Text: MCSRUME = Method
Selection Text: TYP1 = Average stock
Selection Text: TYP2 = Current stock
Selection Text: TYP3 = Self-defined
Selection Text: VERSION = Version
Selection Text: VERSION1 = Version 1
Selection Text: VERSION2 = Version 2
Selection Text: VON = Date: from - to
Title: Safety stock calculation
Text Symbol: 215 = Safety stock
Text Symbol: 214 = Plnt
Text Symbol: 213 = Material
Text Symbol: 212 = Key fig. 2
Text Symbol: 211 = Key fig. 1
Text Symbol: 001 = Active version
Text Symbol: 002 = Inactive version
Text Symbol: 003 = Characteristics in info structure
Text Symbol: 004 = Further selection criteria
Text Symbol: 005 = Version
Text Symbol: 006 = Further selection criteria
Text Symbol: 007 = Analysis chars
Text Symbol: 008 = Statistic(s) origin
Text Symbol: 009 = Period to analyze - month
Text Symbol: 010 = Period to analyze - day time reference
Text Symbol: 011 = Period to analyze - week
Text Symbol: 012 = Period to analyze - posting period
Text Symbol: 100 = Date: from - to
Text Symbol: 200 = Info struct.





Text Symbol: 201 = Posting period
Text Symbol: 202 = Period to anal.
Text Symbol: 203 = Day
Text Symbol: 204 = Month
Text Symbol: 205 = Week
Text Symbol: 206 = Self-defined periods
Text Symbol: 207 = Fiscal year variant
Text Symbol: 208 = To
Text Symbol: 209 = Version 1
Text Symbol: 210 = Version 2


INCLUDES used within this REPORT RMCAMUSE

No INCLUDES are used within this REPORT code!


TABLES used within REPORT and the associated SELECT statement:

No SAP DATABASE tables are accessed within this REPORT code!


Function Modules used within report and the associated call statement:

HELP_VALUES_GET_FROM_LIST *+ CALL FUNCTION 'HELP_VALUES_GET_FROM_LIST' *+ EXPORTING *+ DISPLAY = ' ' *+ FIELDNAME = FIELDNAME *+ TABNAME = TABNAME *+ SHRINK = 'X' *+ IMPORTING *+ SELECT_VALUE = SEL_VALUE *+ TABLES *+ SHRINKFIELDS = SFIELDS.

HELP_VALUES_GET_FROM_LIST *+ CALL FUNCTION 'HELP_VALUES_GET_FROM_LIST' *+ EXPORTING *+ DISPLAY = ' ' *+ FIELDNAME = FIELDNAME *+ TABNAME = TABNAME *+ SHRINK = 'X' *+ IMPORTING *+ SELECT_VALUE = SEL_VALUE *+ TABLES *+ SHRINKFIELDS = SFIELDS.

HELP_VALUES_GET_FROM_LIST *+ CALL FUNCTION 'HELP_VALUES_GET_FROM_LIST' *+ EXPORTING *+ DISPLAY = ' ' *+ FIELDNAME = FIELDNAME *+ TABNAME = TABNAME *+ SHRINK = 'X' *+ IMPORTING *+ SELECT_VALUE = SEL_VALUE *+ TABLES *+ SHRINKFIELDS = SFIELDS.

HELP_VALUES_GET_FROM_LIST *+ CALL FUNCTION 'HELP_VALUES_GET_FROM_LIST' *+ EXPORTING *+ DISPLAY = ' ' *+ FIELDNAME = FIELDNAME *+ TABNAME = TABNAME *+ SHRINK = 'X' *+ IMPORTING *+ SELECT_VALUE = SEL_VALUE *+ TABLES *+ SHRINKFIELDS = SFIELDS.

MC_UNIT_CONVERSION CALL FUNCTION 'MC_UNIT_CONVERSION' EXPORTING MATNR = T_CONV-MATNR NACH_MEINS = T_CONV-NACH_UNIT VON_MEINS = T_CONV-VON_UNIT IMPORTING UMREF = T_CONV-UMREF EXCEPTIONS OTHERS = 1.

MC_UNIT_CONVERSION CALL FUNCTION 'MC_UNIT_CONVERSION' EXPORTING MATNR = T_CONV-MATNR NACH_MEINS = T_CONV-NACH_UNIT VON_MEINS = T_CONV-VON_UNIT IMPORTING UMREF = T_CONV-UMREF EXCEPTIONS OTHERS = 1.

EXIT_SAPMMDRP_001 CALL FUNCTION 'EXIT_SAPMMDRP_001' EXPORTING I_MT61D = SS_MT61D I_LGRAD = SS_LGRAD IMPORTING SAFETY_STOCK = SAFETY_STOCK E_FLG = SS_FLG TABLES TIME_SERIES = TIME_SERIES EXCEPTIONS OTHERS = 0.

DISPSATZ_ERSTELLEN CALL FUNCTION 'DISPSATZ_ERSTELLEN' EXPORTING WA = MDCP.

MC_PERIODE_ZUM_DATUM CALL FUNCTION 'MC_PERIODE_ZUM_DATUM' EXPORTING IDATE = RD_VON_DAT IPERKZ = RD_HLP_PERKZ IPERIV = RD_PERIV IMPORTING EPERID = RD_VON_PER.

MC_PERIODE_ZUM_DATUM CALL FUNCTION 'MC_PERIODE_ZUM_DATUM' EXPORTING IDATE = RD_VON_DAT IPERKZ = RD_HLP_PERKZ IPERIV = RD_PERIV IMPORTING EPERID = RD_VON_PER.

MC_PERIODE_ZUM_DATUM CALL FUNCTION 'MC_PERIODE_ZUM_DATUM' EXPORTING IDATE = RD_BIS_DAT IPERKZ = RD_HLP_PERKZ IPERIV = RD_PERIV IMPORTING EPERID = RD_BIS_PER.

MC_PERIODE_ZUM_DATUM CALL FUNCTION 'MC_PERIODE_ZUM_DATUM' EXPORTING IDATE = RD_BIS_DAT IPERKZ = RD_HLP_PERKZ IPERIV = RD_PERIV IMPORTING EPERID = RD_BIS_PER.

MATERIAL_READ CALL FUNCTION 'MATERIAL_READ' EXPORTING SCHLUESSEL = MTCOM IMPORTING MATDATEN = MT06E RETURN = MTCOR TABLES SEQMAT01 = TDUMMY EXCEPTIONS OTHERS = 1.








Contribute (Add Comments)

Although this basic information may have limited use it does provide an easy to find location to store any knowledge about this program/report.

The contribute/comments section below therefore offer's an opportunity for anyone to add additional information. This can be anything from useful hints, tips and screen shots to relevant SAP notes or anything else you feel is relevant to this report.

This will then be available for everyone to easily find by simply searching on the report name RMCAMUSE or its description.