SAP MASTERIDOC_CREATE_VALSCALE Function Module for Create master IDoc for Value and Quota Scale









MASTERIDOC_CREATE_VALSCALE is a standard masteridoc create valscale SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Create master IDoc for Value and Quota Scale processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for masteridoc create valscale FM, simply by entering the name MASTERIDOC_CREATE_VALSCALE into the relevant SAP transaction such as SE37 or SE38.

Function Group: WMVAL
Program Name: SAPLWMVAL
Main Program:
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function MASTERIDOC_CREATE_VALSCALE pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'MASTERIDOC_CREATE_VALSCALE'"Create master IDoc for Value and Quota Scale
EXPORTING
IN_WMWK_MAINTAIN = "Value Scales Header Maintenance

IMPORTING
CREATED_COMM_IDOCS = "Internal table, current line index

TABLES
IN_T_WMWKT_MAINTAIN = "Value Scale Header Text maintenance
IN_T_WMWP_MAINTAIN = "Value Scale Item data Maintenance
IN_T_WMQK_MAINTAIN = "Quota SCale Header Maintenance
IN_T_WMQKT_MAINTAIN = "Quota Scale Header Text Maintenance
IN_T_WMQP_MAINTAIN = "Quota Scale Item Data Maintenance
IN_T_TWMWQ_MAINTAIN = "Valid Quota SCale per Site/Merchandise Categories Maint.
IN_T_RECEIVERS = "IDOC REceivers

EXCEPTIONS
NO_DISTRIBUTION = 1 ERROR_CREATING_IDOCS = 2
.



IMPORTING Parameters details for MASTERIDOC_CREATE_VALSCALE

IN_WMWK_MAINTAIN - Value Scales Header Maintenance

Data type: WMWK_MAINTAIN
Optional: No
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for MASTERIDOC_CREATE_VALSCALE

CREATED_COMM_IDOCS - Internal table, current line index

Data type: SY-TFILL
Optional: No
Call by Reference: Yes

TABLES Parameters details for MASTERIDOC_CREATE_VALSCALE

IN_T_WMWKT_MAINTAIN - Value Scale Header Text maintenance

Data type: WMWKT_MAINTAIN
Optional: No
Call by Reference: Yes

IN_T_WMWP_MAINTAIN - Value Scale Item data Maintenance

Data type: WMWP_MAINTAIN
Optional: No
Call by Reference: Yes

IN_T_WMQK_MAINTAIN - Quota SCale Header Maintenance

Data type: WMQK_MAINTAIN
Optional: No
Call by Reference: Yes

IN_T_WMQKT_MAINTAIN - Quota Scale Header Text Maintenance

Data type: WMQKT_MAINTAIN
Optional: No
Call by Reference: Yes

IN_T_WMQP_MAINTAIN - Quota Scale Item Data Maintenance

Data type: WMQP_MAINTAIN
Optional: No
Call by Reference: Yes

IN_T_TWMWQ_MAINTAIN - Valid Quota SCale per Site/Merchandise Categories Maint.

Data type: TWMWQ_MAINTAIN
Optional: No
Call by Reference: Yes

IN_T_RECEIVERS - IDOC REceivers

Data type: BDI_LOGSYS
Optional: No
Call by Reference: Yes

EXCEPTIONS details

NO_DISTRIBUTION - No Value scale data to send.

Data type:
Optional: No
Call by Reference: Yes

ERROR_CREATING_IDOCS - Error when generating the IDocs

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for MASTERIDOC_CREATE_VALSCALE Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.

DATA:
lv_no_distribution  TYPE STRING, "   
lv_in_wmwk_maintain  TYPE WMWK_MAINTAIN, "   
lv_created_comm_idocs  TYPE SY-TFILL, "   
lt_in_t_wmwkt_maintain  TYPE STANDARD TABLE OF WMWKT_MAINTAIN, "   
lt_in_t_wmwp_maintain  TYPE STANDARD TABLE OF WMWP_MAINTAIN, "   
lv_error_creating_idocs  TYPE WMWP_MAINTAIN, "   
lt_in_t_wmqk_maintain  TYPE STANDARD TABLE OF WMQK_MAINTAIN, "   
lt_in_t_wmqkt_maintain  TYPE STANDARD TABLE OF WMQKT_MAINTAIN, "   
lt_in_t_wmqp_maintain  TYPE STANDARD TABLE OF WMQP_MAINTAIN, "   
lt_in_t_twmwq_maintain  TYPE STANDARD TABLE OF TWMWQ_MAINTAIN, "   
lt_in_t_receivers  TYPE STANDARD TABLE OF BDI_LOGSYS. "   

  CALL FUNCTION 'MASTERIDOC_CREATE_VALSCALE'  "Create master IDoc for Value and Quota Scale
    EXPORTING
         IN_WMWK_MAINTAIN = lv_in_wmwk_maintain
    IMPORTING
         CREATED_COMM_IDOCS = lv_created_comm_idocs
    TABLES
         IN_T_WMWKT_MAINTAIN = lt_in_t_wmwkt_maintain
         IN_T_WMWP_MAINTAIN = lt_in_t_wmwp_maintain
         IN_T_WMQK_MAINTAIN = lt_in_t_wmqk_maintain
         IN_T_WMQKT_MAINTAIN = lt_in_t_wmqkt_maintain
         IN_T_WMQP_MAINTAIN = lt_in_t_wmqp_maintain
         IN_T_TWMWQ_MAINTAIN = lt_in_t_twmwq_maintain
         IN_T_RECEIVERS = lt_in_t_receivers
    EXCEPTIONS
        NO_DISTRIBUTION = 1
        ERROR_CREATING_IDOCS = 2
. " MASTERIDOC_CREATE_VALSCALE




ABAP code using 7.40 inline data declarations to call FM MASTERIDOC_CREATE_VALSCALE

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

 
 
"SELECT single TFILL FROM SY INTO @DATA(ld_created_comm_idocs).
 
 
 
 
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!