Skip to Content

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                                7001SUBSCREEN_HEADER’.
APPEND ls_bdcdata TO et_ft.

CLEAR: ls_bdcdata.
ls_bdcdata-fnam = ‘BDC_SUBSCR’.
ls_bdcdata-fval = ‘SAPLZFI_UTILITY_VENDOR_ENHANCE          9000SUBSCREEN_BODY’.
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.

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.

To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

  1. Sougata Chatterjee

    I think it would be worthwhile to extend this blog by including the functionlities provided by the methods FILL_ALE_SEGMENTS_OWN_DATA and PASS_NON_STANDARD_SEGMENT within the interface IF_EX_VENDOR_ADD_DATA_BI (for the ALE inbound & outbound distribution) as this same BAdI is used in both ALE distribution and Batch Input processing of the vendor master.

    In case of ALE, you wouldn’t need to enhance the BLFxx structures for the custom fields.

    (0) 

Leave a Reply