SAP for Retail Discussions
Join conversations about personalization, omnichannel strategies, and operational excellence in retail using SAP for Retail software.
cancel
Showing results for 
Search instead for 
Did you mean: 

Adding sales conditions for promotions using a BAPI

glenn_karlsson2
Participant
0 Kudos

Hi,

Is it possible to add sales conditions to a promotion using BAPI or other interface technique?

I have tried to add the sales conditions from outside the promotion, ie directly in VK11, but those do not show in the promotion. So I guess I cannot use a bapi for creating conditions the normal way.

I have managed to create and change the promotion data but haven't find any way to create sales conditions and agreements "from outside".

kind regards,

Glenn

1 ACCEPTED SOLUTION

Tobias_König
Advisor
Advisor
0 Kudos

Hi Glenn,

I guess, without the promotion number in the condition record, no prices maintained via VK11 (or the BAPI you mentioned) will show up in WAK2/3.

Please check, if BAPI_PROMO_CHANGE is sufficient to meet your requirement. With that, you can change the positions of you promotions. As the structure "Items" is part of the BAPI, price changes should also be possible.

Regards

Tobias

View solution in original post

8 REPLIES 8

amit_tunara
Active Contributor
0 Kudos

Hi Glenn,

You can try recording the condition maintenance in LSMW. You have to record the following steps in LSMW for mass creation of conditions.

Give transaction code WAK2 and provide the Promotion number.

Once the promotion is opened, we can navigate to SP conditions tab.

On this tab, there is a button to create Conditions. Click on Create Condition button and then provide the data for condition.

Save the Promotion.

So try creating LSMW with these steps and it might help. You can give a try.

Regards,

Amit

0 Kudos

Hi Amit,

LSMW is not an option.

I get a REST service call from an external tool specifying the conditions and need a way to interface those into SAP, also so that the promotion gets updated with the prices, ie they are visible from WAK2/3.

I rather not use any batch input / call transaction kind of interface if not absolutely necessary.

A BAPI or other function module would be preferred.

I have tried BAPI_PRICES_CONDITIONS but that gives the same result as when I enter the conditions using VK11. They are populated into KONH/KONP nicely, with the promotion field filled, but they don't show in WAK2/3.

kind regards,

Glenn

Tobias_König
Advisor
Advisor
0 Kudos

Hi Glenn,

I guess, without the promotion number in the condition record, no prices maintained via VK11 (or the BAPI you mentioned) will show up in WAK2/3.

Please check, if BAPI_PROMO_CHANGE is sufficient to meet your requirement. With that, you can change the positions of you promotions. As the structure "Items" is part of the BAPI, price changes should also be possible.

Regards

Tobias

0 Kudos

Hi Tobias,

The promotion number ARE populated in KONH/KONP. The records are exactly the same for both scenarios, ie conditions via WAK2 and VK11/BAPI. But still the VK11/BAPI ones does not show in WAK2/3.

The prices that I can change via BAPI_PROMO_CHANGE are just the sales price on the overview, not the actual sales conditions on the sales conditions tab. We don't give the sales price directly in the promotion, but add one or two sales conditions with percentage rebates and lets the system calculate the price.

kind regards,

Glenn

0 Kudos

Hi Glenn,

sorry, now I got your issue. It's not about the sales prices, but about SD conditions. Well, I think you could use BAPI_PRICES_CONDITIONS, like you already said.

But besides filling the KONH/KONP accordingly, you also will have to fill WAKHIND, where a pointer to the condition records belonging to a promotion is stored.

Hope it helps.

Regards

Tobias

0 Kudos

Hi Tobias,

That was exactly what I was looking for.

Thanks for your time and for sharing your knowledge.

kind regards,

Glenn

0 Kudos

Hi again Tobias,

I feels a bit akward to manipulate the WAKHIND-table by simple inserts and deletes.

Do you know of a way to insert entries in a more secure way?

I have looked at FM RV_KONDITION_SICHERN_V13A but also there seems to be no validation of data involved.

kind regards,

Glenn

0 Kudos

Hi Glenn,

I am sorry, without further investigation, I don't know any FM validating the data. I doubt, that there is one.

Regards