0% found this document useful (0 votes)
408 views2 pages

Vendor Data Migration Using LSMW For Custom Fields

This document describes how to extend SAP's standard vendor data migration process using LSMW (Logical System Migration Workbench) to include custom fields. This is done by customizing the interface IF_EX_VENDOR_ADD_DATA_BI to add the custom field values to the BDC table that generates the batch input session. An example shows how radiobutton and date field values are added for a bespoke field in table LFA1. Once developed, the custom code allows maintaining custom fields during vendor data migration via LSMW's Run Batch Input Session step.

Uploaded by

Ricky Das
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
408 views2 pages

Vendor Data Migration Using LSMW For Custom Fields

This document describes how to extend SAP's standard vendor data migration process using LSMW (Logical System Migration Workbench) to include custom fields. This is done by customizing the interface IF_EX_VENDOR_ADD_DATA_BI to add the custom field values to the BDC table that generates the batch input session. An example shows how radiobutton and date field values are added for a bespoke field in table LFA1. Once developed, the custom code allows maintaining custom fields during vendor data migration via LSMW's Run Batch Input Session step.

Uploaded by

Ricky Das
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Vendor Data Migration using LSMW for custom fields

Background
You have extended your Vendor Master tables (LFA1, LFB1 etc) without any modifications to SAP standard code. These fields are maintained via a custom screen using standard transactions XK01 (Create), XK02 (Change). However, you cannot use the Standard Batch/Direct Input program RFBIKR00 to create new Vendors as part of the Data Migration activity.

Extend the standard Batch Input structure


Let's assume that your bespoke fields are in LFA1. You will need to extend the corresponding Batch Input structure BLFA1. These fields will correspond to those in LFA1. Once done activate the structure.

Customising Activity
We will create an implementation of Enhancement Spot VENDOR_ADD_DATA_BI. In SPRO go to Financial Accounting >> Accounts Receivable and Accounts Payable >> Vendor Accounts >> Master Data >> Preparations for Creating Vendor Master Data >> Adoption of Customer's Own Master Data Fields >> Business Add-In: Processing of Master Data Enhancements with Batch Input. It is assumed that no modifications have been done to the standard system and the activities under Adoption of Customer's Own Master Data Fields have been carried out to facilitate Vendor Create and Change using the standard transactions.
We will call the implementation ZEIMP_VENDOR_ADD_DATA_BI. Create the Implementing Class ZCL_VENDOR_ADD_DATA_BI. Extend the Method FILL_FT_TABLE_USING_DATA_ROWS of Interface IF_EX_VENDOR_ADD_DATA_BI. Method FILL_FT_TABLE_USING_DATA_ROWS has a very simple signature. Table ET_FT contains all the BDC recording that LSMW step Create Batch Input Session generates for the standard Vendor Master fields. We will extend this table with our own bespoke fields. The code here is real simple.

Example
For example, I have a radiobutton and some date fields. DATA: ls_bdcdata TYPE bdcdata.

DATA: lv_datum(10) TYPE c. CLEAR: ls_bdcdata. ls_bdcdata-fnam = 'BDC_OKCODE'. ls_bdcdata-fval = '=AO01'. APPEND ls_bdcdata TO et_ft.

CLEAR: ls_bdcdata. ls_bdcdata-program = 'SAPMF02K'. ls_bdcdata-dynpro = '4000'. ls_bdcdata-dynbegin = 'X'. APPEND ls_bdcdata TO et_ft. CLEAR: ls_bdcdata. ls_bdcdata-fnam = 'BDC_SUBSCR'. ls_bdcdata-fval = 'SAPMF02K APPEND ls_bdcdata TO et_ft. CLEAR: ls_bdcdata. ls_bdcdata-fnam = 'BDC_SUBSCR'. ls_bdcdata-fval = 'SAPLZFI_UTILITY_VENDOR_ENHANCE APPEND ls_bdcdata TO et_ft. CLEAR: ls_bdcdata. ls_bdcdata-fnam = 'BDC_CURSOR'. ls_bdcdata-fval = 'GV_SBV_YES'. APPEND ls_bdcdata TO et_ft. CLEAR: ls_bdcdata. ls_bdcdata-fnam = 'GV_SBV_YES'. ls_bdcdata-fval = 'X'. APPEND ls_bdcdata TO et_ft. WRITE: sy-datum TO lv_datum. CLEAR: ls_bdcdata. ls_bdcdata-fnam = 'LFA1-ZZSBV_REGISTER'. ls_bdcdata-fval = lv_datum. APPEND ls_bdcdata TO et_ft. CLEAR: ls_bdcdata. ls_bdcdata-fnam = 'LFA1-ZZSBV_CESSATION'. ls_bdcdata-fval = lv_datum. APPEND ls_bdcdata TO et_ft. CLEAR: ls_bdcdata. ls_bdcdata-fnam = 'LFA1-ZZSBV_REVIEW'. ls_bdcdata-fval = lv_datum. APPEND ls_bdcdata TO et_ft. 9000SUBSCREEN_BODY'. 7001SUBSCREEN_HEADER'.

The End
And that is it. Now when you run the step Run Batch Input Session (foreground mode) in the LSMW you will see your custom fields being maintained.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy