Hi Experts,
I am using the following code to change the Deployment results - Confirmed Stock Transfer Requisition (EG and EF).
After SNP heuristics run, the standard SAP deployment run happens. Then, a stock transport order with reference to production order is created without reference to stock transport requisition or confirmed stock transfer requisition. So, to consume or reduce this confirmed STR quantity, I am using the following code. But the issue is, the date of the confirmed stock transfer requisition gets changed after this BAPI FM. I don't want the date to be changed. Does anyone have any idea of how to just change the quantity, but not to change the dates?
CALL FUNCTION 'BAPI_POSRVAPS_CREATESNPORDER'
EXPORTING
logical_system = 'SAPXXX113' " My current SAP APO system
APPLICATION = 'DEP' " Changing Deployment orders
EXT_NUMBER_ASSIGNMENT = ' ' " I use ORDERID, instead of the order
COMMIT_CONTROL = 'E' " Commit only on successful completion
PLNG_VERSION = '000' " Active planning version
change_if_exists = 'X' " If it exists, then change the same. If not create it.
EVENT_CONTROL = '1' " To update the ERP system too
CHECK_SOURCE_EXISTENCE = 'X' "To check and return error if the source doesn't exist
TABLES
order_data = lt_order_data " Data to be updated
return = lt_return. " Return message of BAPI update
For filling the internal table lt_order_data, I am using the function module BAPI_POSRVAPS_GETLIST3.
* Update fields for BAPI Update
ls_order_data-ordid = ls_requirements-ordid. " ORDID from BAPI_POSRVAPS_GETLIST3
ls_order_data-schedid = ls_requirements-schedid. " SCHEDID from BAPI_POSRVAPS_GETLIST3
ls_order_data-order_number = ls_requirements-order_number. " Order number from BAPI_POSRVAPS_GETLIST3
ls_order_data-product = '4280143180'. " Part number from BAPI_POSRVAPS_GETLIST3
ls_order_data-location_from = 'HGKG'. " From Location number from BAPI_POSRVAPS_GETLIST3
ls_order_data-loctype_from = '1001'. " From location type from BAPI_POSRVAPS_GETLIST3
ls_order_data-location_to = 'SGPR'. " To location number from BAPI_POSRVAPS_GETLIST3
ls_order_data-loctype_to = '1001'. " To location type from BAPI_POSRVAPS_GETLIST3
ls_order_data-ttype = ls_receipts-ttype. " TTYPE from BAPI_POSRVAPS_GETLIST3
ls_order_data-unitofmeas = ls_requirements-unitofmeas.
ls_order_data-unitofmeas_iso = ls_requirements-unitofmeas.
ls_order_data-order_start_date = ls_requirements-requirement_date. "What date to use here? Whatever the date I give it changes the already existing date. I don't want the dates to be changed
ls_order_data-order_end_date = ls_requirements-requirement_date.
ls_order_data-fixed = ls_requirements-fixed.
clear: ls_order_data-atpcat_from, ls_order_data-atpcat_to, ls_order_data-trans_priority.
Thanks,
Suresh