Reg:ABAP Query

Hi,
     my requirement is to create a screen layout like VA05 and add the extra radiobutton for that
and print the values corresponding to that radiobutton .. how we can write the code in SQ02
i am not that much familiar in ABAP Query can any help me
Manoja

Hi..
Report Program is better..using function module GUI_DOWNLOAD.
EX:
SELECT * FROM SPFLI into table t_spfli.
<b>CALL FUNCTION 'GUI_DOWNLOAD'</b> 
  EXPORTING
  BIN_FILESIZE                  =
    FILENAME                       = 'C:\RAM\TST.TXT'
    FILETYPE                        = 'ASC'
    FIELD_SEPERATOR        = 'X'
  TABLES
     TABLE                            = T_SPFLI.
<b>Report writer:</b>
Why List & Label as Report Writer?
With the reporting tool List & Label you enhance your applications with reports, lists, diagrams, forms, labels, mail merges and web reporting with only a few lines of code. It takes only one step to add classic printing options, intelligent preview and comprehensive export functions. Moreover, you add real value to your application by integrating the List & Label Designer: provide your end users with the opportunity to create custom print projects.

Similar Messages

  • Reg:Radio button in ABAP Query

    Hi ABAPers ,
    I created radiobuttons in SQ02 there i have to write the coding for it ... what type of coding we have to write
    ALV coding wll work out or what type of coding we have to write can you guys plz suggest me
    Help me out from this problem i am not familiar with ABAP Query
    Regards,
    Y Ravichandra.

    Hi Ravichandra,
       You have to use at selection-screen output event for this purpose here is a sample code try it and you will get the logic.
    PARAMETERS :
       p_flight RADIOBUTTON GROUP r1 ,
       p_book RADIOBUTTON GROUP r1 .
    PARAMETERS :
      w_temp1 RADIOBUTTON GROUP r2 MODIF ID sc1 ,
      w_temp2 RADIOBUTTON GROUP r2 MODIF ID sc1 .
    SELECT-OPTIONS s_carrid FOR sflight-carrid MODIF ID sc1 .
                                           " Airline Code
    PARAMETERS :
    w_temp01 RADIOBUTTON GROUP r3 MODIF ID sc2 ,
    w_temp02 RADIOBUTTON GROUP r3 MODIF ID sc2 .
    SELECT-OPTIONS s_bookid FOR sbook-bookid MODIF ID sc2 .
                                           " Airline Code
    *                       AT SELECTION-SCREEN OUTPUT                    *
    AT SELECTION-SCREEN OUTPUT .
      IF p_flight = 'X'  .
        fl_flag = 1 .
        LOOP AT SCREEN.
          IF screen-group1 = 'SC2'.
            screen-active = 0 .
            MODIFY SCREEN .
          ENDIF.                           " IF SCREEN-GROUP1 = 'SC2'
        ENDLOOP.                           " LOOP AT SCREEN
      ELSEIF p_book = 'X' .
        fl_flag = 2 .
        LOOP AT SCREEN.
          IF screen-group1 = 'SC1'.
            screen-active = 0 .
            MODIFY SCREEN .
          ENDIF.                           " IF SCREEN-GROUP1 = 'SC1'
        ENDLOOP.                           " LOOP AT SCREEN
      ENDIF .                                " IF P_FLIGHT = 'X' .
    Here in this case, There are 2 radio buttons and 2 select options. On clicking the first radio button one of the select option is hidden. If you you just have a single radio button then you can avoid using at selection-screen output and just write your code start-of-selection.
    Much Regards,
    Amuktha

  • How to create an ABAP Query with OR logical expression in the select-where

    Hi,
    In trying to create an ABAP query with parameters. So it will select data where fields are equal to the parameters entered. The default logical expression is SELECT.. WHERE... AND.. However I want to have an OR logical expression instead of AND.. how can I attain this??
    Please help me on this.. Points will be rewarded.
    Thanks a lot.
    Regards,
    Question Man

    Hi Bhupal, Shanthi, and Saipriya,
    Thanks for your replies. But that didn't answer my question.
    Bhupal,
    You cannot just replace AND with OR in an ABAP QUERY. ABAP QUERY is a self generated SAP code. You'll just declare the tables, input parameters and output fields to be displayed and it will create a SAP standard code. If you'll try to change the code and replace the AND with OR in the SAP standard code, the system will require you to enter access key/object key for that particular query.
    Shanthi,
    Yes, that is exactly what need to have. I need to retireve DATA whenever one of the conditions was satisfied.
    Saipriya,
    Like what I have said, this is a standard SAP code so we can't do your suggestion.
    I have already tried to insert a code in the ABAP query (there's a part there wherein you can have extra code) but that didn't work. Can anybody help me on this.
    Thanks a lot.
    Points will be rewarded.
    Regards,
    Question Man

  • Logical database of ABAP query

    Hi,
    Can anybody please let me know what is the Logical database for ETXDCI, ETXDCH & ETXDCJ (Tax tables) with any sales document tables? I need to develop one ABAP query for the users.
    I am a Functional person so I would like to know Can anybody please let me know how I can find out the Logical database?
    Your time and help will be really appreciate.
    Thanks & Regards,
    Niki Shah.

    Try the BRF logical database.
    I found it by searching in which programs the tables were used.
    It show program SAPDBBRF which is the program for logical database BRF.
    Kind regards,
    Arthur Parisius

  • Pnp- logical db in abap query

    hi.
    i need to create an ABAP/sap query. when i created the InfoSet i used logical db-pnp.
    if i want to get only the employees which entered my organization during the last month where should i add the ABAP code,  under which section => extras -> code. i have there several options - data, initialization, at selection-screen output etc, what to choose??????????
    thanks,
    Ami

    Hi
    Welcome to SDN forum
    query has got some limitatins compared to Reports which we write using SE38
    these queries are user specific and client specific and can't be transportable and you can't write your own code as you wish like reports
    see the doc
    http://help.sap.com/saphelp_46c/helpdata/en/35/26b413afab52b9e10000009b38f974/content.htm
    http://www.thespot4sap.com/Articles/SAP_ABAP_Queries_Introduction.asp
    Step-by-step guide for creating ABAP query
    http://www.sappoint.com/abap/ab4query.pdf
    ABAP query is mostly used by functional consultants.
    SAP Query
    Purpose
    The SAP Query application is used to create lists not already contained in the SAP standard system. It has been designed for users with little or no knowledge of the SAP programming language ABAP. SAP Query offers users a broad range of ways to define reporting programs and create different types of reports such as basic lists, statistics, and ranked lists.
    Features
    SAP Query's range of functions corresponds to the classical reporting functions available in the system. Requirements in this area such as list, statistic, or ranked list creation can be met using queries.
    All the data required by users for their lists can be selected from any SAP table created by the customer.
    To define a report, you first have to enter individual texts, such as titles, and select the fields and options which determine the report layout. Then you can edit list display in WYSIWYG mode whenever you want using drag and drop and the other toolbox functions available.
    ABAP Query, as far as I Believe, is the use of select statements in the ABAP Programming. This needs a knowledge of Open SQL commands like Select,UPdtae, Modify etc. This has to be done only by someone who has a little bit of ABAP experience.
    To sum up, SAP queries are readymade programs given by SAP, which the user can use making slight modification like the slection texts, the tables from which the data is to be retrieved and the format in which the data is to be displayed.ABAP queries become imperative when there is no such SAP query existing and also when there is a lot of customizing involved to use a SAP Query directly
    use either SQ02 ans SQ01
    or SQVI tr code
    for more information please go thru this url:
    http://www.thespot4sap.com/Articles/SAP_ABAP_Queries_Create_The_Query.asp
    http://goldenink.com/abap/sap_query.html
    Please check this PDF document (starting page 352) perhaps it will help u.
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVQUE/BCSRVQUE.pdf
    check the below link will be helpful for u
    Tutorial on SQVI
    once you create query system generates a report starting with AQZZ/SAPQUERY/ABAGENCY2======= assing this report to tr code for the same
    Regards
    Anji

  • Wrong sequence in selection screen generated by ABAP Query

    Hi,
    I am developing a query to display the data in the view.
    My query has 8 selection fields totally.
    As part of my requirement I have added selection parameter in the
    selections tab of the infoset and maintained the sequence as 9.
    Inspite of maintaining the sequence number as 9 in the infoset, It is
    appearing first in the selection screen of the query.
    I tried putting different numbers in the sequence number, but even it
    is appearing first in the selection screen.
    Can you please let me know how to display the selections declared in
    the infoset as per the sequence required.
    Thanks,
    Madhuri.

    Actually what happen when you declare your own fields in ABAP query . you have to care about the sequence . As an example if you’re selecting lets say state name , you have two variables
    <b>1-state
    2- land</b>
    for state you have to select land first , if your state is first and land is 2nd it gave you the error of sequence .
    Because you have to get data in land first in order to get state specific to the land .
    it should be
    1-Land
    2-State
    Just see the your fields , I’m sure you’re missing that .
    <b>You can also see the NO ( field ) in Query ( Sq03 ) . where you can define the seqence on selection.</b>
    hope this’ll help you .
    Pl...Award the points .
    Thanks
    Saquib<b></b>
    Message was edited by: Saquib Khan

  • Performance tuning for ABAP Query (created from t-cd SQ01)

    Hello all,
    We created ABAP Query report from transaction SQ01.
    But the generated report has an appropriate SQL statement which causes performance problem.
    To solve this issue, I guess the easiest way is;
    0. Give up to use it.
    1. Copy it to another object in the customer namespace.
    2. Ajust SQL statement.
    But I'm wondering if there're appropriate ways to adjust SQL statement of Query.
    Could anybody give me any better idea?
    Thank you
    Yuko

    You can try this: Create 2 ranges, for objnr and cdtcode and fill like:
    ra_objnr-sign = 'I'.
    ra_objnr-option = 'CP'.
    ra_objnr-low = 'OR*'.
    append ra_objnr.
    ra_code-sign = 'I'.
    ra_code-option = 'CP'.
    ra_code-low = 'CO*'.
    append ra_code.
    SELECT objnr udate utime
    FROM jcds
    INTO TABLE it_jcds
    WHERE objnr IN ra_objnr
    AND stat = l_tj02t
    AND cdtcode IN ra_code
    AND inact = space
    Regards,
    John.

  • How to hide some fields in ABAP Query

    Hi,
    My ABAP Query has a long list of extracted fields. I wanted to set some of these output to "HIDE".
    This allow User the flexibility to decide what fields to show.
    How can I set the field to "HIDE" in my query?
    Thanks
    bye

    Hi Tim,
    You can do this by setting the Report layout variant in following steps:
    1. First define the parameter on selection screent for report variant.
    2. Data decelaration for variant.
    3. Value request to get already present variants on report:
    4. If doesn't choose the layout take out the default report layout.
    5. Initialize the report variant.
    6. Apply the variant to the REUSE_ALV_GRID_DISPLAY funtion module.
             Here to generate report variant first to open report output and then as per according to user set the layout of report using the layout icon of ALV with summation on value fields (as required) and create layout name.
    *Data Deceleration as below:
    Data :g_save(1) TYPE c,
    **      g_default(1) TYPE c,
    g_exit(1) TYPE c,
    gx_variant TYPE disvariant,
    g_variant TYPE disvariant.
    *First Define the parameter to give layout of Report variant.
    SELECTION-SCREEN BEGIN OF BLOCK 3 WITH FRAME TITLE text-003.
    PARAMETERS: p_vari TYPE disvariant-variant.
    SELECTION-SCREEN END OF BLOCK 3.
    * Process on value request
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
    PERFORM f4_for_variant.
    * Selection-Screen Checking
    AT SELECTION-SCREEN.
    PERFORM pai_of_selection_screen.
    INITIALIZATION.
    w_repid = sy-repid.
    PERFORM variant_init.
    * Get default variant
    gx_variant = g_variant.
    CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
    EXPORTING
    i_save     = g_save
    CHANGING
    cs_variant = gx_variant
    EXCEPTIONS
    not_found  = 2.
    IF sy-subrc = 0.
    p_vari = gx_variant-variant.
    ENDIF.
    FORM f4_for_variant .
    CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
    EXPORTING
    is_variant = g_variant
    i_save     = g_save
    IMPORTING
    e_exit     = g_exit
    es_variant = gx_variant
    EXCEPTIONS
    not_found  = 2.
    IF sy-subrc = 2.
    MESSAGE ID sy-msgid TYPE 'S'      NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    **  ELSE.
    **    IF g_exit = space.
    **    ENDIF.
    ENDIF.
    ENDFORM.                    " f4_for_variant
    FORM pai_of_selection_screen .
    IF NOT p_vari IS INITIAL.
    MOVE g_variant TO gx_variant.
    MOVE p_vari TO gx_variant-variant.
    CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
    EXPORTING
    i_save     = g_save
    CHANGING
    cs_variant = gx_variant.
    g_variant = gx_variant.
    ELSE.
    PERFORM variant_init.
    ENDIF.
    ENDFORM.                    " pai_of_selection_screen
    FORM variant_init .
    CLEAR g_variant.
    g_variant-report = w_repid.
    ENDFORM.                    " variant_init
    **While Showing report pass the variant :::
    g_save = 'A'.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = w_repid
    i_structure_name   = 'IT_MAIN'
    is_layout          = i_layout
    is_print           = i_print
    it_fieldcat        = i_fieldcat[]
    it_events          = i_events[]
    i_save             = g_save
    is_variant         = g_variant
    TABLES
    t_outtab           = it_main
    EXCEPTIONS
    program_error      = 1
    OTHERS             = 2.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    Many Thanks / Himanshu Gupta

  • A few Questions on ABAP Query

    Hi Guru's
    I would like to ask some questions on ABAP query.
    1. Can you transport abab queries? Should it only be Global or you can also transport Standard Areas?
    2. Once transported, am i able to change query?
    Thanks,
    Jograd

    hi....
    you can transport a quary but for that the quary should be an object itself or attached to some object
    and
    if once transported to production....you cannot change it there and for changing you have to get it in developement sysytem and then make any change.
    regards

  • How to set default value in select option for ABAP query

    Hi experts,
    What is the way to set up default values for select-options in ABAP query.
    e.g.
    I have one field 'Year' in my ABAP query selection screen.
    I want value of current year to be appeared here whenever user execute report
    Thanks in Advance
    -Harkamal

    Hi Harkamal,
    execute your Query via SQ01. On Selection-Screen
    goto save Variant. Mark your field
    as selection variable an press Button election variable.
    Take variable from TVARV and use it.
    Than save the Variant.
    Look at TVARV if the 'Year' is updated to the actualYear!
    regards, Dieter

  • Short Dump While selecting Variant for ABAP query

    Hi,
    ABAP query is going to short dump (CONNE_IMPORT_WRONG_COMP_LENG) while selecting a Variant. If i create and use variant then i am able to see Output of Variant.But not able to use Earlier created variants .
    I think some mismatch between variant values and selection screen fields.Can anyone tell me how to rectify this ?
    I am not able to debug the code as dump is coming in a System program(RSDBSPVD).Can anyone tell me which database table i can use to get values of the Variant.
    Thanks in Advance.
    Nirmala K

    Hi nirmala,
    chk the links:
    http://help.sap.com/saphelp_webas620/helpdata/en/c0/980398e58611d194cc00a0c94260a5/content.htm
    http://help.sap.com/saphelp_webas620/helpdata/en/c0/9803a7e58611d194cc00a0c94260a5/content.htm
    regards,
    keerthi.

  • Getting error while assigning ABAP Query to Tr.Code

    Hi Guys,
    There is a problem iam facing with ABAP query while transporting which need to solved asap. It will very greatfull if u guys can resolve this problem.
    My problem is, I created one ABAP Query with Name ASSETOVERVIEW. I had transported this even, now when iam going to assign it to one transaction code with se93 lets say ZAOR. I need to give its description and program name in se93 right. now my question is what is program name i need to give in se93. Bcoz in SQ01 where i created the query, there is no name as 'program name' rather there is 'Name' in that we will create the query name i.e, ASSETOVERVIEW. In se93 u give tr.code and when u see down there will be radiobuttons in 'start object',in that i had checked program and selection screen (report transaction) is this right button i had checked or any other i need to check?. I had assigned this name i.e,ASSETOVERVIEW and development class and then when i check the name for syntax check its giving "'ASSETOVERVIEW' does not exist". I don't understand what program name i need to give.
    If u guys can help me out with this problem it will be very much appreciable and definetly can get the reward points.
    Thanks for as usual help in advance.
    Regards.

    Hi omer,
    1. Just run the query.
    2. one selection screen will come
    3. then using SYSTEM---->STATUS, (from menu)
       look for the program name
    4. the program name will be something wired foramt.
    /asdfasdf/asdfdas etc.
    5. Give that name in se93.
    regards,
    amit m.

  • Abap Query - Creation of Report

    Hi guys,
    I do have a question to ABAP Query:
    I want to create a report that shows me all current active employees and all of their corresponding positions from Infotype 1.
    I have got it to the part where the report gives me all employees (active and withdrawn).
    The question is:
    How can I show only active employees as of todays date?
    Thanks,
    Sascha

    Thanks for your reply,
    but if I enter date 31.12.9999 and status of active. it gives me for some the latest record and for some two - though I could not find out why?!
    I should say, I am using logical database PNP for this query
    null

  • Creation of local field in ABAP Query

    Hi
    Please let me know how to create a local field in ABAP query. I am finding the option inactive in SQ01.
    Regards
    Priyadarshini

    hi priya,
         *__Adding u201CLocal Fieldu201D (user defined field) in SAP Query_ :
    There is also facility to add the user defined fields in SAP query output. Also we can provide calculation formula for calculating values for this user defined field.
    Calculation formula consists of standard fields from standard SAP tables. So the values fetched for particular standard SAP fields from standard SAP tables get calculated as per the calculation formula defined for the user defined field and displays the value accordingly.
    To do this first go to change mode for Query which automatically takes you to screen shown below and click on icon   , as below :
    Then further screen will appears. So select the Field group and again click on the same icon button   .
    Then switch on the Short names for the fields and give the short names to fields which we need to use in Calculation formula.
    Give the short names and then created u201CLocal Fieldu201D, as shown in below screen shot. Also Short names are given to fields, which can be used further for calculation.
    Defining Local Field u201CREM_QTYu201D along with its field type and Calculation formula.
      In this case we have 
      defined field type for new  
      field as similar to
      ORD_QTY and
      Calculation formula is  
      defined.
    Also its possible to have Conditional logic for Local field by putting Condition in u201CConditionu201D line.
    Now activate this newly added Local field for coming it in output screen. To do the same again go to u201CBasic Listu201D and activate the Local Field as shown below :
    i think this will help u
    regards,
    sindhu.

  • Creation of ABAP query

    Dear All,
    This may be a technical question.  I am trying to create the ABAP query by using 2 tables.  Went to SQ02, entered the  description of Infoset and given the first table name in the "Table join in the basis table" row.  When i entered to type the second table name, the program is getting terminated. (If I want to create a query by using one table, then the system accepts)
    If possible, can anybody explain me what could be the proble,?
    Regards
    Manivannan R

    You can post u r req in Expert Forums  » Application Server  » SAP GUI forum
    7.10 is now released, you can get it at
    ftp://ftp.sap.com/pub/sapgui/win/710/compilation1/
    and on
    ftp://ftp.sap.com/pub/sapgui/win/710/patches
    there are the newest patches available.
    http://iris.tennessee.edu/sapgui_vista.htm
    Message was edited by:
            SHESAGIRI.G

Maybe you are looking for

  • ICal calendar color won't change

    I've tried changing the color for my Work calendar in iCal multiple times.  I've done it on my iPad, iMac and finally at the iCloud website.  Each time I try to change it, it defaults to purple.  Any ideas about this?  Thanks in advance.

  • Airport Extreme - Ps4 , Sonos system , apple tv and other apple products

    I need some help, i'm thinking of changing routers i currently have a belkin n750 db , and its not compatible with my sonos system , but i also like to game. I was wondering if the airport extreme would be able to handle all of my gear . ( iMac , 2 i

  • Motion Crashing Constantly

    Here's when it crashes: Start Motion Start With A Template 3D Text Projects - Directions.HD Open Template Let it play a little then drag the play head forwards & backwards CRASH!! The application Motion quit unexpectedly. The problem may have been ca

  • I keep getting java runtime error messages

    I have updated and installed my java/java runtime.  Since then, I keep getting these error messages telling me I need 'to install the java runtime environment".  I have already done that.  It keeps directing me to the java page to download the update

  • How to see Dispatcher,  gateway and Message server port numbers?

    Hi All, Can any body tell me how to know the port numbers of dispatcher, gateway & message server in a particular sap application server. Thanks & Regards Srinivas K