Variant in APD.

Hi all,
When we will create variants in APD. Please give me the scenario.
if a query is having variables then do we need to create variant.
Thanks and Regards,
Asim

When we create Variant,
what's mentioned by lazarus is right that we create Variant in RSRT,
RSRT --> put the Query Name in the Query Box --> Click on Query Variant --> There we can create Variant.
Now your question is in which scenario we reaquire to create varaint.
As I mentioned in my previous, I given example of (Stock Query --> Routine --> Direct Update DSO --> Standard DSO --> InfoCube ). Some times Business new field which is present in Stock Query  ant not present in the flow after APD (Direct Update DSO --> Standard DSO --> InfoCube). So we include that field in the Flow of  (Direct Update DSO --> Standard DSO --> InfoCube). And Business demand for Historical Data from Last Year's each Month end data e.g 31.12.2011. In such case we require to create Query Variant , Then load historical Data.
Once Historical Data loaded rhen revert back to original position i.e. 0Calday of (current day - 1) i.e. Previous Day. 
Regards,
Sushant

Similar Messages

  • Query Variant in APD not working properly

    Hi
    Guyz,
    I have an issue using a Query Variant in APD.
    My APD has data populating from a Query to a DSO.
    When I run the query itself by using the variant it runs fine
    but when i use the same query variant in the APD its giving an error.
             I am saving the  varaint  for current Fiscal year period
    i.e say 0072008 (as july 2008) and when i run query itself with this variant its fine but when i use the same in APD its giving the following error.
         *" Value "08007" for variable "Fiscal Year/Period (Selection Options, Optional)" is invalid "*     
    Its interpreting the variant in a wrong way.
    We are on BI 7.0 patch 14.
    Your help is Appreciated.
    Thanks
    Jay.

    Shashi,
    I think thats not my issue because I can use that variant but its interpreting the Fiscal year period in a wrong way.
    Thanks
    Jay.

  • Variant issue in APD

    Hi All,
    I have created a APD process.
    Source : Query
    Trans : Hide columns and Routine
    Target : Application server.
    In my query level I have varaible on Company code.For this variable I have created a separate
    variants for each compnay codes.In APD In the data source(Query) properties I have given
    one variant.when I am executing the APD process I am getting error dynamic variable are not allowed.
    Regards
    Ram.

    Hi Ram,
    if your really have specified a query variant in APD, there should be no error message.
    I remember some problems when you have defined you query filter condition in the "defaults" area (right hand side of the query designer). Put the variable to the left into the "static" filter area.
    Another remark on performance in APD: In your case, the query partitioning might work well. You would not need query variants then, but define the company code to be the partitioning characteristic. Set package size = 1 in order to start the query for each company code.
    You can specify query variants in RSCRM_BAPI, too. Or, you can also set a filter right there, e.g. for testing with a filter which will lead to a small result. Of course, this does not help for period batch processing.
    Cheers
    Thomas

  • APD error in number of records

    Hi Friends,
       When i execute a query using Bex for a particular variant i get the result with 5 records but when i execute the same query with the same variant using APD, it generates only one record in the file.
       Can someone help me in identifying where the problem is?
    Thanks,
    Raja

    Hi,
              Why not try to check your data on each step of your APD? Try check this link:
    http://help.sap.com/saphelp_nw70/helpdata/en/6d/40a2bb63ac744a80eb288830e01f7c/frameset.htm
    Regards,
    Raymond

  • Automation of APD

    Hi Friends,
    I have a scenario where i need run the query for last 7 days every day through APD. I have 0CALDAY in query and can create variant for selection and provide the name of the variant in APD. If i have to run the APD for fixed date range it would not have been a problem. I need to extract data by query for last 7 day every time i run the APD. So, lets say I run APD today it will get data for last 7 days. When i run the APD tomorrow, it will get data for last 7 days starting from yesterday and so on.
    I would appreciate if some could let me know how to implement this scenario through APD and if the variant in APD could be changed dynamically.
    Thanks,
    Amit

    Ok Fine
    Create a Customer Exit
    Paste the Code below
    FORM ZSURD3
                            TABLES I_T_VAR_RANGE STRUCTURE RRRANGEEXIT
                                  E_T_RANGE
                            USING I_STEP TYPE I.
      DATA: LOC_VAR_RANGE LIKE RRRANGEEXIT.
      IF I_STEP = 2.
        READ TABLE I_T_VAR_RANGE INTO LOC_VAR_RANGE WITH KEY VNAM =
        'ZSURD2'.
        L_S_RANGE-SIGN = 'I'.
        L_S_RANGE-OPT = 'EQ'.
        L_S_RANGE-LOW = SY-DATUM - 7 .
        L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW.
        APPEND L_S_RANGE TO E_T_RANGE.
      ENDIF.
    ENDFORM.
    This Works .
    Have a nice Day
    Santosh nagaraj

  • Running APD for multiple variants of a query

    Hi all,
    I am trying to create an APD with a query as the data source and an ODS as the data target. My requirement is such that i need to run the APD for various values of the characteristic combinations present in the selection screen of the query. I observe that we can only specify a single variant while defining the Data source of type query under RSANWB.
    Is there any way i can use multiple variants with the same query in a single APD , so that the APD runs for different variants of the same query at different run times ?
    Any help would be appreciated !
    Regards
    Snehith

    Hi Snehith,
    As per my knowledge, multiple variants with the same query in a single APD is not possible.
    However you can create different APDs for different combinations of characteristics value and then can use all these APDs in a single process chain to automate the load.
    For Example, Say you have query Q001 whose data you want to load in DSO DSO_001 and then to Cube C_001 for the characteristics combination. Now without filter in your query, you have Controlling Area = IN000,CN000 and Company code IN01,IN02, IN03, CN01,CN02,CN03. Now you want the data for (Controlling Area = IN000,Company code IN01,IN02)and (Controlling Area = CN000,Company code CN01,CN03).
    Create the two APDs with filter conditions between Q001 and DSO_001 as above. Now design the process chain as below:-
    Start varian>First APD>Data load in cube C_001 from DSO_001>Second AP> Data load in cube C_001 from DSO_001.
    Please note that when we execute the APD, old data in data target is deleted.
    Hope it helps.
    Regards,
    Prakash

  • How to transport Query variant used in APD

    Hello Experts,
    I have created 2 query variants for a query in Development system. And, these variants are being used in APD. Now, when APD is transported to next system, query variants does not exist in next system, so cannot execute APD.
    Please let me know how can i transport the query variants.
    Note: Gone through SDN, and found, query variants can be transported through some tables.
    Please let me any other possibile sloutions for the same.
    Thanks
    Lavanya

    Hi Lavanya,
    To the best of my  knowledge, you cannot transport query variants. You have to manually create them in each system. The reason being, when you try to create variants through RSRT -> Query Variants, you are basically trying to create variants for a temporary program generated during run time!
    These run time programs do not have TADIR entries (not transportable) and hence any sub elements (like variants) created on these programs are not transportable as well.
    Actually you can export variants.Please follow the below steps:
    1. Go To TCode SE38.
    2. Execute "RSTRANSP".
    3. Input your program name.
    4. Input your variant name ie. "Z**** ".
    5. Execute.
    6. Click on continue.
    7. You should be able to create a new transport at this point.
    Hope It Helps,
    Thanks,
    Amit Kr.

  • APD variants

    Hi,
        I have created an APD for loading a particular query's data into a Transactional ODS. The APD allows me to choose only one query variant at a time. Is it possible to execute the query for multiple variants using the APD, instead of manually changig the variant settings of the APD every time.Please let me know as this is urgent...
    Thanks
    Akhila.

    Hi Akhila,
    unfortunately, this is not provided by the SAP standard functionality.
    It would take a new program to replace query variants and run your analysis process.
    If you have only a few query variants, you could copy your analysis process and place your variants into the copies. I do not know whether this workaround is appropriate.
    Cheers, Thomas

  • APD : Variant Creation

    Dear All,
        I am using APD. I am pushing data from a Query to ODS.
    Query----Filter----ODS . this is my structure.
    The query has 0calday input at selection screen. But in APD how can I incorporate this. If I go to Query properties in APD I get an option "Variant" but how do I create a variant for my query in APD? And this query has to be scheduled at the end of every month. So I require a variant that changes every month....
    Regards,
    Ratish
    [email protected]

    APD does not suuport selection screen variables and hence variants ...
    You need to handle this in Routine ...
    e.g. you can write a routine to get  a database table for which you want to execute it !!!  you need to maintain this DB table with appropriate values every month ...
    Priya

  • Change a query variant using a program for APD

    Hello everyone,
    Some background:
    We have a complex reporting based on calculated key figures (CKF). However, the business rules do change over time, and the formulas for CKF get outdated. So the business meaning of CKF remains the same, but the way it gets calculated - changes.
    Yesterday CKF "A" = B + C
    Today CKF "A" = B + D - F
    Since the customer requires reporting for the former periods, maintaining several CKF of the same business meaning but calculated differently for each period becomes a problem.
    Instead of having several versions of CKF "A", we decided to use APD, to periodically run the query with valid CKF, save the query results to transactional ods, then move it to another infocube. Now we will have the infocube with figures and dates, and the customer needs to maintain just one CKF "A".
    After trying this out we've encountered following issue:
    Since the query will run periodically we must use a time period filter (in fact - variable on a time characteristic - APD is not working with filter) to select CKF valid for this month for example.
    The query in APD can work with variables only via query variants.
    Now, the question is how to change the query variant automatically?
    We can not force the customer to create new query variants each month for dozens of reports.
    We plan to integrate APD in the process chain (although we haven't check how it works), where the query variant will be changed using a program.
    so please advice:
    1) is there any function module to change query variants in the background
    2) which tables contain the query variant, so we can change it using abap
    3) may be you can suggest other options to make it work
    thank you
    Message was edited by:
            Northern

    Hi,
    here it is.
    write this code in SE38.
    REPORT  ZDATE_CAL..
    DATA: itab_tvarvc like tvarvc,
          l_date like sy-datum,
          l_monthyear_low type /BI0/OICALMONTH,
          l_monthyear_high type /BI0/OICALMONTH,
          l_day(2) type c,
          l_month(2) type c,
          l_year(4) type c,
          l_mandt(3) TYPE c VALUE '010',
          l_type(1) type c VALUE 'S',
          l_numb(4) type N value '0000'.
          l_day = sy-datum+6(2).
          l_month = sy-datum+4(2).
          l_year = sy-datum+0(4).
          concatenate l_day l_month l_year into l_date.
          concatenate '01' l_year into l_monthyear_low.
          concatenate l_month l_year into l_monthyear_high.
    variable for current month interval
    itab_tvarvc-mandt = l_mandt.
    itab_tvarvc-name  = 'ZDATE_INV'.
    itab_tvarvc-type  = l_type.
    itab_tvarvc-numb  = l_numb.
    itab_tvarvc-sign  = 'I'.
    itab_tvarvc-opti  = 'BT'.
    itab_tvarvc-low   = l_monthyear_low.
    itab_tvarvc-high  = l_monthyear_high.
    update TVARVC from itab_tvarvc.
    This code will always maintain the entry for the variable 'ZDATE_INV' as range from the start of month till current month.
    you can modify it store anything yuou want.
    Now when creating the variant by clicking the create variant option when running the query.
    you have the option in the "selection variable" column here you will find only TVARVC table as option select it and then in "name of variable" use the Z variable you have just created.
    This will automatically pick the current value for the variant for that variable.
    So anytime the variant is used in any of the scheduling it will pick the inout from here.
    make sure that the variable for time interval is of same type as that of the entry in the TVARVC table.
    That if it is of type calmonth then TVARVC table should have variable entry of type calmonth.
    thanks

  • APD VARIANT ISSUE

    Hello Experts,
    I am running an APD based on a query. In the selection screen of my query i have a field calendar day which is filled using customer exit showing sydatum-1.
    I have a requirement whereby i need to run the apd using variant. but the date needs to show yesterday date each time the apd is run.
    My question is how can we save a variant being filled by customer exit .
    Kevin

    If the variable is being fed using a customer exit then in the variant also that particular value will be saved and when you'll run your APD using that variant it will show the same date. One option might be to remove the varialbe from the selection screen since it's automaticaly calculating the value and even if the user wants to restrict it later on he can do so in the query itself.
    Thanks,
    Arminder

  • TCode to create APD variant

    I need to create an APD related varinat, can you let me know which Tcode takes you to the screen that takes input for program name and the program variant.....

    Hi,
    Use Process Chain for Creating an Variant
    Use the Process type ABAP program & the report RSAN_PROCESS_EXECUTE in process chain to automate APD.
    And also Check this Link
    Launching an APD analysis process from an ABAP program
    Thanks
    Hari

  • Loading complex report data into a direct update DSO using APD

    Dear All,
    Recently, I had a requirement to download the report data into a direct update DSO using an APD. I was able to perform this easily when the report was simple i.e it has few rows and columns. But I faced problems If the report is a complex one. Summing up, I would like to know how to handle the scenarios in each of the following cases:
    1.   How should I decide the key fields and data fields of the direct update DSO ? Is it that the elements in ROWS will go to the
          key fields of DSO and the remaining to the data fields? Correct me.
    2.   What if the report contains the Restricted KFs and Calculated KFs? Do I have to create separate infoobjects in the BI
          system and then include these in the DSO data fields to accommodate the extracted data ?
    3.   How do I handle the Free Characteristics and Filters ?
    4.  Moreover, I observed that if the report contains selection screen variables, then I need to create variants in the report and
         use that variant in the APD. So, if I have 10 sets of users executing the same report with different selection conditions, then
         shall I need to create 10 different variants and pass those into 10 different APDs, all created for the same report ?
    I would appreciate if someone can answer my questions clearly.
    Regards,
    D. Srinivas Rao

    Hi ,
    PFB the answers.
    1. How should I decide the key fields and data fields of the direct update DSO ? Is it that the elements in ROWS will go to the
    key fields of DSO and the remaining to the data fields? Correct me.
    --- Yes , you can use the elements in the ROWS in the Key fields,  but in case you get two records with same value in the ROWS element the data load will fail. So you basically need to have one value that would be different for each record.
    2. What if the report contains the Restricted KFs and Calculated KFs? Do I have to create separate infoobjects in the BI
    system and then include these in the DSO data fields to accommodate the extracted data ?
    Yes you would need to create new Infoobjects for the CKF's and RKF's in the Report and include them in your DSO.
    3. How do I handle the Free Characteristics and Filters ?
    The default filters work in the same way as when you yourself execute the reoprt. But you cannot use the Free characterisitics in the APD. only the ROWS and cloumns element which are in default layout can be used.
    4. Moreover, I observed that if the report contains selection screen variables, then I need to create variants in the report and
    use that variant in the APD. So, if I have 10 sets of users executing the same report with different selection conditions, then
    shall I need to create 10 different variants and pass those into 10 different APDs, all created for the same report ?
    --- Yes you would need to create 10 different APD's. Its very simple to create, you can copy an APD. but it would be for sure a maintance issue. you would have to maintain 10 APD's.
    Please revert in case of any further queries.

  • One of the APD Process Chains fails.

    Hi All,
    I have created two different process chain (PC1 and PC2 for example)which use program RSAN_PROCESS_EXECUTE  to execute the two diiferent APD (APD1 and APD2 for example) . PC1/PC2 executes APD1/APD2 respectively.Both the process chain have the same trigger event.
    The issues is that only one of the process runs successfully and the other fails at the program RSAN_PROCESS_EXECUTE
    For example if the PC1 runs PC2 fails at the program RSAN_PROCESS_EXECUTE and vice versa.
    The Error message it displays  is
    1) Job started     S     00     516
    2) Step 001 started (program RSPROCESS, variant &0000000155350, user ID ALEREMOTE)      S     00     550
    3) Spool request (number 0000030567) created without immediate output       S     SY     355
    4) Processing completed with errors. See spool list     E     RSAN_PR     22
    5) Job cancelled after system exception ERROR_MESSAGE     A     00     564
    Thanks
    Rajiv

    hi,
    To check the detailed error message for failure of APD, check in RSANWB, goto that APD and click on monitor.
    You will find the spool over there.
    Check the error message and let us know, so that we can try to help you out.
    It can be due to authorization issue or due to low memory.
    Regards
    Lavanya

  • How to schedule job for APDs?

    Hi All,
    Does anyone have an idea how to schedule a job for APDs? There is a program called "RSAN_PROCESS_EXECUTE" and it can be scheduled, but it needs to be run with the specific APD. I will appreciate any help with points,
    Thanks

    I don't know what you mean when you say " ....needs to be run with the specific APD", but you can use the program to execute your APD in process chain by creating a variant, if you want to manually schedule, you can do so as well, rsanbw-> display the APD and schedule Icon on the top menu bar, that will give you scheduling options.
    thanks.
    Wond

Maybe you are looking for

  • Play count not updating - Shuffle 1st gen

    My 1st generation iPod shuffle is not updating the play count or last played fields properly. I have tested it with a few tracks manually dragged into the iPod, and it seems to work if I do this. However the play counts do not update if I use Autofil

  • How to get nodes and its attributes of an XML file usiong DOM parsing?

    how to get nodes and its attributes of an XML file usiong DOM parsing? i am new to XML parsing....... Thanking you........

  • Reports 7

    Has Reports 7 been release? If so, what platforms /databases can it run on. thanks

  • In chat everytime I recieve a message I get an error message saying Quick Time crashed.

    I play on a websit called FUBAR.com. I have a private chat box and anytime I receive a message, I get an error message bar at the top of my screen that reads "The Quick Time Plug-In has Crashed" and to the right are 2 options to RELOAD the page or SU

  • Tomcat freezes...

    Hi Gurus, I`ve got a really simple question but a can`t solve on my own. On Windows, when an applicacion throws an Exception, for the first time, Tomcat freezes, until I hit the keyboard or I do something on the DOS console that appears when Tomcat s