Basic ABAP queries

Hi all,
Can any one please provide me with answers for these quoestions :
How many selection screen can we have and how to control them?
If line count is not given will the End-of-Page event be triggered?
What are the different methods to set break point in program ? What is the  maximum no of breakpoints can I have in a program?
I created a 2ndry index to ztable. how do I make sure that the query uses it ?
Regards,
Varun

Check these details -
SELECTION-SCREEN TAB (len) tabname USER-COMMAND ucomm.         
Creates a tab page with the name tabname and length len, and   
assigns the user command ucomm to it. You can only use this    
variant between BEGIN OF TABBED BLOCK ...  and END OF BLOCK    
... DEFAULT PROGRAM prog SCREEN scr.                                                                               
Use this addition to specify the subscreen that appears by     
default when the tabstrip control is displayed. If you specify 
SCREEN but not PROGRAM, the system uses the current program as 
the default program. If you do not specify a screen, a runtime 
error occurs.                                                                               
You can fill the tab title with text and icons in the          
INITIALIZATION or AT SELECTION-SCREEN OUTPUT event. The        
assignment of tabs to screens is not static, but can be        
changed at runtime. There is a structure with the fields prog, 
dynnr, and activetab assigned to each tab block. You can       
change the assignment between blocks and the screen and set an 
active tab by assigning values to these fields.                                                                               
SELECTION-SCREEN BEGIN OF TABBED BLOCK tabb1 FOR 14 LINES.     
    SELECTION-SCREEN TAB (15) tabs1 USER-COMMAND ucomm1          
                         DEFAULT SCREEN 12.                      
    SELECTION-SCREEN TAB (15) tabs2 USER-COMMAND ucomm2          
                         DEFAULT SCREEN 2000.                    
  SELECTION-SCREEN END OF BLOCK tabb1.                                                                               
INITIALIZATION.                                                
    tabs1 = TEXT-001.                                            
    tabs2 = TEXT-002.                                                                               
AT SELECTION-SCREEN                                            
       CASE SSCRFIELDS-UCOMM.                                    
         WHEN 'UCOMM1'.                                          
           tabb1-program = 'SAPLSVAR'.                           
           tabb1-dynnr   = 100.                                  
           tabb1-activetab = 'TABS2'.                            
       ENDCASE.                                                  
You can create your own screen and mention.

Similar Messages

  • How to find out which abap queries were executed by a user

    Dear SAP Gurus,
    Is there a way to find out which abap queries were executed by an end user in the recent past??
    1.I tried using the t-code "stat" BUT:
    dont seem to be getting any results even though I put the start time almost 2 months back.
    2.Also when using STAT, I give the report name of the query in the program field but it seems to truncate it.
    Any ideas how can I find out which abap queries were executed by the end user.
    thanks a lot, I'll make sure to award points for your help.

    STAT will give you the information for a limited period of time and is limited to the server which you are logged onto yourself. Beyond 24 hours it is of even less use even if you change the selection screen values.
    If you want it for a period way back into the past, then you need to use ST03N.
    There are at least 2 dependencies and 1 confusion:
    1 dependency) The length of period is determined by the size (length) of the file. You can change this in ST03N (default 50MB) via the menu settings.
    2 dependency) The stat collector jobs need to be scheduled to write the information to ST03N (once per hour is a legal requirement in some non-banana republic countries).
    1 confusion) There is an obscure function which converts a report submit to a transaction name (there is not much difference anyway) and an even more obsure one which filters what ST03N will record and therefore whether you can read it. You can (un)filter these things away if you search the SAP Marketplace for the term "MONI".
    What is of particular value from this control is that you can even detect a submission of an abap which only existed temporarily.
    Also note that having this information is potentially very powerfull with respect to the users (some of them are human too), so you should expose and use it responsibly.
    You should also ensure that only responsible users / auditors have access to S_TOOLS_EX.

  • Executing Abap Queries in Abap Code and processing the result

    Hi,
    I want to execute ABAP Queries (designed by sq01) in an abap report and processing the result in an internal table.
    How could it be work?
    Thanks a lot for your responses,
    with kind Regards
    Reinhold Strobl

    Hello,
    GO to SQ01 and select your query. Go to Menu QUERY-->More Functions->Display Report Name.
    You can then take that report name and go to SE38. Copy the code before END-OF_SELECTION and then modify as per your own requirements.
    Regrads
    Saket Sharma

  • ABAP Queries  not available after upgarde from 4.6C to  ECC 6.0

    Hi All,
    We have upgraded from 4.6C to ECC 6.0 version. There is some problem with the ABAP queries. The ABAP queries created in 4.6C were assigned to a Ztcode and now after the upgrade when we execute the Ztcode we are getting the error
    that the program does not exist.
    I tried to regenerate the code ( a new program name is generated) but there are differences in the selection screen (like the output format etc) between the two versions.
    I looked into the relevant SAP notes also but could not find any solution.
    Could any of you suggest any ideas to generate abap queries after upgrade?

    hi,
    Re: SAP version differences 4.5b, 4.6c and ECC6.0
    http://help.sap.com/saphelp_47x200/helpdata/en/fc/e3003deddfae4de10000000a114084/frameset.htm
    http://help.sap.com/saphelp_scm50/helpdata/en/28/b34c40cc538437e10000000a155106/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/43/68805bb88f297ee10000000a422035/frameset.htm
    Hope this helps.
    venkat.

  • ABAP Queries

    We have just upgraded from 4.6 to 6.0. I have noticed lot of differences in the code behind the ABAP queries that is generated once the queries are created. In some instances they are form bunch of include programs like the ones below but in some other queries its the regular code of a query program like it used to be in 4.6 . I also noticed that the extra coding I did in the END_OF_SELECTION event of the Infoset is not getting picked when I execute the query. Have any of you encountered these things?
    *report AQICZSD_CORP====Z_DIR_SALE_NEW.*
    *include /1BCDWB/IQ000000000725DAT.*
    *data %dtab type standard table of /1BCDWB/IQ000000000725 with header line.*
    *data %subrc type sy-subrc.*
    *include /1BCDWB/IQ000000000725SSCR.*
    *include /1BCDWB/IQ000000000725SSCRAT.*
    *start-of-selection.*
      *if %runmode-extr_on <> space.*
        *call function '/1BCDWB/IQ000000000725EXTR'*
             *tables     %selopt = %seloptions*
                        *%dtab   = %dtab*
             *changing   %rtmode = %runmode*
             *exceptions no_data = 1*
                        *others  = 2.*
        *%subrc = sy-subrc.*
        *call function 'RSAQRT_CHECK_EXTR'*
             *exporting extr_subrc = %subrc*
             *tables    dtab   = %dtab*
             *changing  rtmode = %runmode.*
      *endif.*
    *end-of-selection.*
      *if %runmode-show_on <> space.*
        *call function '/1BCDWB/IQ000000000725SHOW'*
             *tables   %dtab   = %dtab*
             *changing %rtmode = %runmode.*
      *endif.*
       special code for old API and BW extractor calls**
    *form %set_data changing p_lines type i.*
      *import ldata to %dtab from memory id 'AQLISTDATA'.*
      *describe table %dtab lines p_lines.*
      *free memory id 'AQLISTDATA'.*
    *endform.*
    *form %get_data tables p_dtab  structure %dtab*
                   *using  p_first type i*
                          *p_last  type i.*
      *append lines of %dtab from p_first to p_last to p_dtab.*
    *endform.*
    *form %get_ref_to_table using p_lid   type aql_lid*
                                 *p_ref   type ref to data*
                                 *p_subrc type i.*
      *if p_lid = %iqid-lid.*
        *create data p_ref like %dtab[].*
        *p_subrc = 0.*
      *else.*
        *p_subrc = 4.*
      *endif.*
    *endform.*

    Hi Jak,
    I guess all ur questions are answered except 2.
    Ans2. Well a correction is a change done to a original SAP object, while a repair is done to a duplicate SAP objects. (I hope its not vice vers, I am bit confused wid that : ) )
    Lets take an example. All the object on a customer system are duplicate object since they are all copy of Original SAP object. So if u make a modification to an existing SAP object at a customer system it comes under the category of Repair i.e all customer modifications of SAP standard objects are repairs.
    While if SAP makes changes to its original object it comes under Corrections. i.e all support packages / Notes comes wid correction requests.
    Now what if a customer has its own object changed .. .then it wil come under the cateogry of correction and not repair.
    Now the trick is which system Dev , Test , Prod ...
    well ofcourse Development .. since your test and production system contains a copy of the objects in Development system.  : )
    hope this help .... but please verify the answer I may not be 100 percent correct.
    regards,
    Sumeet Mishra

  • Creating ABAP queries with t-code SQ01 in SRM

    Hi.
    What tables are available for me to use ABAP queries with t-code in SRM as we currently use this for MM.
    Please can someone tell me if a list of usefull tables for Carts, Approvals, PO are available in SRM as I cannot find these in SE11. We have no BW and need ABAP query for fullfilings any business requirements.
    Thankyou.
    Vijay.

    Please search the documents in transaction BBP_PD. When you click the details it will give you the table details as well.
    Additionally check this thread for details
    good source for tables and reports
    Regards
    Kathirvel

  • Doubt in Basic ABAP.

    Hi Gurus,
    I have a small doubt in basic ABAP.
    What is the exact difference between the below statements.
    Types: Begin of ty_data,
                 matnr type mara-matnr,
              end of ty_data.
    Types: Begin of ty_data,
                 matnr type matnr,
              end of ty_data.
    Types: Begin of ty_data,
                 matnr like mara-matnr,
              end of ty_data.
    Types: Begin of ty_data,
                 matnr like matnr,
              end of ty_data.
    data: matnr type mara-matnr.
    data: matnr type matnr
    data: matnr like mara-matnr
    data: matnr like matnr.
    In those above statement which are correct. And the difference between those statements.
    Thanks,
    Srihari.

    hi,
    LIKE means the datatype of the variable is similar to the referenced variable.
    TYPE means it is a predefined data type.
    Eg:
    DATA int TYPE i.
    Here int is of integer data type.
    DATA var LIKE int.
    var IS a variable having same data type of int. which in turn is integer.
    You can find these helpful when you reference database table variables... You need not know what is the datatype defined.
    Also it adds to FLEXIBILITY.
    Whenever you make changes to your database tables and fields,
    that change is REFLECTED back to your program that is,
    You need not change all your program code when you change your table fields...
    Hope you understand and appreciate the flexibility that SAP provides to the programmers...
    Thanks
    Arun

  • How to put Mandatory option for selection screen fields in ABAP Queries

    Hi Experts
    Can anyone tell me how to put mandatory option for the selection screen fields in ABAP Queries.
    Manually I had written code in the At Selection Screen  option in infoset to display error message if that field is blank.
    But I need to display the selection fields with the tick mark (obligatory mark).
    How to do this?
    Appropriate answers will be awarded

    Hi
    For parameter option
    parameters : p_kunnr type kna1-kunnr  obligatory.
    For select option
    select-options: s_date for vbak-erdat obligatory.
    Plz rewards points ,
    Regards ,
    Ganesh.

  • Basic ABAP information  urgent

    hi gurus
    i need some information about basic abap programming like archieving,periodical job,batch job , user exist,varients
    any info about batch job management?? (abap)
    help ful answers reward points
    [email protected]
    kishore

    Hi
    Follow this detail PDF File
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf
    Regards
    Rehman
    Reward Points If Useful

  • Top Of Page in ABAP Queries

    Hello everyone,
        I want to write some text in theTop-of-page event of Queries.
        I am trying to print the text by using a write statement.But I am not succesful.
        Let me know how to use top-of-page in ABAP Queries.
       Regards,
       Najam

    Hi,
    you need to write the desired code in the top of page event....
    here is the piece of code ..just go through this... and call top of page before start of selection.
    TOP OF PAGE
    TOP-OF-PAGE .
    To Write the header of the Report
      PERFORM write_header .
    *&      Form  WRITE_HEADER
          text :Subroutine to write header
    FORM write_header .
      DATA: v_date(10),
            v_start(10),
            v_end(10) .
      WRITE : sy-datum  TO v_date  MM/DD/YYYY,
              p_prcdte  TO v_start MM/DD/YYYY.
      WRITE   5 '|'  .  ULINE AT 5(95)  .  WRITE 100 '|'    .
      WRITE /30  text-028 INVERSE COLOR 7  .  WRITE 100'|'  .
      WRITE   5 '|'  .  ULINE AT /5(95)  .  WRITE 100 '|'   .
      WRITE:  /7 'Date/Time        :', v_date, ' / ' , sy-uzeit   .WRITE 100 '|'  .
      WRITE   5 '|'  .  ULINE AT /5(95) .WRITE 100 '|'  .
      WRITE: /7 'Processing Month :', v_start   .  WRITE 100 '|'  .
      WRITE   5 '|'  .  ULINE AT /5(95).WRITE 100 '|'   .
      SKIP 2 .
    ENDFORM.                    " WRITE_HEADER
    if u wanna to do for alv then the piece of code provided by Nick will be helpful..
    Thanks & Regards

  • Download & Upload of SAP ABAP Queries.

    Hi All,
    Can anybody please guide How to Download & Upload SAP ABAP Queries.
    Waiting for positive reply.
    Thanks in advance for help.
    Regards,
    MAM

    Program RSAQR3TR is the standard program.
    You can simply download your infoset/query from your source system and upload the  file into your destination system.
    It should works.
    If, for some reason you are not authorized to upload/download, you can create a transport and import it using the usual way.
    Best regards.

  • BDC, SCATT, SECATT & ABAP Queries

    Dear All,
    Can someone please help me out with the following?
    1. What is "System Design?" 
    2. Meaning of BDC, SCATT, SECATT & ABAP Queries & Detailed steps in BDC, SCATT, SECATT & ABAP Queries?
    3. Difference between Report Painter & Report Writer?
    4. What is Cutover Date & Cutover Activities?
    Thanks in advance     
    Regards,
    Varma.

    Moderator message - this is wrong on so many levels, I don't know where to begin, Maybe someone can help me.
    Rob

  • ABAP Queries table

    Hi,
    can any bady help me that there is a one table which stores all custom abap queries , i need that table urgently

    Hi,
    in table AQGDB table there is 5 fields , in which filed i have give qurey name to search is there or not

  • Building ABAP Queries

    Hello Gurus
    Does any one of you have any information regarding building ABAP queries in SAP? Any documentation will really help.
    Please let me know And/OR Email the relevant documentation to
    [email protected]
    Regards
    Siddharth Sridhar
    SAP SD Consultant

    Hi,first setp for ABAP Query is Create a User group-SQ03
    then second step is create infoset-SQ02
    then here select direct read from the table ex then select include all table fields.then click on join tab in the nxt screen
    then click on insert table then here enter vbap.
    then select fields what ever u want from that tables.
    then goto SQ01 and execute this query.
    save it in local object.
    reward points if it helps
    thanks&regards
    veera.

  • In which Table all ABAP queries store?

    Hi Guys,
    In which Table all ABAP queries store?
    Thanks,
    Sa nkar

    Hi..
    ABAP Queries are also stored in the Table TADIR along with other Repository Objects.
    the following fields must be checked to Find ABAP Queries in this Table:
    PGMID = 'R3TR'
    OBJECT = 'AQQU' "For ABAP Queries
    This will help u to retrieve the ABAP queries from this table TADIR.
    sample code:
    data: itab type table of TADIR.
    SELECT * FROM TADIR into table ITAB.
    WHERE PGMID = 'R3TR'
    and OBJECT = 'AQQU'
    and (OBJ_NAME like 'Z%' or OBJ_NAME like 'Y%').
    REWARD IF HELPFUL.

Maybe you are looking for

  • ISE 1.2 Restore Issue

    ISE 1.2 (on vm) creates a backup file without error.  I can use the file to restore a clean ISE installation (same release) without error.  However, the ISE application server process is not running.   "Reload" or "App Start" do not restart the ISE p

  • JSTL class not found in EAR

    Hi, I have an EAR file that works fine in jboss 4.2.3 but i'm experiencing the following when trying to access the web app in Weblogic 10.3.2 (also on 10.0): Caused by: org.apache.tiles.util.TilesIOException: ServletException including path '/jsp/lay

  • Iphone 4 update to ios 5.1 twice?!

    I updated my iphone 4 to ios 5.1 a few weeks after it was released from iphone software update in settings, not through itunes. presently when the phone is connected to itunes and i click on check for updates: everything is up to date. however, now t

  • How can I use Method in the bean

    Hi every one please I made a method in for example employees entity "EmployeesImpl" the name of method getmax() it return number how can I use it at the bean for eaxmple when I want to press button give me the value from this method sorry Iam still b

  • Problem with the JTextArea

    I'm using the swing packege 1.1 and having some problem when trying to limit the number of character per line in a JTextArea component. I want the JTextArea to change line when a certain number of character are typed in one of these lines. Any idea?