SAP EXIT_SAPLWAP0_002 Function Module for Appointments: User Exit for Calculating the Appointment Length for POs
EXIT_SAPLWAP0_002 is a standard exit saplwap0 002 SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Appointments: User Exit for Calculating the Appointment Length for POs 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 exit saplwap0 002 FM, simply by entering the name EXIT_SAPLWAP0_002 into the relevant SAP transaction such as SE37 or SE38.
Function Group: XWAP
Program Name: SAPLXWAP
Main Program:
Appliation area: W
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function EXIT_SAPLWAP0_002 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 'EXIT_SAPLWAP0_002'"Appointments: User Exit for Calculating the Appointment Length for POs.
EXPORTING
I_EKKO = "Order document: header data
I_DURATION = "Length calculated previously in seconds
I_TWAP1 = "Appointments profile
* I_DATAB = "Starting date of appointment
* I_UHRAB = "Starting time of appointment
IMPORTING
E_DURATION = "Length calculated in seconds
TABLES
T_EKPO = "Order document: item data
T_EKET = "Order document: schedule lines
T_EKES = "Order document: confirmations
EXCEPTIONS
NO_DURATION_CALCULATED = 1
Related Function Modules
Below is a list of related SAP function modules this CUSTOMER FUNCTION exit / user exit is relevant for.W_APPOINTMENT_CHECK_OVERLAP NOTRANSL: Torbelegungen: Prüfen Terminkollision auf der Datenbank
W_APPOINTMENT_CREATE_PO NOTRANSL: Torbelegungen: automatisches Anlegen für Bestellbelege
W_APPOINTMENT_CREATE_SN NOTRANSL: Torbelegungen: autom. Anlegen einer Torbelegung zum Lieferav. /
W_APPOINTMENT_DELIVERY_DELETE NOTRANSL: Torbelegungen: Löschen der Torbelegung
W_APPOINTMENT_DISPLAY_SN NOTRANSL: Torbelegungen: Anzeige aus der Anlieferung
W_APPOINTMENT_DOCUMENT_INFO NOTRANSL: Torbelegungen: Anreichern der Torbelegungen mit Belegdaten
W_APPOINTMENT_DUE_LIST Appointments: Worklist
W_APPOINTMENT_GET_LOAD NOTRANSL: Torbelegungen: Arbeitslast für Belege (Bestellung, Anlieferung,
W_APPOINTMENT_MAINTAIN_GANTT Appointments: Display and maintain with planning board (Gantt chart)
W_APPOINTMENT_MAINTAIN_SINGLE NOTRANSL: Torbelegungen: Einzelpflege einer Torbelegung
W_APPOINTMENT_PRE_CHECK NOTRANSL: Torbelegungen: Prüfungen der Selektionskriterien
W_APPOINTMENT_REGISTRATION NOTRANSL: Torbelegungen: Registrierung
W_APPOINTMENT_SELECT NOTRANSL: Torbelegungen: Selektieren von Torbelegungen
W_APPOINTMENT_SELECT_SINGLE NOTRANSL: Torbelegungen: Selektieren Torbelegungen zu einem Beleg
W_APPOINTMENT_TIME_PROPOSAL NOTRANSL: Torbelegungen: Zeitvorschlag
IMPORTING Parameters details for EXIT_SAPLWAP0_002
I_EKKO - Order document: header data
Data type: EKKOOptional: No
Call by Reference: No ( called with pass by value option)
I_DURATION - Length calculated previously in seconds
Data type: RWAP4-DURATOptional: No
Call by Reference: No ( called with pass by value option)
I_TWAP1 - Appointments profile
Data type: TWAP1Optional: No
Call by Reference: No ( called with pass by value option)
I_DATAB - Starting date of appointment
Data type: WAPPT-DATABOptional: Yes
Call by Reference: No ( called with pass by value option)
I_UHRAB - Starting time of appointment
Data type: WAPPT-UHRABOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for EXIT_SAPLWAP0_002
E_DURATION - Length calculated in seconds
Data type: RWAP4-DURATOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for EXIT_SAPLWAP0_002
T_EKPO - Order document: item data
Data type: EKPOOptional: No
Call by Reference: No ( called with pass by value option)
T_EKET - Order document: schedule lines
Data type: EKETOptional: No
Call by Reference: No ( called with pass by value option)
T_EKES - Order document: confirmations
Data type: EKESOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_DURATION_CALCULATED - The length of the appointment could not be calculated
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for EXIT_SAPLWAP0_002 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_i_ekko | TYPE EKKO, " | |||
lt_t_ekpo | TYPE STANDARD TABLE OF EKPO, " | |||
lv_e_duration | TYPE RWAP4-DURAT, " | |||
lv_no_duration_calculated | TYPE RWAP4, " | |||
lt_t_eket | TYPE STANDARD TABLE OF EKET, " | |||
lv_i_duration | TYPE RWAP4-DURAT, " | |||
lt_t_ekes | TYPE STANDARD TABLE OF EKES, " | |||
lv_i_twap1 | TYPE TWAP1, " | |||
lv_i_datab | TYPE WAPPT-DATAB, " | |||
lv_i_uhrab | TYPE WAPPT-UHRAB. " |
  CALL FUNCTION 'EXIT_SAPLWAP0_002' "Appointments: User Exit for Calculating the Appointment Length for POs |
EXPORTING | ||
I_EKKO | = lv_i_ekko | |
I_DURATION | = lv_i_duration | |
I_TWAP1 | = lv_i_twap1 | |
I_DATAB | = lv_i_datab | |
I_UHRAB | = lv_i_uhrab | |
IMPORTING | ||
E_DURATION | = lv_e_duration | |
TABLES | ||
T_EKPO | = lt_t_ekpo | |
T_EKET | = lt_t_eket | |
T_EKES | = lt_t_ekes | |
EXCEPTIONS | ||
NO_DURATION_CALCULATED = 1 | ||
. " EXIT_SAPLWAP0_002 |
ABAP code using 7.40 inline data declarations to call FM EXIT_SAPLWAP0_002
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 DURAT FROM RWAP4 INTO @DATA(ld_e_duration). | ||||
"SELECT single DURAT FROM RWAP4 INTO @DATA(ld_i_duration). | ||||
"SELECT single DATAB FROM WAPPT INTO @DATA(ld_i_datab). | ||||
"SELECT single UHRAB FROM WAPPT INTO @DATA(ld_i_uhrab). | ||||
Search for further information about these or an SAP related objects