SAP MD_SET_ACTION_PLAF Function Module for NOTRANSL: Setzen Aktion im Planauftrag
MD_SET_ACTION_PLAF is a standard md set action plaf SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Setzen Aktion im Planauftrag 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 md set action plaf FM, simply by entering the name MD_SET_ACTION_PLAF into the relevant SAP transaction such as SE37 or SE38.
Function Group: M61O
Program Name: SAPLM61O
Main Program: SAPLM61O
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function MD_SET_ACTION_PLAF 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 'MD_SET_ACTION_PLAF'"NOTRANSL: Setzen Aktion im Planauftrag.
EXPORTING
IPLNUM = "Number of planned order to be processed
* IACCTO = ' ' "Action to be Executed
* IAENKZ = ' ' "Change planned order data yes ('X'), no (' ')
* IVBKZ = 'X' "Post changes yet ('X'), no
* IMDCD = "New planned order data
TABLES
* TMDACCTO = "Table of actions to be executed
* TSERNR = "
EXCEPTIONS
ILLEGAL_INTERFACE = 1
IMPORTING Parameters details for MD_SET_ACTION_PLAF
IPLNUM - Number of planned order to be processed
Data type: PLAF-PLNUMOptional: No
Call by Reference: No ( called with pass by value option)
IACCTO - Action to be Executed
Data type: T46AC-ACCTODefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IAENKZ - Change planned order data yes ('X'), no (' ')
Data type: CM61Q-AENKZDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IVBKZ - Post changes yet ('X'), no
Data type: SY-DATARDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
IMDCD - New planned order data
Data type: MDCDOptional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for MD_SET_ACTION_PLAF
TMDACCTO - Table of actions to be executed
Data type: MDACCTOOptional: Yes
Call by Reference: No ( called with pass by value option)
TSERNR -
Data type: E1RMSNOOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
ILLEGAL_INTERFACE - Invalid interface data
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for MD_SET_ACTION_PLAF 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_iplnum | TYPE PLAF-PLNUM, " | |||
| lt_tmdaccto | TYPE STANDARD TABLE OF MDACCTO, " | |||
| lv_illegal_interface | TYPE MDACCTO, " | |||
| lv_iaccto | TYPE T46AC-ACCTO, " SPACE | |||
| lt_tsernr | TYPE STANDARD TABLE OF E1RMSNO, " | |||
| lv_iaenkz | TYPE CM61Q-AENKZ, " SPACE | |||
| lv_ivbkz | TYPE SY-DATAR, " 'X' | |||
| lv_imdcd | TYPE MDCD. " |
|   CALL FUNCTION 'MD_SET_ACTION_PLAF' "NOTRANSL: Setzen Aktion im Planauftrag |
| EXPORTING | ||
| IPLNUM | = lv_iplnum | |
| IACCTO | = lv_iaccto | |
| IAENKZ | = lv_iaenkz | |
| IVBKZ | = lv_ivbkz | |
| IMDCD | = lv_imdcd | |
| TABLES | ||
| TMDACCTO | = lt_tmdaccto | |
| TSERNR | = lt_tsernr | |
| EXCEPTIONS | ||
| ILLEGAL_INTERFACE = 1 | ||
| . " MD_SET_ACTION_PLAF | ||
ABAP code using 7.40 inline data declarations to call FM MD_SET_ACTION_PLAF
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 PLNUM FROM PLAF INTO @DATA(ld_iplnum). | ||||
| "SELECT single ACCTO FROM T46AC INTO @DATA(ld_iaccto). | ||||
| DATA(ld_iaccto) | = ' '. | |||
| "SELECT single AENKZ FROM CM61Q INTO @DATA(ld_iaenkz). | ||||
| DATA(ld_iaenkz) | = ' '. | |||
| "SELECT single DATAR FROM SY INTO @DATA(ld_ivbkz). | ||||
| DATA(ld_ivbkz) | = 'X'. | |||
Search for further information about these or an SAP related objects