cancel
Showing results for 
Search instead for 
Did you mean: 

Sales Order

Former Member
0 Kudos

Dear SAP guru's

I need a solution.

I created the Sales order then i made delivery, and invoice.

Now i am changing the sales order with the transaction code va02, system is accepting me to do changes.

My requirement is while i do the change sales order with t.code va02 the system should give a error message that i cant proceed for further, how i will do this.

Kindly help me

With regards

Ram

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

hi,

pl check with abaper,

USEREXIT_FIELD_MODIFICATION

This user exit can be used to modify the attributes of the screen fields.

To do this, the screen fields are allocated to so-called modification groups 1 - 4 and can be edited together during a modification in ABAP. If a field has no field name, it cannot be allocated to a group.

The usage of the field groups (modification group 1-4) is as follows:

Modification group 1: Automatic modification with transaction MFAW

Modification group 2: It contains 'LOO' for step loop fields

Modification group 3: For modifications which depend on check tables or on other fixed information

Modification group 4: is not used

The FORM routine is called up for every field of a screen. If you require changes to be made, you must make them in this user exit.

This FORM routine is called up by the module FELDAUSWAHL.

See the Screen Painter manual for further information on structuring the interface.

regards

sadhu kishore

Former Member
0 Kudos

Hi Bogendhra,

Use this user exit " *USEREXIT_FIELD_MODIFICATION *" to grey out the fields in VA02 which you would like restricting.

I am sure this will solve your query.

Give all the table-field names to the Abapper and should be fine.

Let me know if its helps you. If it does please dont forget to reward points.

Kind Regards

Ravi

Former Member
0 Kudos

I believe we can't call a Error Message in User Exit.

Regards,

Sen

Former Member
0 Kudos

Dear Bhogendra,

It actually depends on "What Data you are changing in the Sales order and Why ??"

If you want to control this, you cannot control in the standard settings, You can Use a User Exit to control this.

for ex, if you are trying to change the quanity of an item.

If you have initially ordered for 100 Pcs and subsequently delivered and invoiced 100 Pcs and now you are trying to change the 100 Pcs to some 50 Pcs the system wil give you a warnig message that the Invoice and delivery exists but not stop you from doing this.

you can block such changes by using a User Exit.

The User Exit is MV45AFZZ. but you need to sit with an ABAPER to find out what code has to be written and where it has to be written.

or you can write a field exit to Grey off the fields in the change mode. So the solution depends on the requirement.

Thanks & Regards

Srinivas

Pls Reward Points if Useful