SAP HU_POST Function Module for Post HUs when Last Test Completed Successfully
HU_POST is a standard hu post SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Post HUs when Last Test Completed Successfully 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 hu post FM, simply by entering the name HU_POST into the relevant SAP transaction such as SE37 or SE38.
Function Group: V51E
Program Name: SAPLV51E
Main Program: SAPLV51E
Appliation area: V
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function HU_POST 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 'HU_POST'"Post HUs when Last Test Completed Successfully.
EXPORTING
* IF_SYNCHRON = ' ' "Synchronous or Asynchronous Posting
* IF_COMMIT = ' ' "Commit after Posting
* IF_NO_RENAME = ' ' "No Object Switch
* IF_NO_MESSAGES = ' ' "No Message Determination
* IF_NO_REFRESH = ' ' "No Refresh of Pack Data
* IF_WM_TA_CONF = ' ' "
* IS_OBJECT = "Object for which the Packing Data are Posted
* IS_VBUK = "Status Table for Output Determination
* IT_VBPA = "Partner Table for Output Determination
IMPORTING
EF_NUMBER = "Number under which HUs are to be Posted
ES_EMKPF = "Material Document
ET_EMSEG = "Export Table for Material Document Posting
ET_MESSAGES = "Messages Occurred
ET_HEADER = "Table Type for Handling Units
ET_ITEMS = "Table Type for Handling Unit Items
IMPORTING Parameters details for HU_POST
IF_SYNCHRON - Synchronous or Asynchronous Posting
Data type: XFELDDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
IF_COMMIT - Commit after Posting
Data type: XFELDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IF_NO_RENAME - No Object Switch
Data type: XFELDDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
IF_NO_MESSAGES - No Message Determination
Data type: XFELDDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
IF_NO_REFRESH - No Refresh of Pack Data
Data type: XFELDDefault: SPACE
Optional: Yes
Call by Reference: Yes
IF_WM_TA_CONF -
Data type: XFELDDefault: SPACE
Optional: Yes
Call by Reference: Yes
IS_OBJECT - Object for which the Packing Data are Posted
Data type: HUM_OBJECTOptional: Yes
Call by Reference: No ( called with pass by value option)
IS_VBUK - Status Table for Output Determination
Data type: VBUKOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_VBPA - Partner Table for Output Determination
Data type: VSEP_T_VBPAOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for HU_POST
EF_NUMBER - Number under which HUs are to be Posted
Data type: VPOBJKEYOptional: No
Call by Reference: No ( called with pass by value option)
ES_EMKPF - Material Document
Data type: EMKPFOptional: No
Call by Reference: No ( called with pass by value option)
ET_EMSEG - Export Table for Material Document Posting
Data type: VSEP_T_EMSEGOptional: No
Call by Reference: No ( called with pass by value option)
ET_MESSAGES - Messages Occurred
Data type: HUITEM_MESSAGES_TOptional: No
Call by Reference: No ( called with pass by value option)
ET_HEADER - Table Type for Handling Units
Data type: HUM_HU_HEADER_TOptional: No
Call by Reference: Yes
ET_ITEMS - Table Type for Handling Unit Items
Data type: HUM_HU_ITEM_TOptional: No
Call by Reference: Yes
Copy and paste ABAP code example for HU_POST 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_ef_number | TYPE VPOBJKEY, " | |||
| lv_if_synchron | TYPE XFELD, " ' ' | |||
| lv_es_emkpf | TYPE EMKPF, " | |||
| lv_if_commit | TYPE XFELD, " SPACE | |||
| lv_et_emseg | TYPE VSEP_T_EMSEG, " | |||
| lv_if_no_rename | TYPE XFELD, " ' ' | |||
| lv_et_messages | TYPE HUITEM_MESSAGES_T, " | |||
| lv_if_no_messages | TYPE XFELD, " ' ' | |||
| lv_et_header | TYPE HUM_HU_HEADER_T, " | |||
| lv_if_no_refresh | TYPE XFELD, " SPACE | |||
| lv_et_items | TYPE HUM_HU_ITEM_T, " | |||
| lv_if_wm_ta_conf | TYPE XFELD, " SPACE | |||
| lv_is_object | TYPE HUM_OBJECT, " | |||
| lv_is_vbuk | TYPE VBUK, " | |||
| lv_it_vbpa | TYPE VSEP_T_VBPA. " |
|   CALL FUNCTION 'HU_POST' "Post HUs when Last Test Completed Successfully |
| EXPORTING | ||
| IF_SYNCHRON | = lv_if_synchron | |
| IF_COMMIT | = lv_if_commit | |
| IF_NO_RENAME | = lv_if_no_rename | |
| IF_NO_MESSAGES | = lv_if_no_messages | |
| IF_NO_REFRESH | = lv_if_no_refresh | |
| IF_WM_TA_CONF | = lv_if_wm_ta_conf | |
| IS_OBJECT | = lv_is_object | |
| IS_VBUK | = lv_is_vbuk | |
| IT_VBPA | = lv_it_vbpa | |
| IMPORTING | ||
| EF_NUMBER | = lv_ef_number | |
| ES_EMKPF | = lv_es_emkpf | |
| ET_EMSEG | = lv_et_emseg | |
| ET_MESSAGES | = lv_et_messages | |
| ET_HEADER | = lv_et_header | |
| ET_ITEMS | = lv_et_items | |
| . " HU_POST | ||
ABAP code using 7.40 inline data declarations to call FM HU_POST
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_if_synchron) | = ' '. | |||
| DATA(ld_if_commit) | = ' '. | |||
| DATA(ld_if_no_rename) | = ' '. | |||
| DATA(ld_if_no_messages) | = ' '. | |||
| DATA(ld_if_no_refresh) | = ' '. | |||
| DATA(ld_if_wm_ta_conf) | = ' '. | |||
Search for further information about these or an SAP related objects