Trigger Process chain using ABAP code

Hi All,
As per my knowledge there are 2 ways to trigger a process chain using ABAP code :
1) Using FM ‘RSPC_API_CHAIN_START’ and passing process chain name as the parameter
2)Using FM 'BP_EVENT_RAISE' and passing process event as the parameter, which you can create using SM62 transaction.
I would like to know which one is better to use, in terms of advantage and disadvantage.
Thanks,
Praveena

Hi praveena,
check these links ..u .may get some help
Process Chain
Process Chain
How to run a Process Chain
Process chain-parallel process
Regards
BILL

Similar Messages

  • Trigger process chains using  ABAP program selection screen.

    Hi All
    I am loading flat files through process chains. My requirment is such that i need to create a ABAP selection screen so that user can load the flat file from his PC. when the user is loading the flat file i have to copy the file onto the application server folder and then display him the monitor errors/warnings (if any). when my data load is complete i need to archive the file with time stamp onto the application server folder.
    Please help me in this regard....
    thanks and regards
    sairam phani

    Hi,
    1. Using TA: AL11 create a folder in application server.
    2. There is a program to send the flat file to application server on r/3 side.
    Program Name:RC1TCG3Z.
    3. Regarding archiving...I have no idea.
    Regards,
    Vijay.

  • How-to trigger a process chain using ABAP?

    Does anybody know how to trigger a process chain using ABAP code?
    Any help would be appreciated!
    Thanks
    Ioan

    Hi Ioan,
    try this in your ABAP:
        CALL FUNCTION 'BP_EVENT_RAISE'
          EXPORTING
            eventid         = 'Your Event'
            eventparm       = 'START'
            target_instance = ' '
          EXCEPTIONS
            OTHERS          = 01.
    and schedule your process chain, waiting for 'Your Event'.
    regards
    Siggi

  • Trigger process chain in ABAP program

    Hi Experts,
    We have a requirement to trigger the process chain from an ABAP program. I used the function module RSPC_API_CHAIN_START to trigger the process by passing the process chain name in 'I_CHAIN' and it worked. However, the client wants to trigger this using batch user name as few planners do not have authorization when they executed the custom transaction.
    Based on the return code of the function module I am capturing the status for tracking.
    Please suggest if there is any alternate solution to pass the user name while triggering a process chain in an abap program.
    Thanks and Regards,
    Pavithra

    hi Chintai,
    in bw side, you create a abap program to trigger an event in r/3,
    and include this abap program in your process chain, the abap program like
    CALL FUNCTION 'BP_EVENT_RAISE'
    EXPORTING
    eventid = 'ZRUNJOB_DEL'
    and in r/3 schedule the program to delete previous data with 'after event',
    the event name is same as raise by bw process chain, in this sample ZRUNJOB_DEL.
    hope this helps.

  • Triggering Process chains through abap code

    Hi Experts,
    Can you please let me know if it is possible to trigger a BW Process chain using an abap code.
    If yes , kindly let me know the sample code.
    Help done would be appreciated.
    Regards,
    Uday

    Hi Thanks for your reply.
    When I am trying to execute process chain with variant as a APD ( In this APD data is getting loaded form one Query to Transactional ODS.) This process chain being executing through one ABAP program using the following code
    CALL FUNCTION 'RSPC_API_CHAIN_SCHEDULE'
    EXPORTING
    I_CHAIN = 'XYZ'. ( Dummy Process chain name)
    While executing this program I am getting following message :
    You can specify the name of the application server here
    on which all jobs in the chain are scheduled
    If you do not specify a name, the jobs from batch
    management are divided between the available servers
    How to avoid this message.
    Can we write any code in the above program to assign any fixed server name so that it will not ask for any server name.
    Your help is much appreciated.

  • Trigger Process chains through ABAP program using selection screens

    Hi All
       I am loading flat files through process chains. My requirment is such that i need to create a ABAP selection screen so that user can load the flat file from his PC. when the user is loading the flat file i have to copy the file onto the application server folder and then display him the monitor errors/warnings (if any). when my data load is complete i need to archive the file with time stamp onto the application server folder.
    Please help me in this regard....
    thanks and regards
    sairam phani

    Hi sairam
    can you check this link hope this might help you out
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3507aa90-0201-0010-6891-d7df8c4722f7
    Going thru your query hope i get the right   solution
    Thanks=points in SDN
    Sanjeev kumar hamsala

  • Fork in process chain using ABAP program

    Hello everyone.
    I need a fork in my chain. Depending on the values in some db table I will make a decision: do some process or skip and go further. The only solution I can see is using ABAP program. But unfortunately It doesn't return status. Any suggestion will be appreciated.

    Hi,
    You have few process to run after the abap program. So make all those process as a different chain, and at the end of the ABAP program include a function module to trigger this chain, based on your condition.
    If you like this idea, please revert for more information.
    Hope this helps.
    Thank you,

  • Trigger process chain using event

    Hi all,
    I’d like to know if someone ever faced this kind of situation.
    I have a process in R/3 and it must run every day, and when it’s finished I have to start a process chain in BW.
    I thought to do this using events. So, I created a Job that executes this process and added a step( an ABAP program ) that generates an event in a target system, BW.
    The program is this one:
    PARAMETERS:
        p_eventi   TYPE btceventid,
        p_eventp   TYPE btcevtparm,
        p_server   TYPE btcserver.
    Obligatory parameter: EventID.
    EventID should be an existing event already defined in transaction
    SM64 or using CREATE method of class CL_BATCH_EVENT:
    p_eventi   = 'SAP_TEST'.
    Optional parameters: event parameter and target server.
    p_eventp = 'Event parameter'.
    p_server    = ''.
      CALL METHOD cl_batch_event=>raise
        EXPORTING
          i_eventparm                    = p_eventp
          i_server                       = p_server
          i_eventid                      = p_eventi
        EXCEPTIONS
          excpt_raise_failed             = 1
          excpt_server_accepts_no_events = 2
          excpt_raise_forbidden          = 3
          excpt_unknown_event            = 4
          excpt_no_authority             = 5
          OTHERS                         = 6.
      CASE sy-subrc.
        WHEN 0.
          EXIT.
        WHEN 1 OR 2 OR 3.
    Raise failed.
        WHEN 4.
    Event does not exist.
        WHEN OTHERS.
    Raised failed due to unknown reason.
      ENDCASE.
    The execution of the job appears to be OK, but I checked the log at SM62 and couldn’t find any entrie, and the process chain didn’t start too.
    I created the event at BW and R/3 side,  informed the variant with event / server in R/3, etc.
    I’m missing some step??
    Best Regards,
    Tomas

    This is what this note does.  From R/3, it will trigger an event in BW.
    You can also read this post:
    Triggering a Process Chain From R/3 pgm
    Hope this helps.

  • 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

  • Execute Process Chain Using ABAP

    Hi All,
    Is there any standard ABAP Code or Function Module through which we can execute the Process Chain Manually.
    Regards,
    Anuja

    Hi,
    this forum is for the SAP integration with SAP businessObjects BI. The entry should go to the BW forum
    ingo

  • How to process process chain in ABAP program

    Hi,buddy:
        If I want to start Process Chain in ABAP program,then which code or function can be used?
        Best Regards.
    Martin Xie

    Hi Martin,
    How-to trigger a process chain using ABAP?
    Hope it suffice,
    Cheers
    SRS

  • How do we raise an event to trigger process chain in BI

    Hi Guru's,
    I am having Oracle tables as one of my source systems, I developed the code using DBConnect.
    Now i need to run my Process chain when ever table get data from downstream systems.
    how do we raise an event to trigger the process chain in BI WHEN EVER ORACLE TABLE GET DATA?
    Thanks in Advance,
    Edited by: Naveen Kumar Kencha on Apr 2, 2008 11:21 PM
    Edited by: Naveen Kumar Kencha on Apr 2, 2008 11:27 PM
    Edited by: Naveen Kumar Kencha on Apr 2, 2008 11:27 PM

    Hi Naveen,
    i think we use ABAP program under general services to generate an event.
    searching form gave me following threads which might be helpfull
    1) explains Evenet generation [Event raising procedure]
    other helpfull threads
    [Standard tools for Event raising]
    [Event in Process Chain]
    i could get the process for triggering it weekly,,,it may giv u some help in resolving
    change the Start Process (1st process) in your Process Chain to trigger it to start after the event. To do this, maintain the Start Process of your Process Chain. Select "Direct Scheduling" and click the "Change Selections" icon. This will bring up a Start Time window. Click the "After Event" icon and enter your event name. Also, click the "Periodic Job" (this will insure that all the jobs created for each process in the Process Chain will reschedule themselves after executing the first time). Now save the Start Process, and reactivate and schedule the Process Chain.
    To execute the Process Chain, use transaction SM64 to trigger the event.
    If you want to trigger the event in batch, you will need to create an ABAP program that calls function module BP_EVENT_RAISE (sample ABAP code is available in this forum if you search for "BP_EVENT_RAISE").
    We create batch jobs where we call an external program called SAPEVT, located on the server, and I believe is available on all SAP clients, with the following parameter:
    EVTID('WEEKLY_PROCESS') SID(PU3) NUMBER(00) EVTPARM()
    This will trigger the event WEEKLY_PROCESS.
    See if this helps.
    regards,
    NR

  • Running Process Chains via abap

    Hi all,
    I have scenario in loading text file to cube via chains using abap, here the step:
    Start from abap code to check the file, if exist run the Process chains
    <b>Process Chains</b>
    a. <b>start</b>
    b. <b>load data</b>  
    c. <b>updt from PSA</b>
    d. <b>program</b>  "move file to err folder if loading error
    e. <b>Attrbute Change</b>
    f. <b>program</b>  "move file to suc foled if loading successfull
    g. <b>program</b> check file is still exist
    it's looks like machine gun
    The problem is always create two job "loading" (sm37) each file after abap code for checking file run the event 4 chains. This happened makes loading process takes time event the file only 20 records.
    Why this happened? Please
    Any suggestion is highly appreciated would be thankful for all
    rgds
    supriatna

    you already raise the event after you checked the file successfully, right? And you already scheduled your process chain waiting for that event?!
    -> yes, it's done and works
    But what do you mean with 'each file have 2 jobs ...'
    - > after a file founded and run the chains and I check the job using (sm37-job overview) there are create two job for BI_PROCESS_TRIGGER, BI_PROCESS_PSAPROCESS, BI_PROCESS_LOADING, BI_PROCESS_ATTRIBCHAN
    is there time out ? no time out, stop by system
    I have put 10 files but some times the process only run 2,3,5 file after that the job is stop.
    here the message:
    Process ABAP, job count 15425901 should already have started
    System response
    The chain has been terminated.
    Procedure
    There are probably not enough background proceses in your system.
    Make sure that there are enough background processes, because parallel processes also run when process chains are processed.
    The repeat frequency of the start-process may be too short. Look into this.
    any suggestion on this problem ?
    thanks in advance
    supriatna

  • PI Interface Posting Files - Trigger Process Chain Issue

    Dear Reader,
    Situation -
    We get multiple flat files from source system via PI interface. To process this in BW 7.0 side we have created the web service interface. In the function module we have written a code to trigger process chain, once a data is posted.
    Issue -
    As there are multiple files being posted, the PC runs on completion of the every single post, which is not desired. We need to run the process chain only once at the end of all the files being posted.
    Notes -
    1. Number of files keep varying.
    2. Clubbing all the files in a single file and then posting it would cause performance issues.
    Request your help in find a way like -
    1. A file being posted of name, say 'START PC', which can be trapped in the funciton module and controll the PC call.
    2. <any Other idea>
    regards,
    vinay gupta

    Hi Dhanya,
    This is the code i have in the ABAP program in the process chain. I just included the API_SEMBPS_POST part, but still it doesn't work. Please give me your email address so that i can send some screenshots.
    REPORT  ZHTEST.
    DATA: l_subrc TYPE sy-subrc.
    DATA: ls_return TYPE bapiret2.
    CALL FUNCTION 'API_SEMBPS_POST'
    IMPORTING
       E_SUBRC         = l_subrc
       ES_RETURN       = ls_return.
    CALL FUNCTION 'RSAPO_CLOSE_TRANS_REQUEST'
      EXPORTING
        I_INFOCUBE               = 'ZMAP_TAB'
    EXCEPTIONS
      ILLEGAL_INPUT            = 1
      REQUEST_NOT_CLOSED       = 2
      INHERITED_ERROR          = 3
      OTHERS                   = 4
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

  • Transportation of process chains with ABAP variants

    Hi,
    Could you please help me in finding out how to transport process chains with ABAP variants.
    I can transport them, however when transporting them, I overwrite the already existing variants, which is very unfortunate...
    Could you please advice.
    Thank you in advance!
    /Brian

    Hi Ramesh,
    Option 1:
    You can directly create the process chain in Production. Most of the times ppl do have access to create a process chain in Prod. Kindly check whether you have the authorization to do so.
    Option 2:-
    I did not suggest to delete the old info-packages in QA and Prod. Let them continue to exist but you may not use them once the process chain is in place. You create the process chain, test it and move it up to Prod. I dont' think the new infopackages will hamper your delta load. The delta is not dependent on the infopackage.
    If I were you, I would try the second option and if it does not work during testing then go for the first option.
    Bye
    Dinesh.

