Skip to Content

issue in passing values from WF container -> task container -> custom BO method

Hi Experts,

I am facing a weird problem and I have tried most of the suggestions given on SCN.

I have a full custom workflow with three levels L1,L2 and L3 of approval. After last L3 approval, I call a BO method via ACTIVITY step in workflow and call FM. The issues is, values of the workflow containers are not getting passed to the custom method. I have check all bindings from WF-> task-> method but SWC_GET_ELEMENT 'FIELD' value does not return me any values(gives sy-subrc = 8). I have checked technical log too. The values from workflow container itself are not passed to the task. Seems, somewhere values are getting cleared off. I am entering these values from directly from worflow(for testing only). Please help me.

Please note, apart from user decision for L1,L2 and L3, I have some sendmail steps and activity steps to update Z tables. is it possible that the values into import paramenters which I pass from directly testing (F8) can be refreshed off.? how to fix it. Please help.It is very urgent. Thanks

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Aug 18, 2017 at 02:48 AM

    My issued resolved. I tried myself to resolve it.

    It was my mistake, I did not notice that my workflow still had 'ERROR' message (along with info and warning messages). So with error messages, workflow was not actually activated though it showed activated successfully. So the latest task and binding was not reflecting in the workflow. I fixed the errors and it worked now.

    Thanks again Sue for your quick response. Appreciate it.

    Ratnesh

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 17, 2017 at 06:54 PM

    Hopefully your call to the swc macro looks more like this?

    swc_get_element container 'Invoice_Number' invoice_number.

    Where you have to specify that the container element Invoice_Number (or whatever, and yes, the case does matter here!) will be retrieved into the local variable invoice_number?

    Did you define these as input parameters to your method? When you test the object (and method) from SWo1, are you prompted to provide values for these fields?

    Good luck,

    Sue

    Add comment
    10|10000 characters needed characters exceeded

    • Thanks Sue for reply.

      I used syntax like this swc_get_element container 'Invoice_Number' invoice_number only.

      I have already used this syntax in some of the previous activities of my workflow and it works fine.

      This syntax is not working in last node(Activity step) of my workflow when I post the doc in BO custom method.

      Any suggestions, please share.

      One more strange behavior I noticed, the task for this problematic activity was TS9000032 originally and I replaced(suspecting that TS**32 might have some issue) it by a newly created task TS9000063 around 12 hour ago. Now when I test my workflow even right now, workflow log still shown TS9000032 and NOT TS9000063.

      Even when I deleted that activity step which was holding TS9000032(originally) and TS9000063(replacing task) but when I test workflow, logs still shows TS9000032 and even, method(where MACRO SWC_GET_CONTAINER ....is called) of BO is executed.

      I think, TS9000032 is still being used by workflow run time environment. How to clear this buffer.

      I have already used SWU_OBUF and /NEX the SAP many times but still workflow run time log shows TS9000032 only.

      My system is S4 HANA 1610.

      Please advise.

      Regards,

      Ratnesh