Triggering Event in BW through a ABAP Program in R/3

Hello Friends,
I am working on triggering a process chain in BW using ABAP program in R/3.
1.  I have created a test process-chain in BW which sends test email upon running. This process chain is triggered by an event "Z_START_PC".
2.  I created a function module "ZBW_EVENT_RAISE" which triggers this event.
     ( This function module is "remote enabled module")
3.  I tested running the process chain, with function-module (SE37), which works fine.
     ( i.e. I do receive test-email after..)
4.  Now I created a ABAP program "ZBW_EVENT_RAISE" in R/3.
     The code of which is as follows:
     REPORT  ZBW_EVENT_RAISE.
    parameters: rfcdest like t000-logsys.
    parameters: bwevent like tbtco-eventid.
    call function 'ZBW_EVENT_RAISE'
    destination rfcdest
     exporting
     eventid = bwevent.
5.  When I try to run this ABAP program in R/3 (SE38),
     The process chain does not get triggered.
  (a)  The "<b>rfcdest</b>" i got from SM59 - RFC Destinations -
        R/3 Connections - BW Development Server Client
        Value is "BWDCLNT999".
How do I go about debugging this issue? I know for sure, the BW- function module -- to Trigger -- to Process-chain is working fine. Only part is R/3 to B/W function module starting.
Any help is appreciated.
I promise to award points.
Thanks
PK

in ST05 there is an option for RFC trace. Not sure how much detail that will give you but you can try.
It is possible that your userid doesn't have an RFC call authorization in R/3. Do a SU53 immediately after running the program.
Also, replace the FM with any other FM that you know for sure runs  (eg some BAPI FM) and run it - either in SE37 in R/3 with RFC destination for BW, or, from your code itself and see if that works (you can check return code).

