cancel
Showing results for 
Search instead for 
Did you mean: 

Check on Item Category

Former Member
0 Kudos

Hello,

I have a requirement where I need to perform a check on item category for each sales order line item. if the item category is u2018ZTASu2019 then before saving the document the user should be prompted to verify .

I was thinking to use user exit USEREXIT_SAVE_DOCUMENT_PREPARE. But at this point I will have to loop through entire vbap. This may cause unnecessary load.

Please let me know what would be the best way to achieve this?

Thanks in advance.

K.

Accepted Solutions (1)

Accepted Solutions (1)

former_member217082
Active Contributor
0 Kudos

Hi kathy

Instead of going for user exit you can customize the Incompletion log for ZTAS and maintain a feilds . and while saving it should give the data that has to be filled up

Regards

Srinath

Answers (3)

Answers (3)

0 Kudos

Hi Kathy,

You may perhaps use USEREXIT_CHECK_VBAP to write some code. We used it in out previous version.

Former Member
0 Kudos

Hi Kathy

After reading entire thread I have a small doubt on requirement.

As you mentioned always sales order will have reference of quote and by default Item category would be ZTAS and user should able to change to another item category.

Clarify me on whether user will always has to change ZTAS to another item category or only in certain cases user will change.

If always you want to change to other item category you can use copy control settings to achieve this requirement.

In copy control of Quote to sales order for source item category mention specific item category to which it has to be copied.

Thanks

Jagan

Former Member
0 Kudos

Hi,

Use the same user exit "USER_EXIT_SAVE_DOCUMENT_PREPARE", But put a warning message instead of error message and once the user verifies the document, he will be able to save the document.

Regards

Ram Pedarla

Former Member
0 Kudos

With Warning message, the document will be saved without any provision for edit.

Regards,

K.

Former Member
0 Kudos

If you want to get a message on item category ZTAS, then you need to modify program to display message when entering order item iso during saving the sales order.

Former Member
0 Kudos

Thanks for the reply.

Srinath,

How would i maintain incompletion log as there is nothing which is missing..i just want to generate a messages whenever item category ZTAS is being used..

Monalisha,

The Sales order is being copied from quote..it is not entered manually.

Please help.

K.

0 Kudos

Hi Kathy Carter,

Try to the exit USEREXIT_CHECK_VBAP (MV45AFZB) works fine for your requirement. Anyway I think you should add the logic in USEREXIT_SAVE_DOCUMENT_PREPARE to prevent any other business scenario.

Thanks in advance,

Mariano.

Former Member
0 Kudos

I even tried exit USEREXIT_CHECK_VBAP (MV45AFZB) but the issue is since we copy the sales order from quote it shows the message for each line being copied.

former_member217082
Active Contributor
0 Kudos

Hi Kathy

Instead of going with user exit and as you are copying from Quotation to sales order maintain incompletion log the Vendor number which comes in purchase requisition in ZTAS item category at sales order level . If that number is not filled then sales order should not be saved .

Regards

Srinath

Former Member
0 Kudos

Let me explain what am i trying to achieve.

In our environment the salesorder is always created as a copy from quote.

now if any of salesorder line item contains item category ZTAS, User should be prompted to verify the

item category before saving the sales order.

As you suggested, if i maintain incompletion log for vendor, user will be prompted to enter vendor number where as they should be prompted to verify the item category.

even if i use user exit, i am not finding proper message type which would show the message on screen and provide user the ability to change the item category before save.

PLEASE HELP...

K.

former_member217082
Active Contributor
0 Kudos

Hi Cathy

First option is , Maintain a different message that has to be generated if data is not filled . with the help of ABAP'er .

Second option is use USEREXIT_SAVE_DOCUMENT. In this useexit maintain the program that if

ZTAS itemcategory comes in the sales order then system has to give a popup message while saving the sales order

Regards

Srinath

0 Kudos

Hi Kathy,

In this case you can add the check in the copy routine (at item level) between Quotation and Sales order to show the message. Anyway you need to keep the validation in USEREXIT_SAVE_DOCUMENT_PREPARE.

Thanks,

Mariano.

Former Member
0 Kudos

If i use the user exit, what type of message should i use that i provide user the ability to verify the item category and allow to change if needed.

so far i have tried, E- Which shows the error and makes the screen not editable. Message type I,W shows the information and saves the order without stop.

Please suggest.

former_member217082
Active Contributor
0 Kudos

Hi Kathy

If you Put Error message indicator then you cant save the sales order. So maintain Warning message indicator . Also maintain Incompletion log as i said in my previous thread then your requirement can be fulfilled

In the same way with the help of the technical consultant tell them that the message should be different when the warning message comes. Say if the end user is saving the sales order then he should get a message CHECK THE ZTAS ITEM CATEGORY IN THE ORDER and still if the end user tries to save the sales order then system should tell to maintain incompletion log data

Regards

Srinath

Former Member
0 Kudos

Hello Shrinath,

I think we both are not on same page.

we don't always maintain vendor number.so i can not create incompletion log for vendor number.

i just want to provide the user ability to verify the item category before save. as once the order is saved item category becomes non editable.

with user exit modifications to include warning message , system shows the warning upon save but then without stopping or allowing user to make any changes it just saves the order.

i hope this explains my issue.

0 Kudos

Hi Kathy,

I made in some opportunities development in USEREXIT_SAVE_DOCUMENT_PREPARE with error type E and you have the possibility to edit the fields, because once the message is show it and press enter it disappear until you press SAVE button again, if your requirement doesn't work like this, tall with your Technical consultant.

Thanks in advance.

Mariano.

Former Member
0 Kudos

Thanks for sharing your experience Mariano.

Unfortunately in my case if i use Message type E in userexit USEREXIT_SAVE_DOCUMENT_PREPARE, error message will be displayed and entire screen will be grayed out and user will have to exit. There is no opportunity to make the changes or save the order once error message is displayed.

What could be the reason? Do i need to contact SAP?

Regards,

K..

Edited by: Kathy Carter on Feb 20, 2009 3:45 PM

0 Kudos

Hi Kathy,

When you say "entire screen will be grayed out", you means without any field?. If you see the field but grayed, please try to do a doble clic in one of them; when I do this I have the possibility to edit the fields and then save, because as the validation is on the exit SAVE_DOCUMENT_PREPARE it doesn't take place until you press save button again.

Thanks,

Mariano.

Former Member
0 Kudos

Hello Jagan,

The item category needs to be changed only certain times. say 40 % of time.so i cant not default it to some other category in copy control.

Mariano,

After the message is displayed on the screen. i becomes non-editable meaning the screen like VA03 period.

Please help.

K.