How can i trigger workflow from report

hi i create one report and workflow. i want to trigger workflow from report, how can i do this one, please send me any code you have.
Thanks & Regards
Sankar

Hi Sankar,
There is another sample code...
   REPORT ZRGEVTCR.
INCLUDE <CNTN01>.
DATA: OBJKEY  LIKE SWEINSTCOU-OBJKEY,
      EVENTID LIKE SWEDUMEVID-EVTID.
DATA: BEGIN OF EVENT_CONTAINER OCCURS 0.
        INCLUDE STRUCTURE SWCONT.
DATA: END OF EVENT_CONTAINER.
PARAMETERS:
  OBJTYPE  LIKE SWETYPECOU-OBJTYPE DEFAULT 'ZRGMARA',
  MATERIAL LIKE MARA-MATNR,
  EVENT    LIKE SWETYPECOU-EVENT   DEFAULT 'CREATED',
  VOLEH    LIKE MARA-VOLEH,
  LED      LIKE SY-DATUM           DEFAULT '19971231'.
OBJKEY = MATERIAL.
CLEAR EVENT_CONTAINER. REFRESH EVENT_CONTAINER.
set input parameters for CREATED event.
remark: to be more general, we had to use fm SWO_QUERY_PARAMETERS
IF EVENT EQ 'CREATED'.
  SWC_SET_ELEMENT EVENT_CONTAINER 'LatestChangeDate' LED.
  SWC_SET_ELEMENT EVENT_CONTAINER 'VolumeUnit' VOLEH.
ENDIF.
CALL FUNCTION 'SWE_EVENT_CREATE'
     EXPORTING
          OBJTYPE           = OBJTYPE
          OBJKEY            = OBJKEY
          EVENT             = EVENT
     IMPORTING
          EVENT_ID          = EVENTID
     TABLES
          EVENT_CONTAINER   = EVENT_CONTAINER
     EXCEPTIONS
          OBJTYPE_NOT_FOUND = 1.
IF SY-SUBRC NE 0.
  WRITE : / 'Object type', OBJTYPE, 'not found in object repository'.
ELSE.
  IF EVENTID NE 0.
    WRITE : / 'At least one receiver was found'.
    COMMIT WORK.
  ELSE.
    WRITE : / 'No receivers found'.
  ENDIF.
ENDIF.
Hope this will help you to solve your problem that how to trigger workflow from the report.
Thanks,
Pramod

