SAP UBC_GET_INVOICE_FOR_USER Function Module for









UBC_GET_INVOICE_FOR_USER is a standard ubc get invoice for 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 get invoice for user FM, simply by entering the name UBC_GET_INVOICE_FOR_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_GET_INVOICE_FOR_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_GET_INVOICE_FOR_USER'"
EXPORTING
IM_ORG = "Organizational Unit
IM_USR = "User
* IM_LANGU = SY-LANGU "Language Key
* IM_WI_ID = "Work Item ID
* IM_DOCNUM = "Internal Invoice/Bill Number

IMPORTING
EX_INVH2 = "Structure, also for Bruno (Detail)
ET_MSGSTR = "Table with sap-wapi-Message (Structures)
EX_RCODE = "
ET_INVHACT = "Account Assignment Information (Header)
ET_INVHMES = "Bill: Messages from Inbound Processing
ET_INVP = "Table Types for Item Data
ET_INVPACT = "Account Assignment Information (Item)
ET_NEXT_USERS = "Table of Users with Names
ET_FUNC_EXCL = "Locked Functions
ET_MSGLIN = "Table with sap-wapi Message (Lines)
.



IMPORTING Parameters details for UBC_GET_INVOICE_FOR_USER

IM_ORG - Organizational Unit

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

IM_USR - User

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

IM_LANGU - Language Key

Data type: SPRAS
Default: SY-LANGU
Optional: Yes
Call by Reference: No ( called with pass by value option)

IM_WI_ID - Work Item ID

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

IM_DOCNUM - Internal Invoice/Bill Number

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

EXPORTING Parameters details for UBC_GET_INVOICE_FOR_USER

EX_INVH2 - Structure, also for Bruno (Detail)

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

ET_MSGSTR - Table with sap-wapi-Message (Structures)

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

EX_RCODE -

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

ET_INVHACT - Account Assignment Information (Header)

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

ET_INVHMES - Bill: Messages from Inbound Processing

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

ET_INVP - Table Types for Item Data

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

ET_INVPACT - Account Assignment Information (Item)

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

ET_NEXT_USERS - Table of Users with Names

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

ET_FUNC_EXCL - Locked Functions

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

ET_MSGLIN - Table with sap-wapi Message (Lines)

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

Copy and paste ABAP code example for UBC_GET_INVOICE_FOR_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_invh2  TYPE UBC_S_INVH2, "   
lv_et_msgstr  TYPE SAPI_MSG_STRUC, "   
lv_im_usr  TYPE UBC_DT_USR, "   
lv_ex_rcode  TYPE I, "   
lv_im_langu  TYPE SPRAS, "   SY-LANGU
lv_et_invhact  TYPE UBC_T_INVHACT_DB, "   
lv_im_wi_id  TYPE SWW_WIID, "   
lv_et_invhmes  TYPE UBC_T_INVHMES, "   
lv_et_invp  TYPE UBC_T_INVP_DB, "   
lv_im_docnum  TYPE UBC_DT_DOCNUM, "   
lv_et_invpact  TYPE UBC_T_INVPACT_DB, "   
lv_et_next_users  TYPE UBC_T_USR3, "   
lv_et_func_excl  TYPE UBC_T_FUNC, "   
lv_et_msglin  TYPE SAPI_MSG_LINES. "   

  CALL FUNCTION 'UBC_GET_INVOICE_FOR_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_DOCNUM = lv_im_docnum
    IMPORTING
         EX_INVH2 = lv_ex_invh2
         ET_MSGSTR = lv_et_msgstr
         EX_RCODE = lv_ex_rcode
         ET_INVHACT = lv_et_invhact
         ET_INVHMES = lv_et_invhmes
         ET_INVP = lv_et_invp
         ET_INVPACT = lv_et_invpact
         ET_NEXT_USERS = lv_et_next_users
         ET_FUNC_EXCL = lv_et_func_excl
         ET_MSGLIN = lv_et_msglin
. " UBC_GET_INVOICE_FOR_USER




ABAP code using 7.40 inline data declarations to call FM UBC_GET_INVOICE_FOR_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



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!