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

BADI SD_COND_SAVE_A

Former Member
0 Likes
1,135

Hi,

I was trying to use the BADI SD_COND_SAVE_A to validate data and

trwow an error message on VK* screens( Can we use SD_COND_SAVE_A to throw error messages?) . When the error message is

displayed all the fields are grayed out. But if the user presses any

other button the screen becomes editable( which is desired) . The issue

is that at the point, in VK12 if I had changed the condition value of

any one record the value of all the records gets updated with this

changed value( I changed the value on the screen not through code). Has anyone come across a similar issue before? If so please let me know the solution?

Regards,

Hari.

Hi,

I was trying to use the BADI SD_COND_SAVE_A to validate data and

trwow an error message on VK* screens( Can we use SD_COND_SAVE_A to throw error messages?) . When the error message is

displayed all the fields are grayed out. But if the user presses any

other button the screen becomes editable( which is desired) . The issue

is that at the point, in VK12 if I had changed the condition value of

any one record the value of all the records gets updated with this

changed value( I changed the value on the screen not through code). Has anyone come across a similar issue before? If so please let me know the solution?

Regards,

Hari.

4 REPLIES 4
Read only

Former Member
0 Likes
897

Hello Hari,

What do you mean by "If I had changed the condition value of any one record the value of all the records gets updated with this changed value"? You don't have any criteria on it? Is it mass change?

Do you it change all the values of the existing key combination on that table (i.e A01)?

I need to clarify your inquiry before my response. I just completed working on this BADI right now.

Best regards,

Read only

0 Likes
897

Hi Rurik,

Thanks for the response. Basically I am trying to do some validations in the BAPI. I simply coded for an error message intially to test the BAPI.

if sy-uname = 'me' raise error. In VK12 on the second screen I made a change to an existing entry(changed condition value to '1') . Then I hit the save button and the error message got displayed, graying out the screen. If I press any other button now, the screen becomes editable, but I see that( on the screen) all other condition records now have value '1' !

Regards,

Hari.

Read only

0 Likes
897

Hi Hari,

You said BAPI or BADI?

Anyway, this BADI SD_COND_SAVE_A is called in <b>every</b> line item so if you change a value in will apply to all line items. That is the reason you are having similar values.

Hope this helps.

Best regards,

Read only

0 Likes
897

Sorry, that was a typo.. I meant BADI... In this case I am not changing any value through the code. The code only has an error message. I change the value of one condition record on the screen at VK12, and then press 'SAVE' . This displays the error message and grays out the screen. Now if i press the 'BACK' arrow and cancel it the screen becomes editable but all the codition records get changed!

Regards,

Hari.