Hi,
I have a requirement to link/delink transactions in SOLMAN 7.1
I tried to create and delete the links through the FMs CRM_ORDER_MAINTAIN and CRM_ORDER_SAVE.
I have a problem with creating and deleting the links when there are 2 orders to be dealt where the parent GUID is same and the child guids are different. Only the first row of data is getting updated.
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
CHANGING
ct_input_fields = lt_input_fields
ct_doc_flow = lt_doc_flow
EXCEPTIONS
error_occurred = 1
document_locked = 2
no_change_allowed = 3
no_authority = 4
OTHERS = 5.
IF sy-subrc = 0.
IF lt_guids_temp[] IS NOT INITIAL.
CALL FUNCTION 'CRM_ORDER_SAVE'
EXPORTING
it_objects_to_save = lt_guids_temp
IMPORTING
et_saved_objects = lt_saved_obj
et_exception = lt_exception
et_objects_not_saved = lt_obj_not_saved
EXCEPTIONS
document_not_saved = 1
OTHERS = 2.
IF sy-subrc EQ 0.
IF lt_saved_obj IS NOT INITIAL.
COMMIT WORK.
ENDIF.