SAP UBC_SET_INVOICE_FROM_USER Function Module for
UBC_SET_INVOICE_FROM_USER is a standard ubc set invoice from user 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 ubc set invoice from user FM, simply by entering the name UBC_SET_INVOICE_FROM_USER into the relevant SAP transaction such as SE37 or SE38.
Function Group: UBC_CSP_API
Program Name: SAPLUBC_CSP_API
Main Program: SAPLUBC_CSP_API
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function UBC_SET_INVOICE_FROM_USER 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 'UBC_SET_INVOICE_FROM_USER'".
EXPORTING
IM_ORG = "Organizational Unit
IM_USR = "User
* IM_LANGU = SY-LANGU "Language Key
IM_WI_ID = "Work Item ID
IM_NEXT_FUNCTION = "Screens, Function Code That Triggered PAI
IT_INVHACT = "Account Assignment Information (Header)
IT_INVPACT = "Account Assignment Information (Item)
* IS_INVH_CH = "Changeable Fields of Bill
* IM_NEXT_USER = "User
IMPORTING
EX_RCODE = "
ET_MSGLIN = "Table with sap-wapi Message (Lines)
ET_MSGSTR = "Table with sap-wapi-Message (Structures)
ET_ERRH = "Incorrect Account Assignment Fields
ET_ERRP = "Incorrect Account Assignment Fields
IMPORTING Parameters details for UBC_SET_INVOICE_FROM_USER
IM_ORG - Organizational Unit
Data type: UBC_DT_ORGOptional: No
Call by Reference: No ( called with pass by value option)
IM_USR - User
Data type: UBC_DT_USROptional: No
Call by Reference: No ( called with pass by value option)
IM_LANGU - Language Key
Data type: SPRASDefault: SY-LANGU
Optional: Yes
Call by Reference: No ( called with pass by value option)
IM_WI_ID - Work Item ID
Data type: SWW_WIIDOptional: No
Call by Reference: No ( called with pass by value option)
IM_NEXT_FUNCTION - Screens, Function Code That Triggered PAI
Data type: SYUCOMMOptional: No
Call by Reference: No ( called with pass by value option)
IT_INVHACT - Account Assignment Information (Header)
Data type: UBC_T_INVHACT_DBOptional: No
Call by Reference: No ( called with pass by value option)
IT_INVPACT - Account Assignment Information (Item)
Data type: UBC_T_INVPACT_DBOptional: No
Call by Reference: No ( called with pass by value option)
IS_INVH_CH - Changeable Fields of Bill
Data type: UBC_S_INVH_CHOptional: Yes
Call by Reference: No ( called with pass by value option)
IM_NEXT_USER - User
Data type: UBC_DT_USROptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for UBC_SET_INVOICE_FROM_USER
EX_RCODE -
Data type: IOptional: No
Call by Reference: No ( called with pass by value option)
ET_MSGLIN - Table with sap-wapi Message (Lines)
Data type: SAPI_MSG_LINESOptional: No
Call by Reference: No ( called with pass by value option)
ET_MSGSTR - Table with sap-wapi-Message (Structures)
Data type: SAPI_MSG_STRUCOptional: No
Call by Reference: No ( called with pass by value option)
ET_ERRH - Incorrect Account Assignment Fields
Data type: UBC_T_ERRHOptional: No
Call by Reference: No ( called with pass by value option)
ET_ERRP - Incorrect Account Assignment Fields
Data type: UBC_T_ERRPOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for UBC_SET_INVOICE_FROM_USER 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_im_org | TYPE UBC_DT_ORG, " | |||
| lv_ex_rcode | TYPE I, " | |||
| lv_im_usr | TYPE UBC_DT_USR, " | |||
| lv_et_msglin | TYPE SAPI_MSG_LINES, " | |||
| lv_im_langu | TYPE SPRAS, " SY-LANGU | |||
| lv_et_msgstr | TYPE SAPI_MSG_STRUC, " | |||
| lv_et_errh | TYPE UBC_T_ERRH, " | |||
| lv_im_wi_id | TYPE SWW_WIID, " | |||
| lv_et_errp | TYPE UBC_T_ERRP, " | |||
| lv_im_next_function | TYPE SYUCOMM, " | |||
| lv_it_invhact | TYPE UBC_T_INVHACT_DB, " | |||
| lv_it_invpact | TYPE UBC_T_INVPACT_DB, " | |||
| lv_is_invh_ch | TYPE UBC_S_INVH_CH, " | |||
| lv_im_next_user | TYPE UBC_DT_USR. " |
|   CALL FUNCTION 'UBC_SET_INVOICE_FROM_USER' " |
| EXPORTING | ||
| IM_ORG | = lv_im_org | |
| IM_USR | = lv_im_usr | |
| IM_LANGU | = lv_im_langu | |
| IM_WI_ID | = lv_im_wi_id | |
| IM_NEXT_FUNCTION | = lv_im_next_function | |
| IT_INVHACT | = lv_it_invhact | |
| IT_INVPACT | = lv_it_invpact | |
| IS_INVH_CH | = lv_is_invh_ch | |
| IM_NEXT_USER | = lv_im_next_user | |
| IMPORTING | ||
| EX_RCODE | = lv_ex_rcode | |
| ET_MSGLIN | = lv_et_msglin | |
| ET_MSGSTR | = lv_et_msgstr | |
| ET_ERRH | = lv_et_errh | |
| ET_ERRP | = lv_et_errp | |
| . " UBC_SET_INVOICE_FROM_USER | ||
ABAP code using 7.40 inline data declarations to call FM UBC_SET_INVOICE_FROM_USER
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_im_langu) | = SY-LANGU. | |||
Search for further information about these or an SAP related objects