SAP /SCWM/API_CONDITION_REPLICATE Function Module for Packspec: API - Replicate Condition Records (Inbound)
/SCWM/API_CONDITION_REPLICATE is a standard /scwm/api condition replicate SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Packspec: API - Replicate Condition Records (Inbound) 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 /scwm/api condition replicate FM, simply by entering the name /SCWM/API_CONDITION_REPLICATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: /SCWM/PS_ALE
Program Name: /SCWM/SAPLPS_ALE
Main Program: /SCWM/SAPLPS_ALE
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function /SCWM/API_CONDITION_REPLICATE 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 '/SCWM/API_CONDITION_REPLICATE'"Packspec: API - Replicate Condition Records (Inbound).
EXPORTING
IT_CONDITION = "Table of Condition Headers
SENDER_SYSTEM = "Logical system
* IV_CREATE = "create condition record, upload mode
* IV_SESSION_ID = "
* IV_LOG = "
EXCEPTIONS
ERROR = 1
IMPORTING Parameters details for /SCWM/API_CONDITION_REPLICATE
IT_CONDITION - Table of Condition Headers
Data type: /SCWM/TT_API_CONDITION_HEADEROptional: No
Call by Reference: No ( called with pass by value option)
SENDER_SYSTEM - Logical system
Data type: TBDLS-LOGSYSOptional: No
Call by Reference: No ( called with pass by value option)
IV_CREATE - create condition record, upload mode
Data type: XFELDOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_SESSION_ID -
Data type: /SAPCND/MAINT_SESSION_IDOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_LOG -
Data type: BALLOGHNDLOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for /SCWM/API_CONDITION_REPLICATE 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_error | TYPE STRING, " | |||
| lv_it_condition | TYPE /SCWM/TT_API_CONDITION_HEADER, " | |||
| lv_sender_system | TYPE TBDLS-LOGSYS, " | |||
| lv_iv_create | TYPE XFELD, " | |||
| lv_iv_session_id | TYPE /SAPCND/MAINT_SESSION_ID, " | |||
| lv_iv_log | TYPE BALLOGHNDL. " |
|   CALL FUNCTION '/SCWM/API_CONDITION_REPLICATE' "Packspec: API - Replicate Condition Records (Inbound) |
| EXPORTING | ||
| IT_CONDITION | = lv_it_condition | |
| SENDER_SYSTEM | = lv_sender_system | |
| IV_CREATE | = lv_iv_create | |
| IV_SESSION_ID | = lv_iv_session_id | |
| IV_LOG | = lv_iv_log | |
| EXCEPTIONS | ||
| ERROR = 1 | ||
| . " /SCWM/API_CONDITION_REPLICATE | ||
ABAP code using 7.40 inline data declarations to call FM /SCWM/API_CONDITION_REPLICATE
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 LOGSYS FROM TBDLS INTO @DATA(ld_sender_system). | ||||
Search for further information about these or an SAP related objects