Hello All,
We person a request to make caller entries successful existing PO Item-> Pricing Element wherever the values are passed from a behaviour implementation people of a customized array successful a loop.
MODIFY EML update connection (to make NEW entries wrong a peculiar po item) works lone for past PO successful the loop, but not the earlier PO's passed from the loop. Note: COMMIT connection not allowed successful a behaviour class. I excessively tried with conscionable hardcoded values extracurricular immoderate loop, by executing MODIFY EML connection doubly for antithetic POs 1 by one. Here too, lone the past hardcoded unsocial PO->PO item-> pricing elements were created successful the system.
How to marque each POs inserted with caller pricing elements erstwhile antithetic POs are passed dynamically?
MODIFY EML statement:
MODIFY ENTITIES OF i_purchaseordertp_2 PRIVILEGED
ENTITY purchaseorderitem
CREATE BY \_purordpricingelement SET FIELDS WITH VALUE #(
( %key-purchaseorder = 'PO1'
%key-purchaseorderitem = '0010'
%target = VALUE #( (
%cid = |CID{ sy-tabix }|
conditiontype = 'FVA1'
conditionrateamount = '1'
conditioncurrency = 'USD' ) ) ) )
MAPPED DATA(mapped_pe1)
FAILED DATA(failed_pe1)
REPORTED DATA(reported_pe1).
MODIFY ENTITIES OF i_purchaseordertp_2 PRIVILEGED
ENTITY purchaseorderitem
CREATE BY \_purordpricingelement SET FIELDS WITH VALUE #(
( %key-purchaseorder = 'PO2'
%key-purchaseorderitem = '0010'
%target = VALUE #( (
%cid = |CID{ sy-tabix }|
conditiontype = 'FVA1'
conditionrateamount = '2'
conditioncurrency = 'USD' ) ) ) )
MAPPED DATA(mapped_pe2)
FAILED DATA(failed_pe2)
REPORTED DATA(reported_pe2).
In the supra code, lone the past PO - 'PO2' is getting executed by creating caller entries of pricing constituent successful the 'PO2', Line point '0010'.