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

Similar Messages

  • 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 do we call smartforms in abap program or web services

    how do we call smartforms in abap program or web services
    How many types of smartforms are there?
    points will be rewarded

    Hi
    See this sample program
    Using the fun module smartform is called from the program
    Calling SMARTFORMS from your ABAP program
    REPORT ZSMARTFORM.
    Calling SMARTFORMS from your ABAP program.
    Collecting all the table data in your program, and pass once to SMARTFORMS
    SMARTFORMS
    Declare your table type in :-
    Global Settings -> Form Interface
    Global Definintions -> Global Data
    Main Window -> Table -> DATA
    http://sapr3.tripod.com
    TABLES: MKPF.
    DATA: FM_NAME TYPE RS38L_FNAM.
    DATA: BEGIN OF INT_MKPF OCCURS 0.
    INCLUDE STRUCTURE MKPF.
    DATA: END OF INT_MKPF.
    SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.
    SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
    MOVE-CORRESPONDING MKPF TO INT_MKPF.
    APPEND INT_MKPF.
    ENDSELECT.
    At the end of your program.
    Passing data to SMARTFORMS
    <b>call function 'SSF_FUNCTION_MODULE_NAME'
    exporting
    formname = 'ZSMARTFORM'</b>
    VARIANT = ' '
    DIRECT_CALL = ' '
    IMPORTING
    FM_NAME = FM_NAME
    EXCEPTIONS
    NO_FORM = 1
    NO_FUNCTION_MODULE = 2
    OTHERS = 3.
    if sy-subrc <> 0.
    WRITE: / 'ERROR 1'.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    call function <b>FM_NAME</b>
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    CONTROL_PARAMETERS =
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    OUTPUT_OPTIONS =
    USER_SETTINGS = 'X'
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    JOB_OUTPUT_INFO =
    JOB_OUTPUT_OPTIONS =
    TABLES
    GS_MKPF = INT_MKPF
    EXCEPTIONS
    FORMATTING_ERROR = 1
    INTERNAL_ERROR = 2
    SEND_ERROR = 3
    USER_CANCELED = 4
    OTHERS = 5.
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • How to call subroutines defined in ABAP program with type S

    how to call subroutines defined in ABAP program with type S? can you give an example?

    Normal executable program,
    REPORT  ZTEST_MAIN.
    perform sub1 in program ztest_sub.
    "you can call using in program addition
    Subroutine pool program
    PROGRAM  ZTEST_SUB.
    form sub1.
    endform.

  • How to call a idoc in abap program and updates catsdb table

    how to call a idoc in abap program and updates catsdb table
    thank you,
    Jagrut BharatKumar Shukla

    Hi Kishan,
    You can refer to following help document,
    http://help.sap.com/saphelp_nw04/helpdata/en/bf/d005244e9d1d4d92b2fe7935556b4c/content.htm
    Regards,
    Meera

  • How to make a transport of ABAP Program to a QA environment

    Hi forum and sorry for my easy question, but i am a newby in ABAP
    How can i a transport an ABAP program to QA environment?... is the same machine only changes the mandant.
    Thnks
    Josue Cruz

    You need have transport request for ABAP program.
    Transport Request are two types :
    1.customizing
    2 work bench
    customizing - it is related to SPRO Transaction and Functional people will create Customizing request
    Work Bench Request - normally irt realeted to ABAP Develper. and all about SE38 Programs ,Data dictinary and so on..
    If you want to to release transport request ,then you need to use SE10 or SE09 Transaction.
    Goto SE10 and see ur transport request -.it will have sub request #
    Select Sub request #->overall check -Syntax check
    then Activate check
    then click on release dirctly button(Looks like Bus)
    activate
    now select main request and click on release directly button.
    check the status - by using transport logs at SE10 transaction,you need to have sy-subrc eq 0
    when you get sy-subrc eq 4 then you deleted something in ur program ,sy-subrc eq 8,sy-subrc eq 12 these all status of ur transport request.
    once you done then you need import to Tst Box,use STMS Transaction.
    Reward Points if it is useful
    Thanks
    Seshu

  • How to debug the method in abap program

    How to debug the method in abap program ?
    Could you please give the solution.
    Thanks
    sai

    Hi ,
    Place break point at call method .
    It takes u in to the method implementation .
    Here u can analyse the method implementation ...
    Reward if useful
    Thanks
    Jagadeesh.G

  • HOW TO creat  BAR CHART using ABAP Programming

    DEAR ALL,
    I want some help as to how to creat GRAPHICAL display using ABAP programing (BAR CHART) any sample codes Example will be very helpful.
    Regards,
    VJ

    On earlier versions, you can do something like this.
    [code]
    REPORT ZRICH_0005 .
    DATA: BEGIN OF ITAB_DATA OCCURS 0,
               DATANAME(15),
               QUANTITY1 TYPE I,
               QUANTITY2 TYPE I,
               QUANTITY3 TYPE I,
          END OF ITAB_DATA.
    Data: BEGIN OF ITAB_OPTIONS OCCURS 0,
               OPTION(20),
          END OF ITAB_OPTIONS.
    ITAB_DATA-DATANAME = 'Maple'.
    ITAB_DATA-QUANTITY1 = 5500.
    ITAB_DATA-QUANTITY2 = 6200.
    ITAB_DATA-QUANTITY3 = 5900.
    APPEND ITAB_DATA.
    ITAB_DATA-DATANAME = 'Oak'.
    ITAB_DATA-QUANTITY1 = 3500.
    ITAB_DATA-QUANTITY2 = 5200.
    ITAB_DATA-QUANTITY3 = 4400.
    APPEND ITAB_DATA.
    ITAB_DATA-DATANAME = 'Cherry'.
    ITAB_DATA-QUANTITY1 = 1800.
    ITAB_DATA-QUANTITY2 = 2200.
    ITAB_DATA-QUANTITY3 = 1900.
    APPEND ITAB_DATA.
    CALL FUNCTION 'GRAPH_MATRIX_3D'
         EXPORTING
              COL1        = 'Jan'
              COL2        = 'Feb'
              COL3        = 'Mar'
              TITL        = 'Lumber Usage in $'
         TABLES
              DATA        = ITAB_DATA
              OPTS        = ITAB_OPTIONS
         EXCEPTIONS
              OTHERS      = 1.
    [/code]
    Regards,
    Rich Heilman

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

  • 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

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

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

  • 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

  • How to execute Infopackage with an ABAP program

    Dear All,
    I would like to execute an infopackage every 6th day of the month.
    Therefore I would like to integrate a program in a process chain executed on a daily basis, and call with this program the execution of the infopackage if day = 6.
    Do you know how to execute an infopackage inside an ABAP program ? Which function module use ?
    Thanks,
    Greg

    Hello luminy13,
    Just to answer your question on how to start an InfoPackage inside an ABAP program: you can use function module BAPI_IPAK_START. You might also need to use FM BAPI_IPAK_CHANGE to change the scheduling.
    However, if the only reason you are creating the ABAP program is to run the InfoPackage at the 6th day of the month, then I don't recommend that you create the ABAP program at all. You can simply schedule the InfoPackage (or the process chain that contains it) on the 6th day of the month. Here's how to do it:
    In the scheduling dialog, click the ">>" button. Enter the factory calendar, put 6 is in the workday and then choose "beginning of the month".
    Hope this helps.

  • How to trigger GP workflow through ABAP Program.

    Hi All.
    i have one scnerio , i want to create BOM through Custom Ztransaction that will be developed in ABAP Modulepool.
    User will create BOM  from this ztransaction through  Transactional Iview in PORTAL,Once the user save transaction , i want to trigger a GP(Guided Procedure ) workflow,from ABAP Program.
    is it possible to trigger GP workflow?
    if yes how  to  do it , please suggest the way out.
    Regards,
    Shyam.

    Hi lingana,
    As u see in my requriment that, Workflow is not designed within SAP , But the Workflow will be designing
    in SAP Netweaver, its a GP Workflow. And Ztransaction(Developed by ABAP) will  be seen by user through portal  and
    he save transaction on PORTAL, In backend  ABAP program will run , and after meeting certain condition, it should create
    or(Initiate) GP workflow(process).
    So my question is , how ABAP Program will call GP workflow, How the connection will be made in between ABAP Code and GP workflow framework.
    If any doubt regarding requriment let me know,
    Regards,
    Shyam.

Maybe you are looking for

  • Purchase order with reference to internal order

    Dear all I am creating a purchase order with reference to a statistical internal order.The total PO value should not exceed the budgeted amount for that statistical internal order.How should i achieve this? Thanks in advance. Madhavi

  • Blue lines down imac screen

    I have an iMac4,1 with an Intel Core Duo processor, and on the right side of my screen I developed a blue line running from the top to bottom of my monitor. A couple months later, another line appeared right next to it. Does this mean my iMac is cras

  • How can I add keywords for SEO into the code?

    How can I add keywords (for SEO) into the code of a Muse designed site?

  • ITunes doesn't import first song off CD

    I'm using v.7.0.1 of iTunes, and I've recently noticed that when I import a CD (either commercial or burned) it skips importing the first song. It acts like it does, complete with green mark, but when I go to my library I have only songs 2-whatever.

  • Should I Normalize all my tracks?

    I am newer to working with Logic Pro 7.1 I am working on a personal recording project now and was wondering if I should normalize all of my audio tracks after recording them? Pros? Cos? Does it hurt anything to do that?