
This blog explains how to load business partners using the Winshuttle Studio. For these objects, old transactions like XD01, XK01, … have been deprecated and are no longer available. I will explain how create an script using a CVI function module and what is the logic to fill the different sheets in the file template for BP customers.
With SAP ECC6.0 and previous versions it was common to create LSMW objects linked to different recordings created ad-hoc with transactions XD01 or VD01 or use program RFBIDEK0.
S/4HANA requires the use of business partner, instead of using previous methods of creating separate objects for customers, vendors and contacts. Transactions like XD01, VD01 are outdated and SAP will redirect to new transaction BP.
With the business partner approach, one BP can be a customer, vendor (now supplier), contact person, payer, etc. all at once, so there is no need for separate master data objects.
With the new business partner concept, the tables starting with BUT* are the central repository for all BP created. Older tables like KNA1, KNVV, KNB1 are still filled in S/4HANA, but it is necessary to do the necessary customizing settings in Customer-Vendor-Integration (CVI). CVI is used to synchronize customer and vendor master data objects with SAP business partner objects within SAP. With CVI in place, all the customers and vendors are assigned a BP number.
Besides this, with S/4 HANA it is not recommended to use LSMW any more. There is a new data migration tool called Data Migration Cockpit, which provides file templates that we will fill to perform the data migration. For this there is a previous blog:
In our case, we will use Winshuttle studio version 12.x.
As transaction BP is very difficult to use in recordings, we will use a RFC "RFC_CVI_EI_INBOUND_MAIN", which is used to create a Business Partner as a Customer or Supplier with a contact in a remote system.
The RFC interface is mass-enabled which mean that you can create several different Customers or Suppliers at the same time.
You can either create Customers with Contacts or Supplier with Contacts.
The relationship between different Contacts and an Organization (Customer or Supplier) will be maintained via the same sequential ID (RUN_ID).
For every Business Partner with the corresponding data in the input parameter table with the same RUN_ID an all-or-nothing approach is used.
Details on the rejected Business Partner instances together with other messages will be provided in the optional Application Log and in the message return table.
You will find the messages in the Application Log with the Object BUS1006.
We need to create different sheets for the tables in the RFC, so we can easily assign the fields in the file to those in the structures. Like this, it will be possible to have more than one record in other sheets for one single BP, like various sales organizations, company codes, tax codes, roles, … This follows similar logic to the load template provided by SAP for data migration cockpit.
In the first sheet we fill general data.
In other sheets we link the BP in the column RUN_ID, like for the BP roles.
The same applies for sales area view.
And company data view.
You can add additional sheets for sales texts, contact persons, address versions, …
There are different methods to create an script or a query. We chose the direct input in which BAPIs or RFC can be used, as transaction BP is very difficult to use in recordings.
You need to logon to SAP in order to import the RFC structure
Choose RFC and fill the field:
Once selected, we find all tables to fill in the function module with the fields. We need to select those that are relevant for the load, which includes de mandatory tables/fields as also other fields that need to be filled in the load. We will need to check the filed “commit required” so the data is created in SAP.
You can see that all tables start with the field RUN_ID, which is the field to link all records in different tables in the load file as there will be separate sheets.
We assign the values with the fields in the Excel file. The table IT_BP_GENERAL has only one record for each line in the sheet. In table CT_RETURN we assign the log messages sent by the function module.
For company code data, banks, sales areas, … we need to do a loop using the column for RUN_ID as reference, so we can assign more than once company code, sales area, … for each BP.
Before running the script, we can check the data with the winshuttle option in order to detect possible format or value errors as defined in the mapping. When ready, we can load the data online with the Run option or schedule a job.
When we run the script, Winshuttle will write the log from table Return into the columns that we assigned. We get a clear message with possible errors or the BP number created.
As summary, a business partner can be a vendor, customer, contact person all at once and there is no need of separate objects. As this is the new approach in S/4HANA. this makes the use of LSMW not possible.
Winshuttle provides a useful solution to load business partners getting a detailed log with the errors or BP numbers created. The advantages over data migration cockpit are a more flexible file build (only mandatory and relevant fields need to be added) and more detailed log, which is more user friendly. Additionally, if the script is embedded in the Excel file, the user is able to do preload validations or load without using the Winshuttle Studio, which makes the validation & load tasks much easier.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
7 | |
7 | |
6 | |
4 | |
4 | |
4 | |
4 | |
4 | |
3 |