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: 

Update Sale Order Header Text through Enhancement

Former Member
0 Kudos

Hi Experts,

I Have a requirement to update the sale order Header Text , when the sale order is opened in VA02 and saved.

Here in I tried using edit_text, it updates sale order header text directly in DB during run time even before the save action is completed.

But I need to just fill the header text and that has to be saved during the save action only.

I tried coding the same in the user exit (userexit_save_document) but this user exit gets triggered only when there is some changes made to the document when opened in VA02 & Saved.

Is there any user exist to pass sale Order Header text and save when save button is clicked irrespective of the document been changed or not.

Thanks in advance

Sathish

6 REPLIES 6

former_member320332
Contributor
0 Kudos

May be you can try for userexit_move_field_to_vbak by restricting your code for SAVE fcode only.

brad_bohn
Active Contributor
0 Kudos

What text are you trying to save? Are you logging the fact that the user changed the order? If so, and there's no change, why do you need to save any text at this time? Or, why not use another field that's active for change management so that you can see the values in the change document report?

@PawanG: USEREXIT_MOVE_FIELD_TO_VBAK isn't going to work if there are no other changes detected and there's no commit triggered...

Former Member
0 Kudos

Hi Brad Bohn,

My actual requirement is to trigger an Idoc when the user goes to VA02 transaction and clicks save.

IDoc gets triggered only when there is some changes to that document, that is through NAST table entry based on the output configurations in NACE transaction.

Now that the user wants to trigger an IDoc even if there is no change (ie. to reprocess the IDoc) when he just opens a sale order in VA02 and click save.

It is not possible to trigger an IDoc through configurations when there is no actual change in VA02 and saved.

So it has to be forcefully sent by making some additions to the Order through coding, so I choose that Text box to fill some additional data and save .

Kindly Let me Know any thing could be done for this scenario.

Thanks in advance

Sathish

brad_bohn
Active Contributor
0 Kudos

Changes are not tracked for text boxes. As I said before, I'm not sure I really see the point of re-sending if no changes are made, but if I had to do that, I would just set a value in an insignifcant field that has change tracking, such as 'name of orderer'.

Former Member
0 Kudos

Hi Sathish,

Internal table YVBAP[] will be blank (zero records) when there is no change happend in VA02. Just pust 1 record from xvbap into yvbap through move-corresponding & append yvbap through user exit of mv45afzz. Now, it is considered as something changed through you have not changed. Check & update.

0 Kudos

Hi Rajendran,

I tried filling XVBAP values to YVBAP, but it is not been taken as changes.

Kindly Suggest if there is any other alternative solution for it.