Similar Messages

  • How to know the List of Tables that are updated through a ABAP Program

    Hi,
    Is there a program or something that will help me to identify the List of Tables that are used in a ABAP program(ABAP Report, Transaction .... program) without debugging it or looking at the dictionary structure.
    I really need this urgently. Try to give me many methods as possible.
    Thkx
    Kishan

    Hi,
    I created a Z-transaction for my SE49 and debugged a little bit - it's not so fantastic any longer - just like the proposal of SE80 - DDIC list.
    SE49 (and I guess similiar functions, too) just scan the source code for a list of key words: tables, select, update, insert, modify, export, import.
    But very (very!) often updates are encapsulated into function modules - and here this technical cross reference (just like SE80 DDIC list) is of no help.
    So a SQL trace (or runtime analysis) is still the best option to get a complete list. Still these tools just analysis one process - if in other circumstances more tables are involved, can't be judged.
    E.g.:
    - creating one new entry: 1 table
    - changing existing entry: 2 accesses to 1 table + log table
    Regards,
    Christian

  • SMS through SAP ABAP program

    Hello Guys..
    I am creating a program which is basically alert program. As per the requirement if delivery is pending as on date , a SMS need to send the sales guys.
    is there any  stranded function for that, which help me ragarding the same. Mobile no of all are maintain in z table..
    Regards
    Swati....

    Hello,
    please check this:
    http://help.sap.com/saphelp_nw04/helpdata/en/58/97c43af280463ee10000000a114084/frameset.htm
    Re: SMS through SAP
    /people/anilkumar.vippagunta2/blog/2005/07/20/developing-web-application-without-writing-single-line-of-code-my-first-web-log
    <b>/people/durairaj.athavanraja/blog/2005/07/12/send-sms-to-india-from-abap
    /people/durairaj.athavanraja/blog/2005/07/12/send-sms-to-india-from-abap
    http://www.webservicex.net/WS/WSDetails.aspx?CATID=4&WSID=59
    /people/thomas.jung3/blog/2004/11/17/bsp-a-developers-journal-part-xiv--consuming-webservices-with-abap
    Re: SMS through SAP
    Reagrds,
    Beejal
    **Reward if this helps

  • Export data to Excel through a ABAP program run in batch mode

    Dear Experts,
      The requirement is that a ABAP report should run through background job, which will do the followiing :
       1) Collect data from predifined CRM tables ( Activity , Order for example ).
       2) Create a Excel file in a Application Server ( physical file server location ) location.
       3) Push the data collected in the step 1 to the Excel file.
       I have found 2 function modules which does the export to Excel after creating the Excel file. They are :
        a) XXL_FULL_API
        b) MS_EXCEL_OLE_STANDARD_DAT
       But it seems that the ABAP report needs to run in the foreground ( correct me if i am wrong ) in order to create the Excel file.
       Please can anyone suggest a possible ABAP code to achieve OR how to use these FMs in background mode ?
      The excel creation needs to be automated and send to a administrator email id every day, so the need of exporting the data in background mode arises.
    Thanks and regards,
    Sudipta

    hi,
    In SM36, you can create a job(give your report prog name)..
    call the fun. module by storing all the values into final int. table it_data.
    but u need to open one excel file in your desktop...
      v_file = 'C:\file.xls'.  " path should be like this...
    CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename                      = v_file
         filetype                      = 'xls'
      has_field_separator           = 'X'
      HEADER_LENGTH                 = 0
      read_by_line                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
      VIRUS_SCAN_PROFILE            =
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
        TABLES
          data_tab                      = it_data
    EXCEPTIONS
       file_open_error               = 1
       file_read_error               = 2
       no_batch                      = 3
       gui_refuse_filetransfer       = 4
       invalid_type                  = 5
       no_authority                  = 6
       unknown_error                 = 7
       bad_data_format               = 8
       header_not_allowed            = 9
       separator_not_allowed         = 10
       header_too_long               = 11
       unknown_dp_error              = 12
       access_denied                 = 13
       dp_out_of_memory              = 14
       disk_full                     = 15
       dp_timeout                    = 16
       OTHERS                        = 17
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    regards
    vijay

  • 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 pass background event parameters to ABAP program in SM36

    Hi team,
         I want to pass background event parameters to ABAP program on job scheduling in SM36. For example, Background jobs will trigger, once background event triggered from Non-SAP system using SAPEVT command with parameters.
         I want to pass the event parameter values to the ABAP program . Can you please help me on this.
    Regards,
    Anand Krishnan

    Hi,
    Which ABAP program - the one that will be executed as a job step? If yes, I don't believe you can "pass" something to it because it will be started by "job starter" of SAP background processing run-time system. The ABAP program executed in background can, however, get the job run-time information using FM GET_JOB_RUNTIME_INFO, which also returns EVENTID and EVENTPARM. Is that the event parameters you were looking for?
    cheers
    Jānis

  • How to Raise Event in BW using ABAP program

    Hi BW Experts,
    Can anyone tell how to raise event in BW using a ABAP program.
    Program should ask for the event to be raised and destination server.
    Edited by: Arun Purohit on May 14, 2008 11:04 AM

    Hi Arun,
    By Using BP_EVENT_RAISE function module you can raise an event.Create an ABAP program and call the function module BP_EVENT_RAISE and create a avariant to specify the event to be raised. Schedule this ABAP code. Go to the start process type and set the schedule to "after event" and mention the event name that you created. Also, I think now you can mention the time as well and you can also schedule for periodic scheduling.
    T Code : SM62 --> To Create an Event.
    T Code : SE38 --> To Create an ABAP Program
    Use Function Module : BP_EVENT_RAISE to raise an event.
    Related links:
    http://help.sap.com/saphelp_sem40bw/helpdata/EN/86/6ff03b166c8d66e10000000a11402f/frameset.htm
    http://help.sap.com/saphelp_sem40bw/helpdata/EN/86/6ff03b166c8d66e10000000a11402f/frameset.htm
    http://help.sap.com/saphelp_sem40bw/helpdata/EN/86/6ff03b166c8d66e10000000a11402f/frameset.htm
    http://help.sap.com/saphelp_sem40bw/helpdata/EN/86/6ff03b166c8d66e10000000a11402f/frameset
    Hope this helps
    Regards
    CSM Reddy

  • Deleteing Session through ABAP Program

    Hi,
    I want to delete a session through a custom Program.
    Can anybody help me on how can I do it through An abap program.
    I want to get the same functionality which we do through
    SM04 and not SM12.
    for. eg. I want  that program should take the userid and
    and find how many sessions are open for him and delete the required session.
    Please help.
    Thanks
    GT

    You can do this like this :
    call function 'TH_DELETE_USER'
            exporting client = client
                      user   = user
                      tid    = tid
                      only_pooled_user = only_pooled_user

  • Can i load the cube through an customised abap program??

    Hi all,
    I have loaded the ODS using the customised abap pgrm. is it possible to load the CUBES through the abap program.
    If not what is the reasons for not loading it?
    Thanks
    Pooja

    Hi Pooja,
    For me ..
    I'm afraid to upload directly by program to info cube tables .. Because, i don't know what tables it will be taken into account for uploading ..
    But ..
    If the requirement is to upload it by ABAP Program ..
    I make like this ..
    1. I create the ABAP Program to create .csv files. So all uploaded data will be written into .csv files.
    2. I create info-package, that upload data from file. And i define the path to refer to that corresponding .csv files.
    3. Beside ABAP Program is used to write .csv files, i also use it to trigger the info-package.
    So by that techniques, i'm able to upload data by ABAP Program.
    Hopefully it can help you a lot.
    Regards,
    Niel.

  • 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 get the decision key in abap program

    Hi guys.
    I have a user decision workflow that have two options: Accept or Reject. This options has some type of id, right? Like '0001', '0002', right?
    How i get this ids decisions through a abap program.
    I need to know this because i have to pass this id to a Z Function Model.
    Thanks!

    The result is found in the workitem container in the '_RESULT' or '_WI_RESULT' elements, you can use the SAP_WAPI_READ_CONTAINER function module to read the data (read the element from the simple container returned table).
    CALL FUNCTION 'SAP_WAPI_READ_CONTAINER'
      EXPORTING
        workitem_id                    = im_wi_id
      TABLES
        simple_container             = lt_container
    READ TABLE lt_container WITH KEY element = '_WI_RESULT' into ls_container.
    If you what to get the possible decisions description you can use the SAP_WAPI_DECISION_READ function module,
    CALL FUNCTION 'SAP_WAPI_DECISION_READ'
    EXPORTING
    workitem_id  = im_wi_id
    TABLES
    alternatives = lt_alts.

  • GDS with an ABAP program

    Hi All,
    I have a GDS which is created using table and data (daily delta)  in table is coming through an abap program.
    But I am not getting how this program will execute automatically until and unless we dont execute it.
    Is there any procedure to call the abap program to fill data in GDS ???
    Regards
    Shweta

    Hi,
    One Program is running and filling Table and then you are taking data from that table using GDS. So you ask ABAPer who written that program?. and daily at what time it will execute in ECC and what time the job will completes, then after that you run your daily extraction, then you will get Deltas or Full loads based on Date.
    Thanks
    Reddy

  • Setting value of input/output field of screen in abap program

    I have a screen.I have added a input/output field in my screen.The purpose is i just want to display a text in that field upon PBO through my abap program.I m a newbie.PLS help me
    Also can i use textfield instead of input/output field for this purpose.if so then wats the difference between both of them

    Hi
    To display a text in I/O element, go to the PBO of this screen and
    assign the text to your I/O element.
    Lets say if TEXT_IO is the name of ur UI element, and you want to display "Hello" into it, do it as follows:
    TEXT_IO = 'Hello'.
    Must ensure that the type of this UI element is CHAR type and you define its lenght properly.
    to display "Hello", length would be 5.
    Hope it will solve ur query.

  • Event Triggering ABAP Programs

    Hi SDN User,
    I have a strange issue. We have many process chains and there are triggering by Events and these events are triggering by ABAP programs. My question is I want to know which even is triggering by which ABAP program.
    Any idea guys.
    Thanks
    Sravu2019

    Hi VIkram
    Thanks foir u r input but thiis also not working and am not able to fine the ABAP Program name.
    Thanks
    Srav's

  • Write an ABAP program in BW which triggers an event in R/3

    Hello People
    Method: I need to create a Process Chain in BW for info package loading. In the PC, after the loading occurs, I need to write an ABAP program which has the FM: RSSM_EVENT _RAISE , which triggers a pre-defined event in R/3.  This event in turn triggers a 'z' program in R/3.
    Now, I know that we can use SM62 in R/3 to create the event. But how and where do i need to write the abap code in BW. And do i just place it in the PC after the loading process? Do i need to inculde the FM in the ABAP code? Does the FM know the server in R/3 ( DEV or QA or PROD ) where it needs to trigger the event? And how do i schedule the 'z' prog, so that it starts after the event?
    Please help.
    Thanks in advance.

    Create and rfc function module in r/3 in which code you trigger the event, created in r/3 too.
    You can, and should to do it, include a report as step in your process chain in order to trigger event at finish of process chain.
    Here a sample
    r/3 side.RFC function (get and trigger event)
    FUNCTION Z_RAISE_EVENT.
    ""Interfase local
    *"  IMPORTING
    *"     VALUE(EVENTID) TYPE  TBTCO-EVENTID
    *"  EXCEPTIONS
    *"      BAD_EVENTID
    *"      EVENTID_DOES_NOT_EXIST
    *"      EVENTID_MISSING
    *"      RAISE_FAILED
    *"      OTHERS
      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
      CASE SY-SUBRC .
        WHEN 1.
          RAISE BAD_EVENTID.
        WHEN 2.
          RAISE EVENTID_DOES_NOT_EXIST.
        WHEN 3.
          RAISE EVENTID_MISSING.
        WHEN 4.
          RAISE RAISE_FAILED.
        WHEN 5.
          RAISE OTHERS.
      endcase.
    ENDFUNCTION..
    BW side.Report to call previous rfc function
    REPORT  Z_RAISE_EVENT                           .
    parameters: EVENTID like TBTCO-EVENTID.
    parameters: destino like RFCDES-RFCDEST.
    parameters: test as checkbox default 'X'.
    IF TEST EQ SPACE.
      CALL FUNCTION 'Z_RAISE_EVENT'
        DESTINATION DESTINO
        EXPORTING
          EVENTID                      = EVENTID
        EXCEPTIONS
          BAD_EVENTID                  = 1
          EVENTID_DOES_NOT_EXIST       = 2
          EVENTID_MISSING              = 3
          RAISE_FAILED                 = 4
          OTHERS                       = 5
      CASE SY-SUBRC .
        WHEN 1.
          RAISE BAD_EVENTID.
        WHEN 2.
          RAISE EVENTID_DOES_NOT_EXIST.
        WHEN 3.
          RAISE EVENTID_MISSING.
        WHEN 4.
          RAISE RAISE_FAILED.
        WHEN 5.
          RAISE OTHERS.
      ENDCASE.
      ENDIF.

