J_1BNFE_INVOICE_CREATE 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 J_1BNFE_INVOICE_CREATE into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
J_1B_NFE_IN
Released Date:
Not Released
Processing type: Remote-Enabled
CALL FUNCTION 'J_1BNFE_INVOICE_CREATE' "Create invoice by XML-data
EXPORTING
i_bldat = " bldat Document Date in Document
i_budat = SY-DATUM " budat Posting Date in the Document
i_amnt = " j_1bnftot Amount in Local Currency
i_simulate = " j_1bnfe_simulate Character Field Length 1
i_simulation_level = " j_1bnfe_simulation_level Character Field Length 1
i_xblnr = " xblnr1 Reference Document Number
* i_access_key = " j_1b_nfe_access_key NFe Access Key
* i_xmlgovvers = " j_1bnfegovversion NFe: Authority XML Version
* i_authcode = " j_1bnfeauthcode NF-e: Protocol Number
* i_authdate = " j_1bauthdate NF-e Processing Timestamp - Date
* i_authtime = " j_1bauthtime NF-e Processing Timestamp - Time
* i_future_delivery = ' ' " flag Future Delivery - OLD (replaced by i_process)
* i_consignment = ' ' " flag Consignment - OLD (replaced by i_process)
* i_acckey_ref = " j_1b_nfe_access_key NFe Access Key - Reference Document
* i_process = " j_1bnfe_process_erp_grc NF-e Incoming: Business Process (GRC <--> ERP)
IMPORTING
e_xml_header = " j1b_nf_xml_header Nota Fiscal Eletronica / NF-e Data - HEADER (1:1)
et_xml_item = " j1b_nf_xml_item_tab Table type for RFC call J1B_NF_XML_ITEM
e_belnr = " rbkp-belnr Document Number of an Invoice Document
e_gjahr = " rbkp-gjahr Fiscal Year
e_rbstat = " rbkp-rbstat Invoice document status
TABLES
* it_nfe_in_tax = " j_1bnfe_in_tax_tab NF-e incoming: Tax Data- OLD (replaced by IT_NFE_IN_TAX_2)
* it_nfe_in_item = " j_1bnfe_invoice_tab NF-e incoming: Purchase Order Items - OLD (replaced by IT_NFE_IN_ITEM_2)
* it_extension = " j_1bnfe_extension_tab Container for 'Customer Exit' Parameter
* it_extensionc = " j_1bnfe_extensionc_tab Container for 'Customer Exit' Parameter
* et_nfe_in_tax = " j_1bnfe_in_tax_tab NF-e incoming: Tax Data - OLD (replaced by ET_NFE_IN_TAX_2)
* et_nfe_in_item = " j_1bnfe_in_item_tab NF-e incoming: XML items with PO details- OLD (replaced by ET_NFE_IN_ITEM_2)
et_bapiret2 = " bapirettab Table with BAPI Return Information
* it_nfe_in_tax_2 = " j_1bnfe_in_tax_tab_2 NF-e incoming: Tax Data - with XML position
* it_nfe_in_item_2 = " j_1bnfe_invoice_tab_2 NF-e incoming: XML items with PO details - with XML poistion
* et_nfe_in_tax_2 = " j_1bnfe_in_tax_tab_2 NF-e incoming: Tax Data - with XML position
* et_nfe_in_item_2 = " j_1bnfe_in_item_tab_2 NF-e incoming: XML items with PO details - with XML position
* it_nfe_item_add_info = " j_1bnfe_item_add_info_tab NF-e incoming: Details for XML Items in Consignment Process
EXCEPTIONS
ERROR = 1 "
. " J_1BNFE_INVOICE_CREATE
The ABAP code below is a full code listing to execute function module J_1BNFE_INVOICE_CREATE 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).
| ld_e_xml_header | TYPE J1B_NF_XML_HEADER , |
| ld_et_xml_item | TYPE J1B_NF_XML_ITEM_TAB , |
| ld_e_belnr | TYPE RBKP-BELNR , |
| ld_e_gjahr | TYPE RBKP-GJAHR , |
| ld_e_rbstat | TYPE RBKP-RBSTAT , |
| it_it_nfe_in_tax | TYPE STANDARD TABLE OF J_1BNFE_IN_TAX_TAB,"TABLES PARAM |
| wa_it_nfe_in_tax | LIKE LINE OF it_it_nfe_in_tax , |
| it_it_nfe_in_item | TYPE STANDARD TABLE OF J_1BNFE_INVOICE_TAB,"TABLES PARAM |
| wa_it_nfe_in_item | LIKE LINE OF it_it_nfe_in_item , |
| it_it_extension | TYPE STANDARD TABLE OF J_1BNFE_EXTENSION_TAB,"TABLES PARAM |
| wa_it_extension | LIKE LINE OF it_it_extension , |
| it_it_extensionc | TYPE STANDARD TABLE OF J_1BNFE_EXTENSIONC_TAB,"TABLES PARAM |
| wa_it_extensionc | LIKE LINE OF it_it_extensionc , |
| it_et_nfe_in_tax | TYPE STANDARD TABLE OF J_1BNFE_IN_TAX_TAB,"TABLES PARAM |
| wa_et_nfe_in_tax | LIKE LINE OF it_et_nfe_in_tax , |
| it_et_nfe_in_item | TYPE STANDARD TABLE OF J_1BNFE_IN_ITEM_TAB,"TABLES PARAM |
| wa_et_nfe_in_item | LIKE LINE OF it_et_nfe_in_item , |
| it_et_bapiret2 | TYPE STANDARD TABLE OF BAPIRETTAB,"TABLES PARAM |
| wa_et_bapiret2 | LIKE LINE OF it_et_bapiret2 , |
| it_it_nfe_in_tax_2 | TYPE STANDARD TABLE OF J_1BNFE_IN_TAX_TAB_2,"TABLES PARAM |
| wa_it_nfe_in_tax_2 | LIKE LINE OF it_it_nfe_in_tax_2 , |
| it_it_nfe_in_item_2 | TYPE STANDARD TABLE OF J_1BNFE_INVOICE_TAB_2,"TABLES PARAM |
| wa_it_nfe_in_item_2 | LIKE LINE OF it_it_nfe_in_item_2 , |
| it_et_nfe_in_tax_2 | TYPE STANDARD TABLE OF J_1BNFE_IN_TAX_TAB_2,"TABLES PARAM |
| wa_et_nfe_in_tax_2 | LIKE LINE OF it_et_nfe_in_tax_2 , |
| it_et_nfe_in_item_2 | TYPE STANDARD TABLE OF J_1BNFE_IN_ITEM_TAB_2,"TABLES PARAM |
| wa_et_nfe_in_item_2 | LIKE LINE OF it_et_nfe_in_item_2 , |
| it_it_nfe_item_add_info | TYPE STANDARD TABLE OF J_1BNFE_ITEM_ADD_INFO_TAB,"TABLES PARAM |
| wa_it_nfe_item_add_info | LIKE LINE OF it_it_nfe_item_add_info . |
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_e_xml_header | TYPE J1B_NF_XML_HEADER , |
| ld_i_bldat | TYPE BLDAT , |
| it_it_nfe_in_tax | TYPE STANDARD TABLE OF J_1BNFE_IN_TAX_TAB , |
| wa_it_nfe_in_tax | LIKE LINE OF it_it_nfe_in_tax, |
| ld_et_xml_item | TYPE J1B_NF_XML_ITEM_TAB , |
| ld_i_budat | TYPE BUDAT , |
| it_it_nfe_in_item | TYPE STANDARD TABLE OF J_1BNFE_INVOICE_TAB , |
| wa_it_nfe_in_item | LIKE LINE OF it_it_nfe_in_item, |
| ld_e_belnr | TYPE RBKP-BELNR , |
| ld_i_amnt | TYPE J_1BNFTOT , |
| it_it_extension | TYPE STANDARD TABLE OF J_1BNFE_EXTENSION_TAB , |
| wa_it_extension | LIKE LINE OF it_it_extension, |
| ld_e_gjahr | TYPE RBKP-GJAHR , |
| ld_i_simulate | TYPE J_1BNFE_SIMULATE , |
| it_it_extensionc | TYPE STANDARD TABLE OF J_1BNFE_EXTENSIONC_TAB , |
| wa_it_extensionc | LIKE LINE OF it_it_extensionc, |
| ld_e_rbstat | TYPE RBKP-RBSTAT , |
| ld_i_simulation_level | TYPE J_1BNFE_SIMULATION_LEVEL , |
| it_et_nfe_in_tax | TYPE STANDARD TABLE OF J_1BNFE_IN_TAX_TAB , |
| wa_et_nfe_in_tax | LIKE LINE OF it_et_nfe_in_tax, |
| ld_i_xblnr | TYPE XBLNR1 , |
| it_et_nfe_in_item | TYPE STANDARD TABLE OF J_1BNFE_IN_ITEM_TAB , |
| wa_et_nfe_in_item | LIKE LINE OF it_et_nfe_in_item, |
| it_et_bapiret2 | TYPE STANDARD TABLE OF BAPIRETTAB , |
| wa_et_bapiret2 | LIKE LINE OF it_et_bapiret2, |
| ld_i_access_key | TYPE J_1B_NFE_ACCESS_KEY , |
| it_it_nfe_in_tax_2 | TYPE STANDARD TABLE OF J_1BNFE_IN_TAX_TAB_2 , |
| wa_it_nfe_in_tax_2 | LIKE LINE OF it_it_nfe_in_tax_2, |
| ld_i_xmlgovvers | TYPE J_1BNFEGOVVERSION , |
| it_it_nfe_in_item_2 | TYPE STANDARD TABLE OF J_1BNFE_INVOICE_TAB_2 , |
| wa_it_nfe_in_item_2 | LIKE LINE OF it_it_nfe_in_item_2, |
| ld_i_authcode | TYPE J_1BNFEAUTHCODE , |
| it_et_nfe_in_tax_2 | TYPE STANDARD TABLE OF J_1BNFE_IN_TAX_TAB_2 , |
| wa_et_nfe_in_tax_2 | LIKE LINE OF it_et_nfe_in_tax_2, |
| ld_i_authdate | TYPE J_1BAUTHDATE , |
| it_et_nfe_in_item_2 | TYPE STANDARD TABLE OF J_1BNFE_IN_ITEM_TAB_2 , |
| wa_et_nfe_in_item_2 | LIKE LINE OF it_et_nfe_in_item_2, |
| ld_i_authtime | TYPE J_1BAUTHTIME , |
| it_it_nfe_item_add_info | TYPE STANDARD TABLE OF J_1BNFE_ITEM_ADD_INFO_TAB , |
| wa_it_nfe_item_add_info | LIKE LINE OF it_it_nfe_item_add_info, |
| ld_i_future_delivery | TYPE FLAG , |
| ld_i_consignment | TYPE FLAG , |
| ld_i_acckey_ref | TYPE J_1B_NFE_ACCESS_KEY , |
| ld_i_process | TYPE J_1BNFE_PROCESS_ERP_GRC . |
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 J_1BNFE_INVOICE_CREATE or its description.
J_1BNFE_INVOICE_CREATE - Create invoice by XML-data J_1BNFE_INB_DELIV_PREPARE_SC - Prepare Components for the Creation of the Inbound Delivery J_1BNFE_GOODS_QUANTITY_CHECK - Set Parameters for quantitiy check J_1BNFE_GET_VENDOR_FROM_CNPJ - Derive vendor from CNPJ J_1BNFE_GET_TAX_CODES - Get valid tax codes J_1BNFE_GET_SIMULATION_LEVEL - Get simulation level