Application Development 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: 

How can the status of a contract sales document changed programmatically

Former Member
0 Kudos
411

I am creating an order wth reference to a contract. When I save the order, is there any way by which I can change the status of the contract to complete ? How does the status change in the Sales documents in different SD phases like quotation, order, billing and delivery.

7 REPLIES 7

Former Member
0 Kudos
122

is this related to CRM are R/3.

if in CRM u can use the badi(ORDER_SAVE).

Regards,

Tanveer.Ahmed

Former Member
0 Kudos
122

No... not CRM ... this is R3.

Former Member
0 Kudos
122

is this related to CRM are R/3.

if in CRM u can use the badi(ORDER_SAVE).

Regards,

Tanveer.Ahmed

Former Member
0 Kudos
122

Hi Avanti,

In case you cannot find any Function Exit/BADI/User exit for the requirement.

You can create an Update Function Module. Using the update Function Module you can change the table entry for that particular contract (using modify/update command).

The Update function module should be called from a User Exit or Function Exit that is trigerreed while saving.

The User exits for Sales order creation/change can be found in program SAPMV45A. In this program you can use Includes MV45AFZB or MV45AFZZ to write your desired code as these are the two user exit Includes available for VA01/VA02/VA03/VA31/VA32/VA33 transactions.

Update function Modules are proceesed by SAP in Update Mode. So please take care that no data inconsistencies occur.

Hope this will help in solving your requirement.

Regards,

Abhisek.

Former Member
0 Kudos
122

Hi Abhishek,

Thanks for the reply...

actually, I dont want to update a standard table ... thats why trying to find out a different way out ... btw is it possible to let me know the standard sap process of this status update .... how the status actually changes ... i found a config in spro - assign status to item categories .... is that the one which takes care of this ???

also, thinking about the possibility of adding a user status using transaction bs02 ....

and also came to know that this status is updated thru some copy control .... so a lot of confusion on this ....

0 Kudos
122

Hi Avanti,

Consult a Functional Consultant coz a Functional Consultant would be able to provide a better solution.

Regards,

Abhisek.

0 Kudos
122

I did not find the answer to how the status changes in a sd document as it passes thru the various phases. I am talking about the standard process and not the user status. Not found a satisfactory answer yet....