SAP J_1BNFE_CONVERT_XML_MAT_A_UOM Function Module for Convert XML Material and XML Unit of Measure









J_1BNFE_CONVERT_XML_MAT_A_UOM is a standard j 1bnfe convert xml mat a uom SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Convert XML Material and XML Unit of Measure 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 convert xml mat a uom FM, simply by entering the name J_1BNFE_CONVERT_XML_MAT_A_UOM into the relevant SAP transaction such as SE37 or SE38.

Function Group: J_1B_NFE_UTILITY_2
Program Name: SAPLJ_1B_NFE_UTILITY_2
Main Program: SAPLJ_1B_NFE_UTILITY_2
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function J_1BNFE_CONVERT_XML_MAT_A_UOM 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_CONVERT_XML_MAT_A_UOM'"Convert XML Material and XML Unit of Measure
EXPORTING
IV_LIFNR = "Account Number of Vendor or Creditor
IV_XML_MATNR = "Material Number Used by Vendor
IV_XML_UOM = "External Unit of Measurement in Commercial Format (3-Char.)
* IV_NCM = "Brazilian NCM Code
* IT_RECEIVER_ORGDATA = "NF-e incoming: Organzational Data
* IV_RECEIVER_CNPJ = "CNPJ Number
* IX_CALL_BADI = 'X' "Call BAdI J_1BNFE_IN
* IV_XMLPOS = "NF-e Item Number from XML

IMPORTING
EV_ERP_MATNR = "Material Number
EV_ERP_UOM = "Unit of Entry
EV_ERP_UOM_ISO = "Unit of entry in ISO code
EV_UMREN = "Denominator for Conversion of Order Unit to Base Unit
EV_UMREZ = "Numerator for Conversion of Order Unit to Base Unit
EV_BASE_UOM = "Base Unit of Measure

CHANGING
* CT_BAPIRET2 = "Table with BAPI Return Information

EXCEPTIONS
CONVERSION_MATERIAL_FAILED = 1 CONVERSION_UOM_FAILED = 2
.



IMPORTING Parameters details for J_1BNFE_CONVERT_XML_MAT_A_UOM

IV_LIFNR - Account Number of Vendor or Creditor

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

IV_XML_MATNR - Material Number Used by Vendor

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

IV_XML_UOM - External Unit of Measurement in Commercial Format (3-Char.)

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

IV_NCM - Brazilian NCM Code

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

IT_RECEIVER_ORGDATA - NF-e incoming: Organzational Data

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

IV_RECEIVER_CNPJ - CNPJ Number

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

IX_CALL_BADI - Call BAdI J_1BNFE_IN

Data type: XFELD
Default: 'X'
Optional: Yes
Call by Reference: Yes

IV_XMLPOS - NF-e Item Number from XML

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

EXPORTING Parameters details for J_1BNFE_CONVERT_XML_MAT_A_UOM

EV_ERP_MATNR - Material Number

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

EV_ERP_UOM - Unit of Entry

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

EV_ERP_UOM_ISO - Unit of entry in ISO code

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

EV_UMREN - Denominator for Conversion of Order Unit to Base Unit

Data type: EKPO-UMREN
Optional: No
Call by Reference: Yes

EV_UMREZ - Numerator for Conversion of Order Unit to Base Unit

Data type: EKPO-UMREZ
Optional: No
Call by Reference: Yes

EV_BASE_UOM - Base Unit of Measure

Data type: EKPO-LMEIN
Optional: No
Call by Reference: Yes

CHANGING Parameters details for J_1BNFE_CONVERT_XML_MAT_A_UOM

CT_BAPIRET2 - Table with BAPI Return Information

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

EXCEPTIONS details

CONVERSION_MATERIAL_FAILED - XML Maerial could not be converted

Data type:
Optional: No
Call by Reference: Yes

CONVERSION_UOM_FAILED - XML Unit of Measurement could not be converted

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for J_1BNFE_CONVERT_XML_MAT_A_UOM 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_iv_lifnr  TYPE LIFNR, "   
lv_ct_bapiret2  TYPE BAPIRETTAB, "   
lv_ev_erp_matnr  TYPE MATNR, "   
lv_conversion_material_failed  TYPE MATNR, "   
lv_ev_erp_uom  TYPE ERFME, "   
lv_iv_xml_matnr  TYPE IDNLF, "   
lv_conversion_uom_failed  TYPE IDNLF, "   
lv_iv_xml_uom  TYPE MSEH3, "   
lv_ev_erp_uom_iso  TYPE ERFME_ISO, "   
lv_iv_ncm  TYPE J_1BNBMCO1, "   
lv_ev_umren  TYPE EKPO-UMREN, "   
lv_ev_umrez  TYPE EKPO-UMREZ, "   
lv_it_receiver_orgdata  TYPE J_1BNFE_ORGDATA_TAB, "   
lv_ev_base_uom  TYPE EKPO-LMEIN, "   
lv_iv_receiver_cnpj  TYPE J_1BCGC, "   
lv_ix_call_badi  TYPE XFELD, "   'X'
lv_iv_xmlpos  TYPE J_1BNFE_XML_ITMNUM. "   

  CALL FUNCTION 'J_1BNFE_CONVERT_XML_MAT_A_UOM'  "Convert XML Material and XML Unit of Measure
    EXPORTING
         IV_LIFNR = lv_iv_lifnr
         IV_XML_MATNR = lv_iv_xml_matnr
         IV_XML_UOM = lv_iv_xml_uom
         IV_NCM = lv_iv_ncm
         IT_RECEIVER_ORGDATA = lv_it_receiver_orgdata
         IV_RECEIVER_CNPJ = lv_iv_receiver_cnpj
         IX_CALL_BADI = lv_ix_call_badi
         IV_XMLPOS = lv_iv_xmlpos
    IMPORTING
         EV_ERP_MATNR = lv_ev_erp_matnr
         EV_ERP_UOM = lv_ev_erp_uom
         EV_ERP_UOM_ISO = lv_ev_erp_uom_iso
         EV_UMREN = lv_ev_umren
         EV_UMREZ = lv_ev_umrez
         EV_BASE_UOM = lv_ev_base_uom
    CHANGING
         CT_BAPIRET2 = lv_ct_bapiret2
    EXCEPTIONS
        CONVERSION_MATERIAL_FAILED = 1
        CONVERSION_UOM_FAILED = 2
. " J_1BNFE_CONVERT_XML_MAT_A_UOM




ABAP code using 7.40 inline data declarations to call FM J_1BNFE_CONVERT_XML_MAT_A_UOM

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 UMREN FROM EKPO INTO @DATA(ld_ev_umren).
 
"SELECT single UMREZ FROM EKPO INTO @DATA(ld_ev_umrez).
 
 
"SELECT single LMEIN FROM EKPO INTO @DATA(ld_ev_base_uom).
 
 
DATA(ld_ix_call_badi) = '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!