Queries regarding the workflow

Hi guys
I have created a workflow definition in SWDD and creted a object in SWO1 with an event. this event i linked to the workflow in tepe linkage table also. I tried to trigger the event from the abap report program .I have used standard FM SWE_EVENT_CREATE. I have added the FM SWW_WI_CREATE_VIA_EVENT as the receiver FM in the event.
But still when i run the report i can not see this event in event trace. When i debugged the program i have found that the Event id is generated by the FM SWE_EVENT_CREATE.
Do i have to add anything to the program or anything to be added to the event. PLease let me know
thanks
sankar

hi
i am giving my code here:
REPORT  ZEMPWORKFLOW.
PARAMETERS : empid type ZEMPID obligatory,
             empname type ZEMPNAME obligatory,
             empDOB type ZEMPDOB obligatory,
             empcont type ZEMPCOUNTRY obligatory.
INCLUDE <cntn01>.
DATA: objtype LIKE swetypecou-objtype,
      event   LIKE swetypecou-event,
      objkey  LIKE sweinstcou-objkey,
      eventid LIKE swedumevid-evtid,
      creator LIKE swhactor.
objtype = 'ZEMPLOYEE'.
event = 'UPDATE'.
clear objkey.
objkey(10) = empid.
swc_container z_container.
swc_create_container z_container.
swc_set_element z_container 'empid' empid.
swc_set_element z_container 'empname' empname.
swc_set_element z_container 'empdob' empDOB.
             CALL FUNCTION 'SWE_EVENT_CREATE'
               EXPORTING
                 OBJTYPE                       =  objtype
                 OBJKEY                        =  objkey
                 EVENT                         =  event
             IMPORTING
                EVENT_ID                      =  eventid
             TABLES
                EVENT_CONTAINER               =  z_container
             EXCEPTIONS
                OBJTYPE_NOT_FOUND             = 1
               OTHERS                        = 2.
IF sy-subrc = 0.
COMMIT WORK.
WRITE:/ 'Your event was created.'.
ELSE.
WRITE:/ 'There was an error creating the event.'.
ENDIF.
please tell me if you need any more info.
thanks
sankar

