OL808 when calling SAP_WAPI_START_WORKFLOW with IMAGE - Object with runtime no. .. not defined

viveka.schwartz@implema.se viveka.schwartz at implema.se
Tue Oct 12 05:53:47 EDT 2004


Dear workflowers,
 
a strange problem occurs when calling the fm sap_wapi_start_workflow with
a mandatory import object reference IMAGE in the container.
 
when calling the standard FM sap_wapi_start_workflow with the mandatory
element IMAGE, we receive error message OL808 "Object with runtime no.
200000001 not defined".
The image exists in the ixos archive and can be displayed via the
ixos viewer from R/3 (via the work item or via swo1)
 
 
The system indicated that the macro swc_create_object fails to create
the object reference lv_image:
Structured field           lv_image
Length (in bytes)             92
No.   Component name                  TypLngthContents
  1   HEADER                          C     4 OBJH
  2   TYPE                            C     4 SWO
  3   HANDLE                          I     4  200000001
  4   CB_INDEX                        C    40
  5   CLSID                           C    38
 
 
I have not found any relevant notes.
Has anybody had this problem as well with the IMAGE object?
 
Best regards
Viveka
 
 
The source code is as follows:
 
 
FUNCTION Z_WF19_START_WORKFLOW_01.
*"----------------------------------------------------------------------
*"*"Local interface:
*"  IMPORTING
*"     VALUE(ARCHIV_ID) LIKE  TOAV0-ARCHIV_ID
*"     VALUE(ARC_DOC_ID) LIKE  TOAV0-ARC_DOC_ID
*"     VALUE(TASK) LIKE  SWR_STRUCT-TASK DEFAULT 'WS90100001'
*"     VALUE(LANGUAGE) LIKE  SWR_STRUCT-WILANGUAGE DEFAULT SY-LANGU
*"     VALUE(BUKRS) TYPE  BUKRS DEFAULT 'CCDN'
*"     VALUE(DESCRIPTION) LIKE  TOASP-OBJECTTEXT
*"     VALUE(DOC_TYPE) LIKE  TOADD-DOC_TYPE DEFAULT 'ZINVVENDMN'
*"  EXPORTING
*"     VALUE(RETURN_CODE) LIKE  SY-SUBRC
*"     VALUE(WORKITEM_ID) LIKE  SWR_STRUCT-WORKITEMID
*"  TABLES
*"      MESSAGE_LINES STRUCTURE  SWR_MESSAG
*"      MESSAGE_STRUCT STRUCTURE  SWR_MSTRUC
*"----------------------------------------------------------------------
 
  data: lv_objectkey LIKE swotobjid-objkey,
        lv_object TYPE swc_object,
        lv_otype like toapr-otype,
        lv_objid like toapr-objid,
       lv_subrc like sy-subrc,
        lv_wi_id LIKE swr_struct-workitemid,
        lv_logsys     LIKE T000-logsys,
        lv_image      LIKE  swotobjid.
*        lv_image type swc_object.
 
DATA : lv_input_container TYPE STANDARD TABLE OF swr_cont
                                 WITH HEADER LINE.
 
 
  data: begin of lv_imagekey,
          archiv_id like TOAV0-ARCHIV_ID,
          arc_doc_id like toav0-arc_doc_id,
        end of lv_imagekey.
 
  data: begin of lv_orgobject,
          otype like toapr-otype,
          objid like toapr-objid,
        end of lv_orgobject.
 
*-- fetch org.object
if bukrs = 'CCDN'.
  SELECT  SINGLE otype objid FROM  toapr
    INTO (lv_orgobject-otype, lv_orgobject-objid)
           WHERE  id = 'E003'            AND    ncitype = doc_type
           and    wf_early = 'X'.
endif.
 
if bukrs = 'CCDS'.
  SELECT  SINGLE otype objid FROM  toapr
    INTO (lv_orgobject-otype, lv_orgobject-objid)
           WHERE  id = 'E005'
           AND    ncitype = doc_type
           and    wf_early = 'X'.
endif.
 
CLEAR lv_input_container.
*-- fill container
lv_input_container-element = 'DESCRIPTION'.
lv_input_container-value = description.
APPEND lv_input_container.
 
lv_input_container-element = 'ORGOBJECT'.
lv_input_container-value = lv_orgobject.
APPEND lv_input_container.
 
lv_input_container-element = 'DOCCLASS'.
lv_input_container-value = 'FAX'.
APPEND lv_input_container.
 
 
lv_input_container-element = 'DOCUMENTTYPE'.
lv_input_container-value = doc_type.
APPEND lv_input_container.
 
*lv_input_container-element = 'PREMODE'.
*lv_input_container-value = 'E'.
*APPEND lv_input_container.
 
*-- fetch image reference
CLEAR lv_image.
lv_image-objtype = 'IMAGE'.
CONCATENATE archiv_id arc_doc_id INTO lv_image-objkey.
lv_input_container-element = 'IMAGE'.
lv_input_container-value   = lv_image.
APPEND lv_input_container.
 
CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'
    EXPORTING
      task                  = task
      LANGUAGE              = language
    IMPORTING
      return_code           = lv_subrc
      workitem_id           = lv_wi_id
     TABLES
       input_container       = lv_input_container
       message_lines         = message_lines
       message_struct        = message_struct
      .
* MESSAGE s028(zwf) WITH lv_wi_id.
 
ENDFUNCTION.
======================================0
 
 
 
--------------------------------------------------------------------------------
 


More information about the SAP-WUG mailing list