cancel
Showing results for 
Search instead for 
Did you mean: 

Validation of document type in VA01

Former Member
0 Kudos

23.12.2008

Hi Gurus,

We create a Sales Order (eg. ZXXX) through a Z-development. My requirement is that this particular document type should not be created using t.code VA01. Need a validation for VA01 in the first screen itself ( where the document type, Sales Org, Dist Channel and Divn is entered) to restrict creation of document type ZXXX thru t.code VA01

Regards

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sanjay,

I've implemented a couple of times this using the following technique.

Program MV45AFZZ -> FORM userexit_field_modification -> include zv45afzz02

When you go to VA01 and insert the document type and press enter, the system will stop in this userexit.

Here you just have to do a statement like this.

IF SY-TCODE = 'VA01' AND VBAK-AUART ='XXXX' <- the document type you want to block.

MESSAGE EXXX(XXX) WITH VBAK-AUART. <- Create a new error message (SE91) ''Sales document XXXX cannot be created via this transaction.''

ENDIF.

Please let me know if this helped you,

Regards,

Alcides Fialho

Former Member
0 Kudos

Hi Alcides,

Thanks for the solution provided. It did resolve my problem.

Regards.

Answers (3)

Answers (3)

Former Member
0 Kudos

Dear Sanjay,

If your requirement is - To restrict Creation of Sales Document Type "ZXXX" with Transaction Code: VA01

which, I have understood from your query:

My requirement is that this particular document type should not be created using t.code VA01.

...the same could be achieved by changing/ modifying the Transaction Group in to Sales Document type.

Path: T. Code: VOV8 --> Key-in Sales Doc. Type --> Go in to Detail-page --> Tab: Transaction Flow --> Field: Transaction Group

If, we maintain entry as "0", the sale doc.will be created with VA01

If, we maintain entry as "1", the sales doc. will be created with VA11.

Note: If, you change Transaction Group to "1" for Standard Sales Doc. Type - OR; it will be created with VA11 and not with VA01.

So, change the Transaction Group from "0" to "as reqd." for Sales Document Type "ZXXX" in VOV8

Best Regards,

Amit

Former Member
0 Kudos

23.12.2008

Thanks Amit,

It did work at the Sales Order level, but a bit wary to change the configuration as I do not know whether the field is being used in any reports or somewhere else. Points being awarded.

Regards,

Uday

former_member204513
Active Contributor
0 Kudos

Dear Sanjay,

As per satdard you can have control transaction wise by giving authorisation but I don't think you can control on document type in the specific transaction.

Try with your ABAP consultant

I hope this will help you,

Regards,

Murali.

Former Member
0 Kudos

Murali, any userexit that comes to your mind which could help???

Regards,

Former Member
0 Kudos

Hi

Do not assign sales document type to specific sales area. t.code OVAZ.

We maintain sales document category in sales document type. based on that system checks whether this document can be used in VA01 or not.

A - Inquiry VA11

B - Quotation VA21

C- order VA01

System will allow only document category C in VA01.

Regards,

Chandra

Former Member
0 Kudos

23.12.2008

Thanks Chandra for the reply. Forgot to mention, these orders are edited or changed using t.code VA02.

Regards,