SAP APO_SCHEDULING Function Module for NOTRANSL: Aufruf der APO Versandterminierung
APO_SCHEDULING is a standard apo scheduling 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: Aufruf der APO Versandterminierung 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 apo scheduling FM, simply by entering the name APO_SCHEDULING into the relevant SAP transaction such as SE37 or SE38.
Function Group: V03C_APOINT
Program Name: SAPLV03C_APOINT
Main Program: SAPLV03C_APOINT
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function APO_SCHEDULING 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 'APO_SCHEDULING'"NOTRANSL: Aufruf der APO Versandterminierung.
EXPORTING
IF_VBELN = "Sales and Distribution Document Number
* IF_LOADING_DATE = "Loading Date
* IF_LOADING_TIME = "Loading Time (Local Time Relating to a Shipping Point)
* IF_GOODS_ISSUE_DATE = "Goods Issue Date
* IF_GOODS_ISSUE_TIME = "Time of Goods Issue (Local, Relating to a Plant)
* IF_DELIVERY_DATE = "Schedule Line Date
* IF_DELIVERY_TIME = "Arrival time
* IF_UNLOADING_DATE = "Goods Receipt End Date
* IF_UNLOADING_TIME = "Goods Receipt End Time (Local, Relating to a Plant)
IS_ATTRIBUTES = "Attributes for Shipment Scheduling
* IS_OPTIONS = "Options for Delivery Scheduling
IF_POSNR = "Item Number of the SD Document
* IF_DATE_TODAY = SY-DATLO "DE-EN-LANG-SWITCH-NO-TRANSLATION
* IF_TIME_TODAY = SY-TIMLO "DE-EN-LANG-SWITCH-NO-TRANSLATION
* IF_TZ_TODAY = SY-ZONLO "DE-EN-LANG-SWITCH-NO-TRANSLATION
IF_DIRECTION = "DE-EN-LANG-SWITCH-NO-TRANSLATION
* IF_SCHEDULE_SHIPPING = 'X' "Activate delivery scheduling
* IF_SCHEDULE_TRANSPORT = 'X' "Activate transportation scheduling
* IF_MATERIAL_AVAIL_DATE = "Material Staging/Availability Date
* IF_MATERIAL_AVAIL_TIME = "Material Staging Time (Local, Relating to a Plant)
* IF_TRANSPORT_DISPO_DATE = "Transportation Planning Date
* IF_TRANSPORT_DISPO_TIME = "Transp. Planning Time (Local, Relating to a Shipping Point)
IMPORTING
EF_SCHEDULE_APO = "DE-EN-LANG-SWITCH-NO-TRANSLATION
ES_TIMETAGS = "Times for Shipment Scheduling
ES_TRANSPORT = "Shipment Scheduling: Relevant Shipment Attributes
ES_ROUTING_GUIDE_DATA = "DE-EN-LANG-SWITCH-NO-TRANSLATION
EXCEPTIONS
MISSING_DATE = 1 RFC_ERROR = 2
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLV03C_APOINT_001 Scheduling: Populate User Exit with Additional R/3 Attributes
IMPORTING Parameters details for APO_SCHEDULING
IF_VBELN - Sales and Distribution Document Number
Data type: LIKP-VBELNOptional: No
Call by Reference: No ( called with pass by value option)
IF_LOADING_DATE - Loading Date
Data type: VBEP-LDDATOptional: Yes
Call by Reference: No ( called with pass by value option)
IF_LOADING_TIME - Loading Time (Local Time Relating to a Shipping Point)
Data type: VBEP-LDUHROptional: Yes
Call by Reference: No ( called with pass by value option)
IF_GOODS_ISSUE_DATE - Goods Issue Date
Data type: VBEP-WADATOptional: Yes
Call by Reference: No ( called with pass by value option)
IF_GOODS_ISSUE_TIME - Time of Goods Issue (Local, Relating to a Plant)
Data type: VBEP-WAUHROptional: Yes
Call by Reference: No ( called with pass by value option)
IF_DELIVERY_DATE - Schedule Line Date
Data type: VBEP-EDATUOptional: Yes
Call by Reference: No ( called with pass by value option)
IF_DELIVERY_TIME - Arrival time
Data type: VBEP-EZEITOptional: Yes
Call by Reference: No ( called with pass by value option)
IF_UNLOADING_DATE - Goods Receipt End Date
Data type: ELDATOptional: Yes
Call by Reference: No ( called with pass by value option)
IF_UNLOADING_TIME - Goods Receipt End Time (Local, Relating to a Plant)
Data type: ELUHROptional: Yes
Call by Reference: No ( called with pass by value option)
IS_ATTRIBUTES - Attributes for Shipment Scheduling
Data type: SCHEDULE_ATTRIBUTESOptional: No
Call by Reference: No ( called with pass by value option)
IS_OPTIONS - Options for Delivery Scheduling
Data type: SCHEDOPTIONSOptional: Yes
Call by Reference: No ( called with pass by value option)
IF_POSNR - Item Number of the SD Document
Data type: LIPS-POSNROptional: No
Call by Reference: No ( called with pass by value option)
IF_DATE_TODAY - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: SY-DATLODefault: SY-DATLO
Optional: Yes
Call by Reference: No ( called with pass by value option)
IF_TIME_TODAY - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: SY-TIMLODefault: SY-TIMLO
Optional: Yes
Call by Reference: No ( called with pass by value option)
IF_TZ_TODAY - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: TTZZ-TZONEDefault: SY-ZONLO
Optional: Yes
Call by Reference: No ( called with pass by value option)
IF_DIRECTION - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: SCAL-INDICATOROptional: No
Call by Reference: No ( called with pass by value option)
IF_SCHEDULE_SHIPPING - Activate delivery scheduling
Data type: TVAK-VSTRMDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
IF_SCHEDULE_TRANSPORT - Activate transportation scheduling
Data type: TVAK-TRTRMDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
IF_MATERIAL_AVAIL_DATE - Material Staging/Availability Date
Data type: VBEP-MBDATOptional: Yes
Call by Reference: No ( called with pass by value option)
IF_MATERIAL_AVAIL_TIME - Material Staging Time (Local, Relating to a Plant)
Data type: VBEP-MBUHROptional: Yes
Call by Reference: No ( called with pass by value option)
IF_TRANSPORT_DISPO_DATE - Transportation Planning Date
Data type: VBEP-TDDATOptional: Yes
Call by Reference: No ( called with pass by value option)
IF_TRANSPORT_DISPO_TIME - Transp. Planning Time (Local, Relating to a Shipping Point)
Data type: VBEP-TDUHROptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for APO_SCHEDULING
EF_SCHEDULE_APO - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: ATP00-XFELDOptional: No
Call by Reference: Yes
ES_TIMETAGS - Times for Shipment Scheduling
Data type: SCHEDULE_TIMETAGSOptional: No
Call by Reference: No ( called with pass by value option)
ES_TRANSPORT - Shipment Scheduling: Relevant Shipment Attributes
Data type: SCHEDULE_TRANSPORTOptional: No
Call by Reference: No ( called with pass by value option)
ES_ROUTING_GUIDE_DATA - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: SROUTING_GUIDE_DATAOptional: No
Call by Reference: Yes
EXCEPTIONS details
MISSING_DATE - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type:Optional: No
Call by Reference: Yes
RFC_ERROR - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for APO_SCHEDULING 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_if_vbeln | TYPE LIKP-VBELN, " | |||
| lv_missing_date | TYPE LIKP, " | |||
| lv_ef_schedule_apo | TYPE ATP00-XFELD, " | |||
| lv_if_loading_date | TYPE VBEP-LDDAT, " | |||
| lv_if_loading_time | TYPE VBEP-LDUHR, " | |||
| lv_if_goods_issue_date | TYPE VBEP-WADAT, " | |||
| lv_if_goods_issue_time | TYPE VBEP-WAUHR, " | |||
| lv_if_delivery_date | TYPE VBEP-EDATU, " | |||
| lv_if_delivery_time | TYPE VBEP-EZEIT, " | |||
| lv_if_unloading_date | TYPE ELDAT, " | |||
| lv_if_unloading_time | TYPE ELUHR, " | |||
| lv_is_attributes | TYPE SCHEDULE_ATTRIBUTES, " | |||
| lv_is_options | TYPE SCHEDOPTIONS, " | |||
| lv_if_posnr | TYPE LIPS-POSNR, " | |||
| lv_rfc_error | TYPE LIPS, " | |||
| lv_es_timetags | TYPE SCHEDULE_TIMETAGS, " | |||
| lv_if_date_today | TYPE SY-DATLO, " SY-DATLO | |||
| lv_if_time_today | TYPE SY-TIMLO, " SY-TIMLO | |||
| lv_if_tz_today | TYPE TTZZ-TZONE, " SY-ZONLO | |||
| lv_es_transport | TYPE SCHEDULE_TRANSPORT, " | |||
| lv_if_direction | TYPE SCAL-INDICATOR, " | |||
| lv_if_schedule_shipping | TYPE TVAK-VSTRM, " 'X' | |||
| lv_es_routing_guide_data | TYPE SROUTING_GUIDE_DATA, " | |||
| lv_if_schedule_transport | TYPE TVAK-TRTRM, " 'X' | |||
| lv_if_material_avail_date | TYPE VBEP-MBDAT, " | |||
| lv_if_material_avail_time | TYPE VBEP-MBUHR, " | |||
| lv_if_transport_dispo_date | TYPE VBEP-TDDAT, " | |||
| lv_if_transport_dispo_time | TYPE VBEP-TDUHR. " |
|   CALL FUNCTION 'APO_SCHEDULING' "NOTRANSL: Aufruf der APO Versandterminierung |
| EXPORTING | ||
| IF_VBELN | = lv_if_vbeln | |
| IF_LOADING_DATE | = lv_if_loading_date | |
| IF_LOADING_TIME | = lv_if_loading_time | |
| IF_GOODS_ISSUE_DATE | = lv_if_goods_issue_date | |
| IF_GOODS_ISSUE_TIME | = lv_if_goods_issue_time | |
| IF_DELIVERY_DATE | = lv_if_delivery_date | |
| IF_DELIVERY_TIME | = lv_if_delivery_time | |
| IF_UNLOADING_DATE | = lv_if_unloading_date | |
| IF_UNLOADING_TIME | = lv_if_unloading_time | |
| IS_ATTRIBUTES | = lv_is_attributes | |
| IS_OPTIONS | = lv_is_options | |
| IF_POSNR | = lv_if_posnr | |
| IF_DATE_TODAY | = lv_if_date_today | |
| IF_TIME_TODAY | = lv_if_time_today | |
| IF_TZ_TODAY | = lv_if_tz_today | |
| IF_DIRECTION | = lv_if_direction | |
| IF_SCHEDULE_SHIPPING | = lv_if_schedule_shipping | |
| IF_SCHEDULE_TRANSPORT | = lv_if_schedule_transport | |
| IF_MATERIAL_AVAIL_DATE | = lv_if_material_avail_date | |
| IF_MATERIAL_AVAIL_TIME | = lv_if_material_avail_time | |
| IF_TRANSPORT_DISPO_DATE | = lv_if_transport_dispo_date | |
| IF_TRANSPORT_DISPO_TIME | = lv_if_transport_dispo_time | |
| IMPORTING | ||
| EF_SCHEDULE_APO | = lv_ef_schedule_apo | |
| ES_TIMETAGS | = lv_es_timetags | |
| ES_TRANSPORT | = lv_es_transport | |
| ES_ROUTING_GUIDE_DATA | = lv_es_routing_guide_data | |
| EXCEPTIONS | ||
| MISSING_DATE = 1 | ||
| RFC_ERROR = 2 | ||
| . " APO_SCHEDULING | ||
ABAP code using 7.40 inline data declarations to call FM APO_SCHEDULING
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 VBELN FROM LIKP INTO @DATA(ld_if_vbeln). | ||||
| "SELECT single XFELD FROM ATP00 INTO @DATA(ld_ef_schedule_apo). | ||||
| "SELECT single LDDAT FROM VBEP INTO @DATA(ld_if_loading_date). | ||||
| "SELECT single LDUHR FROM VBEP INTO @DATA(ld_if_loading_time). | ||||
| "SELECT single WADAT FROM VBEP INTO @DATA(ld_if_goods_issue_date). | ||||
| "SELECT single WAUHR FROM VBEP INTO @DATA(ld_if_goods_issue_time). | ||||
| "SELECT single EDATU FROM VBEP INTO @DATA(ld_if_delivery_date). | ||||
| "SELECT single EZEIT FROM VBEP INTO @DATA(ld_if_delivery_time). | ||||
| "SELECT single POSNR FROM LIPS INTO @DATA(ld_if_posnr). | ||||
| "SELECT single DATLO FROM SY INTO @DATA(ld_if_date_today). | ||||
| DATA(ld_if_date_today) | = SY-DATLO. | |||
| "SELECT single TIMLO FROM SY INTO @DATA(ld_if_time_today). | ||||
| DATA(ld_if_time_today) | = SY-TIMLO. | |||
| "SELECT single TZONE FROM TTZZ INTO @DATA(ld_if_tz_today). | ||||
| DATA(ld_if_tz_today) | = SY-ZONLO. | |||
| "SELECT single INDICATOR FROM SCAL INTO @DATA(ld_if_direction). | ||||
| "SELECT single VSTRM FROM TVAK INTO @DATA(ld_if_schedule_shipping). | ||||
| DATA(ld_if_schedule_shipping) | = 'X'. | |||
| "SELECT single TRTRM FROM TVAK INTO @DATA(ld_if_schedule_transport). | ||||
| DATA(ld_if_schedule_transport) | = 'X'. | |||
| "SELECT single MBDAT FROM VBEP INTO @DATA(ld_if_material_avail_date). | ||||
| "SELECT single MBUHR FROM VBEP INTO @DATA(ld_if_material_avail_time). | ||||
| "SELECT single TDDAT FROM VBEP INTO @DATA(ld_if_transport_dispo_date). | ||||
| "SELECT single TDUHR FROM VBEP INTO @DATA(ld_if_transport_dispo_time). | ||||
Search for further information about these or an SAP related objects