SAP EW_TH_WPINFO Function Module for Call TH_WP_INFO by RFC from an External System
EW_TH_WPINFO is a standard ew th wpinfo SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Call TH_WP_INFO by RFC from an External System 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 ew th wpinfo FM, simply by entering the name EW_TH_WPINFO into the relevant SAP transaction such as SE37 or SE38.
Function Group: STUN
Program Name: SAPLSTUN
Main Program: SAPLSTUN
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function EW_TH_WPINFO 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 'EW_TH_WPINFO'"Call TH_WP_INFO by RFC from an External System.
EXPORTING
* DESTINATION = 'NONE' "
WITH_CPU = "
IMPORTING
SYSID = "
TABLES
WPLIST = "
EXCEPTIONS
ARGUMENT_ERROR = 1 SEND_ERROR = 2
IMPORTING Parameters details for EW_TH_WPINFO
DESTINATION -
Data type: RFCDES-RFCDESTDefault: 'NONE'
Optional: Yes
Call by Reference: No ( called with pass by value option)
WITH_CPU -
Data type: TSKH_DUMMY-WITH_CPUOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for EW_TH_WPINFO
SYSID -
Data type: SY-SYSIDOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for EW_TH_WPINFO
WPLIST -
Data type: WPINFOOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
ARGUMENT_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
SEND_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for EW_TH_WPINFO 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_sysid | TYPE SY-SYSID, " | |||
| lt_wplist | TYPE STANDARD TABLE OF WPINFO, " | |||
| lv_destination | TYPE RFCDES-RFCDEST, " 'NONE' | |||
| lv_argument_error | TYPE RFCDES, " | |||
| lv_with_cpu | TYPE TSKH_DUMMY-WITH_CPU, " | |||
| lv_send_error | TYPE TSKH_DUMMY. " |
|   CALL FUNCTION 'EW_TH_WPINFO' "Call TH_WP_INFO by RFC from an External System |
| EXPORTING | ||
| DESTINATION | = lv_destination | |
| WITH_CPU | = lv_with_cpu | |
| IMPORTING | ||
| SYSID | = lv_sysid | |
| TABLES | ||
| WPLIST | = lt_wplist | |
| EXCEPTIONS | ||
| ARGUMENT_ERROR = 1 | ||
| SEND_ERROR = 2 | ||
| . " EW_TH_WPINFO | ||
ABAP code using 7.40 inline data declarations to call FM EW_TH_WPINFO
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 SYSID FROM SY INTO @DATA(ld_sysid). | ||||
| "SELECT single RFCDEST FROM RFCDES INTO @DATA(ld_destination). | ||||
| DATA(ld_destination) | = 'NONE'. | |||
| "SELECT single WITH_CPU FROM TSKH_DUMMY INTO @DATA(ld_with_cpu). | ||||
Search for further information about these or an SAP related objects