Similar Messages

  • A few queries regarding the beauty that is Nokia 5...

    I got this beautiful lil machine a lil over a week back. It looks lovely, and sounds even better. And even though, being a student/intern, it cost me more than my monthly salary, I am mighty pleased I got it. And despite the opposition before, it's a great hit, both at home and work. 
    Just a few queries regarding the usage from my experience so far, the answers to which I could not find in this forum and a few other review sites. [Apologies if I'd missed something.]
     1- First, the battery. It only lasts for a little over a day on full charge. From what I'd heard and read, it looked like it should last quite a bit a more, atleast 2 full days. The phone even hung up a couple of times, while recording/playing video. Upon which I had to remove and reinsert the battery. How seriously wrong is this ?
    2- How do you forcefully exit an application, if need be ? It suggests in the guide, and from the reviews I read, there's supposed to be an exit and a start button with the applications when you bring up the task manager. Where're they?
    3- There's this option where you can insert a Slideshow as your Wallpaper. But when I go to it, select the desired images, [ Tried various random images, yes ]it only shows Options and Back button, when select Back, it just goes, well, back. Nothing really happens to the wallpaper. How does that work ?
    4- This might seem like a petty issue, but it can be pretty annoying. Once you go to Options and tell it you are marking, e.g. in the Inbox or the File Manager, how do you mark multiple items, WITHOUT having to go to Options >Mark >Mark/Unmark for each item ? What's the point of having a seperate Marking option in the first place then, when I could just Move or Delete each item seperately anyway. 
    5- And last, any news on a free full version of a document viewer ? From what I looked up, it costs around US$70, which is about a quarter of the phone's purchase price itself. And that's not a modest sum, that too for a basic application such as this, for a anyone with my status.
    Just so any prospective buyer or amateur user such as myself doesn't get scared off by the seemingly long list of inquiries, the phone's an absolute pleasure to use. Specially, for someone with their first Touchscreen/Symbian experience. I got this phone after a LOT of research, both online and in the field. And it's bloody well worth it so far. 
    I know, it's a huge post, but you'd have my utmost gratitude for an accurately detailed response. Thankyou. =)
    Solved!
    Go to Solution.

    Why of course. Something happening to your phone during the process would brick it, not to mention that the attempt would install something in your phone that voids the warranty, meaning that you just made yourself a very expensive paperweight. ^_^. We're not really allowed to talk about it, other than the fact that with the above possibility, I strongly advise you not to do so. There is a way to do it without hacking it. I know of people who have managed to do it without hacking, but it was on the 5800. Hmm, ok, maybe they'll work for you too though.
    http://forum.dailymobile.se/index.php/topic,4254.0.html 
    If you find my post helpful please click the green star on the left under the avatar. Thanks.

  • Regarding the workflow notification page customization

    Hello Everyone...
    I am new to Oracle OAF...
    Customize the Oracle Workflow Notifications page (for Open Notifications) by using OA Framework Customization (to display more details on the Notification)
    what is solution for this component?
    could someone help me out in this task plz...

    You need to check how the notifications are getting created. Please download the workflow from instance and check the logic of the notification creation. That should give ideas on customizations involved.
    Regards
    Sumit

  • Regarding the Workflow definition 'WS10000051' not in version '0001'

    Hi,
    iam using the worklow template WS10000051 and when try to view the workflow builder it 's giving error " Workflow definition 'WS10000051' not in version '0001"
    please let me know the solution!!
    it's very urgent!!
    thanks
    ram

    Prasath Natesan wrote:Did u check the URL provided by me in the previous post. Below is one of the responses in that thread!
    >
    >Are you in ECC 6.0? check note 981295 and the below message.
    >
    >incomplete / missing workflow on ECC 6.0
    >
    >Thanks,
    >Prasath N
    Check this note and also check out various other options provided by others.
    Thanks,
    Prasath N

  • Queries regarding the datasource to be used in the report

    Hi All,
    I have to use the query "0BBP_DOC_Q001" i.e "Document Flow: Shopping Cart – Purchase Requisition (Backend)".for this,what datasource should i use??? the link in help.sap.com is http://help.sap.com/saphelp_nw70/helpdata/EN/30/906e3acb8f686ae10000000a114084/frameset.htm
    plz.guide me which datasource to use,i am using the datasource for shopping carts i.e 0BBP_TD_SC_1.
    thanks in advance,points will be assigned:)
    regards,
    Manjari.

    Hi,
    Use datasource 0BBP_DOC_ITM_1 and 0BBP_DOC_HDR_1
    Hope this helps.
    Tnx

  • Few queries regarding J3RFLVMOBVED Report

    Hi all,
    I have a few queries regarding the J3RFLVMOBVED Report.
    First and most inconsequential, the report reads Stock Overview (Russia). So why Russia?
    Second, there are two checkboxes in the selection selection screen namely,
    Read List from Database
    Save List to Database
    When I run this report once, it takes about 10 mins to fetch the output. But if I select Read List from Database, I get the result in a matter of few seconds to a couple of minutes.
    So obviously I would like to know the secret behind this magic trick.
    Also, what does Save List to Database do? Im a little apprehensive of trying this option. Just dont understand what it means. Hence did not try it yet. Does it mean that it is saving to a buffer or to the database as suggested(which I feel is highly unlikely).
    I did debug the program. But found it too much to comprehend - pardon my n00biness for that.
    If anybody has looked at this report or a similar one, with the above checkboxes, please help me out.
    pk
    PS: Logging out for the day. Will respond to replies on the morrow.

    Hi Amit,
    The Documentation for this report can be found either in Tcode J3RFLVMOBVED by clicking on the Blue i button or by going to the report J_3RMOBVED and checking the documentation there.
    This part of the documentation is pretty useful:
    Options to keep / receive the report from a database.
    If the option "Keep report in database" is active our report is kept in the databases table "INDX"  with the key "IM". That report can be used operatively for the further analysis.
    The storing is possible on two vevels:
    on a plant level
    on  a company code + GL account level
    In both cases storing is possible only for one period (month).
    Will check out the Notes. Actually services.sap.com has problems opening in my browser. Will have to get that rectified first.
    Thanks for the info.
    pk
    PS: Im on ECC6
    Edited by: kishan P on Feb 4, 2009 4:22 PM

  • Regarding the payment block workflow trigger

    Hi Gurus
    1. All the invoices should be posted with payment block u201CZu201D (customized) where it is not already populated by MIRO with standard u201CRu201D.
    2.Everyday the accountant of the concerned section will run the payment proposal (Automatic Payment Program).  All the invoices that are due will be selected in the proposal with payment block u201CZu201D or u201CRu201D.  Then the accountant manually replaces payment block u201CZu201D or u201CRu201D with u201CSu201D (customized) (signifying start of workflow) in the invoices picked up in the proposal.
    3.Once the payment block changes to u201CSu201D, workflow event should trigger to alert the Section head.
    4.The Section Head then scrutinizes the proposal and wherever he approves the payment block u201CSu201D should be removed in the proposal list. The payment block in all other invoices not approved by the Section Head should be changed from u201CSu201D to u201CZu201D or u201CRu201D again.
    5.The information of rejected invoices should pass to the accountant.
    Roles: 2
    1.Accountant (who has authorization to change the payment block from u201CZu201D or u201CRu201D to u201CSu201D only)
    2.Section Head (who has authorization to approve or to reject)
    Even I given the BOR as BSEG and event as created (Posting item with Payment Block ) .
    I configured as follows.
    1) defined the workflow variant,
    2) assigned the workflow variant to company code
    3) defined the payment block as blank
    But In Event simulation i got workflow get started but it not started. But there is nor event logs too.
    Please help me if you know anything regarding this..
    regards
    vel
    Edited by: Mike Pokraka on Jun 27, 2008 5:27 PM
    Edited by: Velmurugan on Jun 27, 2008 5:45 PM

    Hi Vel
    Did you fix your problem already? recently, I have got a same request from user. The requirement is that after the payment proproal has been confirmed, the workflow should be started by this change and triggers it to send out an email for those vendors by their email address. If you or anybody know about the solution for creating this workflow, please kindly instruct me how to do it, since I am a fresher.
    Thanks
    Jc

  • Doubt's regarding the Hierarchial Queries in Oracle

    Hi,
    i have a doubt regarding the Hierarchial Queries in Oracle.
    SELECT * FROM TMP_TEST;
    ID     NUMVAL     STRVAL
    1     100     Hello
    1     -100     World
    2     1     Concatenate
    2     2     In String
    2     3     using Connect By
    2     4     Using SYS_CONNECT_BY_PATH
    i am clear with my execution of IN_Line view (mechanism how it work's) .
    But i have also read about the Hierarchial queries in the Oracle product documentation's. i am also aware of the
    SYS_CONNECT_BY_PATH , LEVEL & START WITH , CONNECT BY Keywords.
    But i couldnot able to Manually work out as how this below Query works.
    Can you please explain me how this Hieracial query works ?
    SELECT ID, (SYS_CONNECT_BY_PATH(STRVAL,',')),LEVEL
    FROM
    SELECT ID,STRVAL,ROW_NUMBER() OVER(PARTITION BY ID ORDER BY ID) RNUM,
    COUNT(*) OVER(PARTITION BY ID ORDER BY ID) CNT,NUMVAL
    FROM TMP_TEST
    START WITH RNUM = 1
    CONNECT BY PRIOR RNUM = RNUM - 1
    Many Thanks,
    Rajesh.

    Hi, Rajesh,
    My first message was in response to your first message.
    In your latest message, the query is:
    SELECT  ID, (SYS_CONNECT_BY_PATH(STRVAL,',')),LEVEL
    FROM    (
            SELECT  ID,STRVAL,ROW_NUMBER() OVER(PARTITION BY ID ORDER BY ID) RNUM,
                    COUNT(*) OVER(PARTITION BY ID ORDER BY ID) CNT,NUMVAL
            FROM TMP_TEST
    WHERE   RNUM = CNT
    START WITH  RNUM = 1
    CONNECT BY  PRIOR RNUM = RNUM - 1;It looks like you lost the second CONNECT BY condition:
    AND PRIOR ID = IDPut it back: it's important.
    Now you're confused about the output row:
    2    ,Hello,World,using Connect By,Using SYS_CONNECT_BY_PATH   4It doesn't seem to correspond to anything results that you got when you ran the sub-query alone.
    That's because the resutls from your sub-query may change every time you run it, even though the data doesn't change. The ORDER BY clauses in both of the analytic functions do not result in a complete ordering. In fact, they're completely meaningless. It never makes any sense to PARTITON BY and ORDER BY the same value; "PARTITION BY id" means that only rows with the same id will be compared to each other; you might as well say "ORDER BY 0" or "ORDER BY dmbs_random.value".
    The ORDER BY clause of ROW_NUMBER whould reflect that way in which you want the results to appear within each id, for example:
    ROW_NUMBER () OVER (PARTITION BY id ORDER BY UPPER (strval))Note that this is very similar to what was in my first reply.
    In the COUNT function, why do you want an ORDER BY clause at all? Just say:
    COUNT (*) OVER (PARTITION BY id)

  • Regarding the change status of leave workflow.

    hi friends,
    i have copied the standard leave worklfow "WS12300111" and customized it just to meet our requirement means for multiple approvers.
    everything is working fine in production  means if user ID "AIHR01' raise a leave request the workitem will go to "AIHR02" after his approving the workitem will go to the final approver means "AIHR03" after his approval the leave request will be completed and the status in the TC - PTARQ is coming as "APPROVED" means only after the approving of "AIHR03" the status is coming "APPROVED" but in some cases when user id "AIHR02" is approved instead of coming status "SENT" it is coming "APPROVED"  in TC-PTARQ and because of this status the workitem is coming blank in UWL of "AIHR03".
    I have already incorporated the given below method in the "WORKFLOW" just to change the status from "APPROVED"  to "SENT" after the approval of user ID "AIHR02" but in some cases it is not working fine it is giving BUG.
    begin_method changestatus changing container.
    DATA:request TYPE ptreq_header-request_id,
              wi_id TYPE swwwihead-wi_id.
    DATA: request_instance TYPE REF TO if_pt_req_request,
               event   TYPE tim_req_xfer_event VALUE
               cl_pt_req_const=>c_reqtrans_send,
               ex_status TYPE tim_req_status,
               container_wi TYPE swcont OCCURS 0,
               agents TYPE STANDARD TABLE OF swhactor WITH HEADER LINE.
              swc_get_element container 'REQUEST' request.
              swc_get_element container 'Wi_id' wi_id.
    DO.
      CALL FUNCTION 'ENQUEUE_EPTREQ'
       EXPORTING
        MODE_PTREQ_HEADER       = 'S'
        MANDT                   = SY-MANDT
         request_id              = request
        X_REQUEST_ID            = ' '
        _SCOPE                  = '2'
        _WAIT                   = ' '
        _COLLECT                = ' '
       EXCEPTIONS
         foreign_lock            = 1
          system_failure          = 2
          OTHERS                  = 3
        IF sy-subrc = 0.
          EXIT.
        ENDIF.
        WAIT UP TO 60 SECONDS.
      ENDDO.
      IF sy-subrc = 0.
        CALL METHOD ca_pt_req_header=>agent->get_request
          EXPORTING
            im_request_id     = request
          IMPORTING
            ex_request        = request_instance
          EXCEPTIONS
            request_not_found = 1
            OTHERS            = 2.
        IF sy-subrc = 0.
          CALL METHOD request_instance->initiate_state_trans
            EXPORTING
              im_transfer_event = event
               im_external_call  = 'X'
       im_ret_value      = 0
                     ex_new_status     = ex_status
       ex_ret_code       =
          swc_set_element container 'Ex_Status' ex_status.
        ENDIF.
        CALL FUNCTION 'DEQUEUE_EPTREQ'
         EXPORTING
      MODE_PTREQ_HEADER       = 'S'
      MANDT                   = SY-MANDT
           request_id              = request
      X_REQUEST_ID            = ' '
      _SCOPE                  = '3'
      _SYNCHRON               = ' '
      _COLLECT                = ' '
      ENDIF.
      swc_create_container container_wi.
      swc_set_element container_wi 'WI_ID' wi_id.
      agents-otype = 'US'.
      agents-objid = sy-uname.
      APPEND agents.
      CALL FUNCTION 'SWW_WI_START_SIMPLE'
        EXPORTING
          task                         = 'TS90000089'
          called_in_background         = 'X'
        TABLES
          agents                       = agents
          wi_container                 = container_wi
        EXCEPTIONS
          id_not_created               = 1
          read_failed                  = 2
          immediate_start_not_possible = 3
          execution_failed             = 4
          invalid_status               = 5
          OTHERS                       = 6.
      end_method.
    Request you to plesase help me to solve this issue .why in some cases instead of coming status "SENT" it is coming "APPROVED"  after the approval of user id "AIHR02".
    BECAUSE of the  "APPROVED" staus the same workitem is coming blank in the UWL OF "AIHR03".

    solved by own

  • Regarding the SRM WORKFLOW

    here is the requirement
    we have an SRM system and an ECC system, now approval for purchases occurs in ECC on purchase order level. but our client want  all indirect purchase orders will be initiated from SRM in the form of shopping carts.
    shopping cart approval process is:
    after creating the shopping cart i need to send the shopping cart information, including purchasing org, plant, and total value of the shopping cart to ECC. In backend ECC if we have a release strategy then the workflow has to trigger in SRM.
    can anybody help me out on this requirement.
    thanks
    kishore

    You can also make use of coding in custom Virtual attribute. Use this Custom Virtual attribute in the defining the Start Condition through SWB_COND.
    Also make sure you use standard function Module BBP* to retrieve details.
    Thanks
    Arghadip

  • Trigger the workflow when so delivery is completed

    Hi experts ,
    I  need to  trigger the wokflow if SO  delivery is completed.
    could  anyone  please let me know if any event  is there to trigger the workflow whenever SO delivery is completed.
    Regards ,
    Kiran.

    1. First you need to create a RFC function module in the CRM system, and in that FM call the respective workflow template .
    2. Now you need to define RFC connection between the R/3 and CRM system in SM59 txn.
    3. Now once the connection is established between R/3 and CRM system, then as i mentioned in my preivous reply, plesase call the newly created RFC FM in the CRM system from that method.....
    4. Make sure that first you define connection between R/3 andf CRM, approach your basis consultant to create a RFC connection, and provide the username as WF-bacth and its password correctly , this is because when you call a FM in other system then the repective sytem will ask for the login and password, sisnce Wf-bacth is background user w.r.t to Wrokflows , once you provide wf-bacth and its password in the created connection then you mght not face login problem...
    for Further queries please revert back...

  • Payroll area locked.How to Stop the workflow during this period ?

    Dear experts,
    In the travel workflows, after all the approvals, there is a standard task(Custom) with a custom method(BUS2089 Enhanced).
    This method updates the infotype 2002 (Attendances). This works fine for the whole month except during the  payroll run which will be for 3-4 days after 20th of every month.
    We have maintained the exception for this when the control record is in the status '1' or '4', by passing a temporary error to the workflow.
    SELECT SINGLE * FROM t569v WHERE abkrs = 'Z0'.
    IF sy-subrc EQ 0 AND ( t569v-state EQ '1' OR
                           t569v-state EQ '4' ).
      return-message_v1 = 'Employee Master data locked for Payroll'.
      exit_return 1001 return-message_v1 return-message_v2
                       return-message_v3 return-message_v4.
    As i understand the workflows can be restarted after solving the temporary errors.But this Temp error will only be solved after the payroll record is becomes 'Exit Payroll'.
    The system attempts for 3 times in the period of 30 minutes and then the tempoarry error becomes a permanent error and this way the workflows goes into a permanent error which cannot be restarted even after the payroll is exit.Due to this may workflows are unable to update the Infotyp 2002 however their trips are approved at all levels.
    This counter of 3 times and 30 minutes, I belive the system is taking from the error monitoring program (RSWWERRE / SWWERRE) in SWU3.
    I am thinking of putting the workflow into 'Wait' state till the period when the Payroll is locked. This way , we can avoid the workflow even from going into temporary error.
    Can anyone help in this regard ? Do we need to add a WAIT step in the WF Definition or control in the method code itself ?
    Does WAIT UNTIL (ABAP Keyword) works for 3-4 days of payroll run if we implement in the method code itself?
    -Anwar
    Edited by: Sameer Anwar on Aug 20, 2011 9:44 AM
    Edited by: Sameer Anwar on Aug 20, 2011 9:45 AM

    Hi Sameer,
    But , Can you pls put some more information on why we need to avoid WAIT UNTIL in Tthe ABAP ?
    Wait Steps are only used where you have 1 event which the workflow would expect ...moreover this would require more effort in terms of implementation...( you will have to create an event manually after your payroll is open).
    I would suggest create an virtual attrubute of the BO  which will populate a whetherr the Payroll is locked or unlocked... then use this attribute as a start condition in the conditions tab of your step. this would stop the workflow until the payrol is open...
    Regards
    Gautam
    Edited by: gautam maini on Aug 20, 2011 2:34 PM
    Edited by: gautam maini on Aug 20, 2011 2:35 PM

  • Which field is the workflow trigger for a Contract Agreement ?

    Greeting everyone,
    I am not sure if this has been answer before or if this is the correct forum. If not, apologies in advance and do direct me to the appropriate topic/forum.
    I have an inquiries with regards to Contract Outline agreement and workflow trigger.
    Based on my company configuration, the trigger is based on the changes in value and release strategy.
    What I am unsure is that which field the workflow-trigger checks?
    Does SAP checks the field "Target Value" in contract header, or  the sum of net value in each of the contract items?
    Thank you

    Hello Sek,
    In contracts, the target value is used for the release strategy determination and not the net contract value. If you maintain a target value in the contract header, this value is set in field CEKKO-GNETW to determine the strategy. If no target value exists on header level, a cumulation of the target values of the items is carried out and used for the release strategy determination.
    Regards,
    Mauro

  • How to capture the status of a transaction to trigger the workflow

    Hi,
    I want to trigger the workflow whenever the user changes the status.How can i capture the status.I gone through some forms,there it has mentioned that with the help of SWEL transaction we can find the status,but we can trace the events with that,I want to trace the status.How can i acheive that.
    Thanks & Regards,
    Asmitha.

    Hi,
    im using the SAP R/3 4.6C and trying to launch automatic trigger upon BO FIPP post method. I have configured Instance and Type Linkages but nothing ever happens. Whereas i tried this in SAP IDES and it was working fine.
    What is or could be the problem?
    Best regards
    Laurynas

  • Error while transporting the workflow object

    Hi all,
    Please be informed that while i transported the workflow changes to test system i encountered the sy-subrc 8 error as stated in below screen shots.

    Hi Ranjith
    Seems that the transport error is showing that your ID has locked the Workflow (user REDDYRAN).
    Can you do a syntax check of the workflow transported in this transport - in pftc and swdd? Do we get any error?
    Also see if you can execute FM SWD_WFD_REPLICATE_FROM_9999 in Quality (in SM37)  - provide the IM_TASK = WSxxxxxxxx (your workflow number).
    regards,
    Modak

Maybe you are looking for