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.

Similar Messages

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

  • Trigger process chains from UNIX

    Hi,
    I just wanted to know how can we trigger Process chains from UNIX Server.
    Any pointers will be appreciated.
    Thanks

    I suggest to use the sapevt.exe.
    With it you can trigger an event in the SAP system with the execution of a simple command file (.bat for ex.)
    So the event will start the chain as you require.
    You can find more info for sapevt in:
    http://help.sap.com/saphelp_nw04/helpdata/en/fa/096e6b543b11d1898e0000e8322d00/frameset.htm
    Regards,
    Sregio
    Did you try that?
    Message was edited by: Sergio Locatelli

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

  • 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

  • UTF-8 file via process chain doesn't load

    Hello all!
    I've a big problem. I try to load a UTF-8 file via process chain. I have a script which generate the correct name and the process chain will load the file daily. The file format is UTF-8. I've created a info package with the adapter OPEN_DS load text type file from application server and the character set is 4110 (Unicode UTF-8) but it doesn't work. I try it directly - not via routine - and it works perfect but I can't load with the adapter GUI-UPLOAD load text type file from local workstation via process chain.
    I switched the code page back to 1100 sap internal ISO 8859-1 but with this settings I have a lot strange chars in my texts. Any solutions?
    Regards, Thomas

    Hi,
    no solution?
    Regards, Thomas

  • 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

  • ABAP code to trigger Process Chain (Weekdays)

    Dear experts,
    I have a process chain which is triggered after an event in BW which is executed after a job in R3 is finished. This job in R3 is executed all days after another event.
    I would like this process chain to be executed only from Monday to Friday. What ABAP code should I write in the function module which triggers the BW event in order to execute it only the days I really need to?
    Thanks in advance for your help!
    Best regards,
    Cecilia

    Hello Surendra,
    Thakns as well for your help, but my problem is that I don't know any ABAP. With help of SDN posts I've been able to create the program in R3 which calls a FM in BW. My issue now is that I need the exact code which triggers my function module only from Moday to Friday......
    The FM I have created in BW which triggers the event is the following (here I suppose I will need a code which says something like, if today is Monday to Friday trigger the event, if not, do not do anything):
    FUNCTION Z_BW_EVENT_RAISE_PEDIDOS.
    ""Interfase local
    *"  IMPORTING
    *"     VALUE(EVENTID) LIKE  TBTCO-EVENTID
    *"  EXPORTING
    *"     VALUE(RESULT) TYPE  CHAR2
    *"  EXCEPTIONS
    *"      BAD_EVENTID
    *"      EVENTID_DOES_NOT_EXIST
    *"      EVENTID_MISSING
    *"      RAISE_FAILED
    *"      OTHERS
    *data: eventid LIKE TBTCO-EVENTID.
    *data: RESULT    type CHAR2.
    call function 'BP_EVENT_RAISE'
    EXPORTING
    eventid = eventid
    EXCEPTIONS
    bad_eventid = 1
    eventid_does_not_exist = 2
    eventid_missing = 3
    raise_failed = 4
    others = 5.
    if sy-subrc eq 0.
    result = 'OK'.
    endif.
    ENDFUNCTION.
    *& Title: Raise Event for BW                                           *
    Best regards,
    Cecilia

  • Trigger Process chains only once in a day

    Hi All,
    I have a requirement where a process chain triggers on arrival of some files.Now I want this chain to trigger only once in a day even if file arrives before the start of next day.How can i acheive this.
    Reagrds,
    Raj

    Hi,
    Please use below:
    REPORT  ZCHECKPCNEW.
    TABLES : RSPCLOGCHAIN.
    DATA : IT_TAB TYPE TABLE OF RSPCLOGCHAIN,
           WA_TAB TYPE RSPCLOGCHAIN.
    FIELD-SYMBOLS <FS> LIKE LINE OF IT_TAB.
    PARAMETERS :LV_CHAIN TYPE RSPCLOGCHAIN-CHAIN_ID.
    SELECT * FROM RSPCLOGCHAIN INTO TABLE IT_TAB
    WHERE CHAIN_ID  = LV_CHAIN
    AND DATUM = SY-DATUM.
    SORT IT_TAB DESCENDING BY DATUM ZEIT.
    READ TABLE IT_TAB INDEX 1 ASSIGNING <FS>.
    IF SY-SUBRC = 0.
      IF <FS>-ZEIT < SY-UZEIT.
      MESSAGE E000(SABAPDOCU) WITH 'Error'.
      ELSE.
      MESSAGE I162(00) WITH 'Successful'.
      ENDIF.
    ELSE.
    MESSAGE I162(00) WITH 'Successful'.
    ENDIF.
    -Vikram

  • Process Chain Issue

    Hi Gurus
    When i am executing the Process chain which contains two loads(two local chain)- Master data and transaction load.
    After trigger the master variant, it goes to the  Master data local chain, but Its showing the yellow status for long time.
    But, if we dig in to log and see the message.. its showing "Communication buffer deleted from previous run".
    It did not trigger any load inside the master data. But, if i schedule the each processes manually, its successful.
    Thanks in advance.
    Variant settings:
    First variant set to Immediate start
    Master data load variant set to Start using meta chain or API
    Transaction data load variant set to Start using meta chain or API
    Note: Even i changed Master data load variant and Transaction data load variant to  Immediate start. Still did not work.
    I activated the chain many times too.
    Error Message:
    21.04.2010     07:59:21     Job started
    21.04.2010     07:59:21     Step 001 started (program RSPROCESS, variant &0000000311437, user ID ALEREMOTE)
    21.04.2010     07:59:22     Communication buffer deleted from previous run 4HKDQS42CV787C9IUWFGA5073 (status X)
    21.04.2010     07:59:22     Version 'M' of chain MASTERDATA_DAILY was saved without checking
    21.04.2010     07:59:22     Version 'A' of chain MASTERDATA_DAILY was saved without checking
    Thanks & Rgds,
    RR

    Hi ,
    Please check the below thread:
    [Re: Procss chain issue;
    Also try Re-activating both the local chains.

  • Event to trigger Process Chain

    Hello Experts,
    I need your suggestions to write an event to trigger a process chains after user put text file to server,
    but the PC is not run.
    here the step what I have done.
    a. define an event SM62 "ZEV_PC_START"
    b. create abap code to check the file if exist raise the event ZEV_PC_START with BP_EVENT_RAISE.
    c. create Process chain.
    d. schedule PC after event "ZEV_PC_START"
    Could any one tell me the steps in brief. Pointers to any documentation would be highly appreciated.
    thanks
    supriatna

    Hi expert,
    I need create the abap code to check the file if exist raise the event ZEV_PC_START with BP_EVENT_RAISE.
    I don't know ABAP, could you help me with the code?
    Could you give me examples, please?
    Thanks,
    Best Regards.

  • Trigger Process Chain Fails

    Hi All,
    We have a BI 3.5 System.We use the Maestro Background Job utility to fire background jobs in the SAP system including the process chain.
    Of late, we have been experiencing problems wherein the process chain is not triggered automatically from the maestro application as scheduled.
    It fails with the following error log in maestro :
    JOB       : NWPAGENT#NWPDLYMASTERCHN.NWPSTARTCHANGE
    = USER      : master           
    = JCLFILE   : /  -job DAILY_MASTER_CHAIN -i pchain_ -c C
    = Job Number: 32179
    = Thu 09/14/2006 04:00:17 AM PDT
    ===============================================================
    +++ IBM Tivoli Workload Scheduler for Applications, method R3BATCH 8.2 (patchrev FP5 - 12:37:13 Mar  9 2005)
    +++ is called with following parameters:
    +++ -t LJ -c NWPAGENT,AIMPRD,AIMPRD -n null -p 31111 -r 495,495 -s NWPDLYMASTERCHN -d 20060914,1158192000 -l master -o /unison/master/maestro/stdlist/2006.09.14/O32179.0400 -j NWPSTARTCHANGE,32179 -- /  -job DAILY_MASTER_CHAIN -i pchain_ -c C
    +++ EEWO1031I TWS home dir was found: /unison/master/maestro
    +++ EEWO1027I RFC connection established (1)
    [XALOG] - INFO: semaphore key=0xbd60228 (198574632)
    Thu Sep 14 04:00:17 2006
    ERROR 552 ***  EEWO0552E The R/3 job scheduling system has found an
          error for user name RSPC_API_CHAIN_START and job name !2. Please
          check R/3 syslog.
    ERROR 572 ***  EEWO0572E Cannot start Process Chain.
    ===============================================================
    = Exit Status           : 60
    = System Time (Seconds) : 0     Elapsed Time (Minutes) : 0
    = User Time (Seconds)   : 0
    = Thu 09/14/2006 04:00:20 AM PDT
    ===============================================================
    It dosen't throw any dump.In fact the BI_PROCESS_TRIGGER background job shows completed successfully in SM37.
    Any help.
    Thanks & Regards,
    <b>Navin</b>

    Navin,
    this can have several issues. Please verify the r3user profile in your BI system, the r3user which is defined in the r3batch options file. The SAP user must have the profile S_BI-WHM_RFC assigned, additionally to the access right definition explained in the Tivoli Workload Scheduler for Applications users guide.
    If this does not solve your problem, please contact IBM support and open a problem management report.
    Kind regards
    Ralf
    IBM Tivoli Workload Scheduler for Applications Development

  • Trigger Process Chain Manually

    Hello Experts,
    Is there any way we can let a business user trigger a process chain manually without having to log in back-end?
    Ideal would be via an HTTP-link just posted on the customer's Intranet...    do you have any suggestions?
    Thanks!
    Best Regards,
    Rikard

    Hi Arun,
    Thank you for your answer. This seems to fit my need, although I'm new to BSP pages. I did however find this very useful guide:
    <<http://wiki.sdn.sap.com/wiki/display/BSP/BSP%2Citstabsandnavigation.>>
    What is needed to  use such pages? Any special installation other than the front-end? Could any business user with just the sapGUI installed reach the page on the intranet and trigger the load via a button (event)?
    Regards,
    Rikard
    Edited by: Rikard Edvardsson on Sep 16, 2009 11:29 PM
    Edited by: Rikard Edvardsson on Sep 16, 2009 11:31 PM

  • 203 Invoice Process chain Issue

    Greetings All!
    We have been facing an issue where the standard 203 Invoice PC has become cleint dependent .The client which it is pointing is not even existing in BI system configs.Due to this we are not able to open this process chain for editing as well..We tried to delete this process chain and re-instaal from the Business content,but when we are trying that still teh issue of client dependency is coming.The ssyetem gives an error stating
    "Chain 0ASA_P041 can only be edited in client 300"
    The extended message also shows the follwoing
    Object 0ASA_P041 (Process Chain) could not be collected for object ()
    Message no. RSO296
    Diagnosis
    You have collected objects in the BI Metadata Repository. Associated objects for object  of type  have also been collected. Object 0ASA_P041 of type Process Chain was among these objects.
    However, this object 0ASA_P041 of type Process Chain is not available in the metadata repository.
    System Response
    Object 0ASA_P041 of type Process Chain is ignored in further collections. The links for object  of type  are incomplete. This may result in you not being able to activate this object.
    Procedure
    If this error occurs while you are installing BI Content, an error may have occurred during the delivery. Inform SAP. In all other cases, check that the object has not been deleted by another user during collection, for example.
    Please assist,this issue is existing in both Dev as well as Quality enviroment.
    Kind Regards,
    Surbhi

    Hi Surbhi,
    Not sure what might have caused this. Please also try posting the query in BI forums since they might have a better idea on this.
    As a quick workaround you can try to create a copy of the process chain 0ASA_P041 and in the table OPMDM_TYPES for the entries INVOICE and C_INVOICE use this new process chain instead of 0ASA_P041. Then the data management UI will automatically pick the new process chain.
    Thanks,
    Divyesh

  • Download file from process chain

    Hello experts,
    i have just created a data model and report from flat file(CSV) in BW 7.0.
    I understand that if I want to include the extraction from the DataSource into the InfoPackage in the process chain, the CSV file needs to be on the Application Server.
    The external database is being updated with new data daily. There is a URL - www.example.com/export.php -  that when accessed, deliveres the updated flatfile from the database.
    My question is: can i integrate this download in a process chain to be automatically triggered, so that every morning I have the updated data in the report?
    Thanks.

    Hi Andrei,
    Am not sure how to execute the url using the process chain. But still we can check whether the file is available in the application server or not.
    We have a process variant called OS Command, using this variant type we can check whether the file is available or not for some tim intervals. In case file is availabe then the next process will trigger else it will keep on searching for the file until it finds.
    Regards
    Chaithanya

Maybe you are looking for

  • Dear photoshop CS5 64 bit speed experts...

    I'm an illustrator that works w/ brushes(can they ever get fast enough ?) in PS CS5 and, at times, some very large files: Mac Pro  2 x 3 GHz Quad-core Intel Xeon ("early 2008"), 20 GB or RAM OS 10.6.6 Running in 64bit Boot(system only) drive: 60 GB O

  • Resizing a window containing a graph

    I have created a class that plots points on a graph using two arrays passed to the class. One array is for the x-values, the other is for the y-values. Initially, the graph is fine. When I minimize or maximize the window, the values in the arrays cha

  • PISTON /Hydraulic Control GUI or UI

    I want to make a GUI which is well animated showing the fluid flow. I am using six Hydraulic Cylinder which are piston type. I want make a Piston type action with the labview. I have DSC module and checked the image navigation. I could'nt find the so

  • Pay Pal to SagePay

    I've got a client whose site uses Pay Pal to process orders. It works well - all the information is dynamically generated to fill out the Pay Pal variables in the form which is then added to the Pay Pal cart - all works great Now the client is lookin

  • Stock Photos uninstaller not uninstalling

    I just downloaded the Adobe Stock Photos uninstaller from the link in Bridge and it did nothing. Stock photos no longer available message keeps coming up- Is ther a way to really remove this service from Bridge?