SAP SWA_CONT_BIND_ELEMENTS_ASSIGN Function Module for
SWA_CONT_BIND_ELEMENTS_ASSIGN is a standard swa cont bind elements assign SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 swa cont bind elements assign FM, simply by entering the name SWA_CONT_BIND_ELEMENTS_ASSIGN into the relevant SAP transaction such as SE37 or SE38.
Function Group: SWA1
Program Name: SAPLSWA1
Main Program: SAPLSWA1
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function SWA_CONT_BIND_ELEMENTS_ASSIGN 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 'SWA_CONT_BIND_ELEMENTS_ASSIGN'".
EXPORTING
CALLED_CONTTYPE = "Container type of container called
CALLING_CONTTYPE = "Container type of calling container
* DATAFLOW = 'E' "Export to/import from container called
* CALLED_ELEMTYPE = 'I' "Type of container elements in called container
* CALLING_ELEMTYPE = 'I' "Type of container elements in calling container
* CALLED_CONTAINER_IF = "Container - Implementation of a 'Collection'
* CALLING_CONTAINER_IF = "Container - Implementation of a 'Collection'
IMPORTING
SWF_BINDING = "Table with Binding Definitions, Persistent Form
TABLES
* BINDEFINITION = "Binding definition
* CALLED_CONTDEF = "Container definition of container called
* CALLING_CONTDEF = "Container definition of calling container
EXCEPTIONS
UNGUILTY_BINDINGTYPE = 1 INCONSISTENT_BINDINGDEFINITION = 2
IMPORTING Parameters details for SWA_CONT_BIND_ELEMENTS_ASSIGN
CALLED_CONTTYPE - Container type of container called
Data type: SWC_CONTTPOptional: No
Call by Reference: No ( called with pass by value option)
CALLING_CONTTYPE - Container type of calling container
Data type: SWC_CONTTPOptional: No
Call by Reference: No ( called with pass by value option)
DATAFLOW - Export to/import from container called
Data type: SWA_DAFLOWDefault: 'E'
Optional: Yes
Call by Reference: No ( called with pass by value option)
CALLED_ELEMTYPE - Type of container elements in called container
Data type: SWC_ELEMTPDefault: 'I'
Optional: Yes
Call by Reference: No ( called with pass by value option)
CALLING_ELEMTYPE - Type of container elements in calling container
Data type: SWC_ELEMTPDefault: 'I'
Optional: Yes
Call by Reference: No ( called with pass by value option)
CALLED_CONTAINER_IF - Container - Implementation of a 'Collection'
Data type: IF_SWF_CNT_CONTAINEROptional: Yes
Call by Reference: No ( called with pass by value option)
CALLING_CONTAINER_IF - Container - Implementation of a 'Collection'
Data type: IF_SWF_CNT_CONTAINEROptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for SWA_CONT_BIND_ELEMENTS_ASSIGN
SWF_BINDING - Table with Binding Definitions, Persistent Form
Data type: SWFBNDPTABOptional: No
Call by Reference: Yes
TABLES Parameters details for SWA_CONT_BIND_ELEMENTS_ASSIGN
BINDEFINITION - Binding definition
Data type: SWABINDEFOptional: Yes
Call by Reference: Yes
CALLED_CONTDEF - Container definition of container called
Data type: SWCONTDEFOptional: Yes
Call by Reference: Yes
CALLING_CONTDEF - Container definition of calling container
Data type: SWCONTDEFOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
UNGUILTY_BINDINGTYPE - Invalid binding definition (according to LSWA1D00)
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INCONSISTENT_BINDINGDEFINITION - Binding def. for called container inconsistent
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for SWA_CONT_BIND_ELEMENTS_ASSIGN 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_swf_binding | TYPE SWFBNDPTAB, " | |||
| lt_bindefinition | TYPE STANDARD TABLE OF SWABINDEF, " | |||
| lv_called_conttype | TYPE SWC_CONTTP, " | |||
| lv_unguilty_bindingtype | TYPE SWC_CONTTP, " | |||
| lt_called_contdef | TYPE STANDARD TABLE OF SWCONTDEF, " | |||
| lv_calling_conttype | TYPE SWC_CONTTP, " | |||
| lv_inconsistent_bindingdefinition | TYPE SWC_CONTTP, " | |||
| lv_dataflow | TYPE SWA_DAFLOW, " 'E' | |||
| lt_calling_contdef | TYPE STANDARD TABLE OF SWCONTDEF, " | |||
| lv_called_elemtype | TYPE SWC_ELEMTP, " 'I' | |||
| lv_calling_elemtype | TYPE SWC_ELEMTP, " 'I' | |||
| lv_called_container_if | TYPE IF_SWF_CNT_CONTAINER, " | |||
| lv_calling_container_if | TYPE IF_SWF_CNT_CONTAINER. " |
|   CALL FUNCTION 'SWA_CONT_BIND_ELEMENTS_ASSIGN' " |
| EXPORTING | ||
| CALLED_CONTTYPE | = lv_called_conttype | |
| CALLING_CONTTYPE | = lv_calling_conttype | |
| DATAFLOW | = lv_dataflow | |
| CALLED_ELEMTYPE | = lv_called_elemtype | |
| CALLING_ELEMTYPE | = lv_calling_elemtype | |
| CALLED_CONTAINER_IF | = lv_called_container_if | |
| CALLING_CONTAINER_IF | = lv_calling_container_if | |
| IMPORTING | ||
| SWF_BINDING | = lv_swf_binding | |
| TABLES | ||
| BINDEFINITION | = lt_bindefinition | |
| CALLED_CONTDEF | = lt_called_contdef | |
| CALLING_CONTDEF | = lt_calling_contdef | |
| EXCEPTIONS | ||
| UNGUILTY_BINDINGTYPE = 1 | ||
| INCONSISTENT_BINDINGDEFINITION = 2 | ||
| . " SWA_CONT_BIND_ELEMENTS_ASSIGN | ||
ABAP code using 7.40 inline data declarations to call FM SWA_CONT_BIND_ELEMENTS_ASSIGN
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.| DATA(ld_dataflow) | = 'E'. | |||
| DATA(ld_called_elemtype) | = 'I'. | |||
| DATA(ld_calling_elemtype) | = 'I'. | |||
Search for further information about these or an SAP related objects