Requirement wherein I want to call two queries in parallel using ABAP Prg

We are using RSCRM_BAPI to run a query in background and write the results to a table. We later read this table and create a file. I have a requirement u2013 wherein I want to call two queries in parallel using an ABAP program.
For our discussion assume:
1) Program : ZCALL_RCRMBAPI  is a program that calls RSCRM_BAPI in background and takes the query name as input
2) Program: ZMAIN_PROGRAM  this is the main program
The requirement is to call the ZCALL_RCRMBAPI in a loop. Also within the loop call it in parallel. Basically we have an ODS that stores ; FISCPER. So I call the two queries for a list of FISCPER.
ZMAIN_PROGRAM - A program that reads a table (ODS ) in our case and call the two programs in a loop and both should run in parallel .
Now if it was sequential u2013 it was easy u2013 I would just say
Loop at L_T_FISCPER .
Update Z_FISCPER with L_T_FISCPER-FISCPER u201C Assume Z_FISCPER is a Z table . The VARIABLE in the query Q1 and Q2 use a customer exit to read this table.
A)       SUBMIT ZCALL_RCRMBAPI with P_QUERy = Q1 and return .
B)      SUBMIT ZCALL_RCRMBAPI with P_QUERy = Q2 and return .
Endloop .
Question: How do I make these calls in parallel u2013 yet retain control in the main program?
A)       SUBMIT ZCALL_RCRMBAPI with P_QUERy = Q1 and return .
B)      SUBMIT ZCALL_RCRMBAPI with P_QUERy = Q2 and return .

Instead of RSCRM BAPI you can use the RRW3_QUERY_VIEW_DATA function module for greater control over program execution...
/people/arun.varadarajan/blog/2009/07/29/make-the-most-out-of-query-execution--part-1
will give you pointers as to how this can be done...

