Quantcast
Channel: SCN : Document List - ABAP Development
Viewing all articles
Browse latest Browse all 935

Material Master Enhancement End-to-End: Conversion Perspective - 1(Continue)

$
0
0

Integrating Customer-Specific Fields In Material Master -2


 

4 : Maintaining customer specific fields through LSMW Direct Input method. (Program: RMDATIND, Object: 0020)

 

Customer-specific fields in Material Master can also be maintained or migrated using standard direct input program RMDATIND.To achieve this, we need to enhance and integrate few more structures, apart from previously done MARA enhancement and OMSR configuration. Steps are detailed out below.

 

First step is to enhance structure BMMH1 of program RMDATIND. Structure BMMH1 contains the customer include CI_MMH1, which is part of the enhancement MGA0001. Add the customer-specific fields to include CI_MMH1.The names of the fields in CI_MMH1 must be identical to those of the corresponding fields in material master tables Ex’s MARA

 

 

If you have not used customer structure ZMMH1 before, create it as a copy of structure BMMH1 and delete the standard fields that you do not require. You are not permitted to delete field STYPE and include CI_MMH1 when doing this. If you have already used structure ZMMH1, add include CI_MMH1 to it.


Save and Activate both ZMMH1 and CI_MMH1.

Run program RMDATING.This program generates routines which are supplied to your customer-specific fields from the input file


 

You can check function group MGAD in SE80 and activate once if not activated.


 

With above step we are done enhancement and integration that require for direct input LSMW conversion. Now let’s develop the required LSMW object and check the result.

 

 

LSMW

Maintain Object Attributes

Maintain Source Structures

Maintain Source Fields

Maintain Structure Relations

Maintain Field Mapping and Conversion Rules

 

Input File containing Legacy data in Presentation Server


 

Execute the LSMW object after finishing all subsequent steps like Specify Files, Read Data, and Convert Data successfully.


 

 

 

Result for Point Number 4


 

Above example speaks about updating one customer-specific field. Following similar steps we can update more than one custom field which belongs different other material master tables like MARC, MARD etc. However this example is about material updating process. While creating Material we might require passing different other mandatory field values like Material Type, Industry Sector, and respective t-code.


 

5 : Maintaining customer specific fields through LSMW BAPI method

     (BAPI_MATERIAL_SAVEREPLICA, BO: BUS1001006)

 

Customer-specific fields in Material Master can also be maintained or migrated using standard BAPI method: BAPI_MATERIAL_SAVEREPLICA.To achieve this, we need to enhance and integrate few more other structures, apart from previously done MARA enhancement and OMSR configuration. Steps are detailed out below.

 

T-CODE: SWO1 BO: BUS1001006

 


 

 

Structures EXTENSIONIN and EXTENSIONINX can be effectively used to maintain customer-specific fields in material master. It is very much required and advised to read the documentation available for this BAPI and for above structures to have a better understanding of the process and how this BAPI works in updating custom fields.

 

Respective structures enhancement and appropriate input values for different available BAPI parameters are done based on the documentation and same are detailed out below. First structures

BAPI_TE_<NAME>(<NAME> = MARA) and

BAPI_TE_<NAME> (<NAME> = MARAX) need to be extended.

 


 

 

 

 

Parameters EXTENSIONIN and EXTENSIONINX are used for transferring data to the method. Field STRUCTURE contains the name of the structure (for example, BAPI_TE_MARA or BAPI_TE_MARAX).The remaining fields in parameters EXTENSIONIN or EXTENSIONINX contain data for the key fields (for example, the material number) and the data for customer-specific fields in the same sequence as it is present in the modified BAPI extension structures.The number of characters reserved in both parameters for the contents of the customer-specific fields must match the number of characters for the relevant field in the work area.

 

 

Minimum test data of BAPI BAPI_MATERIAL_SAVEREPLICA for modifying customer specific field is given below based on documentation.

 

NOAPPLLOG = ‘X’

HEADDATA


 

EXTENSIONIN

 

EXTENSIONINX

 

Field ‘FUNCTION’ in BAPI parameter plays an important role. It speaks about different activity types which are possible using this BAPI.


 

 

Now let’s prepare a LSMW object top of this and check the result.

 

As this a BAPI method, IDOC’s will be generated with data from File for Converted Data (which is present in Application Server) and subsequently will be passed to BAPI: BAPI_MATERIAL_SAVEREPLICA parameters for posting.

 

For IDOC generation below configuration is required.


Maintain Object Attributes

 

 

 

Maintain Structure Relations


Maintain Field Mapping and Conversion Rules

 

 

 

 

Legacy File

 

Execute the LSMW object after finishing all subsequent steps like Specify Files, Read Data, and Convert Data successfully


 

 

 

Result for Point Number 4


 

 

 

6 :Maintaining customer specific fields through IDOC Method

 

All the steps followed for BAPI method above also applies for IDOC method in the similar manner. Same IDOC Basic Type: MATMAS_MASS_BAPI03 and Message Type:MATMAS_MASS_BAPIwill solve the purpose. Only LSMW object attribute technique will be different.

 

 

Remaining all steps, mapping, sequence of execution and result remains same as BAPI method.

 

 

Table TBDBE speaks about the link between Message Type MATMAS_MASS_BAPI to BAPI_MATERIAL_SAVEREPLICA

 


 

Continue to First Part ?


Click on :
Integrating Customer-Specific Fields In Material Master -1


Viewing all articles
Browse latest Browse all 935

Trending Articles