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

Similar Messages

  • ABAP Program using Selection Screen in Process Chain

    Hi,
    I have included an ABAP Program in the Process Chain.
    The ABAP Program takes a selection screen value from user before execution.
    I have created a variant for both the ABAP Process (YPV_ABC) and a variant for the Selection Screen (YPV_XYZ).
    The ABAP Program executes perfectly well in SE 38.
    I get the following message when I execute the Process Chain.
    "Status Change of Process ABAP YPV_ABC.
    Save Status and Trigger Events if Appropriate "
    When I click Yes, the ABAP Process becomes red.
    These are error messages in the log
    516 -  Job started     
    550 -  Step 001 started (program RSPROCESS, variant &0000000012961, user ID ALEREMOTE)
    25 -    Could not ascertain code page     
    546 -  Job cancelled after system exception ERROR_MESSAGE     
    My questions are:
    1) Is it possible to use an  ABAP Program which has a user input screen in Process Chain?
    2) Could you please help  with the above error?

    1) Is it possible to use an ABAP Program which has a user input screen in Process Chain?
    ABAP programs, with variants established for selection screens, are possible. We use them quite extensively for setting triggers to allow Process Chain to continue after an Interrupt Process has been hit.
    2) Could you please help with the above error?
    I'm not quite sure what could be causing this. When you tested this program in SE38, did you test it with the same variant for the selection screen and did you execute it in background?

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

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

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

  • 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 Chain through the Web

    Hi,
    I am trying to allow the users to control when they trigger a process chain through the web.
    The users have a number of integrated planning sheets, which they access and input, once they are happy with the inputs, then they want to trigger the process chain to carry out additional loads.
    I am using function module RSPC_CHAIN_ACTIVATE_REMOTE to trigger the process chain, when I test this with the chain set to direct scheduling it works fine.
    I have set a planning function to call RSPC_CHAIN_ACTIVATE_REMOTE, with the process chain in question.  Now when I run it with the chain set to direct scheduling it repeatedly calls the process chain over and over again, like it is in an endless loop.
    When I try setting the chain to Meta Chain or API nothing happens.
    Does anyone have any ideas why I can't get this to work through the web?
    Thanks
    D

    CALL FUNCTION 'RSPC_API_CHAIN_START'
        EXPORTING
          i_chain       = 'YOUR PROCESS CHAIN NAME'
        EXCEPTIONS
          error_message = 1.
       IF sy-subrc <> 0.
          CALL FUNCTION 'BALW_BAPIRETURN_GET1'
           EXPORTING
            type             = sy-msgty
            cl               = sy-msgid
            number           = sy-msgno
            par1             = sy-msgv1
            par2             = sy-msgv2
            par3             = sy-msgv3
            par4             = sy-msgv4
           IMPORTING
            bapireturn       = p_return.
          RAISE STREAM_FAIL.
       ELSE.
         RAISE STREAM_SUCCES.
         RETURN.
       ENDIF.

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

  • 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 trigger a process chain through

    Hi All,
    Can any one send me the steps to trigger a process chain through a job in sm37.
    Thanx
    Kishore

    Just a trigger ?
    Best way I can suggest is to call the function module 'RSPC_API_CHAIN_START'...
    So, create an ABAP Program, call the function in the program. You can add parameters and a selection screen to make the program generic and add variants to it.
    Once you are done with this, schedule a job with this program and whichever variant you're lookin for and you should be done.
    - Aditya
    Assign points if helpful

  • Creation of IDOC through abap program.

    hello all,
    I hav created idoc through abap program. I hav used FM 'Master_idoc _distrribute'.this program creates an idoc but giving status 30. can any one tell me how to get status 03. I hav already created port, Logical sys,partner no.,distribution model.
    My Program is as follows:
    ABLES : CRMD_ORDERADM_I,CRMD_ORDERADM_H,CRMD_SCHEDLIN.
    DATA : S_CTRL_REC LIKE EDIDC OCCURS 0 WITH HEADER LINE,"Idoc Control Record
           ORDER_NO TYPE CRMT_OBJECT_ID VALUE '5000000032'," SEGMENT ORDER DATA
           PRODUCT TYPE CRMT_ORDERED_PROD VALUE 'SRV_01',
           QUANTITY TYPE CRMT_SCHEDLIN_QUAN VALUE '1.000'.
    DATA : ZORDER LIKE ZORDER_NUM OCCURS 0 WITH HEADER LINE.
    DATA :  T_EDIDD LIKE EDIDD OCCURS 0 WITH HEADER LINE.     "Data Records
    DATA :  T_COMM_IDOC LIKE EDIDC OCCURS 0 WITH HEADER LINE. "Generated Communication IDOc
    CONSTANTS :
    C_ZRZSEG1 LIKE EDIDD-SEGNAM VALUE 'ZORDER_NUM'.
    PARAMETERS :  C_MESTYP LIKE EDIDC-MESTYP DEFAULT 'ZORDER_IDOC2', "Message Type
                  C_RCVPRT LIKE EDIDC-RCVPRT DEFAULT 'LS',          "Partner type of receiver
                  C_LOGSYS LIKE EDIDC-RCVPRN DEFAULT 'BSNL_OUT',
                  C_RCVPOR LIKE EDIDC-RCVPOR DEFAULT 'A000000006',
                  C_SNDPOR LIKE EDIDC-SNDPOR DEFAULT 'SAPBCD0000',
                  C_SNDPRN LIKE EDIDC-SNDPRN DEFAULT 'BCDCLNT100',
                  C_IDOCTP LIKE EDIDC-IDOCTP DEFAULT 'ZORDER2',
                  C_SNDPRT LIKE EDIDC-SNDPRT DEFAULT 'LS'.          "Destination System
    ***START-OF-SELECTION
    START-OF-SELECTION.
      PERFORM GENERATE_CONTROL_RECORD.
      PERFORM SEND_IDOC.
    *&      Form  generate_control_record
    FORM GENERATE_CONTROL_RECORD .
      S_CTRL_REC-RCVPOR = C_RCVPOR. "Receiver Port
      S_CTRL_REC-MESTYP = C_MESTYP. "Message type
      S_CTRL_REC-IDOCTP = C_IDOCTP. "Basic IDOC type
      S_CTRL_REC-RCVPRT = C_RCVPRT. "Partner type of receiver
      S_CTRL_REC-SNDPOR = C_SNDPOR. "SENDER PORT
      S_CTRL_REC-RCVPRN = C_LOGSYS. "Partner number of receiver
      S_CTRL_REC-SNDPRT = C_SNDPRT. "Sender Partner type
      S_CTRL_REC-SNDPRN = C_SNDPRN. "Sender Partner Number
    APPEND S_CTRL_REC.
    ENDFORM.                    " generate_control_record
    *&      Form  send_idoc
    FORM SEND_IDOC.
    ZORDER-ORDER_NO = ORDER_NO.
    ZORDER-PRODUCT = PRODUCT.
    ZORDER-QUANTITY = QUANTITY.
    APPEND ZORDER.
    T_EDIDD-SEGNAM = C_ZRZSEG1.
    T_EDIDD-SDATA = ZORDER.
    APPEND T_EDIDD.
      CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
        EXPORTING
          MASTER_IDOC_CONTROL            = S_CTRL_REC
        TABLES
          COMMUNICATION_IDOC_CONTROL     = T_COMM_IDOC
          MASTER_IDOC_DATA               = T_EDIDD
        EXCEPTIONS
          ERROR_IN_IDOC_CONTROL          = 1
          ERROR_WRITING_IDOC_STATUS      = 2
          ERROR_IN_IDOC_DATA             = 3
          SENDING_LOGICAL_SYSTEM_UNKNOWN = 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.
      ELSE.
        COMMIT WORK.
        LOOP AT T_COMM_IDOC.
          WRITE:/ 'IDoc Generated - ', T_COMM_IDOC-DOCNUM.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " send_idoc
    I hav created segment , basic type,message typealso and release also .I also linked them.
    Plz help me.
    Hemlata

    Hi Hemalatha,
    Just call this Progream RSEOUT00 from your Zprogram and pass the basic parameters like IDOC number, Basic type,Partner number etc.
    You can check the parameters by executing the Program RSEOUT00.
    This Program will change the status of your IDOC 30 to 03.
    Thanks.
    Note:Reward Points if you find useful.

  • How to crete Button through ABAP programming

    Hello Friends,
    I am creating 2 selection screens through ABAP code and using them in my Tabstrip control also created through ABAP programming.
    Can I also create button on the selection screen through abap programming. If yes then how, and how to assign funtion code and capture the Function Code???
    Moderator Message: Read the below advice.
    Edited by: kishan P on Dec 30, 2010 7:44 PM

    Have a look at F1 help on SELECTION-SCREEN. There should be an example as well.

  • How to Trigger process chains??

    hi all
    How to Trigger process chains??
    Can anybody step by steps??
    thanks
    Senthil

    The background control options are available to directly schedule the start process. You can start the start process immediately , that is when activating the process chain, for a specified time, or after a particular event. When you activate the process chain, the start process is scheduled in the background as defined in your selections.
    You can also trigger the start of a process chain via a meta chain. A meta chain is when a process chain, to which you set this start condition, is fixed to another process chain. The process chain is started directly by this meta chain.
    When you start the start process via a meta chain, it is not scheduled after you activated the related process chain. The process is only started when the meta chain, to which it is linked, is running.
    The remaining chain processes, that is the application processes and the collection processes, are scheduled to wait for an event.
    The start process has the following special features:
    Only the start process can be scheduled without a predecessor process.
    The start process can not be a successor to another process.
    Only one start process is allowed for each process chain.
    One start process can only be used in an individual process chain

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

