Skip to Content
0

Problem with condition record during sales order creation program

Feb 23, 2017 at 04:47 AM

151

avatar image

Dear Experts,

Here we are developing a program which create condition record through FM RV_CONDITION_COPY and RV_CONDITION_SAVE and RV_CONDITION_RESET

which creates pricing condition records successfully then in the same program just after creating condition record we are calling BAPI_SALESORDER_CREATEFROMDAT2 to create sales order which creates sales orders successfully.

But issue is that this sales order created with Old Condition record (if already exists). we used syntax commit and wait after conditions FM but still not able to find the solution.Please help.

Thanks in advance.

Regards

Ravi K

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

5 Answers

Chintu adi Feb 23, 2017 at 11:41 AM
1

Hello,

After Condition record use BAPI_TRANSACTION_COMMIT and wait = ' ''and check the entry in database table whether your condition records are updating before you are calling BAPI_SALESORDER_CREATEFROMDAT2.

thank you!!

Share
10 |10000 characters needed characters left characters exceeded
Jelena Perfiljeva
Feb 23, 2017 at 09:27 PM
1

It's hard to find a black cat in a dark room... Have you checked pricing analysis in the order? Maybe the condition record very much exists in DB but is not pulled because of the data in the order (e.g. pricing date). Otherwise updates not committed yet or some data issue would be the only possible reason.

You could run SQL trace as well to see exactly what happens.

P.S. If I may say - creating a condition record for the order right before placing the order seems rather odd. Why not just have a manual price instead? Something to think about it.

Share
10 |10000 characters needed characters left characters exceeded
ravi katailiha Feb 24, 2017 at 06:36 AM
0

Hi,

Thanks for your suggestions here one more thing i would like to share that if i am trying execute the program for three cases means first condition record creation and then first sales order creation same loop i am executing for more then three different values i.e. second condition record creation and second sales order creation and so on.here it is executing for some times for any of one or two correctly but not for all the three (suppose i am executing three records) i think there is some data base updation issue means it should have to create condition record first and update that price then only it will go for sales order creation with that new price.(but it is picking old price if it is exist already for some cases).

Also i have tried above two options but still not got the solution.

Thanks in advance.

Regards,

Ravi k

Share
10 |10000 characters needed characters left characters exceeded
ravi katailiha Feb 24, 2017 at 10:12 AM
0

Hi,

We have solved the above issue through putting check in our program if condition record is updated then only create sales order thank you all for your valuable inputs.

One more issue we are facing while creation sales order through BAPI_SALESORDER_CREATEFROMDAT1 we have a requirement to put delivery block on schedule line level.We have passed the below parameters in ORDER_SCHEDULE_EX along with header & item parametrs

ORDER_SCHEDULE_EX-OPERATION "009"

ORDER_SCHEDULE_EX-ITM_Number "000010"

ORDER_SCHEDULE_EX-SCHED_LINE "0001"

ORDER_SCHEDULE_EX-REQ_DLV_BL "10" (as per our system config)

Here the sales order is created but schedule line delivery block is not updated.

Please help.

Thanks in advance.

Regards,

Ravi K

Share
10 |10000 characters needed characters left characters exceeded
ravi katailiha Feb 27, 2017 at 09:00 AM
0

Hi Experts,

Above problem got resolved through BAPI_SALESORDER_CREATEFROMDAT2 instead of BAPI_SALESORDER_CREATEFROMDAT1.

Thanks for your inputs & suggestions.

Regards,

Ravi K

Share
10 |10000 characters needed characters left characters exceeded