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

Save document

Former Member
0 Likes
1,152

Hi friends,

I have a requirement of writing a user exit for T-code VA11 ie., Before saving a document, the system has to check for some condition.

In the Include program MV45AFZZ, it is written as Form USEREXIT_SAVE_DOCUMENT_PREPARE and in the other Include program MV45AF0B_BELEG_SICHEN, it is written as Perform USEREXIT_SAVE_DOCUMENT_PREPARE.

On checking the user exit for this T-code, I find around 15 user-exit, which are listed herebelow.

SDTRM001 Reschedule schedule lines without a new ATP check

V45A0001 Determine alternative materials for product selection

V45A0002 Predefine sold-to party in sales document

V45A0003 Collector for customer function modulpool MV45A

V45A0004 Copy packing proposal

V45E0001 Update the purchase order from the sales order

V45E0002 Data transfer in procurement elements (PRreq., assembly)

V45L0001 SD component supplier processing (customer enhancements)

V45P0001 SD customer function for cross-company code sales

V45S0001 Update sales document from configuration

V45S0003 MRP-relevance for incomplete configuration

V45S0004 Effectivity type in sales order

V45W0001 SD Service Management: Forward Contract Data to Item

V46H0001 SD Customer functions for resource-related billing

V60F0001 SD Billing plan (customer enhancement) diff. to billing plan

Kindly guide me as to how to find the correct User_exit and the procedure to code the condition.

TIA.

Regards,

Mark K

7 REPLIES 7
Read only

Former Member
0 Likes
1,019

Mark,

Write your code in MV45AFZZ, in Form USEREXIT_SAVE_DOCUMENT_PREPARE .

Before checking the condition write a code to check transaction as below:

IF sy-tcode = 'VA11'.

<Your condition>

ENDIF.

Read only

0 Likes
1,019

It is not allowing to make changes in MV45AFZZ.

Regards,

Read only

0 Likes
1,019

Hi

The Form USEREXIT_SAVE_DOCUMENT_PREPARE should be ok, you need to amke sure you're elaborating a request and not a sales order or contract.

This exit can be triggered by all kind of sales document.

So you can check the value of field TVAK-KOPGR is 'AG'.

The include MV45AFZZ is std object so you have to get the access key.

So you have to register that object in OSS in order to get the key. If you haven't a OSS account you should ask an help to your basis.

Max

Read only

0 Likes
1,019

hi

good

if you want to change any of the user exit for the respective tcode than you have to undertand first which userexit ll allow you to do the modification,than you can do the changes accordingly,all the user exits wont allow you to do the changes,so it would be better if you consult your functional consultant who can help you in this.

Thanks

mrutyun^

Read only

Former Member
0 Likes
1,019

go to smod tcode give the nehancement names you are listing press F8 it will show some fn module exit like EXIT_SAPM... just dbl click it it will go to se37 fn module builder . there you can find an include program. dbl click on the include it will go to abap editor go to change mode and put a break point or message and test for evry enhancement.

which will satisfy your requirement..

check

V45A0002

V45A0003

V45A0004

first..

regards

shiba dutta

Read only

0 Likes
1,019

Hi Shiba,

I tried all the exits mentioned earlier, as per ur guidelines, ie., in all the includes I have added a 'break-point' and checked one by one. But, nowhere, it is poping at the break-point.

Kindly check and guide me.

Regards,

Read only

0 Likes
1,019

have you activated all the screen . i.e after giving the enhancement name one screen will come with fn module names just there you have to activate that . primarily it will be red but when you will activate that those thing will be green. just check.( if any thing dowes not work again deactivate that) .

regards

shiba dutta