Documentation View

We are hiring and constantly growing! Have a look through our vacancies to find the right role for you!

/OPT/VIM_IIC_DETERMINE_OBJ_KEY - Determine object key to a single work item (template)

/OPT/VIM_IIC_DETERMINE_OBJ_KEY - Determine object key to a single work item (template)

ABAP Short Reference   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

This function module is designed to serve as a template for determining the object key of work items to customer workflow tasks.

Importing parameters:

  • IV_LOGSYS: Logical system of the work item
  • IV_WIH_RH_TASK: Workflow task ID of the work item
  • IV_WI_ID: Work item ID
  • IT_OBJECTS: Work item objects

Exporting parameters:

  • ES_WORKITEM: Output structure of work item
    The following fields of ES_WORKITEM can be updated (all other fields are ignored):
  • OBJ_TYPE: Type of object the work item is related to.
    Possible values:
    /OPT/V1001: DP document
    /OPT/B2081: PO based invoice
    /OPT/LIV: Line item of PO based invoice
    /OPT/FIPP: Non-PO based invoice

    The object type determines the function module that is used to read object related data to the work item.

  • DOCID: ID of DP document

  • DOCITEMID: ID of DP document item

  • BUKRS: Company code

  • BELNR: Invoice document number

  • GJAHR: Fiscal year

  • BUZEI: Document item in invoice document

  • BZKEY: Number of Line Item Within Accounting Document

  • TDOBJECT: Application object of texts (needed for comments to an object)

  • OBJECT_ID: Object ID (needed for comments to an object)

  • BLOCK_REASON: Blocking reason

  • PARK_REASON: Parking reason

Field OBJ_TYPE is mandatory always.
There are further mandatory fields depending on the object type:

  • /OPT/V1001: In case of DP documents/line items of DP document the following fields of structure ES_WORKITEM are mandatory:
  • OBJDOCID, DOCITEMID (in case of a DP line item), TDOBJECT, OBJECT_ID

  • /OPT/B2081: In case of PO based invoices tte following fields of structure ES_WORKITEM are mandatory:
  • BELNR, GJAHR, TDOBJECT, OBJECT_ID

  • /OPT/LIV: In case of a line item of a PO based invoices tthe following fields of structure ES_WORKITEM are mandatory:
  • BELNR, GJAHR, BUZEI, TDOBJECT, OBJECT_ID
  • /OPT/FIPP: In case of a Non-PO based invoice/line item of Non-PO based invoice the following fields of structure ES_WORKITEM are mandatory:
  • BUKRS, BELNR, GJAHR, BZKEY (in case of a line item of a Non-PO based invoice), TDOBJECT, OBJECT_ID.

  • : Depending on the object type, additionally: TDOBJECT and OBJECT_ID

Example

The current work item is related to a DP document or to a notification of absence. The mandatory fields for DP documents or a notification of absence are filled:

  CASE iv_wi_rh_task.
    WHEN 'TS00200026'.  "DP document related WFL task
      READ TABLE it_objects ASSIGNING
           WITH KEY object_id+10(10) = '/OPT/V1001'.
      IF sy-subrc = 0.
        xs_workitem-object_id     = -object_id.
        xs_workitem-obj_type      = -object_id+10(10).
        xs_workitem-docid         = -object_id+20(12).
      ENDIF.
      xs_workitem-tdobject = '/OPT/DOC'.
    WHEN 'TS00200027' OR   "WFL task to notification of absence
         'TS00200029'.
      es_workitem-obj_type = 'FORMABSENC'.
*     Further logic to get key fields to a notification of absence
*     ...
    WHEN OTHERS.
  ENDCASE.

Notes

Further information





Parameters

ES_WORKITEM
IT_OBJECTS
IV_LOGSYS
IV_WI_ID
IV_WI_RH_TASK

Exceptions

Function Group

/SAPLVIM_FGIIC

ROGBILLS - Synchronize billing plans   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.

Length: 5427 Date: 20211130 Time: 134506     sap01-206 ( 40 ms )