Skip to Content
author's profile photo Former Member
Former Member

Using Event to trigger an IDOC in SAP

Hello, Say I have an event raised in SAP for object X and I also have an IDoc of the same type 'X' how can I trigger that IDoc from that event? Links, weblogs etc will be great.

Just to clarify: In this scenario it's an outbound IDoc from SAP to an external system.

regards, dd

null

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Nov 29, 2007 at 02:51 PM

    Hello - Can someone help with this question?

    Thanks

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2007 at 04:02 AM

    Hi Demi,

    Plz go check out these links might be useful.

    function modules.

    ALE/ IDOC

    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm

    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc

    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419

    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm

    http://www.sapgenie.com/sapedi/index.htm

    http://www.sappoint.com/abap/ale.pdf

    http://www.sappoint.com/abap/ale2.pdf

    http://www.sapgenie.com/sapedi/idoc_abap.htm

    http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm

    http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm

    http://www.allsaplinks.com/idoc_sample.html

    http://www.sappoint.com/abap.html

    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm

    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc

    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419

    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm

    http://www.sapgenie.com/sapedi/index.htm

    http://www.allsaplinks.com/idoc_sample.html

    http://idoc.de

    I think u want to trigger the IDOCs through message contrl..

    Outbound IDoc Error Handling via Workflow

    http://www.novell.com/documentation/idmdrivers/index.html?page=/documentation/idmdrivers/sap_user/data/alvpn4u.html

    http://searchsap.techtarget.com/loginMembersOnly/1,289498,sid21_gci1253243,00.html?NextURL=http%3A//searchsap.techtarget.com/tip/0%2C289483%2Csid21_gci1253243%2C00.html

    Plz check out these website might be helpfull I you are triggering through I can provide the code for the same.

    Thanks

    Mohinder Singh Chauhan

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2007 at 05:58 AM

    Hi,

    Some details about SAPEVT which might be useful:

    Hi,

    Following are some details about the SAP Event:

    An SAP event is a "flag" that is created in SAP (SM62). This event (or flag) can be triggered (from a Unix job to an incoming file), causing a job to execute in the background. This event (or flag) can be triggered within R/3 or can be done at the Unix level.

    First, create an event in SM62. It’s easy - just create it under "user event names" and "maintain". You’ll find the create option from there.

    Once created go to SM36 and create the job. Put in the job name you want to call it - fill in the ABAP/4 program you’ll want executed, but under "START DATE" select option AFTER EVENT. Then plug in your SAP event name you created. Fill in the remaining information on this screen and save.

    Once saved, an entry is put in table BTCEVTJOB. The entry is the name of the event you raised. This is the system’s way of keeping track of which jobs are in the queue waiting for an event to occur.

    Now, once the event is triggered this newly created job will execute. The event can be triggered via sap (SM64) or at the Unix level.

    SM64 is pretty self-explanatory. To get the event triggered from Unix:

    -Log into the <SID>adm user id at the Unix level and go to directory /usr/sap/<SYSID>/SYS/exe/run (there is an alias called 'cdexe' that will get you there)

    -From there look for an executable called sapevt. Open another Unix window cause now you are going to need to cut and paste.

    -At the other sap window switch user to the <SID>adm user and go to the /usr/sap/<SYSID>/SYS/profile directory ('cdpro' is the alias)

    -Do an "ll | more" and look for the instance profile name (the sapevt executable will want this!) Example: <SID>_DVEBMGS00_<SYSNAME>

    -Go back to the sapevt window and enter this command to get the event to raise:

    sapevt <event_name> -t pf=<instance_profile_directory_and_name> nr=<SYS_number>

    Example: sapevt roberts_test -t pf=/usr/sap/<SID>/SYS/profile/<SID>_DVEBMGS00_<SYSNAME> nr=00

    -This will raise the event, and cause the job scheduled within SAP to execute.

    Once the job has executed the SAP event that was in the table BTCEVTJOB will disappear.

    Another table, TABTCO, will now have an entry in it with the SAP job that was executed. Once you’ve found that job name in this table you can double click on its entry and see that it was executed via an event.

    -


    To set TRACE level WITHOUT bringing down the system:

    Find the dispatcher process at the Unix level like this:

    ps -ef | grep dw.sap | more

    In the third column look for the "child" process ID number that repeats itself over and over

    Then verify that number to the number in the second column, which should be the parent PID number.

    Then issue the Unix command: kill -usr3 parent-pid-number (to turn on level 3 trace)

    kill -usr2 parent-pid-number (to turn on level 2 trace)

    kill -usr1 parent-pid-number (to turn on level 1 trace)

    -


    To Transport Maintenance Dialogs, you need to enter the object(s) in the following manner in the command file:

    R3TR TOBJ tablename …. (11th position) S

    Function Group

    Table Structure

    And the entries for your table in TVDIR and TDDAT

    -


    To see if a rollback is occurring at the Informix database level, do the following:

    onstat -u | more

    Look for the letter "R" in the 3rd column under the "flags". "R" means rollback - "P" means primary - "X" means critical

    regards

    Aveek

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2007 at 03:17 PM

    Thanks for the feedback guys.

    The event is being raised for a BOR object and I have an IDoc for that BOR object.

    What I would like to do is each time the event for that BOR object is raised, call a function module to create the IDOC.

    Hope this clarifies my question

    Again related weblogs will suffice.

    thanks

    dd

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.