cancel
Showing results for 
Search instead for 
Did you mean: 

Modifying Document Flow

Former Member
0 Kudos

Hi

Does anyone now how to add entries into document flow manually (i.e. programmatically)? I am tying to create a reference to a document on a logical system (ECC). I've been messing around with FMs like CRM_DOC_FLOW_MAINTAIN_OW and crm DOC_FLOW_FILL_OW but to no avail.

Can anyone help?

Sergio

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sergio,

This code shows how to create a flow between documents of the CRM.



  objects-objkey_a = lv_guid_ref. 
  objects-objtype_a   = 'BUS2000126'. " Object type - Activity
  objects-objkey_b    = w_new_guid.
  objects-objtype_b   = 'BUS2000126'. " Object type - Activity
  objects-relation    = 'VONA'.
  objects-remote      = 'X'.

  CALL FUNCTION 'BAPI_REL_CREATERELATION'
    EXPORTING
      OBJECTS            = OBJECTS
    importing
      return             = return
    TABLES
      relationattributes = relationattributes.

If you will create a flow between a document in ECC you must enter fields:

objects-LOGSYS_A - For example CRM system logical

objects-LOGSYS_B - For example ECC system logical

And the object type of the ECC document is the same type that you use to create in TRX SWO1.

Reward if helps!

Best regards,

Caíque Escaler

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Sergio,

I have a similar requirement as mentioned by you on this thread, Can you please check my below code,

I have to create a relation between an Order ADHM guid and an activity GUID, I am writing the below code but it is not working:

objects-objkey_a = ls_created_header-guid. "Activity GUID

objects-objtype_a = 'BUS2000126'. " Object type - Activity

objects-objkey_b = wa_raw_act-ref_guid. "Header GUID

objects-objtype_b = 'BUS2000223'. " Object type - OrderADMH

objects-relation = 'VONA'.

objects-remote = 'X'.

CALL FUNCTION 'BAPI_REL_CREATERELATION'

EXPORTING

OBJECTS = OBJECTS

IMPORTING

return = return

TABLES

relationattributes = relationattributes.

Please help,

Thanks,

Mansi

Former Member
0 Kudos

My mistake. This does work.

Appologies.

Points on the way

Former Member
0 Kudos

Hi Caíque

Unfortunatley, this function module only works up to a certain point. It updates the document flow of the service order with the new entry, however, if you close the service order and then open it again, the document flow entry dissappears even after running CRM_ORDER_SAVE. It is as though the function module only updates the interface layer and not the work area .

Sergio