SAP J_1B_NF_MAP_TO_XML Function Module for Mapping NF data to XML Structures
J_1B_NF_MAP_TO_XML is a standard j 1b nf map to xml SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Mapping NF data to XML Structures 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 1b nf map to xml FM, simply by entering the name J_1B_NF_MAP_TO_XML into the relevant SAP transaction such as SE37 or SE38.
Function Group: J_1B_NFE
Program Name: SAPLJ_1B_NFE
Main Program: SAPLJ_1B_NFE
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function J_1B_NF_MAP_TO_XML 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_1B_NF_MAP_TO_XML'"Mapping NF data to XML Structures.
EXPORTING
I_NFDOC = "Nota Fiscal Header
I_ACCKEY = "NFe Access Key
* I_VBELN = "Billing Document
* I_PARALLEL = ' ' "General flag
* I_SIMULATION = ' ' "Simulation
* I_XMLVERS = "NF-e: XML Version
IMPORTING
EV_MSSTAT = "General Flag
TABLES
IT_NFLIN = "Nota Fiscal line items
* IT_CTE_RES = "Information about resource
* IT_CTE_DOCREF = "Reference to the NF-e being transported
* IT_TRANS_VOLUMES = "Transported Volumes
* IT_TRAILER_INFO = "Trailer Information
* IT_TRADE_NOTES = "Trade Notes
* IT_ADD_INFO = "Free Usage Fields for Additional Information
* IT_REF_PROC = "Additional Information: Referenced Processes
* IT_SUGAR_SUPPL = "Daily Supply of Sugarcane
* IT_SUGAR_DEDUC = "Taxes and Contributions on Sugarcane
* IT_VEHICLE = "Nota Fiscal: Vehicle Details
IT_NFNAD = "Nota Fiscal partners
* IT_PHARMACEUT = "Nota Fiscal: Pharmaceutical
* IT_FUEL = "Nota Fiscal: Fuel Details
IT_NFSTX = "Nota Fiscal tax per item
IT_NFFTX = "Nota Fiscal header message
IT_NFREF = "Nota Fiscal reference to header message
* IT_NFCPD = "Nota Fiscal one-time accounts
* IT_VBFA = "Reference Structure for XVBFA/YVBFA
* IT_IMPORT_DI = "Nota Fiscal Data for Import Documents
* IT_IMPORT_ADI = "Nota Fiscal Data for Additions to Import Documents
EXCEPTIONS
RFC_FAILURE = 1 PROCESS_ERROR = 2 CTE_ERROR = 3
IMPORTING Parameters details for J_1B_NF_MAP_TO_XML
I_NFDOC - Nota Fiscal Header
Data type: J_1BNFDOCOptional: No
Call by Reference: Yes
I_ACCKEY - NFe Access Key
Data type: J_1B_NFE_ACCESS_KEYOptional: No
Call by Reference: Yes
I_VBELN - Billing Document
Data type: VBELN_VFOptional: Yes
Call by Reference: Yes
I_PARALLEL - General flag
Data type: FLAGDefault: SPACE
Optional: Yes
Call by Reference: Yes
I_SIMULATION - Simulation
Data type: FLAGDefault: SPACE
Optional: Yes
Call by Reference: Yes
I_XMLVERS - NF-e: XML Version
Data type: J_1BNFEXMLVERSIONOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for J_1B_NF_MAP_TO_XML
EV_MSSTAT - General Flag
Data type: FLAGOptional: No
Call by Reference: Yes
TABLES Parameters details for J_1B_NF_MAP_TO_XML
IT_NFLIN - Nota Fiscal line items
Data type: J_1BNFLINOptional: No
Call by Reference: Yes
IT_CTE_RES - Information about resource
Data type: J_1BCTE_D_RESOptional: Yes
Call by Reference: Yes
IT_CTE_DOCREF - Reference to the NF-e being transported
Data type: J_1BCTE_D_DOCREFOptional: Yes
Call by Reference: Yes
IT_TRANS_VOLUMES - Transported Volumes
Data type: J_1BNFTRANSVOLOptional: Yes
Call by Reference: Yes
IT_TRAILER_INFO - Trailer Information
Data type: J_1BNFTRAILEROptional: Yes
Call by Reference: Yes
IT_TRADE_NOTES - Trade Notes
Data type: J_1BNFTRADENOTESOptional: Yes
Call by Reference: Yes
IT_ADD_INFO - Free Usage Fields for Additional Information
Data type: J_1BNFADD_INFOOptional: Yes
Call by Reference: Yes
IT_REF_PROC - Additional Information: Referenced Processes
Data type: J_1BNFREFPROCOptional: Yes
Call by Reference: Yes
IT_SUGAR_SUPPL - Daily Supply of Sugarcane
Data type: J_1BNFSUGARSUPPLOptional: Yes
Call by Reference: Yes
IT_SUGAR_DEDUC - Taxes and Contributions on Sugarcane
Data type: J_1BNFSUGARDEDUCOptional: Yes
Call by Reference: Yes
IT_VEHICLE - Nota Fiscal: Vehicle Details
Data type: J_1BNFVEHICLEOptional: Yes
Call by Reference: Yes
IT_NFNAD - Nota Fiscal partners
Data type: J_1BNFNADOptional: No
Call by Reference: Yes
IT_PHARMACEUT - Nota Fiscal: Pharmaceutical
Data type: J_1BNFPHARMACEUTOptional: Yes
Call by Reference: Yes
IT_FUEL - Nota Fiscal: Fuel Details
Data type: J_1BNFFUELOptional: Yes
Call by Reference: Yes
IT_NFSTX - Nota Fiscal tax per item
Data type: J_1BNFSTXOptional: No
Call by Reference: Yes
IT_NFFTX - Nota Fiscal header message
Data type: J_1BNFFTXOptional: No
Call by Reference: Yes
IT_NFREF - Nota Fiscal reference to header message
Data type: J_1BNFREFOptional: No
Call by Reference: Yes
IT_NFCPD - Nota Fiscal one-time accounts
Data type: J_1BNFCPDOptional: Yes
Call by Reference: Yes
IT_VBFA - Reference Structure for XVBFA/YVBFA
Data type: VBFAVBOptional: Yes
Call by Reference: Yes
IT_IMPORT_DI - Nota Fiscal Data for Import Documents
Data type: J_1BNFIMPORT_DIOptional: Yes
Call by Reference: Yes
IT_IMPORT_ADI - Nota Fiscal Data for Additions to Import Documents
Data type: J_1BNFIMPORT_ADIOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
RFC_FAILURE - RFC called failed
Data type:Optional: No
Call by Reference: Yes
PROCESS_ERROR - Error from form routine
Data type:Optional: No
Call by Reference: Yes
CTE_ERROR - CT-e mapping error
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for J_1B_NF_MAP_TO_XML 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_nfdoc | TYPE J_1BNFDOC, " | |||
| lt_it_nflin | TYPE STANDARD TABLE OF J_1BNFLIN, " | |||
| lv_ev_msstat | TYPE FLAG, " | |||
| lv_rfc_failure | TYPE FLAG, " | |||
| lt_it_cte_res | TYPE STANDARD TABLE OF J_1BCTE_D_RES, " | |||
| lt_it_cte_docref | TYPE STANDARD TABLE OF J_1BCTE_D_DOCREF, " | |||
| lt_it_trans_volumes | TYPE STANDARD TABLE OF J_1BNFTRANSVOL, " | |||
| lt_it_trailer_info | TYPE STANDARD TABLE OF J_1BNFTRAILER, " | |||
| lt_it_trade_notes | TYPE STANDARD TABLE OF J_1BNFTRADENOTES, " | |||
| lt_it_add_info | TYPE STANDARD TABLE OF J_1BNFADD_INFO, " | |||
| lt_it_ref_proc | TYPE STANDARD TABLE OF J_1BNFREFPROC, " | |||
| lt_it_sugar_suppl | TYPE STANDARD TABLE OF J_1BNFSUGARSUPPL, " | |||
| lt_it_sugar_deduc | TYPE STANDARD TABLE OF J_1BNFSUGARDEDUC, " | |||
| lt_it_vehicle | TYPE STANDARD TABLE OF J_1BNFVEHICLE, " | |||
| lt_it_nfnad | TYPE STANDARD TABLE OF J_1BNFNAD, " | |||
| lv_i_acckey | TYPE J_1B_NFE_ACCESS_KEY, " | |||
| lv_process_error | TYPE J_1B_NFE_ACCESS_KEY, " | |||
| lt_it_pharmaceut | TYPE STANDARD TABLE OF J_1BNFPHARMACEUT, " | |||
| lt_it_fuel | TYPE STANDARD TABLE OF J_1BNFFUEL, " | |||
| lv_i_vbeln | TYPE VBELN_VF, " | |||
| lt_it_nfstx | TYPE STANDARD TABLE OF J_1BNFSTX, " | |||
| lv_cte_error | TYPE J_1BNFSTX, " | |||
| lt_it_nfftx | TYPE STANDARD TABLE OF J_1BNFFTX, " | |||
| lv_i_parallel | TYPE FLAG, " SPACE | |||
| lt_it_nfref | TYPE STANDARD TABLE OF J_1BNFREF, " | |||
| lv_i_simulation | TYPE FLAG, " SPACE | |||
| lt_it_nfcpd | TYPE STANDARD TABLE OF J_1BNFCPD, " | |||
| lv_i_xmlvers | TYPE J_1BNFEXMLVERSION, " | |||
| lt_it_vbfa | TYPE STANDARD TABLE OF VBFAVB, " | |||
| lt_it_import_di | TYPE STANDARD TABLE OF J_1BNFIMPORT_DI, " | |||
| lt_it_import_adi | TYPE STANDARD TABLE OF J_1BNFIMPORT_ADI. " |
|   CALL FUNCTION 'J_1B_NF_MAP_TO_XML' "Mapping NF data to XML Structures |
| EXPORTING | ||
| I_NFDOC | = lv_i_nfdoc | |
| I_ACCKEY | = lv_i_acckey | |
| I_VBELN | = lv_i_vbeln | |
| I_PARALLEL | = lv_i_parallel | |
| I_SIMULATION | = lv_i_simulation | |
| I_XMLVERS | = lv_i_xmlvers | |
| IMPORTING | ||
| EV_MSSTAT | = lv_ev_msstat | |
| TABLES | ||
| IT_NFLIN | = lt_it_nflin | |
| IT_CTE_RES | = lt_it_cte_res | |
| IT_CTE_DOCREF | = lt_it_cte_docref | |
| IT_TRANS_VOLUMES | = lt_it_trans_volumes | |
| IT_TRAILER_INFO | = lt_it_trailer_info | |
| IT_TRADE_NOTES | = lt_it_trade_notes | |
| IT_ADD_INFO | = lt_it_add_info | |
| IT_REF_PROC | = lt_it_ref_proc | |
| IT_SUGAR_SUPPL | = lt_it_sugar_suppl | |
| IT_SUGAR_DEDUC | = lt_it_sugar_deduc | |
| IT_VEHICLE | = lt_it_vehicle | |
| IT_NFNAD | = lt_it_nfnad | |
| IT_PHARMACEUT | = lt_it_pharmaceut | |
| IT_FUEL | = lt_it_fuel | |
| IT_NFSTX | = lt_it_nfstx | |
| IT_NFFTX | = lt_it_nfftx | |
| IT_NFREF | = lt_it_nfref | |
| IT_NFCPD | = lt_it_nfcpd | |
| IT_VBFA | = lt_it_vbfa | |
| IT_IMPORT_DI | = lt_it_import_di | |
| IT_IMPORT_ADI | = lt_it_import_adi | |
| EXCEPTIONS | ||
| RFC_FAILURE = 1 | ||
| PROCESS_ERROR = 2 | ||
| CTE_ERROR = 3 | ||
| . " J_1B_NF_MAP_TO_XML | ||
ABAP code using 7.40 inline data declarations to call FM J_1B_NF_MAP_TO_XML
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_parallel) | = ' '. | |||
| DATA(ld_i_simulation) | = ' '. | |||
Search for further information about these or an SAP related objects