cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a customer in SAP S4 HANA through custom program?

pritam_mondal
Explorer

Dear Gurus,

In S4 HANA, we have the concept of business partner and roles (Concept of Customers and Vendors are modified in order to reduce data redundancy). If we require a customer or vendor to be created, we need to create a BP and assign the role of customer.

I want to create/upload customers through program. I would like to know the steps for that.

Should I create a BP first and assign a customer role to it through BAPI and then update sales area data and any other required data? Is this the best way or is there any other way to achieve this? Is there any class/api available to create a BP and assign a customer role in a single step?

I am using CMD_EI_API to create/change customers. Is there any api/class to create/change BP?


Regards,

Pritam

pritam_mondal
Explorer
0 Kudos

@horst.keller Sir, Could you please guide me on this? At least I should be able to reach out the right person for help. I don't know if it is allowed in the community policy to seek help from a specific person. Hope it will be forgiven.

Thanks in Advance.

Pritam

Accepted Solutions (0)

Answers (4)

Answers (4)

d024348
Employee
Employee

Hi, note 2417298 "Integration of Business Partner with Customer and Supplier Roles" contains the allowed BP APIs.

CMD/VMD APIs are to not released for customer usage.

Regards, Ingo Bruß

pritam_mondal
Explorer
0 Kudos

Thanks a lot ingo.bruss Sir... I believe it'll serve my purpose. I'll try to implement this solution tomorrow and update you.


Regards,

Pritam

pritam_mondal
Explorer
0 Kudos

Hello ingo.bruss Sir. Thanks for your help. I have been able to implement a basic solution and created BP through the program. However, It is not automatically creating a BP number and I had to mention the BP number explicitly.

I believe the issue is with the configurations and I would like to learn the basics about BP, BP creation, partner groups etc. Could you please share some document related to that? I am sorry that I am asking too much. But it's a bit difficult for a technical consultant to formulate a solution on his own. So, it'll be of great help if I get any pointers.

Thanks again.

Regards,

Pritam

d024348
Employee
Employee
0 Kudos

Sorry, can't really help here - thought that the number determination was controlled by BP grouping (BU_GROUP) and am not aware whether there are any issues in internal number creation.

Regards, Ingo

former_member194575
Active Participant
0 Kudos

Hi Pritam,

I am not sure if there is a standard class/api to create BP and assign customer role in a single step. But if you are fine with creating business partner first and then assign customer/supplier role with another FM, then use following BAPI to fulfill that requirement.

Create business partner - BAPI_BUPA_CREATE_FROM_DATA

Add BP role - BAPI_BUPA_ROLE_ADD_2

Thanks,

Shanthi

pritam_mondal
Explorer
0 Kudos

Dear Shanthi,

Thanks for your response. I am sure these BAPIs works perfectly and so does the APIs. I am trying to explore the APIs and facing issues with number ranges. Hope I'll be able to resolve it at the earliest.

Thanks again 🙂

Regards,

Pritam

former_member330246
Active Contributor
0 Kudos

Pritam, use BOPF framework to create a program to handle Business Partner.

I do not have your business requirement, and of course, the best option would be to use LTMC tool. But, if you checked it, and suppose that it does not fit your requirements, try to use a standard BOPF object to this.

Check if / BOFU / BUSINESSPARTNER could support you.

FM

d024348
Employee
Employee
0 Kudos

To the best of my knowledge, /BOFU/BUSINESSPARTNER implements read-only access

Regards, Ingo Bruß

pritam_mondal
Explorer
0 Kudos

Dear Fausto,

Thanks for your response to my question. I'll try to explain the business requirement.

In our case, customers and vendors are created through BDC on XD01/XK01 etc. As we are migrating to S4 HANA, these BDCs will not be functional any more as these tcodes are made obsolete.

So I need to create a program which will help us to create / change business partners. I don't want to go with the idea of BDCs neither the BAPIs. I am pretty sure this APIs work perfectly and it should work for me also. I have developed a program, where it creates a BP when I use the external number range. However, I'm facing problem when I am trying to get the BP no from the internal number range.

Thanks again 🙂

Regards,

Pritam

former_member330246
Active Contributor
0 Kudos

Pritan, when I read your question I don’t understood that you are talking about services or API. Hence, I suggested to elaborate a program using BOPF.

There is a generic interface to import business partner. Please check the help link here.

The help documentation could be read here.

FM.

narasimhulu_konnipati
Active Contributor
0 Kudos

You can take a look into the LTMC (Migration Cockpit). Please find more details in the below note.

2576565 - SAP S/4HANA Data Migration - On Premise