Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

create customer and sales contract in one commit

Former Member
0 Likes
488

does anyone know a method to create a customer and a sales contract guaranteeing transactional, using one commit at last of work?

I use to create a customer the standard class CMD_EI_API.

Thanks of all.

does anyone know a method to create a customer and a sales contract guaranteeing transactional, using one commit at last of work?

I use to create a customer the standard class CMD_EI_API.

Thanks of all.

3 REPLIES 3
Read only

FredericGirod
Active Contributor
0 Likes
458

Hi Daniele,

I see people who have one sold-to-party (AG) with several delivery address (temporary). In the SD document, they modify the address  to create a specific address for each SD document. In SAP that will create you an address starting with 999   it's an address only valid for the SD document.

it's not beautiful, but it works

regards

Fred

Read only

0 Likes
458

Thank you, but i already done this solution to manage different address for the same customer.

My target is create in the first time, when between customer and sales contract not exist, these two object with one commit; if the customer had been created without errors and sales contract had been created without errors then only now i must commit these two object into db.

Read only

0 Likes
458

Hi Daniele,

I'm not sure you could do this. Because you will need to wait the commit to have the address number into the SAP table. And you need also this information to create your SD document ...

Maybe it's more simple to lock and delete the customer. (look how SAP works in the SARA archiving trans. )

regards

Fred