Re: Trigger an ABAP program in R/3 by a process chain in BW

This is regarding a previous thread of mine. The basic idea is to trigger an ABAP program in R/3 by a process chain in BW.
1. I created an ABAP program ( lets say P1)  in BW ( using SE38 ), and included the code:
CALL FUNCTION 'BP_EVENT_RAISE'
EXPORTING
eventid = 'Y21608_CCNA3PVAR_START'.
There is no variant for the ABAP program.
2. Now, I dragged the process type ABAP code in my process chain, created a variant and gave this program P1 there.
3. I have already created an event in R/3 with the name 'Y21608_CCNA3PVAR_START' ( using SM62 ) and created a job with schedule 'after event', which starts the ABAP programin R/3.
Question: In the process chain, the process is going to the ABAP program but nothing is happening. What more do i include in the ABAP program? And how does this program trigger an event in R/3? Can i use BP_EVENT_RAISE or RSSM_EVENT_RAISE??
Please advise.

Edwin, are we calling a FM which exists in BW or are we calling an FM which exists in R/3 ?
I thought, that the FM used should be in BW but it will trigger an event which has been created in R/3. Is this right? And where in the ABAP prgram can i specify the destination? How do i write this?
Sorry if iam asking u to do the entire job for me:-)

Similar Messages

  • Calling an ABAP Program from source system in a process chain

    Hi,
    I need to call an ABAP program (Extract program RMBWV308) from R/3 within a Process Chain in BW 3.5
    Your urgent advice please

    Hi,
    check the following link:
    Start an ABAP program in R/3 from a process chain in BW
    regards,
    raju

  • How-to trigger an ABAP program after a user logs on?

    Does anybody know if it is possible to trigger an ABAP program just after a users logs into the system?
    Thanks
    Ioan

    The function module is EXIT_SAPLSUSF_001.  The include program is ZXUSRU01. 
    Just put your SUBMIT statement in this include program.
    Regards,
    Rich Heilman

  • Trigger execution of a CR report from SAP BW Process chain

    Hi,
    we want to trigger execution of a Crystal Report from a BW process chain.
    What is the best way to do this?
    Our CR reports are not saved to BW.
    We are currently investigation the option of using a file event on the BO server and using an ABAP program step in the process chain to create the file using FTP. But we want to know if there is an easier way of doing this?
    Thanks and regards
    Jarle

    Hello Nathan,
    your solution with the FTP script and a file being moved to the BO server sounds very interesting!
    Actually that's what I would need to implement in my project.
    Would it be possible for you to give me some information on how to write such a script and how to call it from the Process Chain? Any hint would be really precious!
    Thank you in advance!
    Best regards,
    Hubert

  • How to trigger an ABAP program in a Process chain

    Hello Forum,
    1. In a process chain, if a program fails, how can we re-run it?
    2. If the process preceeding the ABAP program fails, how can we start the program?
    3. If an Infospoke fails in a process chain, how can we trigger that?
    Thank you,
    Its my pleasure to assign points,
    raj

    Hi,
    1. U have to first check whats the reason for the failure. check in the monitor screen details button, the error message will be displayed, check the error, correct it. and to proceed with further right click on the subsequent process use Repeat option , the loads will get continue.
    2. same here, if it fails check the reason, sometimes if two parallel process trying to access the same program Lock may occur, stop one process, once its done start the second process, use the transaction code SA38>select ur ABAP program, the corresponding variant->this is for running the ABAP program in the backgroud..if u want to run direct means Select the Process types Under the general services u find an ABAP program
    3. same here too u should find the reason why it fails, and rectify the error, and use the repaet option to proceed with further.

  • Database Trigger in ABAP Program

    Hi experts,
    Is it possible to define a database trigger in an ABAP program, to be triggered when the data from a database table is modified?
    Thanks,
    Nuno Afonso

    I doubt it, but if it's possible, I would NOT use it. Remember the application server assumes the role of the DBMS sometimes, and you will never be absolutely sure if your trigger will be used or not.
    You can also define a TRIGGER for your Z-tables using the DBMS, but I will only recommend it if you are using ONLY z-tables. For standard tables, I would look for an alternate method, ie EXITs.
    And if it's a Z-Table, you can just control its inputs by permissions (don't allow users to maintain it, just make a dialog to do it, and the dialog program would be the "trigger" guy)

  • Trigger an ABAP program through a Process Chain

    Hi,
    I have an ABAP program as part of my Process Chain that updates the BW Hierarchy OREGH. 
    However I can't get the program to execute through the chain, even the though chains goes all green. without any REDS anywhere along the chain. 
    When I check if the program has made the desired changes in the tables it hasn't.
    If I run the program using SE38 it works fine and in seconds.
    Is there a parameter setting I have to set in the process chain or within the program itself.Tthe program is active.
    Ive checked many of the  posts about this issue but couldn't find a someone experiencing a similar problem.
    Please Help
    Thanks
    Amir

    Remove that ABAP program from the Process Chain and activate. Leave RSPC screen.
    Re-enter to RSPC, and add that program by creating a new variant with following options:
    Call Mode : Synchronous
    Call From : Local
    Check and Activate process chain.

  • Triggering Event in BW through a ABAP Program in R/3

    Hello Friends,
    I am working on triggering a process chain in BW using ABAP program in R/3.
    1.  I have created a test process-chain in BW which sends test email upon running. This process chain is triggered by an event "Z_START_PC".
    2.  I created a function module "ZBW_EVENT_RAISE" which triggers this event.
         ( This function module is "remote enabled module")
    3.  I tested running the process chain, with function-module (SE37), which works fine.
         ( i.e. I do receive test-email after..)
    4.  Now I created a ABAP program "ZBW_EVENT_RAISE" in R/3.
         The code of which is as follows:
         REPORT  ZBW_EVENT_RAISE.
        parameters: rfcdest like t000-logsys.
        parameters: bwevent like tbtco-eventid.
        call function 'ZBW_EVENT_RAISE'
        destination rfcdest
         exporting
         eventid = bwevent.
    5.  When I try to run this ABAP program in R/3 (SE38),
         The process chain does not get triggered.
      (a)  The "<b>rfcdest</b>" i got from SM59 - RFC Destinations -
            R/3 Connections - BW Development Server Client
            Value is "BWDCLNT999".
    How do I go about debugging this issue? I know for sure, the BW- function module -- to Trigger -- to Process-chain is working fine. Only part is R/3 to B/W function module starting.
    Any help is appreciated.
    I promise to award points.
    Thanks
    PK

    in ST05 there is an option for RFC trace. Not sure how much detail that will give you but you can try.
    It is possible that your userid doesn't have an RFC call authorization in R/3. Do a SU53 immediately after running the program.
    Also, replace the FM with any other FM that you know for sure runs  (eg some BAPI FM) and run it - either in SE37 in R/3 with RFC destination for BW, or, from your code itself and see if that works (you can check return code).

  • How to integrate an ABAP program in process chain

    Hello Experts :
    I need to call an ABAP program in PROCESS CHAIN from a different system, using Process type "ABAP program", option "scheduled program".
    Sombebody have the step by step or some examples
    Regards,
    Diana

    If you search this forum for RSPC_ABAP_FINISH you will find some good answers such as:
    Start an ABAP program in R/3 from a process chain in BW

  • ABAP program on process chain

    Hi, 
       I'm trying to create an ABAP program in the process chain. I Know how to do this, so the problem that I'm having is that I need to know <b>WHO is</b> the process chain that is call me because this same ABAP program can we caller from another process chain. Exist any function code to interpret this ? I need to know this and then save it.
    Thanks a bunch.

    Hi Sebastian,
    please post questions like this in the another BI forum, e.g. BI General or Data Warerhousing. This forum is dedicated to SAP NetWeaver 2004s only topics.
    Nevertheless, please see the online documentation for the information you need
    <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/06/efd63b54e56276e10000000a11402f/content.htm">http://help.sap.com/saphelp_nw2004s/helpdata/en/06/efd63b54e56276e10000000a11402f/content.htm</a>
    (GET_INFO)
    For the implmenetation of a custom defined process type, please see
    <a href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/45d8a990-0201-0010-a290-f22083728179">https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/45d8a990-0201-0010-a290-f22083728179</a>
      Cheers
        SAP NetWeaver BI Organisation

  • How to schedule a Process Chain using ABAP Program?

    Hi All,
    I want to schedule the activity of extracting data from the query to a flatfile.
    Currently we are schedulling it using the transaction rscrm_bapi.
    I need to know , how we can achieve the same using an abap program and not ( rscrm_bapi) in a process chain.
    Any help would be appreciated.
    Regards
    Purva

    Your problem will be solved if you use the Function Module "RSPC_API_CHAIN_GET_STATUS" instead of the function module "RSPC_API_CHAIN_GET_LOG".
    The function module "RSPC_API_CHAIN_GET_STATUS" gives you the STatus of the process chain, when you pass the Chain Name and the Log ID.
    If you get an output
    G or F - Report that the Chain is Successfully Completed.
    A - The chain is Currently running
    R or X - Report that the chain has ended with Errors.
    Sample code :
    REPORT Z_BW_GET_STATUS_PROZESSKETTE.
    TABLES rspclogchain.
    DATA: gt_rspclogchain LIKE rspclogchain OCCURS 0,
    wa_rspclogchain LIKE rspclogchain.
    DATA: gt_log LIKE rspc_s_msg OCCURS 0,
    wa_log LIKE rspc_s_msg,
    gt_status like RSPC_STATE.
    SELECT * FROM rspclogchain
    INTO CORRESPONDING FIELDS OF TABLE gt_rspclogchain
    WHERE datum = sy-datum
    AND chain_id = 'BD_C02_1D'.
    IF sy-subrc = 0.
    SORT gt_rspclogchain BY datum DESCENDING
    zeit DESCENDING.
    READ TABLE gt_rspclogchain
    INTO wa_rspclogchain INDEX 1.
    CALL FUNCTION 'RSPC_API_CHAIN_GET_STATUS'
    EXPORTING
    i_chain = wa_rspclogchain-chain_id
    i_logid = wa_rspclogchain-log_id
    IMPORTING
    E_STATUS = gt_status.
    IF gt_status = 'G' or gt_status = 'F'.
    WRITE :/ 'BD_C02_2D chain COMPLETED'.
    ELSE.
    WRITE :/ 'BD_CO2_2D chain is Running or Ended with Errors'.
    ENDIF.
    ELSE.
    WRITE :/ 'No chain BD_C02_2D started for today ! or keine Kette BD_C02_2D gestartet !'.
    ENDIF.
    I have just provided a sample code, you might have to edit or add necessary messages to the program.
    Regards,
    Ramya

  • Program Variant in Process Chain

    Hi All,
    I have to execute a program in a Process Chain. I have included a process variant to execute the program. Now, this program bring us to a screen, where we need to click on the execute button to run that program. I need to add a program variant for this i guess. Can any one give me the procedure how to do this?
    Points will be awarded.
    Thanks in advance,
    Anjum.

    The program that you have written should run in background.
    We use Variants for ABAP programs to be run in the Process Chain
    - Create an ABAP variant
    - Choose call mode "Synchronous", Called from "Local". Thats mostly the default we use. choose according to your requirement.
    - Choose "Program". Choose the program name & the variant n ame. Its better if you create the variant while testing the program in sa38. Later you can use the same variant in the Process Chain ABAp variant OR can create a new one. Set appropriate values.
    Please note that if in SA38, your program ran successfully with the variant, it should run here as well.
    That should do.
    Regards
    Anujit Ghosh
    Edited by: Anujit Ghosh on Jun 17, 2008 12:36 PM
    To create the program variant, first enter a name of your choice in the program variant field. Click Edit.
    - Choose Create New
    - Choose "Values". Click Change. In teh next screen, enter all the required parameters. Choose if its a SAP standard prog, or modified program.
    - Check the attributes as well. It will usually choose selection screen 1000 as default. Let it be.

  • ABAP program created in one system want to trigger from other system

    Hello,
    I have created ABAP program in ECC server internally it is using function module to update table.This ABAP program has 2 variants.
    I wnat to trigger this ABAP program from BW . How to idenfied an abap program which is return in system1 into other system2.So that it can be executed from BI.
    Thanks.

    There are ways to do this.
    Create an RFC in R/3 system (Tcode: se37 or read forums for sample). Create an event in sm62 (choose customer event) - then schedule your R/3 program (with whatever variant you want) in R/3 to trigger it when the event raised.
    Within the RFC (R/3), you need to trigger the event -
    Raise event to execute background jobs running under this event id
    w_eventid type btceventid value 'ZCUSTOMEVENT'.
        call function 'BP_EVENT_RAISE'
          exporting
            eventid                = w_eventid
          exceptions
            bad_eventid            = 1
            eventid_does_not_exist = 2
            eventid_missing        = 3
            raise_failed           = 4
            others                 = 5.
        if sy-subrc <> 0.
        endif.
    in BW - Create a program - Call the RFC (created in R/3). You can even add this to your process chains.
    CALL FUNCTION 'Z_RFC_IN_R3'
          DESTINATION p_dest
          IMPORTING
          XYZ = XYZ
          TABLES
          IT_X = IT_X
    p_dest being your R3 destination (this is RFC maintained in sm59 for your R3 client)....
    Good luck. Quite a bit of work but works perfect.

  • Trigger ABAP program using UNIX script

    Hi All,
    I want to trigger an Abap program whenever a unix file comes to SAP.
    Can any1 please tellme how to write a unix script to trigger the ABAP program.
    Thanks in advance.

    you will need to create a batch job in SM37 for the ABAP program, and use an event for the start criteria.
    The event can be created in SM62
    Then in unix, you will need to call an executable SAPEVT.
    This will be in the directory /usr/sap/<SAPSID>/SYS/exe/run
    you will need to use the appropriate profile for the SAP system to run the sapevt utility.
    example :-
    sapevt abap_event -t pf=/usr/sap/<SID>/SYS/profile/<SID>_DVEBMGS00_<SYSNAME> nr=00

  • Urgent: call ABAP program from BSP

    hi BSP experts,
    We just want to trigger an ABAP program to say "Hello World" in BSP and see the wording "Hello World" on web browser when running it from BSP.  One BSP expert Raj gave the answer by using the following in BSP:
    oninitialization:
    submit ('z_program_name') and return exporting list to memory.
      call function 'LIST_FROM_MEMORY'
           tables
                listobject = listobject.
      call function 'WWW_HTML_FROM_LISTOBJECT'
           exporting
                report_name = 'z_program_name'
           tables
                html        = html
                listobject  = listobject.
      clear output_str.
      loop at html into html_wa.
        concatenate output_str html_wa into output_str.
      endloop.
    layout code:
    <htmlb:content design="design2003">
    <htmlb:page title = " ">
    <htmlb:form>
    <%= output_str %>
    </htmlb:form>
    </htmlb:page>
    </htmlb:content>
    We put the above in our BSP and then activate them, but get the following error:
    Field "LISTOBJECT" is unknown. It's neither in one of the specified tables nor defined by a "DATA" statement. "DATA" statement."DATA" statement.
    And the error stopps here:
    submit ('z_program_name') and return exporting list to memory.
    call function 'LIST_FROM_MEMORY'
    tables
    listobject = listobject.
    Any idea? 
    We will give you reward points!

    hi Tanguy,
    Eventually, I have figured it out on how to make the code works by showing "Hello World!" on web browser. But actually we would like to run another ABAP program which open a new container on users' machines, download an Excel template stored on server to the opened container on users' machinese, and then dump SAP table data to the opened excel template. This program works very well through SAP GUI, but users would like to run it on web that we tried to run this program in BSP, but it doesn't work with your code! Any idea?
    Thanks alot!

Maybe you are looking for