Maybe you are looking for

  • How to properly disconnect a Mini Display Port (MDP) from a Macbook Pro 2012, 1,9?

    Hello: I was wondering if any Macxperts out there had any idea on how to properly disconnect a MDP Thunderbolt Cable from a 2012 1,9 Gen. Macbook Pro. From my experience with older Macbooks the command was "Command + F7" or something of the sort. On

  • OPM 10.4.4 not working with Word 2013 (toolbar will not stay on document)!!!!

    I recently upgraded to Microsoft Office 2013 and then was forced to upgrade to OPM 10.4.4 in order for Word 2013 to recognize the OPM Toolbar.  The toolbar in the WORD document does not last (or stay) after closing the document.  Additionally, the TE

  • Reverse Proxy - Apache vs SAP Web Dispatcher

    Hi, my config consists in a portal (EP7.0 - DB/CI + AS) and an ECC system (ECC 6.0 - DB/CI + AS). Web developments are based on Abap Web Dynpro and are also located on ECC. To ensure load balancing there are 2 web dispatchers : one on EP DB/CI, one o

  • Sap j2ee engine configuration in NWDS

    Hi, I am using Netweaver studio 2.0.15 for developing web dynpro application and using  Application server 7.1. When I try to configure J2EE engine in Netweaver studio, it is giving a message message saying "No system could be found under sapmnt." If

  • [svn:cairngorm3:] 17605: Migrated InsyncBasic to 2.3.

    Revision: 17605 Revision: 17605 Author:   [email protected] Date:     2010-09-08 08:36:28 -0700 (Wed, 08 Sep 2010) Log Message: Migrated InsyncBasic to 2.3. Refactored GlobalRemoteObjectFaultHandler to 2.3, minor refactorings in navigation lib. Modif