cancel
Showing results for 
Search instead for 
Did you mean: 

Auto Object link

Former Member
0 Kudos

Is there a BAPI or FM for automatically creating Object link for cProjects or Phase or Task. How to find them?

Any other way to do this?

Accepted Solutions (1)

Accepted Solutions (1)

rabikiran_sahu
Participant
0 Kudos

Hi ,

To create object link under phase task or Cproject,

First Call function GUID_CREATE to create a guid for DPR_OBJLINK Table

CALL FUNCTION 'GUID_CREATE'

           IMPORTING

             ev_guid_32 = v_objlink_guid

         x_objlink_insert-guid     = v_objlink_guid.                   "DPR_OBJLINK GUID

         x_objlink_insert-project_guid = v_project_guid.               "DPR_OBJLINK PROJ_GUID

         x_objlink_insert-task_guid = v_task_guid.                     "DPR_OBJLINK TASK_GUID

         x_objlink_insert-object_type =              "DPR_OBJLINK OBJECT_TYPE

         x_objlink_insert-created_by = sy-uname .                      "DPR_OBJLINK USERNAME

         x_objlink_insert-created_on = v_created_on.                   "DPR_OBJLINK CREATED_ON

         x_objlink_insert-object_key = v_quote.  "Ex: If your creating a material pass material no

         APPEND x_objlink_insert TO it_objlink_insert.

         CLEAR x_objlink_insert.

Then Call the below function module

CALL FUNCTION 'DPR_OBJLINK_SAVE'

             EXPORTING

               it_insert = it_objlink_insert

               it_update = it_objlink_update

               it_delete = it_objlink_delete.

Thanks,

Rabi

Answers (1)

Answers (1)

andrea_langlotz
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

you can add object links via the funtion modules:

- BAPI_BUS2175_OBLINK_ADD (for Tasks)

- BAPI_BUS2173_OBLINK_ADD (for Phases)

The function module documentation explains details on usage.

Regards, Andrea