ABAP Query - Selection fields

Hello all,
I understand that SAP automatically generates an ABAP program for every ABAP Query wherein the selection fields are connected by an "AND" statement within the WHERE clause of the actual SELECT statement.
Is there a way to control this WHERE clause in such a way that we can use "OR" operators as well to connect some selection fields?
Thanks in advance,
John

Hi, Everyone .
We can do that .
At selection-screen output (code section 13), set "1" to the field REQUIED by using MODIFY SCREEN code .
(You can get Dynpro number by F1 key or T-cd SE51 )
Masao .
Edited by: MASAO NONAKA on Oct 20, 2008 9:11 AM

Similar Messages

  • Addition of checkbox and 2 fields in ABap query selection screen

    Hi
    I need to add chack boxes and 2 fields in ABAP query which is using LDB QMI. can u pls let me know how to do that.

    Hi Tarun,
    I am still not clear with the problem..I guess you require plant in your selection screen which you have.
    i guess if you go to sq01tcode there is a option infoset query from where you can give your selection options and value.
    have you selected all the fields in infoset and made a selection screen?
    When you have done with your infoset you just need to diplay the fields and there is a automatic program generated.
    Let me know...
    Regards,
    Nihkil.

  • SQ01 -  Include a check box on ABAP query Selection screen

    Hi Experts,
    For my Abap Query, on the selection screen i am planning to include a check box such that if i click on the check box then a field will be displayed in the resulting output . On the other hand if i do not check on i should not be able the field in the output.
    Please tell me how do i do this.
    Thanks
    Venkata Pradeep.

    In infoset, Extras code tab
    Code section: At selection-screen output
    Do something like below:
      IF radiobutton1 = 'X'.    
         LOOP AT SCREEN.      
              IF screen-group1 = 'XXXX'.         "XXX is the filed group name you want to hide., you have to                                                                  find out what is it.
                   screen-input = '1'.        
                   screen-invisible = '0'.        
                   MODIFY SCREEN.      
              ENDIF.    
         ENDLOOP.  
    ELSE.   
         LOOP AT SCREEN.     
              IF screen-group1 = 'XXX'.        
                   screen-input = '0'.       
                   screen-invisible = '1'.       
                   MODIFY SCREEN.     
              ENDIF.   
         ENDLOOP. 
    ENDIF.

  • Validate plants selected in Abap Query selection screen

    Hi Everyone,
    I have a requirement wherein i have to validate 'authority check' for the plants populated in the selection screen in an already created abap query.
    I tried adding code in the code section. But i dont know how to use the select-option parameter. It already exists(VBAP-WERKS) in the table which is used for join, so i cannot add it in the additional fields. Am i correct ?
    Also, i saw that the report program for this query uses this parameter sa SP$00008. I tried using it but it gives an error The IN operator with "SP$00008" is followed neither by an internal table nor by a value list.
    Please help.
    Also, please advice whether this requirement can be catered in this query alone? or should i go with writing a new report program for this? ( i personally feel that this would beat the purpose of using Abap Query. )
    Regards,
    Tarun

    Hi Tarun,
    I am still not clear with the problem..I guess you require plant in your selection screen which you have.
    i guess if you go to sq01tcode there is a option infoset query from where you can give your selection options and value.
    have you selected all the fields in infoset and made a selection screen?
    When you have done with your infoset you just need to diplay the fields and there is a automatic program generated.
    Let me know...
    Regards,
    Nihkil.

  • ABAP Query Selection screen

    Hi,
    I have an existing ABAP Query, my req is to add new Radio buttions block after the current seelction paramertes.
    i created radiobuttons in SQ02 infoset query with radiobuttons but when i run the report, selections screen has radio buttons first and then  previous selection criteria fields displaying...
    my req is first previous selection fields then radio buttons.
    how to change the sequence of the fields in selection screen?
    and based on the radio buttons, i need to filter the output data...
    in which event i have to write the code?
    Thanks
    Giri

    Sudheer,
    it is ABAP Query report... from SQ02... i cant modify those in SE38...
    current selection parameters are from table fields selected in SQ01 Query.... and radio buttons are in SQ02 Infoset.
    Giri

  • ABAP Query - Selection Screen Values Usage

    Hi,
       I have created an ABAP Query. For one of the selection-screen fields (CAUFV-FTRMI)
    which is select-options, I want to use the values during coding (in the where clause of a select query)
    in Extras section under the event "record processing". Please suggest how to make the the selection-screen values
    available during record processing event. Thanks in advance.
    Regards,
    Tejas Savla

    Hi Kartik,
                  I need to fetch data from some table KEKO depending on the values entered on the selection-screen for the field CAUFV-FTRMI. So, I need to find a way by which the selection-screen input values are available in the record processing event. The values are available in some variable SP$00002 of the automatically generated report program. But, this variable cannot be used in the Coding section of the ABAP QUERY. Please advise.
    Thanks & Regards,
    Tejas Savla

  • ABAP Query Selection screen parameters

    I need to add an additional selection screen parameter  in existing ABAP Query. How to modify the selection screen fields in existing ABAP query ? Kindly help me.

    Hi,
    GO to info set transaction SQ02
    Give the infoset
    Press change
    Press the selections button..Shift F7
    In the right hand side you will get a table control to enter the selection screen parameters..
    Press create button on top of the table control to create new parameters
    Thanks,
    Naren

  • ABAP Query Selection Screen Comment

    Hi,
      I want to display some text (just text) on Selection Screen of an abap query. If this was a regular abap program I could have simply used "SELECTION-SCREEN COMMENT... " and that would have been enough. But since I dont seem to have access to Initialize event I cant use this option.
    1.  Is there some way I can write code which will be executed in the initialize event of the abap query
    2. Is there some other way for us to just display comment (without any selection field) on the selection screen of abap query.

    Hi Saquib,
    Is the navigation correct ? I dont see any onfoset anywhere on se38 editor. Can you eloborate please.
    Thanks and Regards,
    Ben.
    Message was edited by: Daniel Ben

  • ABAP QUERY: Selection text name change : seq. of column sequence in output

    hi friends,
    1)I need to change the text of the selection field in ABAP QUERY REPORT
    please help me. t code: SQ03 : User Group(zabc) and report name (zabc).
    Environment -> infosets.
    in the field group, double click field name to be changed. I tried to change it. The changed name is only reflecting in the list output, but not in the selection screen.
    I want the text to be changed even in selection screen.
    2)I want to change the position of the column ie end(last colum) to 8th column in the report output. Please help me.
    Environment -> Queries -. I tried with 'Output sequence' and given no as '8'. But is not reflected and the column is still displayed at last column.
    Please help me

    Go to Query and go to selection field and change the selection text.
    Hope this help.

  • SQ01 ABAP Query - input field contains leading zeros

    Hi,
    I have a ABAP query where some of the values are stored with leading zeros in the table. This means that the user have to enter the leading zeros as well in the selection screen in SQ01 in order to get any output.
    What I would like to do is to restrict the input in the selection screen to allow only the digits without any leading zeros. For example, the user should not enter 000000000602590, but 602590. Also, the output should be without the leading zeros.
    Does anyone know how to do this in the InfoSet?
    Thanks in advance
    Br,
    Lars

    Hi Lars,
    The leading zeroes are appearing because your field is either a Numeric or Packed decimal.
    The leading zeroes can be suppressed if you  assign the packed to a Character field.
    You have option to change the datatype of the field in Infoset.
    Try converting it to equivalent character type.
    Let me know your findings.
    Thanks
    Ajay

  • ABAP Query: add field on layout based on Company code

    Hello Experts,
    I currently working on ABAP Query report  for asset master issues and would like one more field added to layout for Company code XXXX . Is it possible to add fields to this layout based on company code .
    Thanks in Advance
    Nupur

    Hello Andreas,
    I'm asking is that possible to change ABAP Query report layout based on Company code.
    For Instance:
    Company code :1111
    Layout should : A B C D E F
    other than 1111.
    layout should : A X Y Z F
    My scenario is :
    ABAP Query is working fine but users from UK wants some more fields on the layout but rest of the country users other than UK, they don't want such changes.
    Regards,
    nupur

  • QUERY - selection fields.

    Hi,
    I create QUREY for QM notification, with info set - logical database QNQ.
    In the selection fields i ask for WORK CENTER and CODINIG, but i have no browser for those fields.
    thank you
    Aviva.

    Hi Aviva ,
                   No browser means are you not getting a screen with WORK CENTER and CODINIG as selection fields if this is the case .
    Then In Query when you move to the Basic Data it will ask for which are selection fields in that tick the checkbox and then it will ask for which fields you want on screen please tick this will move the fields on the screen and will be displayed .
    Please reward if useful.

  • ABAP Query : Obligatory fields on selection screen!

    Hi Experts,
    I would like to know the differrent ways through which we can define mandatory fields on selection screen.Options availabel in Infosets (SQ02) as well as Query(SQ01).
    Selection Screen:
    Document Date in Document:  (Mandatory      Select-Option)
    Plant :  (Mandatory      Select-Option)
    Thanks,
    Yogesh

    Hi, Everyone .
    We can do that .
    At selection-screen output (code section 13), set "1" to the field REQUIED by using MODIFY SCREEN code .
    (You can get Dynpro number by F1 key or T-cd SE51 )
    Masao .
    Edited by: MASAO NONAKA on Oct 20, 2008 9:11 AM

  • Checkbox in the ABAP query selection screen

    Hi experts,
    The reqiurement is to add checkbox(parameter name: EX_ZE_ST) to the selection screen of the query and if its checked then the records with the quantity = 0, should not be displayed in the output.
    I added a check box and now my issue is, how to suppress displaying the record having quantity = 0.
    that quantity field is a custom added field and in sq02 i selected that quantity( Z_HANDQTY) field and gone into the code for the same and wrote below code...
    the total generated table view for this query is : marav
    if EX_ZE_ST = 'X' and Z_HANDQTY = 0.
    break-point.
    clear: marav, Z_MATDESC, Z_MATGRPDESC, Z_TAXIND,
            Z_TAXTYPE, MARD, MARD-LGPBE, Z_PREVMATNR,
            Z_CSTTOTAL, Z_CSTUNIT, Z_VSTOCK.
            FREE MEMORY ID 'AQLISTDATA'.
    endif.
    But still i could see a blank line in the output if that record has quantity( Z_HANDQTY) = 0.
    Thanks in advance...
    Karthik

    hi,
    Try this wa y...
    if EX_ZE_ST = 'X' and Z_HANDQTY = 0.
    break-point.
    clear: marav, Z_MATDESC, Z_MATGRPDESC, Z_TAXIND,
    Z_TAXTYPE, MARD, MARD-LGPBE, Z_PREVMATNR,
    Z_CSTTOTAL, Z_CSTUNIT, Z_VSTOCK.
    FREE MEMORY ID 'AQLISTDATA'.
    Continue.
    endif.

  • ABAP Query - Local field creation error

    Hi,
    In SQ01, I created a query. when i try to create local field EDIT>LOCAL FIELD>CREATE. Its throwing error 'Reference field does not exist' Message no. AQ273.Can anyone please tell me how to create local field then?
    useful answers will be rewarded.
    Thanks
    Shameem.

    Hi,
    When creating a local field in a query, you need to define the type of data it will hold. There is a radio button to select a "reference field" or you can specify the type of data directly. I believe you got this error message because you selected reference field but specified no other field in the query to use as reference.
    RaulV

Maybe you are looking for

  • Error when starting ADF Mobile Browser Sample Application

    I had successfully deployed the Sample App downloaded from the Oracle ADF Mobile Browser Website in JDeveloper 11.1.2.2. This sample app is deployed successfully in IntegratedWebLogicServer as EAR. But when I trying to access the app in browser, it o

  • Adobe Acrobat 8 unable to load plug-in in Window Vista

    I have developed a plug in for Adobe Acrobat, but Abode Acrobat unable to load the plug in. I try to troubleshoot the problem by putting a messagebox in the PIHandshake function. Noticed that, the function is not being called by Adobe Acrobat when Ac

  • Final Cut Studio Fresh Install

    Wats the best way to do a fresh instal of Final Cut Pro Studio? What files do I need to delete, etc...

  • How do I get the back cover off?

    Hey guys I just bough a new GE70 2PE Apache Pro (Ge70 2PE-010US to be precise) and I want to add an SSD to it. How do I get the back cover off so I can open it up?

  • PERFORM_TOO_MANY_PARAMETER

    I get this short dump, when doing Initial Stock Initilization for 2LIS_40_S278. I couldnt use 2LIS_03_BX because, i would be missing some fields related to AFS. Any Input on how to ..Stock Initilization for AFS Inventory. I have earlier done for MM b