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,

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 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

  • 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.

  • 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-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 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

  • 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

  • Server name message when triggering process chain through ABAP PROGRAM

    Hi all,
    When I am trying to execute one process chain with variant as a APD ( In this APD data is getting loaded form one Query to Transactional ODS.) This process chainis 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.
    Thanks,
    Uday.

    Hi Shanthi,
    How to write exception handling for this.
    Quick reply is nedeed.
    Thanks,
    Uday.

  • To set delay in process chain using a program

    Hi all,
    We have a requirement in which the loads from nearly 15 sources (DSO) gets loaded into the Cube thro 15 process chains. The source gets loaded from the PI interface. So it might happen that simultaneously 10 loads will be started and reach the cube.
    In the cube we have delete overlapping request, so its gives a deadlock when the chains try to delete the prev. request at the same time.
    What we have planned is if we can write a program that will set a delay depending on the lock entries present for that particular cube. But still we are not sure how far this will help.
    If anyone has faced a similar issue or can anyone suggest on this would be much appreciated.
    Thanks
    Merlin

    I believe in each of your 15 local chains you have the load to Cube process.Why dont you take the load to the Cube out of the local chains and in the meta chain you could sequence the loads from the 15 ODSs so that you can have a parallel processing upto the ODSs ( assuming the rest of the local chain is used to fetch from R3 ) and then sequential to Cube.
    I dont think writing a program will help much here.

  • How to Trigger a Process Chain through ABAP Program

    Hi
    I have a Requirement to trigger a process Chain on 1st, 2nd and 3rd day of the month for 2 times in a Day.
    Can any one give me any idea, how i can do it by writing a ABAP program and triggering the Process chain.
    If anyone can share the Logic for ABAP program means, that will be helpful for me, as i dont have much expertise on writing ABAP program.
    Regards,
    Muruganand.K

    Hi,
    you can achieve this in a following way.
    DATA : v_date type sy-datum,
    v_day(2) type c.
    v_date = sy-datum.
    v_day = v_date6(2).+
    if v_day = '01' or
       v_day = '02" or
       v_day = '03".
    CALL FUNCTION RSPC_API_CHAIN_START.
    pass the name of the chain to this function module.
    hope this wil help.

  • Ending a process chain with abap program

    Hello friends.
    Can anyone help me please?
    I have a problem with a process chain in BW.
    The process chain is triggered by the MF BP_EVENT_RAISE in an custom MF. While the process chain works, the custom MF is monitoring the chain´s log.
    This process chain have 2 steps:  one is the initial process and the other is a ABAP program. In the abap program there are validations and if exists some error, the program abort and this job (BI_PROCESS_ABAP) is cancelled. The problem is that i have to go to the Tx. RSPC and view the logs fro this chain and in these moment ends th custom MF. In other wors, the MF ciustom ends until i go to the tx RSPC for view the logs.
    I need that the program ends the process chain naturally.
    Thanks for your help.
    Regards.

    Hi,
    You can end a process chain by seeing the variant name and instance name of teh process chain from and finding its corresponding log id,type of process from the table RSPCPROCESSLOG and then executing the standard FM RSPC_PROCESS_FINISH. Here you will have to give the log id,type of process ,vairant name and instance name alongwith the status of the process chain as R to end the process chains.
    If you want to aurtomate it you can do that by creating a Z program which will read LOG ID and teh TYPE of process from table RSPCPROCESSLOG on the basis of variant name and the instance name of the process chain and the execute the function module RSPC_PROCESS_FINISH from inside the program.
    Navesh

  • 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

  • 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.

  • 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

Maybe you are looking for

  • How can I fix Dock/Mission Control/Launchpad? (Glitch)

    General Description Mission Control and Launchpad glitch when invoked (whether by using the mouse or trackpad gesture). They seems to crash or quit, and then relaunch themselves (/itself - all the same app?), I know this because: they both, as well a

  • Weird error message on compile

    I get this error message when I try to compile a file: ProviderMain.java:11: cannot resolve symbol symbol : Class CyberlabInterface location : package Cyberlab import com.Cyberlab.CyberlabInterface; __________________^ The class CyberlabInterface doe

  • I have a little problem. I have 2 threads and each of them gets

    a pointer to class A. I mean: class q1 extends Thread class q2 extends Thread class A q1(this); q2(this); each of them gets a pointer to the same object. The problem is somehow when q1 update one variable in A , q2 doesn't get the update. Thanks, Ami

  • Date mask for Safari

    Has anyone found a mask for date formatting which works with Safari MAC? Nick

  • Unable to access files on 1TB TC

    Hey all, I posted a question here ages ago regarding the access of my files on a TC. I was advised to remove the disk from the TC and mount it into a HDD holder connected to my mac via USB which would remove any network issues. I have done that and I