SAP GN_INVOICE_CREATE Function Module for
GN_INVOICE_CREATE is a standard gn invoice 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 gn invoice create FM, simply by entering the name GN_INVOICE_CREATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: V60A
Program Name: SAPLV60A
Main Program: SAPLV60A
Appliation area: V
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function GN_INVOICE_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 'GN_INVOICE_CREATE'".
EXPORTING
* DELIVERY_DATE = 0 "Delivery date
* ID_KVORG = ' ' "
* ID_NO_DIALOG = ' ' "New Input Values
* ID_NEW_CANCELLATION = ' ' "
* ID_ANALYZE_MODE = ' ' "
* ID_NO_FI_DOC = ' ' "
* IS_FI_ADD_INPUT = "
* ID_SIM_WITHOUT_PRICE = ' ' "
* INVOICE_DATE = 0 "Billing date
* INVOICE_TYPE = ' ' "Billing Category
* PRICING_DATE = 0 "Pricing date
VBSK_I = "SD document collective processing header import
* WITH_POSTING = ' ' "Create billing document immediately
* CALLER_TYPE = ' ' "Type of Caller
* I_WITHOUT_REFRESH = ' ' "
* ID_NO_ENQUEUE = ' ' "
IMPORTING
VBSK_E = "SD document collective processing header export
TABLES
XKOMFK = "Billing Communications Table
XVBRP = "Billing Document: Item Data
XVBSS = "Collective Processing: Sales Documents
* XKOMFKZM = "
* SUCCESS_DOC_OUT = "
XKOMFKGN = "General communication table
XKOMFKKO = "Communication table conditions
* XKOMFKTX = "
XKOMV = "Pricing: Communications Condition Record
XTHEAD = "SAPscript: Text header
XVBFS = "Error Log for Collective Processing
XVBPA = "Sales Document: Partner
XVBRK = "Billing Document: Header Data
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLV60A_001 Billing User Exit. Processing KIDNO (Payment Reference Number)
EXIT_SAPLV60A_002 Customer Function: Process Communication Table for the Bill. Document
IMPORTING Parameters details for GN_INVOICE_CREATE
DELIVERY_DATE - Delivery date
Data type: VBRP-FBUDAOptional: Yes
Call by Reference: No ( called with pass by value option)
ID_KVORG -
Data type: KOMK-KVORGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
ID_NO_DIALOG - New Input Values
Data type: XFLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
ID_NEW_CANCELLATION -
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
ID_ANALYZE_MODE -
Data type: CHAR1Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
ID_NO_FI_DOC -
Data type: CHAR1Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IS_FI_ADD_INPUT -
Data type: SDFI_S_ADD_INPUTOptional: Yes
Call by Reference: No ( called with pass by value option)
ID_SIM_WITHOUT_PRICE -
Data type: CHAR1Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
INVOICE_DATE - Billing date
Data type: VBRK-FKDATOptional: Yes
Call by Reference: No ( called with pass by value option)
INVOICE_TYPE - Billing Category
Data type: VBRK-FKARTDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
PRICING_DATE - Pricing date
Data type: VBRP-PRSDTOptional: Yes
Call by Reference: No ( called with pass by value option)
VBSK_I - SD document collective processing header import
Data type: VBSKOptional: No
Call by Reference: No ( called with pass by value option)
WITH_POSTING - Create billing document immediately
Data type:Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
CALLER_TYPE - Type of Caller
Data type: CDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_WITHOUT_REFRESH -
Data type:Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
ID_NO_ENQUEUE -
Data type:Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for GN_INVOICE_CREATE
VBSK_E - SD document collective processing header export
Data type: VBSKOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for GN_INVOICE_CREATE
XKOMFK - Billing Communications Table
Data type: KOMFKOptional: No
Call by Reference: No ( called with pass by value option)
XVBRP - Billing Document: Item Data
Data type: VBRPVBOptional: No
Call by Reference: No ( called with pass by value option)
XVBSS - Collective Processing: Sales Documents
Data type: VBSSOptional: No
Call by Reference: No ( called with pass by value option)
XKOMFKZM -
Data type: KOMFKZMOptional: Yes
Call by Reference: No ( called with pass by value option)
SUCCESS_DOC_OUT -
Data type: BAPISUCCOptional: Yes
Call by Reference: No ( called with pass by value option)
XKOMFKGN - General communication table
Data type: KOMFKGNOptional: No
Call by Reference: No ( called with pass by value option)
XKOMFKKO - Communication table conditions
Data type: KOMVOptional: No
Call by Reference: No ( called with pass by value option)
XKOMFKTX -
Data type: KOMFKTXOptional: Yes
Call by Reference: No ( called with pass by value option)
XKOMV - Pricing: Communications Condition Record
Data type: KOMVOptional: No
Call by Reference: No ( called with pass by value option)
XTHEAD - SAPscript: Text header
Data type: THEADVBOptional: No
Call by Reference: No ( called with pass by value option)
XVBFS - Error Log for Collective Processing
Data type: VBFSOptional: No
Call by Reference: No ( called with pass by value option)
XVBPA - Sales Document: Partner
Data type: VBPAVBOptional: No
Call by Reference: No ( called with pass by value option)
XVBRK - Billing Document: Header Data
Data type: VBRKVBOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for GN_INVOICE_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_vbsk_e | TYPE VBSK, " | |||
lt_xkomfk | TYPE STANDARD TABLE OF KOMFK, " | |||
lv_delivery_date | TYPE VBRP-FBUDA, " 0 | |||
lt_xvbrp | TYPE STANDARD TABLE OF VBRPVB, " | |||
lv_id_kvorg | TYPE KOMK-KVORG, " SPACE | |||
lt_xvbss | TYPE STANDARD TABLE OF VBSS, " | |||
lv_id_no_dialog | TYPE XFLAG, " SPACE | |||
lt_xkomfkzm | TYPE STANDARD TABLE OF KOMFKZM, " | |||
lv_id_new_cancellation | TYPE KOMFKZM, " SPACE | |||
lv_id_analyze_mode | TYPE CHAR1, " SPACE | |||
lt_success_doc_out | TYPE STANDARD TABLE OF BAPISUCC, " | |||
lv_id_no_fi_doc | TYPE CHAR1, " SPACE | |||
lv_is_fi_add_input | TYPE SDFI_S_ADD_INPUT, " | |||
lv_id_sim_without_price | TYPE CHAR1, " SPACE | |||
lt_xkomfkgn | TYPE STANDARD TABLE OF KOMFKGN, " | |||
lv_invoice_date | TYPE VBRK-FKDAT, " 0 | |||
lt_xkomfkko | TYPE STANDARD TABLE OF KOMV, " | |||
lv_invoice_type | TYPE VBRK-FKART, " ' ' | |||
lt_xkomfktx | TYPE STANDARD TABLE OF KOMFKTX, " | |||
lv_pricing_date | TYPE VBRP-PRSDT, " 0 | |||
lt_xkomv | TYPE STANDARD TABLE OF KOMV, " | |||
lv_vbsk_i | TYPE VBSK, " | |||
lt_xthead | TYPE STANDARD TABLE OF THEADVB, " | |||
lv_with_posting | TYPE THEADVB, " ' ' | |||
lt_xvbfs | TYPE STANDARD TABLE OF VBFS, " | |||
lv_caller_type | TYPE C, " ' ' | |||
lt_xvbpa | TYPE STANDARD TABLE OF VBPAVB, " | |||
lv_i_without_refresh | TYPE VBPAVB, " ' ' | |||
lt_xvbrk | TYPE STANDARD TABLE OF VBRKVB, " | |||
lv_id_no_enqueue | TYPE VBRKVB. " ' ' |
  CALL FUNCTION 'GN_INVOICE_CREATE' " |
