IBM Support

Configuring Maximo Enterprise Adapter for SAP to use the material number field length extension in SAP S/4HANA

Fix Readme


Abstract

As described in SAP Note 2215424, in SAP S/4HANA, the maximum length of the fields that handle the material number was extended from 18 to 40 characters. To ensure compatibility with other versions and existing interfaces, existing fields in BAPIs kept their original length. A new field was added at the end of the structure to support up to 40-character material numbers.

Content

To allow material numbers with more than 18 characters, you must activate the extended material number functionality on the SAP S/4HANA system. Until the extended material number functionality is activated, communication via BAPIs, IDOCs, web-services, and released RFCs (inbound) still works as normal.
After the extended material number functionality is activated,  some minor changes are required to the Maximo Enterprise Adapter for SAP ABAP code to deliver the material number to a new field inside the BAPI structures.
Note. Numeric only material numbers are still restricted to 18 characters and padded with leading zeros up to 18 characters in the database. This behavior is unchanged.
Required Changes to Maximo Enterprise Adapter for SAP ABAP code:
SAP PO – Message Mapping msgMap_IDoc_MATMAS
The IDOC MATMAS has a field MATNR_LONG in segment E1MARAM. Modify the mapping to use this field instead of MATNR which is still 18 characters.
SAP ERP – ABAP Function Group ZBC_M2S
Change the mapping of the material number to map to the new MATERIAL_LONG BAPI structure field  in each of the following function modules:
              Z_BC_CREATE_GOODISSUE_BAPI
              Z_BC_CREATE_PURCHASEREQ_N_BAPI
              Z_BC_CREATE_PURCHORDER_BAPI
              Z_BC_UPDATE_PURCHORDER_BAPI
              Z_BC_CREATE_RESERVATION_BAPI
Example
In the following example, the ABAP code shows how the material number is mapped to the MATERIAL_LONG BAPI structure field in each functional module.

Z_BC_CREATE_GOODISSUE_BAPI

** set GOODSMVT_ITEM **********************************

*** begin of issue #345561
*    GOODSMVT_ITEM-MATERIAL =   ISSUES-MMATNR.
     GOODSMVT_ITEM-MATERIAL_LONG =   ISSUES-MMATNR. 
*** end of issue #345561

Z_BC_CREATE_PURCHASEREQ_N_BAPI

** set PRITEM **********************************

*** begin of issue #345561
*    PRITEM-MATERIAL =   REQUISITIONS-MMATNR.
    PRITEM-MATERIAL_LONG =   REQUISITIONS-MMATNR.
*** end of issue #345561

** set PRITEMX **********************************

*** begin of issue #345561
*    PRITEM-MATERIAL =   REQUISITIONS-MMATNR.
*   PRITEMX-MATERIAL =   'X'.
    PRITEMX-MATERIAL_LONG =  'X'.
*** end of issue #345561

Z_BC_CREATE_PURCHORDER_BAPI

*** set ORDER_ITEM **********************************

*** begin of issue #345561
*    POITEM-MATERIAL = ORDERS-MEMATN.
    POITEM-MATERIAL_LONG ORDERS-MEMATN.
*** end of issue #345561

*** set ORDER_ITEMX **********************************

*** begin of issue #345561
*    POITEMX-MATERIAL = 'X'.
    POITEMX-MATERIAL_LONG 'X'.
*** end of issue #345561

  Z_BC_UPDATE_PURCHORDER_BAPI

*** set ORDER_ITEM **********************************

*** begin of issue #345561
*    POITEM-MATERIAL = ORDERS-MEMATN.
    POITEM-MATERIAL_LONG ORDERS-MEMATN.
*** end of issue #345561

*** set ORDER_ITEMX **********************************

*** begin of issue #345561
*    POITEMX-MATERIAL = 'X'.
    POITEMX-MATERIAL_LONG 'X'.
*** end of issue #345561

Z_BC_CREATE_RESERVATION_BAPI

*** RESERVATIONITEMS Data
*** begin of issue #345561
*    RESERVATIONITEMS-MATERIAL    = RESERVATIONS-MMATNR.
    RESERVATIONITEMS-MATERIAL_LONG    RESERVATIONS-MMATNR.
*** end of issue #345561

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSLKYL","label":"Maximo Enterprise Adapter"},"Component":"","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
31 October 2019

UID

ibm11098081