SAP J_1BNFE_RETURN_OF_COMPONENTS Function Module for Return of subcontracting components









J_1BNFE_RETURN_OF_COMPONENTS is a standard j 1bnfe return of components SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Return of subcontracting components processing and below is the pattern details for this FM, 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 j 1bnfe return of components FM, simply by entering the name J_1BNFE_RETURN_OF_COMPONENTS into the relevant SAP transaction such as SE37 or SE38.

Function Group: J_1B_NFE_SC
Program Name: SAPLJ_1B_NFE_SC
Main Program: SAPLJ_1B_NFE_SC
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function J_1BNFE_RETURN_OF_COMPONENTS 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 'J_1BNFE_RETURN_OF_COMPONENTS'"Return of subcontracting components
EXPORTING
* I_BLDAT = SY-DATUM "Document Date in Document
* I_BUDAT = SY-DATUM "Posting Date in the Document
I_ACCESS_KEY = "NFe Access Key
I_XMLGOVVERS = "NFe: Authority XML Version
* I_AUTHCODE = "NF-e: Protocol Number
* I_AUTHDATE = "NF-e Processing Timestamp - Date
* I_AUTHTIME = "NF-e Processing Timestamp - Time
* I_SIMULATE = 'X' "Checkbox
* I_RECEIVER_CNPJ = "CNPJ Number

IMPORTING
E_XML_HEADER = "Nota Fiscal Eletronica / NF-e Data - HEADER (1:1)
ET_XML_ITEM = "Table type for RFC call J1B_NF_XML_ITEM
E_MATERIALDOCUMENT = "Number of Material Document
E_MATDOCUMENTYEAR = "Material Document Year

TABLES
* IT_NFE_COMPONENT = "NF-e in: Return of Subcontracting Components
* ET_ITEM_CFOP = "NF-e incoming: CFOP
* ET_NFE_TAX = "NF-e incoming: Tax Data
ET_BAPIRET2 = "Table with BAPI Return Information
.



IMPORTING Parameters details for J_1BNFE_RETURN_OF_COMPONENTS

I_BLDAT - Document Date in Document

Data type: BLDAT
Default: SY-DATUM
Optional: No
Call by Reference: No ( called with pass by value option)

I_BUDAT - Posting Date in the Document

Data type: BUDAT
Default: SY-DATUM
Optional: No
Call by Reference: No ( called with pass by value option)

I_ACCESS_KEY - NFe Access Key

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

I_XMLGOVVERS - NFe: Authority XML Version

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

I_AUTHCODE - NF-e: Protocol Number

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

I_AUTHDATE - NF-e Processing Timestamp - Date

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

I_AUTHTIME - NF-e Processing Timestamp - Time

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

I_SIMULATE - Checkbox

Data type: XFELD
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_RECEIVER_CNPJ - CNPJ Number

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

EXPORTING Parameters details for J_1BNFE_RETURN_OF_COMPONENTS

E_XML_HEADER - Nota Fiscal Eletronica / NF-e Data - HEADER (1:1)

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

ET_XML_ITEM - Table type for RFC call J1B_NF_XML_ITEM

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

E_MATERIALDOCUMENT - Number of Material Document

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

E_MATDOCUMENTYEAR - Material Document Year

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

TABLES Parameters details for J_1BNFE_RETURN_OF_COMPONENTS

IT_NFE_COMPONENT - NF-e in: Return of Subcontracting Components

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

ET_ITEM_CFOP - NF-e incoming: CFOP

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

ET_NFE_TAX - NF-e incoming: Tax Data

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

ET_BAPIRET2 - Table with BAPI Return Information

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

Copy and paste ABAP code example for J_1BNFE_RETURN_OF_COMPONENTS 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_i_bldat  TYPE BLDAT, "   SY-DATUM
lv_e_xml_header  TYPE J1B_NF_XML_HEADER, "   
lt_it_nfe_component  TYPE STANDARD TABLE OF J_1BNFE_COMPONENT_RETURN_TAB, "   
lv_i_budat  TYPE BUDAT, "   SY-DATUM
lv_et_xml_item  TYPE J1B_NF_XML_ITEM_TAB, "   
lt_et_item_cfop  TYPE STANDARD TABLE OF J_1BNFE_ITEM_DETAILS_TAB, "   
lt_et_nfe_tax  TYPE STANDARD TABLE OF J_1BNFE_MATERIAL_TAX_TAB, "   
lv_i_access_key  TYPE J_1B_NFE_ACCESS_KEY, "   
lv_e_materialdocument  TYPE MBLNR, "   
lt_et_bapiret2  TYPE STANDARD TABLE OF BAPIRETTAB, "   
lv_i_xmlgovvers  TYPE J_1BNFEGOVVERSION, "   
lv_e_matdocumentyear  TYPE MJAHR, "   
lv_i_authcode  TYPE J_1BNFEAUTHCODE, "   
lv_i_authdate  TYPE J_1BAUTHDATE, "   
lv_i_authtime  TYPE J_1BAUTHTIME, "   
lv_i_simulate  TYPE XFELD, "   'X'
lv_i_receiver_cnpj  TYPE J_1BCGC. "   

  CALL FUNCTION 'J_1BNFE_RETURN_OF_COMPONENTS'  "Return of subcontracting components
    EXPORTING
         I_BLDAT = lv_i_bldat
         I_BUDAT = lv_i_budat
         I_ACCESS_KEY = lv_i_access_key
         I_XMLGOVVERS = lv_i_xmlgovvers
         I_AUTHCODE = lv_i_authcode
         I_AUTHDATE = lv_i_authdate
         I_AUTHTIME = lv_i_authtime
         I_SIMULATE = lv_i_simulate
         I_RECEIVER_CNPJ = lv_i_receiver_cnpj
    IMPORTING
         E_XML_HEADER = lv_e_xml_header
         ET_XML_ITEM = lv_et_xml_item
         E_MATERIALDOCUMENT = lv_e_materialdocument
         E_MATDOCUMENTYEAR = lv_e_matdocumentyear
    TABLES
         IT_NFE_COMPONENT = lt_it_nfe_component
         ET_ITEM_CFOP = lt_et_item_cfop
         ET_NFE_TAX = lt_et_nfe_tax
         ET_BAPIRET2 = lt_et_bapiret2
. " J_1BNFE_RETURN_OF_COMPONENTS




ABAP code using 7.40 inline data declarations to call FM J_1BNFE_RETURN_OF_COMPONENTS

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_i_bldat) = SY-DATUM.
 
 
 
DATA(ld_i_budat) = SY-DATUM.
 
 
 
 
 
 
 
 
 
 
 
 
DATA(ld_i_simulate) = 'X'.
 
 


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!