on 10-29-2014 5:26 AM
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.
I solved it. I just had to append the second row of data to the doc_link table inside lt_doc_flow. So, lt_input_fields and lt_doc_flow will have only one row each. and the doc_link internal table will have 2 rows of data.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
I would put a break-point in CRM_ORDER_MAINTAIN, do your steps manually in WebUI or GUI and see how the import structures are filled. Important is IT_IMPORT_FIELDS and IT_DOC_FLOW as you have already seen.
Best regards,
Thomas Wagner
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.