Maybe you are looking for

  • Transaction SWPC when scheduled in Background  is not working

    Hi All, I have scheduled the program RSWP_CONTINUE_WORKFLOWS_GRID  behind the transaction : SWPC daily at 11 : 00 PM system time. The creation date is selected as Creation date GE Sy-datum-1 dynamically and continue immediately option is also checked

  • Adobe Acrobat X Pro will not print .pdf on HP printer

    Help!  I have not been able to print a .pdf file from my HP Officejet J6480. Each time I sent the file to the printer it acts as if its going to print and then I get a paper jam error but there isn't a paper jam. I am using an HP TouchSmart 610 with

  • "Pages" not showing in list of purchased apps on iPad

    My wife bought "Pages" for her laptop - i want to download it on her iPad, too, but it's not showing on the list of her "purchased" apps. Where do i find her purchase of "Pages" on the iPad?

  • Cannot open source panel in iPhoto

    I need to find out how to access the following file so I can view the source panel in iPhoto: com.apple.iPhoto.plist. I have forgotten how to find this file so I can fix iPhoto. Please help.

  • Creating variables with XSL

    How do I catch XML data and put it in a variable, so I can use it later when creating a link? In the below example I want to use the values for server, port and scriptname to create links for each USER/NAME. Can anyone give any hints? -- XML -- <Adap