SAP EHS003_SET_DATA_SD Function Module for NOTRANSL: EHS: Datenübergabe SD nach EH&S
EHS003_SET_DATA_SD is a standard ehs003 set data sd 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: EHS: Datenübergabe SD nach EH&S 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 ehs003 set data sd FM, simply by entering the name EHS003_SET_DATA_SD into the relevant SAP transaction such as SE37 or SE38.
Function Group: EHS003
Program Name: SAPLEHS003
Main Program: SAPLEHS003
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function EHS003_SET_DATA_SD 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 'EHS003_SET_DATA_SD'"NOTRANSL: EHS: Datenübergabe SD nach EH&S.
EXPORTING
* I_VBAK_VBTYP = "SD document category
I_POSNR = "Item Number of the SD Document
* I_LIKP_VBTYP = "SD document category
I_TVAK_FEHGR = "Incompletion procedure for sales document
I_TRTYP = "Transaction Type
* I_FEHLER = "
* I_FEHLERFELD = "Sales documents: Table field name
* I_TC_SELLINE = "Screens, current table line index
* I_SHP_CURSOR = "Char20
* I_SHP_CURSOR_LINE = "Screens, current table line index
TABLES
I_XVBUVTAB = "Structure for Internal Table XVBUV
I_DVBUVTAB = "Structure for Internal Table XVBUV
I_HVBUVTAB = "Structure for Internal Table XVBUV
EXCEPTIONS
OTHERS_ = 1
IMPORTING Parameters details for EHS003_SET_DATA_SD
I_VBAK_VBTYP - SD document category
Data type: VBAK-VBTYPOptional: Yes
Call by Reference: Yes
I_POSNR - Item Number of the SD Document
Data type: POSNROptional: No
Call by Reference: Yes
I_LIKP_VBTYP - SD document category
Data type: LIKP-VBTYPOptional: Yes
Call by Reference: Yes
I_TVAK_FEHGR - Incompletion procedure for sales document
Data type: TVAK-FEHGROptional: No
Call by Reference: Yes
I_TRTYP - Transaction Type
Data type: T180-TRTYPOptional: No
Call by Reference: Yes
I_FEHLER -
Data type: COptional: Yes
Call by Reference: Yes
I_FEHLERFELD - Sales documents: Table field name
Data type: TBFDNAM_VBOptional: Yes
Call by Reference: Yes
I_TC_SELLINE - Screens, current table line index
Data type: SY-STEPLOptional: Yes
Call by Reference: Yes
I_SHP_CURSOR - Char20
Data type: SHP_CURSOR-FIELDNAMEOptional: Yes
Call by Reference: Yes
I_SHP_CURSOR_LINE - Screens, current table line index
Data type: SHP_CURSOR-LINEOptional: Yes
Call by Reference: Yes
TABLES Parameters details for EHS003_SET_DATA_SD
I_XVBUVTAB - Structure for Internal Table XVBUV
Data type: VBUVVBOptional: No
Call by Reference: Yes
I_DVBUVTAB - Structure for Internal Table XVBUV
Data type: VBUVVBOptional: No
Call by Reference: Yes
I_HVBUVTAB - Structure for Internal Table XVBUV
Data type: VBUVVBOptional: No
Call by Reference: Yes
EXCEPTIONS details
OTHERS_ - Internal Error
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for EHS003_SET_DATA_SD 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_others_ | TYPE STRING, " | |||
| lt_i_xvbuvtab | TYPE STANDARD TABLE OF VBUVVB, " | |||
| lv_i_vbak_vbtyp | TYPE VBAK-VBTYP, " | |||
| lv_i_posnr | TYPE POSNR, " | |||
| lt_i_dvbuvtab | TYPE STANDARD TABLE OF VBUVVB, " | |||
| lv_i_likp_vbtyp | TYPE LIKP-VBTYP, " | |||
| lt_i_hvbuvtab | TYPE STANDARD TABLE OF VBUVVB, " | |||
| lv_i_tvak_fehgr | TYPE TVAK-FEHGR, " | |||
| lv_i_trtyp | TYPE T180-TRTYP, " | |||
| lv_i_fehler | TYPE C, " | |||
| lv_i_fehlerfeld | TYPE TBFDNAM_VB, " | |||
| lv_i_tc_selline | TYPE SY-STEPL, " | |||
| lv_i_shp_cursor | TYPE SHP_CURSOR-FIELDNAME, " | |||
| lv_i_shp_cursor_line | TYPE SHP_CURSOR-LINE. " |
|   CALL FUNCTION 'EHS003_SET_DATA_SD' "NOTRANSL: EHS: Datenübergabe SD nach EH&S |
| EXPORTING | ||
| I_VBAK_VBTYP | = lv_i_vbak_vbtyp | |
| I_POSNR | = lv_i_posnr | |
| I_LIKP_VBTYP | = lv_i_likp_vbtyp | |
| I_TVAK_FEHGR | = lv_i_tvak_fehgr | |
| I_TRTYP | = lv_i_trtyp | |
| I_FEHLER | = lv_i_fehler | |
| I_FEHLERFELD | = lv_i_fehlerfeld | |
| I_TC_SELLINE | = lv_i_tc_selline | |
| I_SHP_CURSOR | = lv_i_shp_cursor | |
| I_SHP_CURSOR_LINE | = lv_i_shp_cursor_line | |
| TABLES | ||
| I_XVBUVTAB | = lt_i_xvbuvtab | |
| I_DVBUVTAB | = lt_i_dvbuvtab | |
| I_HVBUVTAB | = lt_i_hvbuvtab | |
| EXCEPTIONS | ||
| OTHERS_ = 1 | ||
| . " EHS003_SET_DATA_SD | ||
ABAP code using 7.40 inline data declarations to call FM EHS003_SET_DATA_SD
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 VBTYP FROM VBAK INTO @DATA(ld_i_vbak_vbtyp). | ||||
| "SELECT single VBTYP FROM LIKP INTO @DATA(ld_i_likp_vbtyp). | ||||
| "SELECT single FEHGR FROM TVAK INTO @DATA(ld_i_tvak_fehgr). | ||||
| "SELECT single TRTYP FROM T180 INTO @DATA(ld_i_trtyp). | ||||
| "SELECT single STEPL FROM SY INTO @DATA(ld_i_tc_selline). | ||||
| "SELECT single FIELDNAME FROM SHP_CURSOR INTO @DATA(ld_i_shp_cursor). | ||||
| "SELECT single LINE FROM SHP_CURSOR INTO @DATA(ld_i_shp_cursor_line). | ||||
Search for further information about these or an SAP related objects