Similar Messages

  • How can I pass parameter from report to form?

    Hi :)
    Now I try to build conference room like this by using form
    and report. And i design that when users click at group report
    then i'll show page that contain questions report and add
    question form. And question form and report must receive the
    same parameter from group report.
    First Problem: is I don't know how group report send the
    same parameter to question report and add question report at the
    same time. And is it possible??? If not please suggest me what
    should I do???
    Second Problem: is I don't know how can I pass parameter from
    report to form. I don't know the way to do it.
    Please tell me!!! Please...
    I look forward to hearing from all of you.
    Thank You.

    One way is to create a link based on that form and attach that
    link with the report. Through links you can pass parameters

  • How can i trigger workflow when particular event happens in webdynpro

    how can i trigger workflow when particular event happens in webdynpro

    hi,
    To trigger workflow , use the fm : 'SAP_WAPI_START_WORKFLOW'
    Refer this thread for similar requirment : Workflow in WebDynpro
    Blog : http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417500)ID1564403950DB00699140435432809306End?blog=/pub/wlg/2778

  • How can I generate email from report 6i.

    Dear Sir,
    When I click on e-mail button on report 6i (Win2k User) Generate following error:-
    Rep-4203 error occurred while a mail message.
    Rep-4220 There is a problem with the email subsystem.
    When I generate report from administrator then email generated no error occurred.
    Please help me how can I generate email from report 6i without administrator rights.
    Thanks and Regards
    Brij

    You can try this at form that calling your report;
    add_parameter(p_id,'DESFORMAT','HTML');
    hope this helps...
    defne
    ps: raporu cagiridigin form program units'ine, bu add_parameter'i eklersen, HTML olarak raporunu emailleyebilirsin...

  • How can I pass parameters from report to HTML page

    Hi,
    Does any one know how to pass value from Portal Report to other HTML page (asp for excample).
    I build a Protal report, and I want jamp to "http://...viewDoc.asp?DocID=DocumentID" URL, by clicking on link, where "DocumentID" is parameter that to be pass from report.

    One way is to create a link based on that form and attach that
    link with the report. Through links you can pass parameters

  • How can I sent email from reports 6i?

    Is it possible to send email with attachment using reports 6i ?
    when I trying from Report Previewer.Report Builder
    create mail with report.eps file (subject "Report sent from Report Builder" )
    but I cant open report.eps file .
    i do not know what to do
    thanks

    You can try this at form that calling your report;
    add_parameter(p_id,'DESFORMAT','HTML');
    hope this helps...
    defne
    ps: raporu cagiridigin form program units'ine, bu add_parameter'i eklersen, HTML olarak raporunu emailleyebilirsin...

  • How can i trigger the workflow from REPORT

    hi,
      my requirement is, whenever Z... Report Is generated there is Icon called print. the write the code for printing icon. if printing Icon fails the workflow will be trigger.
    how can i trigger this from report. and i send attachent of report with mail to next person to sap inbox.
    pls let me know.
    pls give any documentation if you have.
    thanks & Regards
    Sankar.

    Hi,
    Workflow container
      swc_container        lt_container.
      swc_create_container lt_container.
      swc_set_table lt_container '<cont_name>' lit_int_tab.
    CALL FUNCTION 'SWE_EVENT_CREATE'
        EXPORTING
          objtype           = lc_objtyp
          objkey            = lv_objkey
          event             = lc_event_name
        IMPORTING
          event_id          = lv_eventid
        TABLES
          event_container   = lt_container
        EXCEPTIONS
          objtype_not_found = 1
          OTHERS            = 2.
      IF sy-subrc <> 0.
        yv_err_flg = gc_true.
        EXIT.
      ENDIF.
    Rgds,
    Prakash

  • How to call a Workflow from a Report in SE38?

    How to call a Workflow from a Report in SE38?
    Please can Anyone Send me a Source code (with Explanation)which I can use for calling Workflow >> WS99900253?
    Regards,
    Shashank.

    you can use FM
    SAP_WAPI_CREATE_EVENT
    SWE_EVENT_CREATE
    OR
    SAP_WAPI_START_WORKFLOW
    Regarding usge of this FMS search the forums you will get ample examples.
    Thanks
    Arghadip

  • How can i get input from user in Workflows

    Hello professionals,
    I'm new to SAP B1 Workflow, i have created some workflows and they all worked fine.
    But, I am wondering, How can i get input from user?. For example, i want to display list of options to choose between them and route the workflow based on the selected option. I don't want to use the exclusive gateway and check for some conditions, i want to get input from user.
    How can i do that?
    Thanks in advance,
    Kareem Naguib

    Hi,
    Please refer SAP help file:
    http://help.sap.com/saphelp_sbo900/helpdata/en/b8/1f9a1197214254b79bcf8f93f9fff9/content.htm?frameset=/en/44/c4c1cd7ca22…
    Thanks & Regards,
    Nagarajan

  • How can we trigger an IDOC based on Orders creation.

    Hiii...experts,
                            After searching alot in SDN i am taking this very commonly asked to experts in the hope of a better understanding.
    If i create a sales order means.. i want to trigger a IDOC based on certain Condition on ORDER data .. how can we do this..
    when ever i'm creating a sales order it should be automatically trigger a IDOC , Because when ever sales ordre was created in R/3 system it should be transferred to some destination...
    And pls tell me about the reports that does the job of collecting required data from the sales order and converts it into a IDOC.
    so, how can we trigger an IDOC based on Orders creation..
    pls help.
    Ram.

    Use IDOC_OUTPUT_ORDERS for creating IDOC
    you need to maintain condition records & output type
    <REMOVED BY MODERATOR>
    Edited by: Alvaro Tejada Galindo on Apr 10, 2008 4:18 PM

  • Trigger workflow from Email (lotus or Outlook)

    Hi All,
    Is it possible to trigger a workflow from An Email (lotus or Outlook). if so how can we do it?
    Reg,
    Sre
    Edited by: sre on Jul 9, 2009 3:53 PM

    Check the following links.. which answers its pretty much possible to Trigger workflow from email...
    triggering workflow from incoming mail.
    Triggering a workflow on receiving mail from external mail id.
    Can we trigger workflow on receiving e-mail ?
    Regards,
    PR.

  • How can I prevent breadcrumbs from being used on the first page?

    Hi,
    I'm using the latest version of the technical communication suite to produce a WebHelp
    layout from a framemaker book. Thanks to all the help I've received so far it's proceeding
    well, although slowly.
    II have an initia l'home'  page, that isn't present in the TOC, just with a program logo, a company
    logo and a helpdesk address. How can I stop breadcrumbs from appearing on this page?
    I'm happy for this to be the Home page and to keep the word Home, and it is a separate
    document in the linked framemaker book.
    Has anyone got any ideas as to how I can do this?
    Thanks in advance for your help.
    Best wishes,
    Karen

    Hi Karen
    To each his or her own. Jeff's approach certainly will work but will require you to repeat the process each time you generate. With the approach I outlined you would only need to do things once.
    As for the breadcrumbs not appearing at all, it depends on *WHERE* in the Master Page you elected to add them. In order for the approach I outlined to work, you need to ensure you add the placeholder *OUTSIDE* the Body placeholder. Then you should see breadcrumbs on the pages you have associated with the Master Page.
    Cheers... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7, 8 or 9 within the day!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • Hi,how can i transport objects from one server to other like (Dev To Qty)

    Hi Sir/madam,
       Can u explain how can i transport objects from one server to other like (Development To Quality To Production).
    Regards,
    Vishali.

    Hi Vishali,
    Step 1: Collect all Transports(with Packages) in Transports Tab(RSA1)- CTO
    Step 2: Release the subrequests first and then the main request by pressing Truck button
    Step 3: STMS or Customized transactions
    Object Collection In Transports:
    The respective Transports should have the following objects:
    1. Base Objects -
    a. Info Area
    b. Info object catalogs
    c. Info Objects
    2. Info Providers u2013
    a. Info Cubes
    b. Multi Providers
    c. Info Sets
    d. Data Store Objects
    e. Info Cube Aggregates
    3. Transfer Rules u2013
    a. Application Components
    b. Communication Structure
    c. Data Source replica
    d. Info Packages
    e. Transfer Rules
    f. Transformations
    g. Info Source Transaction data
    h. Transfer Structure
    i. Data sources (Active version)
    j. Routines & BW Formulas used in the Transfer routines
    k. Extract Structures
    l. (Note) If the transfer structures and related objects are being transferred without preceding
    Base Objects transport (e.g. while fixing an error) it is safer to transport the related Info
    Objects as well.
    4. Update Rules u2013
    a. Update rules
    b. Routines and formulas used in Update rules
    c. DTPs
    5. Process Chains u2013
    a. Process Chains
    b. Process Chain Starter
    c. Process Variants
    d. Event u2013 Administration Chains
    6. Report Objects u2013
    a. Reports
    b. Report Objects
    c. Web Templates
    Regards,
    Suman

  • How can I remove iCloud from my Mac Book and iPad and Mac Book Air and then just reload back on the MB Air and iPad only?

    How can I remove iCloud from my Mac Book and iPad and Mac Book Air and then just reload back on the MB Air and iPad only, which have a different user with a separate Apple ID?

    You have quite muddied up the waters, I'm afraid. Assuming you now have a single GUID partition formatted Mac OS Extended, Journaled, you should try reinstalling Lion:
    Reinstalling Lion/Mountain Lion Without Erasing the Drive
    Boot to the Recovery HD: Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
    Repair the Hard Drive and Permissions: Upon startup select Disk Utility from the main menu. Repair the Hard Drive and Permissions as follows.
    When the recovery menu appears select Disk Utility. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the main menu.
    Reinstall Lion/Mountain Lion: Select Reinstall Lion/Mountain Lion and click on the Continue button.
    Note: You will need an active Internet connection. I suggest using Ethernet if possible because it is three times faster than wireless.

  • I tried to create a new google calendar in ical, but they did not show up, I tried this several times. Now when I sync my iPad via iTunes all these failed attempts are showing up under the ical sync list in iTunes, how can i clear them from this list?

    I tried to create a new google calendar in ical, but they did not show up, I tried this several times.
    Now when I sync my iPad via iTunes all these failed attempts are showing up under the ical sync list in iTunes, how can I clear them from this list?

    See https://bugs.downthemall.net/ticket/2147
    Google Search Bug
    Reported by: openid:nathan wride Owned by:
    Priority: major Milestone:
    Component: Polish/Usability Version: 2.0.10
    Keywords: Google search instant save bug Cc:
    Operating System: Windows
    Description
    Hi Guys
    I have found a bug/annoying thing that occurs frequently on google. When searching, DTA trys to download the search...
    I'll try to attach a screenshot.
    Attachments
    [https://bugs.downthemall.net/attachment/ticket/2147/Screenshot.png Screenshot.png] Download (113.0 KB) - added by openid:nathan wride 4 weeks ago.
    The screenshot that shows the bug.

Maybe you are looking for

  • ANN: Oracle XML Parser for C - v2.0.7

    A new release of the Oracle XML Parser for C (release 2.0.7) for Solaris and NT is now available from OTN at http://technet.oracle.com/tech/xml. Key new features include: XSLT improvements: This release further improves upon the processing speed and

  • File Flagged as Malware when Installing Enterprise Pack for Eclipse

    Hello, I was installing Oracle Enterprise Pack for Eclipse 12.1.2.1-kepler when Norton 360 flagged one of the files during installation. I did do two screen captures but I can't find anywhere to upload them so I'll manually post the information here.

  • Lost Purchases - wont download

    Hey all, Im using Itunes 7.1.1.5 and after buying an album I discovered (unfortunately) that it wont load the music at all. Its odd, because just the other day it downloaded a small podcast, but wouldnt load a larger one. It trys to load the album, g

  • Info.pList

    I copied info.pList from the director directory and put it with my file. Which of the 31 items do I need to change and to what? Thanks in advance.

  • How to partition MacbookPro running with installed OS 10.7 to also have OS 10.6 running in the partition

    I can create a partition but cant't install OS 10.6 into it. I need it to run several applications that aren't supported by OS 10.7