Generate BEx Variant with ABAP

I would like to create lot of BEx Variant automaticlly on a Workbook. But now, I just found the Variant stored in table VARID(ID) , VARIT (Text) , VARI ( ? ) and TRDIR .
But the data which stored in these tables are not I want.
How could I do this ?
Thank you.

Liang,
What is the version of BW/BI (3.x or 2004s) you are using?
In BW 3.x these are stores in VARI & VARID
In BI 2004s these are in RSRVARIANT & RSRVARIANTDIR
You can look athe function modules RS_VARIANT_CREATE, RS_VARIANT_DELETE and RS_VARIANT_EXISTS.
But if you are using 2004s , forget it these functions are not useful anymore.because when you create variants in 2004s they gets stored in RSRVARIANT & RSRVARIANTDIR, but the function modules are looking at VARI & VARID tables.
Hope this helps.
Alex (Arthur Samson)

Similar Messages

  • Generating an event with ABAP Progrm

    Kudos SDN:
    Is there any way to generate an 'Event' using ABAP Progam.?
    Thanks in advance,
    Pidugu

    >
    Mark Barton wrote:
    > yes - create a program which calls function module BP_EVENT_RAISE.
    That function module is obsolete.Shouldnot be used in future.

  • BEx Query via ABAP Programm (without Querydesigner) ???

    hello friends,
    is there anybody who knows a solution to gernerate a BEx Query without using the BEx Querydesigner, with ABAP coding, only!? I´m looking for a solution, whre f.e. the customer selected character, keyfigures and selections in an external applikation (maybe ms excel) and from there an ABAP programm takes the information and generate a BEx Query?
    I´m not sure if these considerations could be come reality, but maybe there is a solution, or some ideas and input from your side!?
    thx...

    hi anass,
    thx for your reply. Yes i know this feature, but this isn´t a solution for my tasks. Becaus I need a "regular" query at the end of the process, which i can implement in an WAD template. and on top I need the queries for BW IP planning applications, so the tool must generate planning queries with input ready cells.
    I think these facts and many many side effects like variables, hierachies, structuredefinions and so on, will destroy my "dreams" of such a 'query-generating-tool'. probably a very easy query will be a problem for automatic generation, because there are many sap tables where the queryinformation will be stored, with id references, and so on...
    br david

  • Short dump creating variant with RS_CREATE_VARIANT

    I'm getting the attached short dump while creating a variant with ABAP. The problem only occurs when the variants for both RPTIME00 and HDKCALC0 are created in the same program. I've tried adding a COMMIT between them to avoid any buffering problems, but to no avail. I've also tried searching SAP Notes for any hints.
    So any input would be appreciated..
    Regards,
    Jan
    Short text                                                                        
        The length of COMMON PART "INFTY_TIME_EVAL" in program "RPTIME00" is incorrect.
    Error analysis                                                                 
        The structure of the COMMON PART "INFTY_TIME_EVAL" in program "RPTIME00" is
        different from the corresponding area in the calling program               
        "HDKCALC0".                                                                               
    Length of the COMMON PART in program RPTIME00: 11784 bytes.                
        Length of the COMMON PART in program HDKCALC0: 10752 bytes.                                                                               
    There is probably an error in the program                                  
        "SAPLSLDB".                                                                
    Edited by: Jan Petersen on Sep 18, 2009 1:17 PM
    Edited by: Rob Burbank on Sep 18, 2009 9:16 AM

    Hi,
    Try to use the below way.
        REPORT  ZTEST_PROGRAM.
      DATA:
           G_REPORT      LIKE  RSVAR-REPORT VALUE SY-REPID,
           G_VARIANT     LIKE  RSVAR-VARIANT VALUE 'TEST_VAR1',
           G_VARI_DESC   LIKE  VARID.
      DATA:
           IT_RSPARAMS   TYPE STANDARD TABLE OF  RSPARAMS,
           WA_RSPARAMS   LIKE LINE OF IT_RSPARAMS,
           IT_VARI_TEXT  TYPE STANDARD TABLE OF VARIT,
           WA_VARI_TEXT  LIKE LINE OF IT_VARI_TEXT.
      PARAMETERS :P_NAME   TYPE CHAR15.
      AT SELECTION-SCREEN.
        IF SY-UCOMM = 'ONLI'."Variant is created when you press EXECUTE button on selection-screen.
          WA_VARI_TEXT-LANGU     =  'EN'.
          WA_VARI_TEXT-REPORT    =  G_REPORT.
          WA_VARI_TEXT-VARIANT   =  G_VARIANT.
          WA_VARI_TEXT-VTEXT     =  'Test variant'.
          APPEND WA_VARI_TEXT TO IT_VARI_TEXT.
          CLEAR WA_VARI_TEXT.
          G_VARI_DESC-REPORT     = G_REPORT.
          G_VARI_DESC-VARIANT    =  G_VARIANT.
          G_VARI_DESC-ENVIRONMNT = 'A'.
          G_VARI_DESC-AEDAT      = SY-DATUM.
          G_VARI_DESC-AETIME     = SY-UZEIT.
          WA_RSPARAMS-SELNAME    = 'P_NAME'.
          WA_RSPARAMS-KIND       = 'P'.
          WA_RSPARAMS-LOW        = P_NAME.
          APPEND WA_RSPARAMS TO IT_RSPARAMS.
          CLEAR WA_RSPARAMS.
          CALL FUNCTION 'RS_CREATE_VARIANT'
            EXPORTING
              CURR_REPORT   = G_REPORT
              CURR_VARIANT  = G_VARIANT
              VARI_DESC     = G_VARI_DESC
            TABLES
              VARI_CONTENTS = IT_RSPARAMS
              VARI_TEXT     = IT_VARI_TEXT.
        ENDIF.
      START-OF-SELECTION.
        WRITE 'Variant created'.
    Thanks
    Venkat.O

  • BEx query with variant from ABAP

    Hello,
    I'm looking for possibility to start BEx query with variant (variant is created with tx RSRT) from ABAP. There are some funktion modules, which start queries (launch excel), for example RSAH_LAUNCH_EXCEL or RSSEM_QUERY_LAUNCH, but they are ending with short dump, when there are variables in the query. Is there any standard FM, which starts the query with variant or accepts parameters?
    regards,
    Krzysztof

    Hi,
    the short dump was my fault, I've passed query name instead of genuniid to the RSAH_LAUNCH_EXCEL.
    What I'm trying to do is to I'll start BEx query with parameters (I don't want to get selection-screen from the query, I need to fill it from ABAP).
    Here is my example, which is not working.
    DATA:
      lv_query(30) TYPE c,
      lv_genuniid  TYPE rsrrepdir-genuniid,
      ls_var       TYPE rrx_var,
      lt_var       TYPE TABLE OF rrx_var.
    lv_query = 'YB_MAKLER_DETAIL'.
    CALL FUNCTION 'CONVERSION_EXIT_GENID_INPUT'
      EXPORTING
        input  = lv_query
      IMPORTING
        output = lv_genuniid.
    IF lv_genuniid = ''.
      WRITE: / 'There is no Query', lv_query.
    ELSE.
      ls_var-vnam = 'YS_MKLE'.
      ls_var-sign = 'I'.
      ls_var-opt  = 'EQ'.
      ls_var-low  = '0000005100'.
      APPEND ls_var TO lt_var.
      ls_var-vnam = 'YS_VTGJ'.
      ls_var-sign = 'I'.
      ls_var-opt  = 'EQ'.
      ls_var-low  = '1999'.
      APPEND ls_var TO lt_var.
      CALL FUNCTION 'RSAH_LAUNCH_EXCEL'
        EXPORTING
          i_genuniid                       = lv_genuniid
          I_OBJVERS                        = 'A'
          i_hide_sapgui                    = 'X'
        TABLES
          I_T_VAR                          = lt_var.
    ENDIF.
    If parameter 'i_hide_sapgui' is empty, I'm getting empty selection-screen,
    If parameter 'i_hide_sapgui' equals 'X' I'm getting selection-screen filled with values, which were used last time manualy, not with values from the internal table 'lt_var'.
    Do you have any idea how to pass parameters to the query with this function module?
    Regards,
    Krzysztof

  • Transportation of process chains with ABAP variants

    Hi,
    Could you please help me in finding out how to transport process chains with ABAP variants.
    I can transport them, however when transporting them, I overwrite the already existing variants, which is very unfortunate...
    Could you please advice.
    Thank you in advance!
    /Brian

    Hi Ramesh,
    Option 1:
    You can directly create the process chain in Production. Most of the times ppl do have access to create a process chain in Prod. Kindly check whether you have the authorization to do so.
    Option 2:-
    I did not suggest to delete the old info-packages in QA and Prod. Let them continue to exist but you may not use them once the process chain is in place. You create the process chain, test it and move it up to Prod. I dont' think the new infopackages will hamper your delta load. The delta is not dependent on the infopackage.
    If I were you, I would try the second option and if it does not work during testing then go for the first option.
    Bye
    Dinesh.

  • Query with variant from ABAP

    Hello!
    I need to execute a BW-query from an Abap-report.
    I tried it already with function module 'RRW3_GET_QUERY_VIEW_DATA' and with classes / objects 'CL_RSR_REQUEST' resp. 'CL_RSR_DATA', but:
    I want to use the query with a variant, which could be found in table RSRPARAMETRIZA.
    (Btw: even with a variant in table RSRVARIANTDIR  I don't get the results wanted...)
    Is there a direct way to call a BW-query with a variant from Abap?
    Alternatively: How do I get the variant-contents? Is there a 'universal' way to work with both kinds of variants? (RSRVARIANTDIR / RSRPARAMETRIZA) 
    Thanks in advance.

    Thanks for the link.
    Well, I already read that document and I followed the links to the former blogs on this subject.
    But this solution doesn't work for me: CL_RSR_QUERY_VARIABLES is unknown.
    I read the pdf and the function-module-code, but I still don't have an idea how to work with query- variants . The example-coding includes a line
    DATA: wf_variant TYPE variant .
    but that's not used, or is it?
    (I don't have a set of variables and conditions, but just a variant-name. The variant will be created by other people, who would start my report.)
    Greetings

  • Refresh BEx-Query with variant

    Dear all,
    i have a question about refreshing Queries with variants.
    To refresh a BEx-Query (BW3.5) in a Workbook with VBA is no problem.
    For example:
    Run "SAPBEX.XLA!SAPBEXrefresh", False, myRange
    But is there a possibilty to refresh a BEx-Query with a variant (also with VBA)?
    My target is to create a VBA-Tool:
    1 which user can select a single Query and the available variant.
    2 Then push a VBA-Button
    3 After the selection no Variable-Screen will pop-up
       and the refreshing is completed.
    Thanks all

    Hi Ashok,
    refreshing Queries automatically on Workbook open is standard...
    What i need is to refresh a Query with variant (saved variable-values for a query e.g. the name of the variant is "ZMYVARIABLES").
    The user should not select an existing variant (ZMYVARIABLES)
    manually with Shift+F5 (Get Variant) on the Query-Variable POPUP-Screen.
    What i need is a codefragment which implement that all.
    Pseudo code:
    Sub RefreshQuery(QueryID As String, Variantname As String)
    End Sub
    Thanks,
    Erol

  • Bex Query in ABAP report

    Can i call a BEx query in ABAP report and display in ALV grid. if so please give me the syntax.
    Thanks
    Akila.R

    Look at the FM "RSDRI_INFOPROV_READ".
    With this you can read data into a internal table of your program.
    With this FM, you can do a selective read and select only the key figures and characteristics that you wish to read in your ABAP.
    I am not ure, if you can call a BEx report in your ABAP. But with what I mentioned here, you can acheive what you want.
    Ravi Thothadri

  • How to use web service with ABAP Web Dynpro

    Hi.
         do you know, how to web service with ABAP Web Dynpro?

    Hi,
    If you have a webservice ready with you then you can generate a proxy from SE80 and you can use that. You just have to create a port and assign to that generated proxy(CLASS) and you are good to go.
    Let me know if you need more information.
    Thank You,
    Gajendra.

  • It's possible to sign a PDF file with ABAP????

    Hi all.
    I'm trying to sign PDF file with SAPCRYPTOLIB. I'm 4.7 sap version.
    It's possible to do this?????....
    My question is because I've done all steps to sign a pdf, without errors, and the pdf generated is not signed.
    Can anybody to say me if it's possible to sign a pdf file with ABAP???
    thanks a lot.
    ISmael

    Here: [SAP Interactive Forms by Adobe|SAP Interactive Forms by Adobe;
    Also, please read the forum rules of engagement, it explains to use the forums.

  • SAP job SAP_COLLECTOR_FOR_PERFMONITOR getting failed  with abap dump LOAD_PROGRAM_NOT_FOUND

    Dear Experts,
    Background job SAP_COLLECTOR_FOR_PERFMONITOR getting failed  with abap dump LOAD_PROGRAM_NOT_FOUND.
    As it is hourly scheduled job and it gets finished 22 times in a day but other 2 times fails with abap dump.
    Finished Job log
    Job started
    Step 001 started (program RSCOLL00, variant , user ID Bharath)
    Clean_Plan:Cleanup of DB13 Plannings
    Clean_Plan:started by RSDBPREV                       on server
    Clean_Plan:Cleaning up jobs of system DEV
    Clean_Plan:finished
    Job finished
    Failed Job Log
    Job started
    Step 001 started (program RSCOLL00, variant , user ID Bharath)
    Internal session terminated with a runtime error (see ST22).
    Kindly suggest on this..
    Thanks,
    Bharath.

    Dear Divyanshu,
    Our system in ERP 6.0 EHP5 with SP level 10. The ABAP Dump shows below error.
    |Short text                                                                                        |
    |    Program "RSORA811" not found.                                                                 |
    |What happened?                                                                                    |
    |    There are several possibilities:                                                              |
    |                                                                                                  |
    |    Error in the ABAP Application Program                                                         |
    |                                                                                                  |
    |    The current ABAP program "RSCOLL00" had to be terminated because it has                       |
    |    come across a statement that unfortunately cannot be executed.                                |
    |    or                                                                                            |
    |    Error in the SAP kernel.                                                                      |
    |                                                                                                  |
    |    The current ABAP "RSCOLL00" program had to be terminated because the                          |
    |    ABAP processor detected an internal system error.                                             |
    |What can you do?                                                                                  |
    |    Note down which actions and inputs caused the error.                                          |
    |                                                                                                  |
    |                                                                                                  |
    |    To process the problem further, contact you SAP system                                        |
    |    administrator.                                                                                |
    |                                                                                                  |
    |    Using Transaction ST22 for ABAP Dump Analysis, you can look                                   |
    |    at and manage termination messages, and you can also                                          |
    |    keep them for a long time.                                                                    |
    |Error analysis                                                                                    |
    |    On account of a branch in the program                                                         |
    |    (CALL FUNCTION/DIALOG, external PERFORM, SUBMIT)                                              |
    |    or a transaction call, another ABAP/4 program                                                 |
    |    is to be loaded, namely "RSORA811".                                                           |
    |                                                                                                  |
    |    However, program "RSORA811" does not exist in the library.                                    |
    |                                                                                                  |
    |    Possible reasons:                                                                             |
    |    a) Wrong program name specified in an external PERFORM or                                     |
    |       SUBMIT or, when defining a new transaction, a new                                          |
    |       dialog module or a new function module.                                                    |
    |    b) Transport error                                                                            |
    |Information on where terminated                                                                   |
    |    Termination occurred in the ABAP program "RSCOLL00" - in                                      |
    |     "LOOP_AT_SYSTEMS_AND_REPORTS".                                                               |
    |    The main program was "RSCOLL00 ".                                                             |
    |                                                                                                  |
    |    In the source code you have the termination point in line 535                                 |
    |    of the (Include) program "RSCOLL00".                                                          |
    |    The program "RSCOLL00" was started as a background job.                                       |
    |    Job Name....... "SAP_COLLECTOR_FOR_PERFMONITOR"                                               |
    |    Job Initiator.. " bharath"                                                                       |
    |    Job Number..... 18243400
    Kindly check and suggest..
    Thanks,
    Bharath.

  • Why not "Web Dynpro *with* ABAP"?

    As a newbie I found "Web Dynpro for ABAP" to be confusing.  Any ideas why its worded that way?  Just curious.

    Hi,
    because it's a programming <u>model</u> created <u>for</u> abap programming.
    If you look at the true content of webdynpro you come out at:
    declarative programming of all the navigation, ui, datadisplay and gathering, without
    writing the code, but letting the code to be generated.
    so it's a concept build for abap,
    not with abap (although the classes and interfaces are)
    grtz,
    Koen

  • Generated schema based on ABAP

    Hello,
    is there any tool for generating schema or picture based on ABAP like UML diagram, DFD, etc.?
    I have the business requirement to create a report in non-sap system with the same logic like already done custom report in abap
    Best regards
    Radek

    Please refer Auto generating UML diagrams from ABAP code
    I tried to use this technique on a program written using Procedural ABAP but did not find any success. One issue i faced was that I was on SAPGUI 730 and one of the gui components required was available only in SAPGUI 720.
    Hope you have better luck.

  • Interactive Form with ABAP DDIC Interface

    Hi,
    I'm new on adobe interactive forms and  I have some problems. I have a form with a abap dictionary based interface.
    When I test my web dynpro application with the interactive form, it is not interactive. :-P
    And yes the property "enabled" of the UI-Element is marked.
    First I watched an e-Learning an build a web dynpro application with a from which has a interface based on xml.
    I generated the inteface of the form from my context. It works fine.
    But with a interface based on xml I dont't know how I can get a table on my PDF in the Adobe Lifecycle Designer.
    So I searched snd n the forum and found a tutorial (InteractiveForm_and_Dynamic_Tables). Like in this tutorial I created a interface based on ABAP Dictionary and a form with a table. Then I choose this form on my UI-Element as templateSource and generate the context from the interface. But as i mentioned above, now the PDF isn't interactive.
    Any idea?
    Thx Florian
    PS: when someone can tell/help me in german it would be much easier for me to understand...

    You can create Interactive form with ABAP dictionay based interface.  You need to add following code in method "WDDOMODIFYVIEW" of your view.
       DATA: LR_INTERACTIVE_FORM  TYPE REF TO CL_WD_INTERACTIVE_FORM,
          LR_METHOD_HANDLER    TYPE REF TO IF_WD_IACTIVE_FORM_METHOD_HNDL.
      CHECK FIRST_TIME = ABAP_TRUE.
      LR_INTERACTIVE_FORM ?= VIEW->GET_ELEMENT( 'TEST' ).
      LR_METHOD_HANDLER ?= LR_INTERACTIVE_FORM->_METHOD_HANDLER.
      LR_METHOD_HANDLER->SET_LEGACY_EDITING_ENABLED( ABAP_TRUE ).
    Refer:: http://help.sap.com/saphelp_nw70/helpdata/en/42/c247dc6227311ce10000000a1553f7/content.htm

Maybe you are looking for

  • Question about windows printer canon bj5200 can't print or see in Leopard

    Hello; this has been a problem for me in Tiger as well, I have a windows workgroup network and have a canon bj5200 share on a windows xp machine, I've done some research and can't seem to find the solution on how print from Leopard (previous Tiger) t

  • Upload / download gui-status/dynpro when function group

    Hi All, I'm coding a program where I can download and upload reports and module pools but I tried to do the same with function groups and I found It is different to upload dynpro and gui staus when the objet to generate is a function group. Could any

  • .Mac gallery in iweb site with custom domain name

    This is my first post on the boards and I want to say that switching from pc to mac has been one of the greatest moves of my life. Anyways Im a photographer and have my own domain name. Ive created a site in iweb with .mac photo galleries on it. To u

  • Force DV output to 0-255 ?

    Hi, After bashing my head against the wall for two hours, I finally figured out why DV footage is getting mangled when passing through After Effects. It seems that the DV output module (and the IYUV output module, for that matter) are hard-wired to o

  • Guage Charts are not displaying  in OBIEE 11.1.1.5

    Hi Gurus, I am trying to build a report using guage charts in linux 64bit using OBIEE 11.1.1.5 but its not displaying any guages. what will be the causes for not displaying guages. but other chart views are working fine. Regards Kris