Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 8392

User-Decision COMPLETED buti next step not executed

$
0
0

Hi Gurus,

 

I have a very strange problem when approving user-decision tasks in my workflow using FM SAP_WAPI_DECISION_COMPLETE.

SOMETIMES, the user-decision step becomes COMPLETED but the result in the workflow logs (SWI1) is blank and does not continue to the next steps of my workflow. I've done my research and checked everything (commit = X, SWU3, Task is General, etc..) but i still have not found any solution yet.

 

FYI: this does not happen all the time, most of the time the workflow works fine.

 

Based on SWWWIHEAD, the user ADSUSER(from WebDynpro)  is the creator and the last one who updated the workflow instance.

 

Here's part of my code for your reference: (RFC - called by WebDynpro)

 

  CALL FUNCTION 'SWL_GET_PROCESS_STEPLIST'

    EXPORTING

      wf_id                       = wi_id

      with_techdetails            = space

      with_expansion              = space

      with_errors                 = space

    TABLES

      wfm_steplog                 = lt_wfm_steplog

    EXCEPTIONS

      workflow_does_not_exist     = 1

      error_while_reading_wfm_log = 2

      OTHERS                      = 3.

 

  DELETE lt_wfm_steplog WHERE wi_type NE 'W'.

 

  CLEAR: wa_wfm_steplog, li_lines.

  DESCRIBE TABLE lt_wfm_steplog LINES li_lines.

  READ TABLE lt_wfm_steplog INTO wa_wfm_steplog INDEX li_lines.

 

    IF in_pdf_flag = 'Y'.      "Continue

      ly_decision_key = '0001'.

    ELSE. "Cancel

      ly_decision_key = '0002'.

    ENDIF.

 

    IF NOT ly_decision_key IS INITIAL .

      CALL FUNCTION 'SAP_WAPI_DECISION_COMPLETE'

        EXPORTING

          WORKITEM_ID          = wa_wfm_steplog-wi_id

          LANGUAGE             = SY-LANGU

          USER                 = SY-UNAME

          DECISION_KEY         = ly_decision_key

          DO_COMMIT            = 'X'

        IMPORTING

          RETURN_CODE          = l_subrc.

                 

Thanks in advance.

 

Regards,

Dexter


Viewing all articles
Browse latest Browse all 8392

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>