2008 May 29 9:47 PM
Hi Everyone,
I am implementing BADI "WORKORDER_UPDATE". The requirement is there should be no changes made on the IW32 transaction. I have successfully implemented the BADI and it is now giving an error when we try to change anything on the order in IW32.
The problem is with the longtext. There is a field TXCHG which I used to see if there are any changes being made to the long text. When someone changes the lontext and tries to save it, it gives an error but still retains the changed longtext. The code works fine with all other changes(I mean it gives an error when they try to change anything in IW32 and will not retain the changes). But this does not happen in the case of long text. It gives an error but still has the changed long text as part of the order.
Any suggestions on how to proceeed? I am using instance Before_Update in this BADI.
Thanks
Kumar.
2008 May 30 4:06 AM
Do u mean after giving the Error message, even if u come out without saving it is keeping the changes?
If the answer to the above question is no then try the following procedure:
Read the long text using READ_TEXT (function module) by passing the TDID, TDOBJECT, TDSPRAS, TDNAME (u can get these details by going through the menu edit-> go to header).
Store that in an internal table and then append all the lines of this internal table into a string Variable and assign this variable's text to the field in which long text is being displayed.
This should work bcoz , in the database only the original Long text is stored and we are retrieving it and displaying back in the relevant field.
Please reply if it works.....
Hi Everyone,
I am implementing BADI "WORKORDER_UPDATE". The requirement is there should be no changes made on the IW32 transaction. I have successfully implemented the BADI and it is now giving an error when we try to change anything on the order in IW32.
The problem is with the longtext. There is a field TXCHG which I used to see if there are any changes being made to the long text. When someone changes the lontext and tries to save it, it gives an error but still retains the changed longtext. The code works fine with all other changes(I mean it gives an error when they try to change anything in IW32 and will not retain the changes). But this does not happen in the case of long text. It gives an error but still has the changed long text as part of the order.
Any suggestions on how to proceeed? I am using instance Before_Update in this BADI.
Thanks
Kumar.
2008 May 30 4:06 AM
Do u mean after giving the Error message, even if u come out without saving it is keeping the changes?
If the answer to the above question is no then try the following procedure:
Read the long text using READ_TEXT (function module) by passing the TDID, TDOBJECT, TDSPRAS, TDNAME (u can get these details by going through the menu edit-> go to header).
Store that in an internal table and then append all the lines of this internal table into a string Variable and assign this variable's text to the field in which long text is being displayed.
This should work bcoz , in the database only the original Long text is stored and we are retrieving it and displaying back in the relevant field.
Please reply if it works.....
2008 May 30 2:04 PM
Harshu,
It is retaining the text even after giving the error message and getting out of the transaction. Thats the whole problem.
Kumar.
2008 May 30 2:27 PM
Also the order retains long text only if it has long text before. I mean if there is no long text for a particular operation it gives me an error and will not retain the new long text. But if the operation already has old long text, it retains it.
Kumar.
2008 Jun 02 1:39 PM