‎2009 Sep 09 8:21 PM
Hello,
I am trying to figure out if I can use the standard BAPI to create a SO with a reference to a Contract. I don't see any mention of this in the documentation and wanted to know if anyone uses this BAPI this way or if there is another method to accomplish this?
Scenario we are trying to implement:
Old open contracts and sales orders that need to be re-created.
Copy old contract to new contract using the contract BAPI.
Copy the old open sales orders to new ones with reference to the new contract.
Close the old contracts/SOs.
Thanks,
John
‎2009 Sep 16 2:57 AM
Hi,
You create read the old contract/sales order and recreate using BAPI_SALESORDER_CREATEFROMDAT2. Another options is that using BAPI_SALESORDER_COPY to copy the old sales order and then change the reference using BAPI_SALESORDER_CHANGE.
I use BAPI_SALESORDER_CREATEFROMDAT2. If you want create with reference, please take care below fields as well as the corresponding flag fields.:
header level:
BAPISDHD1-REF_DOC
item level:
BAPIITEMIN-REF_DOC
BAPIITEMIN-REF_DOC_IT
Regards,
Andy
[www.sapgeek.net]
Edited by: Andy Zhao on Sep 16, 2009 4:00 AM
‎2009 Sep 09 8:33 PM
‎2009 Sep 15 6:11 PM
Unfortunatly this would copy the existing reference to the old contract instead of linking to the new one.
‎2009 Sep 16 2:57 AM
Hi,
You create read the old contract/sales order and recreate using BAPI_SALESORDER_CREATEFROMDAT2. Another options is that using BAPI_SALESORDER_COPY to copy the old sales order and then change the reference using BAPI_SALESORDER_CHANGE.
I use BAPI_SALESORDER_CREATEFROMDAT2. If you want create with reference, please take care below fields as well as the corresponding flag fields.:
header level:
BAPISDHD1-REF_DOC
item level:
BAPIITEMIN-REF_DOC
BAPIITEMIN-REF_DOC_IT
Regards,
Andy
[www.sapgeek.net]
Edited by: Andy Zhao on Sep 16, 2009 4:00 AM