Similar Messages

  • Synchronizing Two Custom Z Tables Using Abap Program

    Hi,
        My requirement is Synchronizing two custom z tables using abap program me.
    I have vendors in two tables, i have to select the common vendors from first which are existing in second  table also.
    In first table each vendor can have more than one supplier types in one field only. In second table these supplier types are divided into
    different fields.
         My requirement is I have to check supplier types in first table and i have to pass X to corresponding supplier types in second table vendor.
    I have to pass X value for each depending in Second table depending upon supplier type in first table.
    . How to do it can any one suggest with code.
    Thanks in Advance,
    Vivek
    <subject edited by moderator>
    Message was edited by: Manish Kumar

    Hi,
    Imho, you need to get (meaning, extract into separate fields) the different supplier types from Table1 first. Your key for Table1 is the vendor no, which is also the key in Table2 (or the key for Table2 is Vendor no & Type).
    For better performance, better select multiple/all required entries from Table1 instead of doing a select endselect.
    Depending on the format of the vendortypes in Table1, put them in a new itab (for our purpose named Table1New where vendor no & type are the only 2 fields. For example, if the type length is fixed to 2 chars, or divided by space,... use your coding accordingly.
    Next step is to select all vendor no's in Table2 which you have selected in Table1. If in Table2, the vendor no is the only key (and the all vendor types are filled in a single record), then loop check the vendor types from Table1New against the types in Table2.
    If the key of Table2 is vendor no & vendor type, then do a read table for the key.
    The logic in pseudo-code:
    Select from Table1 into table. If you'd like to limit the selection size, add package size statement.
         extract the vendor types in to itab Table1New.
         Select the vendor & types from Table2 by using the for all entries option (better performance).
         loop at Table1New
              check in Table2:
                   if the unique key is vendor no: check all fields for the vendor type from Table1New
                   if the unique key combo is vendor no & type: check by using a read table.
              If not found => add entry to Table2
         endloop.
    endselect Table1 (when using package size)
    I guess the most difficult step is to extract the types from Table1 into separate fields, all the rest seems straight forward. Please keep in mind the itab type definitions for a better performance.
    Good luck!
    Best regards,
    Zhou

  • Want to call India + Europe, can i use subscription services?

    Hey.. I want to call India, (Family) and Germany (Friends). How to use monthly subscription for my criteria??Can i call to both places with same monthly subscription? Suraj 

    Hello WCMack,
    That was a great explanation on the situation. Just to confirm, Europe uses GSM for their wireless network. There are third party apps that will allow you to make calls via wi-fi on a wi-fi enabled device. This is largely due if wi-fi is available and if it's free.
    From my experience, I was able to make wi-fi calls on my Iphone 4 in Greece without any problems last month. Since we don't own any towers in Europe, the service is hit or miss. Feel free to update us when you get back.
    Enjoy your trip!...

  • Creating or Updating BW Queries at runtime using ABAP

    Hi everybody,
    How can we create BW Query programmatically (using ABAP) or How can we update structure of BW queries at run time using ABAP? We have requirement where we want to add/remove characteristics from rows section of query at run time based on user’s input, we are making a BSP module for that, is there any function module provided to create or update BW queries in ABAP?

    Hi Annabelle,
    I think there is a very simple solution to your problem - use lexical parameters.
    You define a user parameter e.g. P_TABLE with a default value e.g. EMP. This must be the name of an existing table. The you write your select like this: SELECT ENAME,SAL from &P_TABLE. This will work as long as the default value is the name of an existing table. You can now change the value of P_TABLE as long as the column names are the same. If the column names also changes then you can write the select as: SELECT &P_COL1 ENAME,&P_COL2 SAL from &P_TABLE.
    Regards,
    Hans Peter Guldager
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by AnnabelleJones:
    Hello!
    I want to create queries and charts, one for each of a number of tables which each have the same format. I dont know how many tables at design time but will do at runtime. Is there any way of creating charts and tables at runtime or will I have to generate a seperate report for each table?
    Thanks for any help!<HR></BLOCKQUOTE>
    null

  • Delete Existing request in Cube of two years before data using ABAP

    Hi,
    I want to automize the process of deleting cube data which is Two years old in the process chain.
    I know this could be done in process type of delete overlapping request . There we  Should write ABAP code to acheive the same.
    I have seen the editor screen but could do nothing as i am writing the code for the first time.
    In the code i see the following:
    {form compute_XX
      tables l_t_request_to_delete structure rsreqdelstruc
      using l_request like rsreqdone-rnr
      changing p_subrc like sy-subrc.
    *Insert Source Code to decide if requests should be deleted.
    *All Requests in table l_t_request_to_delete will be deleted
    *from Infocube XX.
    *Add new requests if you want to delete more (from this cube).
    *Remove requests you did not want to be deleted.
    $$ begin of routine - insert your code only below this line        -
         loop at l_t_request_to_delete.
         endloop.
         clear p_subrc.
    ENDFORM.}
    Any clue of how to procede?

    You will need code similar than bellow in the routine that you mentioned:
    *Defined the ccupeaka data types as the timestamp calculation module
    *requires this data types
      DATA i_date LIKE  ccupeaka-timestamp.
      DATA i_request_date LIKE  ccupeaka-timestamp.
      DATA i_diff_sec TYPE i.
      DATA i_diff_day TYPE i.
      DATA i_request_tm LIKE rsreqdelstruc-timestamp.
    *Define here the retention period in days
      DATA c_retention_day TYPE i VALUE 70.
      i_date+0(8) = sy-datum.
      i_date+8(6) = '000000'.
      LOOP AT l_t_request_to_delete.
        i_request_tm = l_t_request_to_delete-timestamp.
        i_request_date = i_request_tm.
        CALL FUNCTION 'CCU_TIMESTAMP_DIFFERENCE'
          EXPORTING
            timestamp1 = i_date
            timestamp2 = i_request_date
          IMPORTING
            difference = i_diff_sec.
    *Get the day difference:
        i_diff_day = i_diff_sec / 24 / 3600.
    *Exclude all request that are within the retention
    *time
        IF i_diff_day LE c_retention_day.
          DELETE l_t_request_to_delete.
        ENDIF.
      ENDLOOP.
    However, it is bad practice to keep a lot of request in a cube (e.g. all request of 12 month) without doing compression.
    Normally you would use request compression (lets say for all requests older 7 days) to have best cube query performance. As after compression you can no longer do request deletion you would then use the selective deletion as descibed in the document in the post above to control the data volume in the cube.
    Best regards,
    Axel

  • Is it possible to call an external web service using ABAP?

    Hi~~
    I wonder that is possible to use an external web service in SAPGUI using ABAP without PI ( Process Integraion ).
    The external web service means the service that is developed by web-language like ASP.NET.
    Thank you.

    hi,
    i'm trying to study on how to use the oracle bi publisher using another client application aside from oracle. the client application is custom and uses a .Net framework. unfortunately, i am not familiar with how .Net sends requests to oracle bi publisher so i was thinking that may be i can just create oracle pl/sql stored procedures that can send this requests over to bi publisher.
    p.s. when you said concurrent manager, i'm not sure if you are referring to oracle apps concurrent manager but if you are, unfortunately i won't be using oracle apps with bi publisher.
    thanks
    allen

  • How to call two smartforms with using a single print program

    Hi,
       I have a requirement wherein I need to call two smartforms using a single print program.
       The interface parameters are different in two smartforms.
       I presently solved the issue using the smartform names as the reference.
       Can anyone let me know if there is any other way to solve it.
       I heard something about global params. But not sure.
       Please let me know the best possible way to solve this issue.
    Thanks and Regards,
       Debabrata

    Hi Debabrata,
    Based on the condition in your print program you can call the below code
    fname1 TYPE rs38l_fnam.
    IF -
    call function 'SSF_FUNCTION_MODULE_NAME'
      exporting
        formname                 = 'ZSMARTFORMS'
    importing
       fm_name                  = fname1
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.*
    CALL FUNCTION FNAME
    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      =
    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.
    ELSE.
    fname2 TYPE rs38l_fnam.
    call function 'SSF_FUNCTION_MODULE_NAME'
      exporting
        formname                 = 'ZSMARTFORMS'
    importing
       fm_name                  = fname2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.*
    CALL FUNCTION FNAME
    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      =
    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.
    ENDIF.

  • How to call two data blocks at a time.

    hi all
    i want to call two data blocks at a time on function when button pressed.
    how can I it?
    many thanks

    Many thanks that you people reply,
    I am working in oracle form developer 6i and database 10g.
    I have a form that have three data blocks,
    first block have text boxes and search button,and next two blocks display records on the basis of search criteria that is inserted in the first block and when is clicked on save button.
    the data that is to b displayed is from two different tables.
    i used Go_block('my_block')
    and call other block with the same method.
    kindly guide me how can i do it.
    Thanks in advance

  • Union two queries

    i have two queries.
    query 1: select to_char(date) as column1from table1
    query 2: select getVarchar(somevalue) as column1 from table2
    first query converts date to varchar2 and displays the column as column1
    second query returns varchar2 and displays the column as column1
    i want to union two queries
    i am getting error while i do that.
    error is 'expression must have same datatype as corresponding expression.
    Solution?

    things are working gud. my question is wrong

  • Call a backing bean method using h:selectBooleanCheckbox of jsf on select

    I want to call a backing bean method using h:selectBooleanCheckbox of jsf on select and deselect.
    I cannot use af:selectBooleancheckBox of adf and h:selectBooleanCheckbox doesnot have the property of autosubmit="true"

    User,
    please don't duplicate your posts on this forum ({thread:id=2369739})
    If you don't get an answer right away it might be that there is some information missing or nobody had time to work on the issue. Pleas be patience...
    We all have other work to do to get our bills paid.
    If you can't wait open a support request with support.oracle.com
    Timo

  • Two bapi calls in the same session using PI

    Hi,
    I have a file to RFC scenario wherein I need to call a BAPI (L_TO_CANCEL) and then again, I need to call another bapi called
    "BAPI_TRANSACTION_COMMIT" in the same session. My question is, if I use RFC adapter, do I have to call the commit bapi again?
    If yes, is there anyway I can do that ?
    I believe that will be the case only if I use a proxy. Is that correct ?
    The requirement is to call these two BAPIs and finally include a success or error message in the response.
    Thanks.

    Inside the BPM you do not have a specific exception message. You can do an exception handling based on the exception, but the excpetion itself is not a real message.
    If you want a real message, you could create an ABAP proxy, which has a message like this:
    root
      - part1
           - rfc response
       - part2
            - error text
    then you can split this inside BPM and send a the response or the error.
    Of course there are other possible solutions.

  • How to combine two queries in one EXCEL

    hi i got one requirement
    i got one excel sheet  from user which contains two  report s(hoe we know whether it is worknook or not) of  2011 data and now user wants 2012 data .now i icluded jan 2012 to dec 2012 in two reports and sent to user.But user is asking these two reports want to see in one sheet.
    so how can i proceed: if i go for work  book  how can i include these two reports in workbook and here my doubt is if i create a workbook based on  these two querie which name i have to give user.Please help me out on the same.
    Regards,
    Madhu.

    Hi Madhu
    Run one query. Click on a empty space in the excel
    From the BEx Design Toolbar -
    >Insert Analysis Grid -
    > Right click on the Design Item
    Edit the DataProvider.....You can ran same or different query with selection. 
    Save the result
    Check this link for detail....I am also searching for something with screenshot
    Regards
    Anindya
    Edited by: Anindya Bose on Feb 14, 2012 3:04 AM

  • Calling two diferent R3 systems for same RFC

    Hello Everybody,
    My scenario is:
    I have one RFC in two different systems. this is the same RFC available on two systems. I want to call this RFC from the Web dynpro application. System will be determined at runtime to call this RFC.
    If user selects System XYZ then using hte same RFC model, RFC should be executed on XYZ. If user selects System ABC then using hte same RFC model, RFC should be executed on ABC.
    Can we achieve this using single RFC model in one web dynpro application?
    If not, then can we create two RFC models containing same RFC?
    Regards,
    Bhavik

    Hi Bhavik,
                   Use these links for ur requirement.
    The logical target system name is configured in the Web Dynpro Content Administrator.
    With the configuration of the Portal page, you pass the following URL parameters with the Web Dynpro application. These parameters are then taken into account when the application is started.
    sap.wdarfc.useSys=<DEFAULT_SYSTEM>:<SUFFIX_OF_MAPPED_SYSTEM>
    If several systems are to be mapped, the parameter sap.wdarfc.useSys can be repeated any number of times within a URL entry. One parameter entry is made for each logical system.
    The URL parameters for the Portal page are maintained as described in the Administration Guide of the SAP Enterprise Portal.
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/af/84a34098022a54e10000000a1550b0/frameset.htm">Multiple systems</a>
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/82/76a2406546ba15e10000000a1550b0/content.htm">http://help.sap.com/saphelp_nw04/helpdata/en/82/76a2406546ba15e10000000a1550b0/content.htm</a>
    <a href="/people/anilkumar.vippagunta2/blog/2007/02/06/dynamic-jco-creation:///people/anilkumar.vippagunta2/blog/2007/02/06/dynamic-jco-creation
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/77/931440a1c32402e10000000a1550b0/content.htm">http://help.sap.com/saphelp_nw04/helpdata/en/77/931440a1c32402e10000000a1550b0/content.htm</a>
    regards
    Sumit

  • Calling two table controlls based on some conditions......

    I hav a requirement in which i have two table controlls, which i want to call based on some conditions. Like if condition is satisfied the first table controll shud fill up the screen and other wise the secondtable controll shud fill the screen....

    Hello,
    In the main screen where u need to vary with the 2 table controls , create a subscreen area .
    Now create two subscreens with the required table controls respectively.
    You can dynamically call the subscreens accordingly for  the conditions.
    Hope this may help you.
    Neeraj

  • Display one navigation block in two queries in WAD

    Hi All,
    I have a problem in WAD.
    I have two Queries to be displayed in WAD Q1 and Q2 based on dataproviders DP1 and DP2.
    Q1    DP1
    Q1    DP2.
    Now i have navigation blocks which i want to set common for both the queries. (When i change the selection in one query, it will automatically change in other).
    This i can do by using Affected Datproviders property and set to the navigation block as DP1 and DP2.
    But the problem is .. I want to display only one set of navigation block in the definition of Web template not define it two times.
    I guess some HTML code has to be changed for this.
    Can anybody help me in this issue.

    Hi Preet,
    You can achieve(try) that using table Interface concept, for that you need to do some R&D.
    Here i am providing you required URL for the same.
    http://help.sap.com/saphelp_nw04/helpdata/en/ff/56853bc623c075e10000000a114084/content.htm
    Hope this helps you.
    Regards,
    Rajkandula

Maybe you are looking for

  • Google calendar event times are shown as -1h

    Summary: When I create a new event in the built in WP8 calendar app to a Google calendar the time of the event is being displayed as one hour earlier. Steps to reproduce: Create a new event in calendar. Choose one of the Google calendars configured (

  • Can't get printer to connect to laptop

    I have a Toshiba laptop running Vista and a HP C5180 printer.  I've had the laptop connected to the printer wirelessly previously and it won't connect any longer.  I have a comcast xfinity wireless gateway modem that is about a year old. I don't know

  • I have problem with the Client Security. Help me please

    I've a T61 and would like to use a finger print scan for my password. When I started the Client Security Solution, I've got this message "The TPM on this system has been configured previously for an operating system other than svista. To use TPM in w

  • PERWSHRG form - How to end/terminate and assignment with end dated entered by user Apps R12.1

    Hi All. How to end/terminate and assignment with end dated entered by user Apps R12.1? when i try to end or terminate and assignemnt the sysdate is begin registered for effective_end date. any help is reaaly greatly appriciated thanks and regards Son

  • Video clip animation

    Is it possible to have a video clip slide in motion while it is transition, in order to avoid any video delay? We really need to get this done ASAP. We appreciate any suggestions.