SAP Function Modules

EXIT_SAPLM61W_001 SAP Function module - Changes to Forecast Values After Running the Forecast







EXIT_SAPLM61W_001 is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name EXIT_SAPLM61W_001 into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: XW61
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM EXIT_SAPLM61W_001 - EXIT SAPLM61W 001





CALL FUNCTION 'EXIT_SAPLM61W_001' "Changes to Forecast Values After Running the Forecast
* EXPORTING
*   i_rm61w =                   " rm61w
*   i_progdat =                 " prop-prdat
* TABLES
*   t_vergwerte =               "
*   t_meldungen =               " imeld
*   t_ablauf =                  " imeld
*   t_prognose =                " iprog
* CHANGING
*   c_prog_param =              " pcom
  EXCEPTIONS
    ERROR_IN_APPLICATION = 1    "
    .  "  EXIT_SAPLM61W_001

ABAP code example for Function Module EXIT_SAPLM61W_001





The ABAP code below is a full code listing to execute function module EXIT_SAPLM61W_001 including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).

DATA:
it_t_vergwerte  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_t_vergwerte  LIKE LINE OF it_t_vergwerte ,
it_t_meldungen  TYPE STANDARD TABLE OF IMELD,"TABLES PARAM
wa_t_meldungen  LIKE LINE OF it_t_meldungen ,
it_t_ablauf  TYPE STANDARD TABLE OF IMELD,"TABLES PARAM
wa_t_ablauf  LIKE LINE OF it_t_ablauf ,
it_t_prognose  TYPE STANDARD TABLE OF IPROG,"TABLES PARAM
wa_t_prognose  LIKE LINE OF it_t_prognose .

DATA(ld_c_prog_param) = 'Check type of data required'.
DATA(ld_i_rm61w) = 'Check type of data required'.

SELECT single PRDAT
FROM PROP
INTO @DATA(ld_i_progdat).


"populate fields of struture and append to itab
append wa_t_vergwerte to it_t_vergwerte.

"populate fields of struture and append to itab
append wa_t_meldungen to it_t_meldungen.

"populate fields of struture and append to itab
append wa_t_ablauf to it_t_ablauf.

"populate fields of struture and append to itab
append wa_t_prognose to it_t_prognose. . CALL FUNCTION 'EXIT_SAPLM61W_001' * EXPORTING * i_rm61w = ld_i_rm61w * i_progdat = ld_i_progdat * TABLES * t_vergwerte = it_t_vergwerte * t_meldungen = it_t_meldungen * t_ablauf = it_t_ablauf * t_prognose = it_t_prognose * CHANGING * c_prog_param = ld_c_prog_param EXCEPTIONS ERROR_IN_APPLICATION = 1 . " EXIT_SAPLM61W_001
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_c_prog_param  TYPE PCOM ,
ld_i_rm61w  TYPE RM61W ,
it_t_vergwerte  TYPE STANDARD TABLE OF STRING ,
wa_t_vergwerte  LIKE LINE OF it_t_vergwerte,
ld_i_progdat  TYPE PROP-PRDAT ,
it_t_meldungen  TYPE STANDARD TABLE OF IMELD ,
wa_t_meldungen  LIKE LINE OF it_t_meldungen,
it_t_ablauf  TYPE STANDARD TABLE OF IMELD ,
wa_t_ablauf  LIKE LINE OF it_t_ablauf,
it_t_prognose  TYPE STANDARD TABLE OF IPROG ,
wa_t_prognose  LIKE LINE OF it_t_prognose.

ld_c_prog_param = 'Check type of data required'.
ld_i_rm61w = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_vergwerte to it_t_vergwerte.

SELECT single PRDAT
FROM PROP
INTO ld_i_progdat.


"populate fields of struture and append to itab
append wa_t_meldungen to it_t_meldungen.

"populate fields of struture and append to itab
append wa_t_ablauf to it_t_ablauf.

"populate fields of struture and append to itab
append wa_t_prognose to it_t_prognose.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name EXIT_SAPLM61W_001 or its description.