cancel
Showing results for 
Search instead for 
Did you mean: 

Update/Replace old/exsisting RREQ in S/4 Via SAP CPI-DS

0 Kudos

Hello Experts,

We have a requirement to replace old PREQ items with latest PREQ every time, when we send the data (Transport Receipts) from IBP to S/4. To create the PREQ in S/4 we are calling the BAPI_PR_CREATE using its RFC function module via CPI-DS and it is successfully creating PREQ is S/4. But the challenge is every time is it creating new PREQ no even if we are sending same Material, Location Combination from IBP with updated QTY. Is it possible to somehow Update/Replace the old PREQ automatically in S/4 while sending new ones from IBP via CPI-DS?

Thanks,

Ratan

Accepted Solutions (1)

Accepted Solutions (1)

abhisekdutta
Advisor
Advisor
0 Kudos

You can try DELETE FM first and then call out CREATE FM in separate tasks. This will delete old entries and create new ones.

0 Kudos

Hello Abhisek,

Thanks for your valuable suggestion. I will definitely try this option. However, can you please share some more details on this, like what is the FM name that we need to use to delete the old PREQs, what are the mandatory fields of the FM , any other specific details required to call the FM via cpi-ds etc. Please let me know. Thank in advance.

Regards,

Ratan

Answers (2)

Answers (2)

GauthamKonthum
Participant
0 Kudos

First check if the Requirement exists using function module BAPI_REQUIREMENTS_GETDETAIL.

If it does, Consider updating the existing requirements using BAPI_REQUIREMENTS_CREATE using options Update = 'X' and delete_old = 'X'

abhisekdutta
Advisor
Advisor
0 Kudos

Delete FM - BAPI_REQUISITION_DELETE

Pass PREQ number and line item number with Delete Flag as set.

Fetch the PREQ data from SAP and delete in First task.

Second task will create PRQ using creation FM.