Maybe you are looking for

  • Quicktime player does not play video clip on desktop but plays in iPhoto

    QuickTime player opens the video clip but the screen remains blank and no sound either. What am I doing wrong? It plays perfectly well in iPhoto.

  • Line appears when applying drop shadow on large scale

    Hello! Some weeks ago I had to make a large scale graphic (800mmx2000mm) for a roll-up banner. I wanted to apply a drop shadow to a rounded shape, and ugly lines came up. Since it was a bit urgent, I decided not to use it. But now I'm curious, so I q

  • 313 and 315 Movment Type

    Hi,   We are doing 313 Mvt type ( Transfer Sloc to Sloc -- two step Procedure ) using MB1B and we are doing GRN ( MIGO -- Place in storage -- 315 Mvt Type ) . Scenario :   Now we are issuing the material ( 313 Mvt type ) -- 100 kgs and we are receing

  • I NEED DOCUMENTATION   TO GET ADD-ON CERTIFICATION IN B1

    We have developed an add-on, what i actually need is that the terms and conditions to satisfy SAP, and get the certification properly, let me know  as soon as possible procedures to be followed for my add-on

  • Wireless iCal Sync?

    On the iPhone, does iCal sync over the network (via wireless) with DotMac (as is the case on a Mac) or is a physical connection required to sync with a Mac/PC?