Problem in workflow container

Dear Experters,
I got this problem, when I am doing my first workflow exercise,I tried to create a workflow from a standard Template(ws00000038(for Purchase requistion)).I followed the following steps
In pftc event is activated
Workflow stratergies n etc are released.
Agent assignment is done along with event linkage
In workflow builder when I came to step u201CRelease requisitionu201D and checked binding I got the following error   u201CThe object types '[BO.BUS0007]' (source) and '[BO.BUS2009]' (target) are not compatibleu201D
Please kindly give advice.

Hi, did you relate the release code with the agents in SPRO? I mean you have to set the workflow in SPRO to link the release codes with the agents you assigned in your workflow definition.
If you have done this, how about running the TCode SWU_OBUF to refresh the buffers, just in case the changes  didn't take place yet.
Don't worry, it's ok, it's the learning curve we all have to go through. I faced a lot of problems too when I first started working on workflow. I am still new in this field as well, but I just hope I could contribute a little just like how the others have helped me been through all this.
Hope this helps...
Regards,
YL

Similar Messages

  • Workflow container element empty

    Hi all,
    I have the following problem:
    - my workflow container has an element named 'AbsenceRequest'
    - in the element 'AbsenceRequest' I have a subelement named Comments which is a table
    - I created a business object type 'ZESS_AREQ' in SWO1 which has an attribute named 'Comments' and a method named 'Create'
    - In a report I create an object of this object type using swc_create_object and I set subelement 'Comments' to a value 'test' using swc_set_table
    - Then I call method 'Create' of the created object
    - In that method I retrieve the value from the container using swc_get_table and I receive value 'test'
    Then I have the following piece of code:
    swc_free_object lf_object.                             
    MOVE lw_areq-pernr TO object-key-personnelnumber.      
    MOVE lw_areq-id TO object-key-id.                      
    swc_create_object lf_object 'ZESS_AREQ' object-key.    
    IF sy-subrc EQ 0.                                      
       swc_raise_event lf_object 'Created' container.       
       COMMIT WORK AND WAIT.                                
    ENDIF.
    Which should start the corresponding WF (which it does), but in my WF container the subelement Comments is empty...
    Any idea what goes wrong?
    Many thanks in advance!
    Julien

    Well actually the WF container element has one entry but this entry is empty (blank)...

  • Upload file in Web Dynpro and add to Workflow container as SOFM object

    Hi!
    I have a Web Dynpro for ABAP application that should send attachments of uploaded files to a workflow container. I have already managed to do this, and it works fine for TXT files, but when I try to attach a WORD (.DOC) file the file looks corrput when I open it from the SAP inbox.
    When uploading files in Web Dynpro it is as an XSTRING. I have tried out the following alternatives regarding convertion of the XSTRING before it is inserted in the SOFM object:
    1) Convert from XSTRING to STRING using codepage 4110.
    Then it is split into a string table of 255 chars
    2) Convert from XSTRING to STRING using codepage 4102
    Then it is split into a string table of 255 chars
    3) Convert from XSTRING to BINARY format
    I use function module 'SWL_SOFM_CREATE_WITH_TABLE'
    and then swf_create_object lr_sofm 'SOFM' ls_sofm_key.
    before I call some macros to fill the container.
    Anyone else who have tried to do this with success? I'm greatful for any help.
    Regards, Tine

    Hi,
    I had the same problem in the last days and finally I got a quite simple solution:
    I had a look at the FM SWL_SOFM_CREATE_WITH_TABLE an noticed that it calls another FM (SO_DOCUMENT_INSERT_API1) which has a tables parameter for HEX data and is actually able to  create a SOFM object from HEX data.
    I simply copied SWL_SOFM_CREATE_WITH_TABLE as a customer FM and applied a few changes to make it accept HEX data:
    First I added a new table parameter in the interface which gets the HEX data from the calling application (uploaded data using BIN format):
    OBJECT_CONTENT_HEX     LIKE     SOLIX
    Here is the code of the FM (I marked all additional and changed lines with a comment):
    function z_test_sofm_create_with_table .
    *"*"Lokale Schnittstelle:
    *"  IMPORTING
    *"     VALUE(NOTE_TITLE) LIKE  SODOCCHGI1-OBJ_DESCR OPTIONAL
    *"     VALUE(DOCUMENT_TYPE) LIKE  SOODK-OBJTP DEFAULT SPACE
    *"  EXPORTING
    *"     VALUE(SOFM_KEY) LIKE  SWOTOBJID-OBJKEY
    *"  TABLES
    *"      NOTE_TEXT STRUCTURE  SOLISTI1 OPTIONAL
    *"      OBJECT_CONTENT_HEX STRUCTURE  SOLIX OPTIONAL
    *"  EXCEPTIONS
    *"      ERROR_SOFM_CREATION
      data: region like sofd-folrg.
      data: folder_id like soodk.
      data: l_folder_id like soobjinfi1-object_id.
      data: document_data like sodocchgi1.
      data: document_info like sofolenti1.
      data: object_content like solisti1 occurs 0 with header line.
      data: lines like sy-tabix.
    *- set default
      if document_type is initial.
        document_type = 'RAW'.
      endif.
    *- create office object
    *-- get dark folder
      region = 'B'.
      call function 'SO_FOLDER_ROOT_ID_GET'
        exporting
          region                = region
        importing
          folder_id             = folder_id
        exceptions
          communication_failure = 1
          owner_not_exist       = 2
          system_failure        = 3
          x_error               = 4
          others                = 5.
      if sy-subrc ne 0.
        message e696(wl)                       "<== Add message class
                raising error_sofm_creation.
      endif.
    *- get description
      if note_title is initial.
        read table note_text index 1.
        note_title = note_text.
      endif.
    *-- create office document
      document_data-obj_name = 'ATTACHMENT'.
      document_data-obj_descr = note_title.
      document_data-obj_langu = sy-langu.
      object_content[] = note_text[].
      describe table object_content lines lines.
      document_data-doc_size = ( lines - 1 ) * 255 + strlen( object_content ).
      if object_content[] is initial.                     "<== insert
        describe table object_content_hex lines lines.    "<== insert
        document_data-doc_size = lines * 255.             "<== insert
      endif.                                              "<== insert
      l_folder_id = folder_id.
      call function 'SO_DOCUMENT_INSERT_API1'
        exporting
          folder_id                  = l_folder_id
          document_data              = document_data
          document_type              = document_type
        importing
          document_info              = document_info
        tables
          object_content             = object_content
          contents_hex               = object_content_hex   " <== Insert line
        exceptions
          folder_not_exist           = 1
          document_type_not_exist    = 2
          operation_no_authorization = 3
          parameter_error            = 4
          x_error                    = 5
          enqueue_error              = 6
          others                     = 7.
      if sy-subrc ne 0.
        message e696(wl)                              "<== Add message class
                raising error_sofm_creation.
      endif.
    *- set export parameter
      sofm_key = document_info-doc_id.
    endfunction.
    The returned  SOFM key I added to a container element. The element refers to event parameter of type OBJ_RECORD in my ABAP OO Class
    Using this function I was able to raise an event by using Method cl_swf_evt_event=>raise
    that invoked a workitem containing an Excel-File i had uploaded as binary file and passed to the FM z_test_sofm_create_with_table as document type 'XLS'.
    In the woritem preview when clicking on the attachment the file was opened directly in Excel.
    Actually the new lines for calculation the file size is not yet quite correct. At first glance it does not seem to cause any trouble, but I will stll check that. In FM SO_OBJECT_INSERT the size is again checked and calculated if initial, so leaving size initial might also be an option.
    I hope this helps anyone having a similar issue.
    Greetings,
    Michael Gulitz

  • Problem in workflow

    Hello,
    There is an urgent issue regarding workflow. The workflow gets triggered by SWE_EVENT_CREATE from a z-function module. The parameters passed while triggering are Approver1, Approver2, first_approver and payment method. The problem is, In some cases, the workflow fails at the start and workitem doesn't go the 1st approver inbox for a particular user. After 6-7 errors, the triggering event got deactivated automatically.
    The data passed to the workflow even in case of error is correct and the binding is also correct.
    The scenario is in the production server and cant be simulated in quality server since the same data is working fine in the quality server.
    The error log for the document in error shows the folowing error:
    Diagnosis
    When the work item no. 1160113 sent a response message, an inconsistency was found in the related workflow definition: Node no. 1 has a line but no node definition or step definition.
    The respective workflow task (definition no. , version ) may have been changed during the workflow execution in a way which is not allowed.
    System Response
    The workflow is forced into the error status and stopped.
    Procedure
    Check and correct the workflow definition. You can display the structure (nodes and lines) of the workflow definition in the workflow builder via the menu function 'Extras' -> 'Techn. information' -> 'Definition structure' and -> 'Runtime structure'.
    Extras -> Technical information -> Definition structure or
    Extras -> Technical information -> Runtime structure
    It may be possible to correct the error by activating the workflow or by using the special function Extras -> Special functions -> Block correction.
    The same workflow is working for other users properly.
    Can anybody please help me with this. Its really urgent.
    Thanks in advance.
    Radhika
    Edited by: Alvaro Tejada Galindo on Apr 7, 2008 12:42 PM

    Hi Radhika,
    You can activate the event trace by SWE4 transaction.
    After you switch it on, execute your workflow once and check the event trace in SWEL.
    Once you open the Event trace, check the following to diagnose the problem:
    1. See if the workflow actually got triggered.
    2. If yes, go into the details of the WF, and check the technical settings. In this you can actually check at which step the WF failed.
    3. Once you determine the erronous step, check the container.
    4. Check both the workflow container as well as the task container.
    5. check the Bindings between the various containers.
    Post the scenario once you have pinpointed the exact or the probable cause.
    Hope this helps.
    Regards,
    Sonal

  • Retrieve workflow container data in programming exit

    I am trying to use a programming exit in Workflow in order to amend the task container for the receipients field of a "Send Email" step. The reason why we are not determining the receipients in the usual way is because we hold the receipients (amongst other data) in a separate Z* table - this needs to stay this way.
    I created a class and copied method CHANGE_CONT_ELEMENT to base my altered code on. The method is triggered fine when testing the workflow. Here is what it now looks like:
    method CHANGE_CONT_ELEMENT .
      DATA: container TYPE REF TO if_swf_cnt_container,
            if_swf_cnt_container,
            cont TYPE REF TO IF_SWF_IFS_PARAMETER_CONTAINER,
            name TYPE swfdname,
            lh_wihandle TYPE REF TO if_swf_run_wim_internal,
            l_exception TYPE REF TO cx_swf_cnt_container,
            l_wiid TYPE sww_wiid,
            w_container type ref to IF_SWF_IFS_PARAMETER_CONTAINER,
            w_names type SWFDNAMTAB,
            wa_names type line of SWFDNAMTAB,
            w_value(30).
      w_container = me->m_ctx->GET_WI_CONTAINER( ).
      w_names = w_container->LIST_NAMES( ).
    data: w_name type SWFDNAME.
    w_name = 'TEST-NUMBER'.
    TRY.
      loop at w_names into wa_names.
        CALL METHOD w_container->get
         EXPORTING
          name       = wa_names.
      endloop.
    CATCH CX_SWF_CNT_ELEM_NOT_FOUND .
    CATCH CX_SWF_CNT_ELEM_TYPE_CONFLICT .
    CATCH CX_SWF_CNT_UNIT_TYPE_CONFLICT .
    CATCH CX_SWF_CNT_CONTAINER .
    ENDTRY.
    ENDMETHOD.
    Now w_names retrieves the names of the fields fine (including my "TEST" entry which I declared in the Workflow Builder), but the GET method causes a "CX_SWF_CNT_ELEM_NOT_FOUND" exception.
    Is this the correct way to retrieve data out of a Workflow container within a WF programming exit? What am I doing wrong?
    Kind regards,
    Michael Koch

    Hi Michael, Paolo & Other experts,
    I am trying to understand when, why and how to use a 'programming exit' in a SAP workflow.
    (1) Did you figure out the solution to your problem?
    (2) Is there any material / tutorial on use of a  'programming exit' in a workflow?
    Thanks
    Abaper

  • Over Time Workflow Container elements not updated

    Hi,
    I am using Standard Task TS20000459 for approval of Overtime entered for an employee in CAT2 transaction.
    Work item is getting generated to his manager's inbox.
    Issue is, subject of the work item should have employee number and Employe name. Standard Task contains Container elements &TS_PERNR& and &TS_ENAME& which is not getting filled with any values.
    Can any one suggest me how to get the same?
    Regards,
    Saravana Perumal

    Hi Shanti
    I faced the same problem...And i resolved that problem by binding...
    Create the container element for PERNR and ENAME in the standard task ts20000459 as well as in workflow container.Then bind those container values.
    Before bind the workflow and task container, you have to bind the workflow container with the event container.
    Regards,
    Hemalatha.

  • PASS DATA FROM ABAP PROGRAM TO WORKFLOW CONTAINER

    Hello Everybody,
    I am a workflow beginner and I want to pass a data from my ABAP code to a workflow container. This workflow container is used in the Send Mail step.
    The ABAP  Program is:
    REPORT  zdb_work_flow.
    tables : vbak.
    DATA : k TYPE sweinstcou-objkey,
                e TYPE swetypecou-event.
    DATA : st TYPE swcont,
                itab TYPE STANDARD TABLE OF swcont.
    PARAMETERS : vbeln TYPE vbak-vbeln.
    start-of-selection.
      st-element = 'VBELN'.   "This is my WORKFLOW CONTAINER
      st-tab_index = 1.
      st-elemlength = 10.
      st-type = 'C'.
      st-value = vbeln.
      append st to itab.
      k = vbeln.
      e = 'TRIGGER'               "This is an event in my BUS OBJ ZDB_WFLOW
      CALL FUNCTION 'SWE_EVENT_CREATE'
        EXPORTING
          objtype                               = 'ZDB_WFLOW'   "My BUS OBJ
          objkey                                 = k
          event                                  = e    "Event TRIGGER in ZDB_WFLOW
        tables
          event_container               = itab
        exceptions
          objtype_not_found             = 1
          OTHERS                        = 2
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.         .
      COMMIT WORK.
    Now I have created a workflow in SWDD as ZDB_WF_SW.
    In this WF I have created a container as VBELN.
    In the SEND MAIL I have given a header as "Worflow Triggered for &VBELN&"
    PROBLEM.
    The Workflow is getting triggered. I am also getting a mail "Workflow Triggered for" in my mailbox but the &VBELN& is missing from the header.
    I have set the IMPORT EXPORT flag of the WF CONTAINER "VBELN"
    Please Help.
    Edited by: Deepankar.B on Feb 22, 2011 4:08 PM
    Edited by: Deepankar.B on Feb 22, 2011 4:10 PM

    You wouldn't use a SMA as an assistance class - but refer to one within it.
    I would use Shared Memory Area classes - but I'd also build a SMA that could talk across multiple application servers.
    Thomas Jung proposed this in a forum reply some time ago.
    It shouldn't be too difficult to use RFC's to access the content of SMA's in multiple app servers - ensuring synchronisation across multi app servers. I've not yet had the need, so haven't attempted.
    The long polling in 7.02 apparently uses this approach, so in a 7.02 system there may even be standard components/ SMAs that you could use.
    I do not think global areas in FM's are available across sessions - I don't think you could use that as a data transport.

  • Element Missing in Workflow Container

    Hi,
    I am facing a strange issue.
    I am not finding a particular element in workflow container (both in the Container tab and also in Basic data->Workflow Builder->Workflow container->Element (R/3 4.70 Enterprise)) but at runtime - SWI1 (Workflow Log) when I execute with workflow instance id, I am getting that workflow container element with the value that I required. I am sure I haven't deleted that element from that container... since it's not appearing, again I went to workflow template and added the Element and now it's appearing and working. As of now my problem is solved but can you please tell why it was not appearing in definition.
    Advance thanks.
    Regards,
    Balaji Viswanath.

    Is there any reason to pass single line element to multiline element?
    Instead of that try to pass single line item to single line item and user
    SWC_GET_ELEMENT CONTAINER ac_container <container> <single line element> to get the value.
    After that you can pass the value to internal table(if required)
    Aman

  • How to set the following workflow container element

    In the below example i have created the following  field chgdocdat fieldnam in the workflow container in the initial value it is showing as <notset>
    but i want the value for initial value for field chgdocdat as 00.00.0000
    fieldnam as
    can any body help me

    hi koto,
    when u create a work flow element container.
    u have tye option to give the data type.
    there u u choose from dictonary, ie some date field from the data dictonory.
    after that in the 3rd tab it is initial value.
    click it and give 00.00.0000
    since it is date type no problem here.
    save it.
    thats all
    clarifiactions are welcome.
    pls reward points, if this helped u.
    regards,
    anversha.
    [email protected]

  • Raising exception as well as populating workflow container from an activity

    hi
    I am using an activity step within a worflow which is calling method of a class.
    Within the method I am calling a bapi, if sy-subrc of BAPI <> 0 then populating the export parameter(BAPIRET2)  of method and raising an exception.
    My requirement is in workflow if there is an exception, it will follow exception path and populate WF container BAPIRET2.
    For this, I am writing following code in the method.
    call function F.M name
    if sy-subrc <> 0.
    popurate bapiret2.
    raise exception1.
    endif.
    In the worflow, I have activated the outcome exception1 in the activity step.
    But the problem is it is following exception1 path but the workflow container is not populating.
    If I am commenting the raise exception1 statement in the method, it is not following the exception path but populating workflow container.
    Please suggest how both(it will follow exception path and populate WF container BAPIRET2.) can be achieved. I have checked the binding. It is ok.
    Please suggest.
    Regards,
    Sucheta.

    Hi,
    Maybe it is just easier to forget the exception path, and put a condition after your step. In the condition you can for example check if the bapiret is initial or not. This is of course just an example - you can also return something else from the method that divides the workflow into two (or more branches). A workaround solution, if you don't get the exception working.
    Regards,
    Karri

  • Database table for Workflow Container values

    hi,
    I am on SAP ECC 6.0
    I am trying to find workflow id number starting from document number
    I try to find database table which has containe values of the workflow instances so that I can get workflow/workitem instance numbers for the document
    this is custom workflow and it is not based on business object type. so checking container values is the onlyway I can get the workflows
    but I am not able to find any table for it
    I have checked following
    SWW_CONT
    SWW_CONTOB
    SWWVCONTWI
    SWXML_CONT
    SWJ_CONT
    SWJPCONT
    SWJSCONT
    SWPCMPCONT
    SWU_CONT1
    SWUOCONT1
    almost all the SWCONT tables
    Morever I put St05 trace to see all the tables in database operations while triggering the workflow
    but the only tables seen here are
    SWWHRINDEX
    SWD_CONT  
    SWWWIHEAD
    SWWCNTP0  
    SWWLOGHIST
    SWWWIRET  
    SWWCNTP0  is Workflow Container: XML Database (P0)
    but it is XML structure data. so its of new use to query container fields.
    is this reason because of any workflow design or system config ?
    how to read container values from database tables in such case?
    thanks
    bhakti

    Hi,
    >i need to display an ALV list with list of invoices and whether the workflow is awaiting / approved / rejected for review / approval. and who did the approval / rejection action
    This you should be able to read from container now, if you have FIPP instance.
    >the workflow has two steps - review and approve and so i would query table swwwihead for the parent id of workflow and then based on task number see which is ready status task and find if its awaiting approval or rejection
    Don't do any selects to SWWWIHEAD unless you have some really specific reason. Just use SAP_WAPI* functions. You should be able to get each depended work item etc. easily with the standard functions.
    >apart from this, several data like amount values, reference document, creation date and whole lot of invoice item and header level data is required which needs to be taken from workflow container
    Why would you read this data from container? This data is in the SAP tables VBKPF, etc. There should be even functions to get all data related to an invoice - try to search for example with READPRELIMINARY* (read preliminary invoice).
    In general:
    1) if you have invoice number, get all related work items with a SAP_WAPI* function
    2) if you have only the top WI ID, use SAP_WAPIDEPEND function to get the depended work items
    3) with above function you probably will get also the status of the tasks / work items, so you don't need select in SWWWIHEAD
    4) Now you have the "status" and the workflow data for the invoice
    5) read the invoice data from standard FI tables (unless there is some specific reason to get it from WF container, and if there is, then I think that you might be having some fundamental problems in your design)
    Regards,
    Karri

  • Binding Problem in workflow

    Hi,
    I have created my own workflow for SO change. The kind of requirement i am handling is that whenever there is a change
    in SO a mail should get triggered to workflow inititor along with changed SO number.
    Now i stucked up at one place. See i have executed VA02 tcode and captured corresponding business object
    After that i have  created workflow with 2 step types one is user decision and another is send mail and at the start of workflow
    i have attached corresponding business object event to workflow  Now the problem is i am not able to pass data from VA02 tcode to correspodng created container
    Please guide me  and at the same time i would like to send that mail to my gmail id for which i have already done
    configuration in SCOT and SWU3.
    Thanks
    Parag

    Hi,
    I think you haven't done the binding between event_object & BO that acts as workflow container.
    I mean, in your workflow, see if a workflow container of type BUS2032 exists with Import/export parameter set.
    If no create one and do the necessary binding between event container Event_object & your workflow container (say BUS2032).
    Hope it helps.
    Regards,
    Raj

  • Task container to workflow container binding

    Hi all,
    I have a requirement to send mail to department responsible of a quality notification as soon as it is created from defects recording.
    I am using sendmail step for this but since it doesnt have agent determination using rule, I am forced to create a background step which captures the value of department responsible (IHPA-PARNR) and passes on to a element in workflow container. The idea was I could later use the value of this container element in my send mail step which follows.
    For this, I have defined a background step in my workflow template. The method in the standard task of this step refers to a function module.
    The function module takes quality notification number as input (QMEL-QMNUM) and outputs the partner number (data type IHPA-PARNR).
    I want to capture this partner number into my workflow at runtime. For this I defined a workflow container element refering to IHPA-PARNR so that it can bind to the export parameter of the task, which gets the value from method.
    when I test my function module it works fine. BUt when I try to bind the task to my workflow, the binding between the elements refering to IHPA-PARNR gives error this error message:
    " incompatible data type reference"
    whereas the data type reference is same for both container elements.
    Please help.
    Thanks
    kiran

    Hi Ramki,
    This is the binding from workflow to task container.
    X                 => &EXPRESS&
    G                 => &TYPEID&
    &DEPTRESPONSIBLE& => &ADDRESSSTRINGS&
    Here the DEPTRESPONSIBLE is the WF container element which gets the value of department (basically a org structure IHPA-PARNR) via a background task in the previous step.
    And in the recepients list, I have given
    recepient type : organizational object
    expression     : &DEPTRESPONSIBLE&
    I think this is where the problem is. Because when I give workflow initiator as recepient, it works fine. But when I give the department responsible as expression as shown above it errors out.
    It also works fine when I hardcode the value of department responsible in the recepients list (say 50001930)and give recepient type as Organizational object.
    So the problem is it is not taking the value stored in the container element &DEPTRESPONSIBLE& as the recepient.
    Any ideas.
    Thanks a million.
    kiran

  • Problems in workflow builder

    Hi,
    I am facing problems in workflow builder and tasks while i am creating a custom workflow template.
    1) binding between task and workflow does not work. One of the container element value is getting passed from the task to the workflow while others are not getting passed. All these are part of the same binding.
    2) the workflow container elements are not available in the steps of the workflow. eg, in a condition step i am comparing two container elements, it is failing, its taking balnk values. also in send mail step i have included a continer elements in description. i see nothing there. means the container elements are blank for the send mail step.
    3) the binding betw the task and the method simple dissappears (thrd Binding betw task and method dissappears !! )
    kindly provide and advice or suggestions
    thank you very much
    -r

    Hi,
    I have sent a mail to the email address mentioned in your profile. I will try to find a place in sdn where i cud upload the screen shots.
    Yes it look as though the data is not available at the time of the condition step. But how could that be as it is the business object attribute and that has to be available at any point in the workflow  for all the workflow steps. I have used it several times in other workflow templates.
    I have done the following
    created new workflow template and put bus2091-created as start event
    extended business object and added several new attributes and defined each attribute. some of them are virtual and some are database attribute. And while coding the definition of the virtual attribute, which is pretty complex logic, i have used the database attributes of the same business object.
    the first step in the workflow was activity step . in which i called BO method to get soem data. eg frist name, last name of the creator. i did not export anything to the method, only imported the first name, last name because inside the method i use object-_essr-ernam to get the creator user id and then i find the names of this user id
    the second step is the condtion step where i check the attribute of the business object. the attribute which are database attributes are available. but those which are virtual attributes are totally blank.
    when i trigger the workflow, the condition result always fails as there are no values available. and in swi1 i can see that those values are very much there in the business object instance.
    is it so that these attributes are populated later than the time when condition step is called ? if yes, then why does the workflow processing reach the condition step ? it should first process all the initial steps, ie completely instantiate the business object and then it should start the steps of workflow. am i right ?
    is it because i have used the database attributes of the BO in order to build logic in the definition of the virtual attributes ? for eg. instead of using object-_essr-createdby, should i use only object-key-entrysheet. then write select statement on essr table for whatever entrysheet data i want and then carry on with my coding for the virtual attribute ??
    thank you
    r

  • Passing values from and to workflow container

    Hi Guys,
                 I am reading and writing back into the workflow container element from task container using FM.
    But its not writing back the values into workflow container.
    here is my code.
    swc_get_element container 'TripNumber' trip_no.   
    Fetch Personal No. from Trip No.                
      SELECT SINGLE pernr FROM ptrv_head INTO l_pernr  
        WHERE reinr = trip_no.                                                                               
    IF sy-subrc NE 0.                                 
      EXIT.                                            
    ENDIF.                                                                               
    Fetch Employee Name                             
    SELECT SINGLE ename FROM  pa0001 INTO l_ename      
           WHERE  pernr = l_pernr                      
           AND    endda  >= sy-datum                   
           AND    begda  <= sy-datum.                  
    Fetch Employee Email id                         
    select single usrid_long from pa0105 into l_email 
       where pernr = l_pernr                           
         and usrty = '0010'                            
         and endda  >= sy-datum                        
         AND begda  <= sy-datum.                       
    Set Personal No.                          
    swc_set_element container 'Pernr1' l_pernr. 
    Employee Name                             
    swc_set_element container 'Ename' l_ename.  
    Email ID                                  
    swc_set_element container 'Email' l_email   
    Am I missing anything here.
    Thanks

    Hi,
    I faced the same issue and i found that it is not sufficient to just have proper bindings and using macros with exact container names.
    You need to create IMPORT and EXPORT parameters for that METHOD with names matching with container element names. Once you do this, you see a GREEN binding icon right below the BO and Method name in the TASK. Click that icon and create binding between TASK and METHOD.
    This should resolve your problem.
    All - Please correct me if am wrong as i am new to the workflow.
    Thanks,
    SKJ

Maybe you are looking for