SAP UPSCU_PACKAGE_CREATE Function Module for









UPSCU_PACKAGE_CREATE is a standard upscu package create SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 upscu package create FM, simply by entering the name UPSCU_PACKAGE_CREATE into the relevant SAP transaction such as SE37 or SE38.

Function Group: UPSCU
Program Name: SAPLUPSCU
Main Program: SAPLUPSCU
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function UPSCU_PACKAGE_CREATE 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 'UPSCU_PACKAGE_CREATE'"
EXPORTING
IM_INSTID = "ALE Distribution Packet: ID for Instantiation
* FLG_MSG_COLLECT = KUPS_FALSE "Collect accumulated messages
* IM_HANDLE = "Application Log: Log Handle
* FLG_SET_UPSSTS_NEW = KUPS_FALSE "Set packet status to 'new'
* IM_VRGNG = KUPS_VRGNG_EDIT "Business Transaction
IMT_APIITM = "
* IMT_APISRC = "
* IMT_APIPRE = "ALE Distribution Packet: Predecessor (Input Structure)
* FLG_COMMIT_AND_WAIT = KUPS_TRUE "Send COMMIT AND WAIT
* FLG_APPL_LOG = KUPS_FALSE "Write application log
* FLG_DOCNUM_UPDATE = KUPS_FALSE "Identify object IDocs
* FLG_SERIAL_UPDATE = KUPS_FALSE "
* FLG_LOCK_PACKAGE = KUPS_FALSE "Lock packet against changes

CHANGING
CH_APIHDR = "ALE Distribution Packet: Header Data (Input Structure)

TABLES
* EX_MESSAGES = "Accumulated messages

EXCEPTIONS
FAILING_INSTANCE = 1 CURRENT_EXISTS = 2 ERROR = 3 WRONG_INSTANCE = 4 NO_CHANGE = 5 PACKAGE_EXISTS = 6 NO_AUTHORITY = 7
.



IMPORTING Parameters details for UPSCU_PACKAGE_CREATE

IM_INSTID - ALE Distribution Packet: ID for Instantiation

Data type: UPS_INSTID
Optional: No
Call by Reference: Yes

FLG_MSG_COLLECT - Collect accumulated messages

Data type: XFELD
Default: KUPS_FALSE
Optional: Yes
Call by Reference: Yes

IM_HANDLE - Application Log: Log Handle

Data type: BALLOGHNDL
Optional: Yes
Call by Reference: Yes

FLG_SET_UPSSTS_NEW - Set packet status to 'new'

Data type: XFELD
Default: KUPS_FALSE
Optional: Yes
Call by Reference: Yes

IM_VRGNG - Business Transaction

Data type: TJ01-VRGNG
Default: KUPS_VRGNG_EDIT
Optional: Yes
Call by Reference: Yes

IMT_APIITM -

Data type: API_TUPSITM
Optional: No
Call by Reference: Yes

IMT_APISRC -

Data type: API_TUPSSRC
Optional: Yes
Call by Reference: Yes

IMT_APIPRE - ALE Distribution Packet: Predecessor (Input Structure)

Data type: API_TUPSPRE
Optional: Yes
Call by Reference: Yes

FLG_COMMIT_AND_WAIT - Send COMMIT AND WAIT

Data type: XFELD
Default: KUPS_TRUE
Optional: Yes
Call by Reference: Yes

FLG_APPL_LOG - Write application log

Data type: XFELD
Default: KUPS_FALSE
Optional: Yes
Call by Reference: Yes

FLG_DOCNUM_UPDATE - Identify object IDocs

Data type: XFELD
Default: KUPS_FALSE
Optional: Yes
Call by Reference: Yes

FLG_SERIAL_UPDATE -

Data type: XFELD
Default: KUPS_FALSE
Optional: Yes
Call by Reference: Yes

FLG_LOCK_PACKAGE - Lock packet against changes

Data type: XFELD
Default: KUPS_FALSE
Optional: Yes
Call by Reference: Yes

CHANGING Parameters details for UPSCU_PACKAGE_CREATE

CH_APIHDR - ALE Distribution Packet: Header Data (Input Structure)

Data type: API_UPSHDR
Optional: No
Call by Reference: Yes

TABLES Parameters details for UPSCU_PACKAGE_CREATE

EX_MESSAGES - Accumulated messages

