2007 Apr 20 2:45 PM
Hi,
In BADI SD_COND_SAVE_A implementation, a validation check is added to prevent pricing condition from saving if the price entered is different from its contract item. If the price or its validity period is different from its contract we are raising an error message. However, in the case of the validation check does fail, after the error message is raised, if user presses enter key or back key to re-activate the field for re-entering data, a cancel popup window is displayed with the error message then, the transaction is terminated and user loses all data entered previously.
Can any one advise a solution?
2007 Apr 20 2:53 PM
In the BAdI, you could replace the entered value with the contract value (if they don't match) and then display a warning message instead of an error message. That way an incorrect value could not be entered and the transaction shouldn't terminate. I hope this helps.
- April King
2007 Apr 23 1:35 PM
Hi April,
Business requires error message to avoid users move further until complete validation occured. This cannot be replaced by warning message.
Thanks,
2007 Apr 27 1:30 PM
Hi April,
I have replaced error with Warning message. The transaction gives a termination (dump).
Also to see BADI response we have replaced all the code except keeping simple IF condition with "warning" message. The condition transaction details are shown empty. And later after changing the date, it returns a dump.
Thanking you in advance for reply,
2007 Apr 27 3:32 PM
What is the dump? Are you moving the correct value to the screen field before displaying the warning?
- April
2007 Apr 27 4:10 PM
Initially I have some logic written in this BADI. However after receiving dumps and issues in the standard SAP screens, I have removed all the code and checked with simple warning message.
Now, I have no value moved to any screen value except the following simple code:
IF sy-uname CS 'userid'
MOVE 'Testing' to v_msg.
MESSAGE v_msg TYPE 'W'.
ENDIF.
I have seen in the "Forums" that many persons have issues on the same BADI. However, I donot know how they have solved this issue.
Thanks again,
2007 Apr 30 2:40 PM
Have you searched for any OSS notes for this particular BAdI? I would suggest checking there. If you haven't looked there before, go to the SAP service marketplace and then click on the "SAP Search Notes" quick link (under the SAP support portal heading). Then you can enter the BAdI name as your search term.
- April