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,924

Hi folks,

I have a scenario where I need to fill the custom table whenever a new entry/modify an existing entry is saved in the standard sap transaction(vk11/vk12) with the new entries/modified entries.

In my case when vk11(create condition records)/ vk12(change) for a a particular condition type (not for all types) whenever a new entry is added/existing entry is changed, a user exit /BADI (sd_cond_save_a) copy the new entry/modified entry into the custom table.

where should i write my programming steps in the BADI?

its very urgent.

Plz make it clear with programming steps.

All the helpful answers/hints will be rewarded with points.

thanks

1 ACCEPTED SOLUTION
Read only

Former Member
5 REPLIES 5
Read only

Former Member
0 Likes
1,341

Hi,

In your case, you have the

interface IF_EX_SD_COND_SAVE_A and

class cl_EX_SD_COND_SAVE_A and the

Definition - SD_COND_SAVE_A.

You can view the definition from SE18, interface and class from se24.

Initiallly you need to create an implementation for your badi. which will be done from SE18. Create an implementation EX: ZSD_COND_SAVE_A and say create.

You will be prompted for the definition. You may give the definition name as SD_COND_SAVE_A. Give some short text and in the interface tab, by default the interface name IF_EX_SD_COND_SAVE_A will be assigned and will be disabled. You may change the name of the implementing class which is by default is populated. Save the implementation. you may double click the implementing class , which will take you the class interface (created by you). You may also go to this from SE19 where you can see all the methods and the documentation along with attributes. You may double click any method to go into the method to write your own abap code.

Hope this is useful to you.

Srini

Read only

Former Member
Read only

0 Likes
1,341

Hi srinivas,

the custom table contains the fields CLIENT, SALES ORGANISATION< VALID FROM DATE, VALID TO DATE, PLANT, VENDOR< PRODUCT HIERARCHY, MATERIAL.

But the BADI (SD_COND_SAVE_A) doesnt conatin all the above fileds.

BADI contains only VALID FROM &VALID TO & VENDOR.

how can i populate the remaining fields in my custom table.

is there any other BADI for that? or we need to cerate our CUSTOM BADI.

plz helpout in this if creating a newBADI?

cheers

Read only

0 Likes
1,341

HI

Please check if you can field VAKEY.

VAKEY is the combination of data as per the access sequence we use for a particular condition type.

Please proceed exploring on the same.

Kind Regards

Eswar

Read only

Former Member
0 Likes
1,341

I created an implementaion of this BADI so that I could update the conditions entered on the condition tab of ME11 or ME12, The problem is that when the update task is called using table xkonp and ykonp and not CT_KONPDB_NEW or CT_KONPDB_OLD which are the imethod parameters. Is there a way to update the konp tables using this BADi. there is no documentation available for it.