Data type: TUPSBAPIRET2
Optional: Yes
Call by Reference: Yes

EXCEPTIONS details

FAILING_INSTANCE -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

CURRENT_EXISTS - There is still a packet in the unit that can be changed

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

ERROR - Unspecified Error

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

WRONG_INSTANCE - Packet key does not fit current instance

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NO_CHANGE - Packet has been opened for display only

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

PACKAGE_EXISTS - Package already exists

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NO_AUTHORITY - No Authorization

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for UPSCU_PACKAGE_CREATE 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_ch_apihdr  TYPE API_UPSHDR, "   
lv_im_instid  TYPE UPS_INSTID, "   
lt_ex_messages  TYPE STANDARD TABLE OF TUPSBAPIRET2, "   
lv_failing_instance  TYPE TUPSBAPIRET2, "   
lv_flg_msg_collect  TYPE XFELD, "   KUPS_FALSE
lv_im_handle  TYPE BALLOGHNDL, "   
lv_flg_set_upssts_new  TYPE XFELD, "   KUPS_FALSE
lv_im_vrgng  TYPE TJ01-VRGNG, "   KUPS_VRGNG_EDIT
lv_imt_apiitm  TYPE API_TUPSITM, "   
lv_current_exists  TYPE API_TUPSITM, "   
lv_error  TYPE API_TUPSITM, "   
lv_imt_apisrc  TYPE API_TUPSSRC, "   
lv_imt_apipre  TYPE API_TUPSPRE, "   
lv_wrong_instance  TYPE API_TUPSPRE, "   
lv_no_change  TYPE API_TUPSPRE, "   
lv_flg_commit_and_wait  TYPE XFELD, "   KUPS_TRUE
lv_flg_appl_log  TYPE XFELD, "   KUPS_FALSE
lv_package_exists  TYPE XFELD, "   
lv_no_authority  TYPE XFELD, "   
lv_flg_docnum_update  TYPE XFELD, "   KUPS_FALSE
lv_flg_serial_update  TYPE XFELD, "   KUPS_FALSE
lv_flg_lock_package  TYPE XFELD. "   KUPS_FALSE

  CALL FUNCTION 'UPSCU_PACKAGE_CREATE'  "
    EXPORTING
         IM_INSTID = lv_im_instid
         FLG_MSG_COLLECT = lv_flg_msg_collect
         IM_HANDLE = lv_im_handle
         FLG_SET_UPSSTS_NEW = lv_flg_set_upssts_new
         IM_VRGNG = lv_im_vrgng
         IMT_APIITM = lv_imt_apiitm
         IMT_APISRC = lv_imt_apisrc
         IMT_APIPRE = lv_imt_apipre
         FLG_COMMIT_AND_WAIT = lv_flg_commit_and_wait
         FLG_APPL_LOG = lv_flg_appl_log
         FLG_DOCNUM_UPDATE = lv_flg_docnum_update
         FLG_SERIAL_UPDATE = lv_flg_serial_update
         FLG_LOCK_PACKAGE = lv_flg_lock_package
    CHANGING
         CH_APIHDR = lv_ch_apihdr
    TABLES
         EX_MESSAGES = lt_ex_messages
    EXCEPTIONS
        FAILING_INSTANCE = 1
        CURRENT_EXISTS = 2
        ERROR = 3
        WRONG_INSTANCE = 4
        NO_CHANGE = 5
        PACKAGE_EXISTS = 6
        NO_AUTHORITY = 7
. " UPSCU_PACKAGE_CREATE




ABAP code using 7.40 inline data declarations to call FM UPSCU_PACKAGE_CREATE

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_flg_msg_collect) = KUPS_FALSE.
 
 
DATA(ld_flg_set_upssts_new) = KUPS_FALSE.
 
"SELECT single VRGNG FROM TJ01 INTO @DATA(ld_im_vrgng).
DATA(ld_im_vrgng) = KUPS_VRGNG_EDIT.
 
 
 
 
 
 
 
 
DATA(ld_flg_commit_and_wait) = KUPS_TRUE.
 
DATA(ld_flg_appl_log) = KUPS_FALSE.
 
 
 
DATA(ld_flg_docnum_update) = KUPS_FALSE.
 
DATA(ld_flg_serial_update) = KUPS_FALSE.
 
DATA(ld_flg_lock_package) = KUPS_FALSE.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!