EXPORTING | ||
DELIVERY_DATE | = lv_delivery_date | |
ID_KVORG | = lv_id_kvorg | |
ID_NO_DIALOG | = lv_id_no_dialog | |
ID_NEW_CANCELLATION | = lv_id_new_cancellation | |
ID_ANALYZE_MODE | = lv_id_analyze_mode | |
ID_NO_FI_DOC | = lv_id_no_fi_doc | |
IS_FI_ADD_INPUT | = lv_is_fi_add_input | |
ID_SIM_WITHOUT_PRICE | = lv_id_sim_without_price | |
INVOICE_DATE | = lv_invoice_date | |
INVOICE_TYPE | = lv_invoice_type | |
PRICING_DATE | = lv_pricing_date | |
VBSK_I | = lv_vbsk_i | |
WITH_POSTING | = lv_with_posting | |
CALLER_TYPE | = lv_caller_type | |
I_WITHOUT_REFRESH | = lv_i_without_refresh | |
ID_NO_ENQUEUE | = lv_id_no_enqueue | |
IMPORTING | ||
VBSK_E | = lv_vbsk_e | |
TABLES | ||
XKOMFK | = lt_xkomfk | |
XVBRP | = lt_xvbrp | |
XVBSS | = lt_xvbss | |
XKOMFKZM | = lt_xkomfkzm | |
SUCCESS_DOC_OUT | = lt_success_doc_out | |
XKOMFKGN | = lt_xkomfkgn | |
XKOMFKKO | = lt_xkomfkko | |
XKOMFKTX | = lt_xkomfktx | |
XKOMV | = lt_xkomv | |
XTHEAD | = lt_xthead | |
XVBFS | = lt_xvbfs | |
XVBPA | = lt_xvbpa | |
XVBRK | = lt_xvbrk | |
. " GN_INVOICE_CREATE |
ABAP code using 7.40 inline data declarations to call FM GN_INVOICE_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."SELECT single FBUDA FROM VBRP INTO @DATA(ld_delivery_date). | ||||
"SELECT single KVORG FROM KOMK INTO @DATA(ld_id_kvorg). | ||||
DATA(ld_id_kvorg) | = ' '. | |||
DATA(ld_id_no_dialog) | = ' '. | |||
DATA(ld_id_new_cancellation) | = ' '. | |||
DATA(ld_id_analyze_mode) | = ' '. | |||
DATA(ld_id_no_fi_doc) | = ' '. | |||
DATA(ld_id_sim_without_price) | = ' '. | |||
"SELECT single FKDAT FROM VBRK INTO @DATA(ld_invoice_date). | ||||
"SELECT single FKART FROM VBRK INTO @DATA(ld_invoice_type). | ||||
DATA(ld_invoice_type) | = ' '. | |||
"SELECT single PRSDT FROM VBRP INTO @DATA(ld_pricing_date). | ||||
DATA(ld_with_posting) | = ' '. | |||
DATA(ld_caller_type) | = ' '. | |||
DATA(ld_i_without_refresh) | = ' '. | |||
DATA(ld_id_no_enqueue) | = ' '. | |||
Search for further information about these or an SAP related objects