Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
fernando_martin
Participant
0 Kudos

Purpose

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.

 

How customers were loaded with ECC 6.0

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.

customer_1.JPG

 

Why approach with ECC 6.0 is no longer possible. Business Partner concept.

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.

customer_10b.JPG

 

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.

customer_11b.JPG

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:

https://blogs.sap.com/2020/12/17/how-to-load-customers-business-partners-with-sap-s-4hana-data-migra...

In our case, we will use Winshuttle studio version 12.x.

 

 

Build load file for Winshuttle Studio BP load

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.

WS_BP_01.jpg

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.

WS_BP_02.jpg

In other sheets we link the BP in the column RUN_ID, like for the BP roles.

WS_BP_03.jpg

The same applies for sales area view.

WS_BP_04.jpg

And company data view.

WS_BP_05.jpg

You can add additional sheets for sales texts, contact persons, address versions, …

 

 

Create the script with Winshuttle Studio v12.x

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.

WS_BP_06.jpg

WS_BP_07.jpg

You need to logon to SAP in order to import the RFC structure

WS_BP_08.jpg

Choose RFC and fill the field:

WS_BP_09.jpg

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.

WS_BP_10.jpg

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.

WS_BP_11.jpg

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.

WS_BP_12.jpg

 

Run the script with Winshuttle Studio to create business partners

 

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.

WS_BP_13.jpg

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.

WS_BP_14.jpg

Summary

 

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.

Labels in this area