SAP VHUPILE_ASSIGN_PACKINSTRUCTION Function Module for NOTRANSL: Zuordnung von Packvorschriften zu Belegpositionen und Mengen
VHUPILE_ASSIGN_PACKINSTRUCTION is a standard vhupile assign packinstruction 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: Zuordnung von Packvorschriften zu Belegpositionen und Mengen 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 vhupile assign packinstruction FM, simply by entering the name VHUPILE_ASSIGN_PACKINSTRUCTION into the relevant SAP transaction such as SE37 or SE38.
Function Group: VHUPILE
Program Name: SAPLVHUPILE
Main Program: SAPLVHUPILE
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function VHUPILE_ASSIGN_PACKINSTRUCTION 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 'VHUPILE_ASSIGN_PACKINSTRUCTION'"NOTRANSL: Zuordnung von Packvorschriften zu Belegpositionen und Mengen.
EXPORTING
APPLICATION = "
OBJECT = "
* PROFILE = "
* PDPARA = "
PACKGOODS = "
* DIALOG_FLAG = ' ' "Call in Dialog
IMPORTING
PACKITEMS = "
T_PACKQTY = "List of Packed Materials
RETURN_CODE = "
EXCEPTIONS
FAILURE = 1 PROFILE_NOT_FOUND = 2 PROFILE_WRONG = 3 CREATION_FAILED = 4 NO_PACKGOOD_FOUND = 5 PACKINSTR_DELETED = 6 PACKINSTR_NOT_FOUND = 7
IMPORTING Parameters details for VHUPILE_ASSIGN_PACKINSTRUCTION
APPLICATION -
Data type: PDT_APPLICATIONOptional: No
Call by Reference: No ( called with pass by value option)
OBJECT -
Data type: PDT_OBJECTOptional: No
Call by Reference: No ( called with pass by value option)
PROFILE -
Data type: PDT_PROFILEOptional: Yes
Call by Reference: No ( called with pass by value option)
PDPARA -
Data type: PDT_PDPARAOptional: Yes
Call by Reference: No ( called with pass by value option)
PACKGOODS -
Data type: PDT_PACKGOODSOptional: No
Call by Reference: No ( called with pass by value option)
DIALOG_FLAG - Call in Dialog
Data type: PDT_DIALOG_FLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for VHUPILE_ASSIGN_PACKINSTRUCTION
PACKITEMS -
Data type: PDT_PACKITEMSOptional: No
Call by Reference: No ( called with pass by value option)
T_PACKQTY - List of Packed Materials
Data type: PDT_T_PACKQTYOptional: No
Call by Reference: No ( called with pass by value option)
RETURN_CODE -
Data type: PDT_AUTOPACKRESULTOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
FAILURE - Errors
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PROFILE_NOT_FOUND - Profile Not Found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PROFILE_WRONG -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
CREATION_FAILED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_PACKGOOD_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PACKINSTR_DELETED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PACKINSTR_NOT_FOUND - Packing instruction not found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for VHUPILE_ASSIGN_PACKINSTRUCTION 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_failure | TYPE STRING, " | |||
| lv_packitems | TYPE PDT_PACKITEMS, " | |||
| lv_application | TYPE PDT_APPLICATION, " | |||
| lv_object | TYPE PDT_OBJECT, " | |||
| lv_t_packqty | TYPE PDT_T_PACKQTY, " | |||
| lv_profile_not_found | TYPE PDT_T_PACKQTY, " | |||
| lv_profile | TYPE PDT_PROFILE, " | |||
| lv_return_code | TYPE PDT_AUTOPACKRESULT, " | |||
| lv_profile_wrong | TYPE PDT_AUTOPACKRESULT, " | |||
| lv_pdpara | TYPE PDT_PDPARA, " | |||
| lv_creation_failed | TYPE PDT_PDPARA, " | |||
| lv_packgoods | TYPE PDT_PACKGOODS, " | |||
| lv_no_packgood_found | TYPE PDT_PACKGOODS, " | |||
| lv_dialog_flag | TYPE PDT_DIALOG_FLAG, " SPACE | |||
| lv_packinstr_deleted | TYPE PDT_DIALOG_FLAG, " | |||
| lv_packinstr_not_found | TYPE PDT_DIALOG_FLAG. " |
|   CALL FUNCTION 'VHUPILE_ASSIGN_PACKINSTRUCTION' "NOTRANSL: Zuordnung von Packvorschriften zu Belegpositionen und Mengen |
| EXPORTING | ||
| APPLICATION | = lv_application | |
| OBJECT | = lv_object | |
| PROFILE | = lv_profile | |
| PDPARA | = lv_pdpara | |
| PACKGOODS | = lv_packgoods | |
| DIALOG_FLAG | = lv_dialog_flag | |
| IMPORTING | ||
| PACKITEMS | = lv_packitems | |
| T_PACKQTY | = lv_t_packqty | |
| RETURN_CODE | = lv_return_code | |
| EXCEPTIONS | ||
| FAILURE = 1 | ||
| PROFILE_NOT_FOUND = 2 | ||
| PROFILE_WRONG = 3 | ||
| CREATION_FAILED = 4 | ||
| NO_PACKGOOD_FOUND = 5 | ||
| PACKINSTR_DELETED = 6 | ||
| PACKINSTR_NOT_FOUND = 7 | ||
| . " VHUPILE_ASSIGN_PACKINSTRUCTION | ||
ABAP code using 7.40 inline data declarations to call FM VHUPILE_ASSIGN_PACKINSTRUCTION
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_dialog_flag) | = ' '. | |||
Search for further information about these or an SAP related objects