UPC_PACKAGE_CREATE_ADHOC is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.
See here to view full function module documentation and code listing, simply by entering the name UPC_PACKAGE_CREATE_ADHOC into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
UPC_PACKAGE
Released Date:
Not Released
Processing type: Remote-Enabled
CALL FUNCTION 'UPC_PACKAGE_CREATE_ADHOC' "Creation of Ad-Hoc package
EXPORTING
i_area = " upc_y_area Planning Area
i_plevel = " upc_y_plevel Planning Level
* i_set_default = " char1 Set package to default values
* i_no_plevel_error = " char1 Ignore errors from the level
* TABLES
* it_charsel = " upc_yt_charsel Characteristic Selections
* it_hiesel = " upc_yt_hiesel_rfc Hierarchy info
* it_hiesel_chadep = " upc_yt_chadep_rfc Values of Compound Characteristics
EXCEPTIONS
AREA_ERROR = 1 " Error in planning area
PLEVEL_ERROR = 2 " Error in planning level
CHANM_NOT_IN_PLEVEL = 3 " Characteristic is not contained in planning level
CHANM_SEL_IN_PLEVEL = 4 " Characteristic already has a selection in the planning level
. " UPC_PACKAGE_CREATE_ADHOC
The ABAP code below is a full code listing to execute function module UPC_PACKAGE_CREATE_ADHOC including all data declarations. The code uses 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 original method of declaring data variables up front. 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).
| it_it_charsel | TYPE STANDARD TABLE OF UPC_YT_CHARSEL,"TABLES PARAM |
| wa_it_charsel | LIKE LINE OF it_it_charsel , |
| it_it_hiesel | TYPE STANDARD TABLE OF UPC_YT_HIESEL_RFC,"TABLES PARAM |
| wa_it_hiesel | LIKE LINE OF it_it_hiesel , |
| it_it_hiesel_chadep | TYPE STANDARD TABLE OF UPC_YT_CHADEP_RFC,"TABLES PARAM |
| wa_it_hiesel_chadep | LIKE LINE OF it_it_hiesel_chadep . |
The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.
DATA:
| ld_i_area | TYPE UPC_Y_AREA , |
| it_it_charsel | TYPE STANDARD TABLE OF UPC_YT_CHARSEL , |
| wa_it_charsel | LIKE LINE OF it_it_charsel, |
| ld_i_plevel | TYPE UPC_Y_PLEVEL , |
| it_it_hiesel | TYPE STANDARD TABLE OF UPC_YT_HIESEL_RFC , |
| wa_it_hiesel | LIKE LINE OF it_it_hiesel, |
| ld_i_set_default | TYPE CHAR1 , |
| it_it_hiesel_chadep | TYPE STANDARD TABLE OF UPC_YT_CHADEP_RFC , |
| wa_it_hiesel_chadep | LIKE LINE OF it_it_hiesel_chadep, |
| ld_i_no_plevel_error | TYPE CHAR1 . |
Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name UPC_PACKAGE_CREATE_ADHOC or its description.