Quantcast
Channel: SCN : Discussion List - Customer Relationship Management (SAP CRM)
Viewing all articles
Browse latest Browse all 4296

Doc flow link and delink using CRM_ORDER_MAINTAIN

$
0
0


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.

 

2.png

 

3.png


Viewing all articles
Browse latest Browse all 4296

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>