SAP Reports / Programs | Logistics - General | Logistics Basic Data | Material Master(LO-MD-MM) SAP LO

RMDATGEN SAP ABAP Report - Store Material in File







RMDATGEN is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). It is used for You use this program to write existing material master records in the system to a file...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 RMDATGEN into the relevant SAP transactions such as SE38 or SE80


Transaction Code(s):

Below is a list of transaction codes which are relevant to this SAP report

OMY1 - Create Input File from Material


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 RMDATGEN. "Basic submit
SUBMIT RMDATGEN AND RETURN. "Return to original report after report execution complete
SUBMIT RMDATGEN 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: USE_Z = Use ZMMH1
Selection Text: SET_PSTA = Copy maintenance statuses
Selection Text: PHY_NAME = Physical File Name
Selection Text: MYNODATA = NODATA indicator
Selection Text: MIT_VERB = With consumption values
Selection Text: MIT_PROG = With forecast values
Selection Text: MIT_EAN = With EANs
Selection Text: MATNR = Material number
Selection Text: LDS_NAME = Logical name
Selection Text: INV = Number assignment (I, E, N)
Selection Text: DEBUG = Display data file
Selection Text: CH_PR_DT = Future forecast values only
Title: Store Material in File
Text Symbol: 103 = with physical file name
Text Symbol: 102 = Write file to presentation server
Text Symbol: 101 = with logical file name
Text Symbol: 100 = Write file to application server
Text Symbol: 021 = Transaction
Text Symbol: 020 = Table
Text Symbol: 010 = Physical file name:
Text Symbol: 005 = Technical details
Text Symbol: 003 = General data
Text Symbol: 002 = Additional/main data
Text Symbol: 001 = General parameters


INCLUDES used within this REPORT RMDATGEN

INCLUDE RMMMBIMX.
INCLUDE RMDATIT1.
INCLUDE RMDATIT2.
INCLUDE RMMMBIMC.
INCLUDE RMMMBIMW.
INCLUDE RMDATGE1.


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:

DYNP_VALUES_READ CALL FUNCTION 'DYNP_VALUES_READ' EXPORTING dyname = d020s-prog dynumb = d020s-dnum TABLES dynpfields = dynp_value_tab EXCEPTIONS invalid_abapworkarea = 04 invalid_dynprofield = 08 invalid_dynproname = 12 invalid_dynpronummer = 16 invalid_request = 20 no_fielddescription = 24 undefind_error = 28. "#EC *

WS_FILENAME_GET CALL FUNCTION 'WS_FILENAME_GET' EXPORTING def_filename = space def_path = os_name mask = mask mode = 'O' title = text-005
IMPORTING filename = os_name
EXCEPTIONS inv_winsys = 04 no_batch = 08 selection_cancel = 12 selection_error = 16. "#EC *

FILE_LOGFILE_ALIAS_PAI CALL FUNCTION 'FILE_LOGFILE_ALIAS_PAI' EXPORTING ed_logfile_appl = lds_const_for_log_name CHANGING cd_logfile = lds_name EXCEPTIONS OTHERS = 1.

FILE_GET_NAME CALL FUNCTION 'FILE_GET_NAME' EXPORTING logical_filename = lds_name IMPORTING file_name = ds_name EXCEPTIONS file_not_found = 01.

FILE_VALIDATE_NAME CALL FUNCTION 'FILE_VALIDATE_NAME' "#EC EXISTS EXPORTING logical_filename = lds_const_for_phy_name CHANGING physical_filename = phy_name EXCEPTIONS others = 1.

STEUMMTAB_READ CALL FUNCTION 'STEUMMTAB_READ' EXPORTING kzrfb = x matnr = matnr TABLES steummtab = steumm_tab EXCEPTIONS OTHERS = 3. "#EC *

STEUERTAB_READ CALL FUNCTION 'STEUERTAB_READ' EXPORTING kzrfb = x matnr = matnr TABLES steuertab = stab EXCEPTIONS wrong_call = 01 steuertab_empty = 02. "#EC *

