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 to Capture Sales Contract Number Upon Creation

Former Member
0 Kudos

Dear Expert,

I am trying to provide a customized index table for sales contract, as in VBAK, document number is not a key.

How can I capture the contract number, at the point of document creation (transaction code VA01)?

When i debug the VA01 program, I do not see the document number at user exit.

Please help.

Regards,

HJMY

2 REPLIES 2

Vijay
Active Contributor
0 Kudos

Hi,

You can try one thing. Find an exit in Transaction VA01 and write a perform inside it with "on commit " addition. Like:

Perform XYZ on commit.

this XYZ form will be called on commit work and on commit sales contract number should have been generated and you should be able to get the same inside the perform.

Regards

Vijay

Former Member
0 Kudos

Thx Vijay.

But I found a better way.

Per the test that I have conducted, I found that the sales contract number is already generated in userexit_save_document.

I can just grab it from internal table "vbak".