09-18-2013 2:40 PM
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
09-25-2013 7:56 AM
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
09-24-2013 11:42 AM
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
09-24-2013 2:07 PM
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
09-25-2013 7:56 AM
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
09-25-2013 8:25 AM
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
09-25-2013 9:22 AM
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
09-25-2013 10:44 AM
Hi Tobias,
That was exactly what I was looking for.
Thanks for your time and for sharing your knowledge.
kind regards,
Glenn
09-25-2013 1:15 PM
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
09-27-2013 8:21 AM
Hi Glenn,
I am sorry, without further investigation, I don't know any FM validating the data. I doubt, that there is one.
Regards