CF_ST_MAT_READ CALL FUNCTION 'CF_ST_MAT_READ' EXPORTING matnr_imp = mat werks_imp = werk IMPORTING mfhm_exp = mfhm EXCEPTIONS not_found = 1 wrong_parameter = 2 OTHERS = 3.

LESEN_PROGNOSE CALL FUNCTION 'LESEN_PROGNOSE' EXPORTING imaprf = maprf IMPORTING epropf = propf TABLES tprowf = i_prowf EXCEPTIONS OTHERS = 99.

CONVERSION_EXIT_ISOLA_OUTPUT CALL FUNCTION 'CONVERSION_EXIT_ISOLA_OUTPUT' " //br4.0

CONSUMPTION_READ_FOR_MM CALL FUNCTION 'CONSUMPTION_READ_FOR_MM' EXPORTING " KZRFB = ' ' matnr = matnr werks = werks perkz = i_marc-perkz periv = i_marc-periv " TODO TABLES ges_verb_tab = ges_verb_tab ung_verb_tab = ung_verb_tab EXCEPTIONS wrong_call = 01 not_found = 02.

DATE_GET_WEEK CALL FUNCTION 'DATE_GET_WEEK' EXPORTING date = datum IMPORTING week = week EXCEPTIONS date_invalid = 1 OTHERS = 2. "#EC *

PROGNOSEPERIODEN_ERMITTELN CALL FUNCTION 'PROGNOSEPERIODEN_ERMITTELN' EXPORTING eanzpr = 1 edatum = datum eperiv = periv " thk 30F PERIV instead of PERKZ TABLES pperx = int_pper EXCEPTIONS t009b_fehlerhaft = 01 t009_nicht_gefunden = 02.

SELECT_TEXT CALL FUNCTION 'SELECT_TEXT' EXPORTING id = id language = '*' name = hilf1 object = obj IMPORTING entries = ent TABLES selections = sel EXCEPTIONS wrong_access_to_archive = 01. "#EC *

READ_TEXT CALL FUNCTION 'READ_TEXT' EXPORTING id = sel-tdid language = sel-tdspras name = sel-tdname object = sel-tdobject IMPORTING header = se2 TABLES lines = lin EXCEPTIONS OTHERS = 07.

CONVERSION_EXIT_ISOLA_OUTPUT CALL FUNCTION 'CONVERSION_EXIT_ISOLA_OUTPUT' " //br4.0

TVKO_SINGLE_READ CALL FUNCTION 'TVKO_SINGLE_READ' EXPORTING vkorg = vkorg IMPORTING wtvko = l_tvko EXCEPTIONS not_found = 01.

T001_SINGLE_READ CALL FUNCTION 'T001_SINGLE_READ' EXPORTING bukrs = l_tvko-bukrs IMPORTING wt001 = l_t001 EXCEPTIONS not_found = 01 wrong_call = 02.

CURRENCY_CONVERTING_FACTOR





CALL FUNCTION 'CURRENCY_CONVERTING_FACTOR' EXPORTING currency = t001-waers IMPORTING factor = help_factor.

CURRENCY_CONVERTING_FACTOR CALL FUNCTION 'CURRENCY_CONVERTING_FACTOR' EXPORTING currency = t001-waers IMPORTING factor = help_factor.

MATERIAL_AKTVSTATUS CALL FUNCTION 'MATERIAL_AKTVSTATUS' EXPORTING irmmg1 = irmmg1 flg_erweitern = erweitern mara_vpsta = i_mara-vpsta IMPORTING aktvstatus = aktvstatus bisstatus = biststatus TABLES mtab = mtab EXCEPTIONS error = 1 OTHERS = 2.

FILE_LOGFILE_ALIAS_PBO CALL FUNCTION 'FILE_LOGFILE_ALIAS_PBO' EXPORTING ed_logfile_appl = lds_const_for_log_name ed_parameter_name = 'LDS_NAME' CHANGING cd_logfile_param = lds_name.

FILE_LOGFILE_ALIAS_F4 CALL FUNCTION 'FILE_LOGFILE_ALIAS_F4' EXPORTING ed_logfile_appl = lds_const_for_log_name ed_parameter_name = 'LDS_NAME' CHANGING cd_logical_file = lds_name.



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 RMDATGEN or its description.