Application Development and Automation 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: 
Read only

SD_COND_SAVE_A - Program termination

Former Member
0 Likes
1,000

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?

6 REPLIES 6
Read only

Former Member
0 Likes
818

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

Read only

0 Likes
818

Hi April,

Business requires error message to avoid users move further until complete validation occured. This cannot be replaced by warning message.

Thanks,

Read only

0 Likes
818

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,

Read only

0 Likes
818

What is the dump? Are you moving the correct value to the screen field before displaying the warning?

- April

Read only

0 Likes
818

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,

Read only

0 Likes
818

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