I recently worked on a project which entailed enhancing vendor master, updating CREMAS04 Idoc with a new segment for custom records and finally being able to generate IDOCS with new segment when these custom fields of (added to )vendor master are updated. In this 3 part blog I will try to cover the development effort required to achieve the aforementioned functionality in detail.
The entire development effort can be classified into three sections as follows:
1) Extending the vendor master
2) Enhancing method VMD_EI_API->MAINTAIN( ) method to programmatically update vendor master tables (LFA1, LFB1, LFM1, LFM2 .. ) - part2.
3) Enhancing the CREAMS04 basis type to include the new segment. - part3
Extending vendor master involves enhancing the vendor master database table and vendor master screen. For the purpose of this blog I am going to enhance LFA1 (vendor master general - header level ) table with custom fields.
SAP IMG->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.
In this step you specify the screen group and screen number associated with the new vendor master fields.
This steps allows user to create a implementation for BADI - VENDOR_ADD_DATA. In my example I am just activating the custom screen group
Add on , However this BADI provides other methods to query data for add on fields, save data to table other then vendor master, initialize add- on append structure ( discussed later ) and much more.
This steps allows for creation of implementation of BADI- VENDOR_ADD_DATA_CS. This badi provides methods to manipulate the screen elements of subscreen which are all associated with the screen-group declared in previous group. It also provides methods to set values to and read values from the screen fields on the subscreens.
A filer with the screen group has to be specified before methods of this BADI can implemented.
To do this, go to SE11 and open definition of table LFA1. Click on 'Append Structure..' option and then click on 'Create' to create new append structure. Since for this demo IDOCS have to be created for any change in values stored in these custom fields. Make sure that the 'Change document' option is turned on at the data element level .
Save all changes and active.
Execute transaction SE51 and create a new subscreen for program and screen number specified above ( step 4 and step2 respectively: program: SAPMZMSW_VEND_EPA, Screen: 9030 ).
Click on the 'Dictionary/Program fields window' button to select the append structure fields from LFA1 table structure.
Arrange the fields on the layout screen and save all changes.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |