Skip to Content
0
Aug 13, 2009 at 07:36 AM

Replacement for the FM 'SWW_WI_TO_OBJECT_FIND'

17 Views

CALL FUNCTION 'SWW_WI_TO_OBJECT_FIND'
      EXPORTING
        existence_check_only = ''
        unfinished_wis_only  = ''
        logsys               = ''
        objtype              = 'BUS2009'
        objkey               = objkey
      IMPORTING
        wi_to_object_found   = wi_to_object_found
      TABLES
        workitem_list        = it_workitem_list.

    DESCRIBE TABLE it_workitem_list LINES c_wi_count.

    IF wi_to_object_found = 'X'.
      CLEAR top_wi_status.
      SORT it_workitem_list BY wi_cd wi_ct.
      LOOP AT it_workitem_list.
        IF it_workitem_list-wi_id = it_workitem_list-top_wi_id.
          wi_id = it_workitem_list-wi_id.
          wi_cruser = it_workitem_list-wi_cruser.
          top_wi_status = it_workitem_list-wi_stat.
          EXIT.
        ENDIF.
      ENDLOOP.