Count option in abap programme

Dear 
I am writing abap programme.
i want count option in abap programme.
For how many rows display in my programme.
pls suggest.

To display count of rows in ur final table use this code:
data: l_lines type i.
l_lines = lines( itab ).
write: l_lines.

Similar Messages

  • ABAP Programm for calling Proxies

    Hi Experts,
    I was writing a ABAP programm für starting a ABAP proxy.
    *& Report  Z_XI_MAPPING
    REPORT  Z_XI_MAPPING.
    parameters: PA_WAIT type decimals default 0,
                PA_LOOP type decimals default 1,
                PA_EOIO type char1 default 'X',
                PA_QUEUE type PRX_SCNT default 'Regression01'.
    DATA: myProxy TYPE REF TO ZCO_MI_MAPPING_OUT ,
          l_start type tims value is initial,
          l_start_time type i value  0,
          l_end_time  type i value  0,
          l_max_time type i value 0,
          l_min_time type i value 999999999,
          l_delta_time  type i value 999999999,
          l_avr_time type i value 0,
          l_ctr type i value 0,
          l_ctr_item type i value 0,
          lt_pers_id type char10,
          it_pers_id type char10,
          lo_async_messaging TYPE REF TO if_wsprotocol_async_messaging.
    get time.
    WRITE: / 'System: '    , sy-sysid,
             'Start Time: ', sy-datum, sy-uzeit,
             'Wait Time: ' , pa_wait,
             'Loops: '     , pa_loop.
    WRITE: / 'start-time  execution-time'.
    TRY.
        CREATE OBJECT myProxy
    EXPORTING
       LOGICAL_PORT_NAME  = 'LP_XI_REGRESSION'.
      CATCH CX_AI_SYSTEM_FAULT .
    ENDTRY.
    specify queue id
    if pa_EOIO = 'X'.
      lo_async_messaging ?= myProxy->get_protocol( if_wsprotocol=>async_messaging ).
      lo_async_messaging->set_serialization_context( pa_QUEUE ).
    endif.
    data: OUTPUT type ZMT_MAPPING_OUT .
    move 'Element01' to OUTPUT-MT_MAPPING_OUT-set-set_ELEMENT_01.
    move 'Element02' to OUTPUT-MT_MAPPING_OUT-set-set_ELEMENT_02.
    move 'Element03' to OUTPUT-MT_MAPPING_OUT-set-set_ELEMENT_03.
    move 'Element04' to OUTPUT-MT_MAPPING_OUT-set-set_ELEMENT_04.
    move 'Element05' to OUTPUT-MT_MAPPING_OUT-set-set_ELEMENT_05.
    move 'Element06' to OUTPUT-MT_MAPPING_OUT-set-set_ELEMENT_06.
    move 'Element07' to OUTPUT-MT_MAPPING_OUT-set-set_ELEMENT_07.
    move 'Element08' to OUTPUT-MT_MAPPING_OUT-set-set_ELEMENT_08.
    move 'Element09' to OUTPUT-MT_MAPPING_OUT-set-set_ELEMENT_09.
    move 'Element10' to OUTPUT-MT_MAPPING_OUT-set-set_ELEMENT_10.
    do pa_loop TIMES.
        l_ctr = l_ctr + 1 .
        get time.
        move sy-uzeit to l_start.
        get run time field l_start_time.
        TRY.
            CALL METHOD myProxy->EXECUTE_ASYNCHRONOUS
              EXPORTING
                OUTPUT = OUTPUT.
          CATCH CX_AI_SYSTEM_FAULT .
        ENDTRY.
        get run time field l_end_time.
        l_delta_time = l_end_time - l_start_time.
        l_avr_time = l_avr_time + l_delta_time.
        if l_delta_time < l_min_time.
          move l_delta_time to l_min_time.
        endif.
        if l_delta_time > l_max_time.
          move l_delta_time to l_max_time.
        endif.
        WRITE: /    l_start,
                 11 l_delta_time.
        wait up to pa_wait seconds .
    enddo.
    COMMIT WORK.
    l_avr_time = l_avr_time / l_ctr .
    WRITE: / 'fastest call: ', l_min_time,
             'slowest call: ', l_max_time,
             'average time: ', l_avr_time,
             'Count IDs: '  , l_ctr.
    When activating this program I get the error: "The data object OUTPUT-MT_MAPPING_OUT does not have a component SET-SET_ELEMENT_01
    But the structure of the Proxy looks like this:
    ZCO_MI_MAPPING_OUT
           Method Execute Asynchronous
              Importing OUTPUT
                     MT_MAPPING_OUT
                           SET
                              SET_ELEMENT_01
                              SET_ELEMENT_02
    I gernereated and activated the proxies several times, which did not solve the problem. I switched also in the ABAP Coding between capital an dsmall letters...
    I have no idea where the problem is, it looks all fine for me.
    Hope you can help me there.
    Thanks,
    Sebastian

    Hi Sebastian,
    It's because you reference the wrong structure. It's a bit tricky to get the right one, but look into generation tab in SPROXY. Here you can see, which data elements has been created, and using the right one of these is the key. Notice you can foreward navigate into the different structures, which can help you.
    Kind regards
    Mikkel

  • Re : select-options in abap-objects program

    Dear friends,
                      I want to give select-options in abap-objects program. How to give that.
                                 Thanking You
    with regards,
    Mani

    In the transaction SE24, enter your class name, click modify.
    in the tab named "Types" you have to declare two types. By example, if you want to receive one select-options that in your program that uses this class is declared like:
    " P_SAKNR FOR SKAT-SAKNR".
    you've got to declare two types in the class:
    a- TYPES:  begin of E_S_SAKNR,
                          sign(1),
                          option(2),
                          low(10),
                          high(10),
                      end of E_S_SAKNR.
    b - TYPES E_T_SAKNR type standard table of E_S_SAKNR.
    so, in the class method that you want to receive P_SAKNR as importing parameter. You got to do this:
    method TEST importing ET_SAKNR type E_T_SAKNR.
    now, in the implementation of this method you should be able to use ET_SAKNR as the same way as you usually use a parameter or a select-option. You could use it in a select with the operator IN by example..

  • Re : select-options in abap objects

    Dear friends,
    I want to give select-options in abap-objects program. How to give that.
    Thanking You
    with regards,
    Mani

    HI Mani,
    It's common mix ABAP Procedural with ABAP Objects in the same program.
    You should use the same way used in ABAP procedural program as Marco Cerdelli sad.
    But inside ABAP OBJECTS classes you can't use is these statement type.
    Don't forget to close this thread and all yours previous when your question be answered ! In case of doubt read the [rules of engagement|https://forums.sdn.sap.com/].
    Best Regards.
    Marcelo Ramos

  • Select-option in ABAP objects

    Hi Guys,
               I need a small help from you. I want to know how to populate the value from select-option to abap object. Please help me, it is very important

    check this code
    REPORT ZSELOPT_TO_CLASS .
    TABLES: VBRK.
    SELECT-OPTIONS: S_VBELN FOR VBRK-VBELN.
    DATA: IT_VBELN TYPE RSELOPTION.
    DATA: X_VBELN TYPE RSDSSELOPT.
    CLASS C1 DEFINITION.
    PUBLIC SECTION.
    DATA: IT_VBRP TYPE VBRP_TAB,
          X_VBRP LIKE LINE OF IT_VBRP.
    METHODS: GET_DATA IMPORTING S_VBELN TYPE RSELOPTION.
    METHODS: DISP_DATA.
    ENDCLASS.
    CLASS C1 IMPLEMENTATION.
    METHOD GET_DATA.
      *SELECT * FROM VBRP*
       INTO TABLE IT_VBRP
       WHERE VBELN IN S_VBELN.
    ENDMETHOD.
    METHOD DISP_DATA.
      LOOP AT IT_VBRP INTO X_VBRP.
        WRITE:/ X_VBRP-VBELN,
                X_VBRP-POSNR.
      ENDLOOP.
    ENDMETHOD.
    ENDCLASS.
    START-OF-SELECTION.
    DATA OBJ TYPE REF TO ZCL_SELOPT.
    CREATE OBJECT OBJ.
    LOOP AT S_VBELN.
      MOVE S_VBELN-LOW TO X_VBELN-LOW.
      MOVE S_VBELN-HIGH TO X_VBELN-HIGH.
      MOVE S_VBELN-SIGN TO X_VBELN-SIGN.
      MOVE S_VBELN-OPTION TO X_VBELN-OPTION.
      APPEND X_VBELN TO IT_VBELN.
    ENDLOOP.
    CALL METHOD OBJ->GET_DATA
                        EXPORTING
                          S_VBELN = IT_VBELN.
    CALL METHOD OBJ->DISP_DATA.
    Edited by: moazam hai on May 17, 2008 6:17 AM
    Edited by: moazam hai on May 17, 2008 6:19 AM

  • 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

  • How to write text name of parameters / select options in  ABAP list??

    Hi gurus, i must read the text name of parameterd / select options in ABAP program and write it in a list of the same program for log.......how can i do it??
    Thanks in advance!
    Best regards!
    Ferdinando
    Message was edited by:
            Ferdinando Sellitto

    Hello Ferdinandino
    Useful function modules are:
    RS_PRINT_SELECTIONS
    RS_LIST_SELECTION_TABLE (Generates list according to values in selection table(RSPARAMS))
    RS_REFRESH_FROM_SELECTOPTIONS (Current contents of selection screen)
    Function module RS_REFRESH_FROM_SELECTOPTIONS can provide the input for function module RS_LIST_SELECTION_TABLE.
    Regards
      Uwe

  • As a abap programmer what is the role in ale/idoc.

    hi guru.
    i am a abap programmer. please tell me<b> what is the role of abap programmer
    in ale/ idoc.</b>
    regards.
    subhasis.

    Hi,
    ALE  is Application Link Enabling.
    ALE
    A means of creating and operating distributed applications.
    Application Link Enabling (ALE) guarantees a distributed, but integrated, R/3 installation. This involves business-controlled message exchange using consistent data across loosely linked SAP applications.
    Applications are integrated using synchronous and asynchronous communication - not by using a central database.
    ALE consists of the following layers:
    Application services
    Distribution services
    Communication services
    Refer
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    Check this link ALE and EDI
    ABAP Programmer must know how to create inbound n outbound interfaces to send IDOCs through ALE.
    Please refer to the details mentioned in the hyper-links beow.
    You will get the details how to go about it.
    To see the IDOC & status check it in WE02/WE05
    You will get step by step process.
    ABAP Development
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.allsaplinks.com/idoc_sample.html
    http://www.geocities.com/xplosion78/customised_ALE_IDOC_BY_SACHIN_DABHADE.zip
    http://help.sap.com/saphelp_45b/helpdata/en/35/b0ea5187a62488e10000009b38f9b7/content.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/c4/6bc368fef411d28d0900104b56737d/frameset.htm
    ABAP Development
    Follow below steps to create custom IDOC.
    1.Create segments through transaction WE31.
    2.Create IDoc Type through transaction WE30 by attaching created segments.
    3.Message type through transaction WE81.
    4.Link Idoc and message type in WE82 transaction.
    Check the transaction WEDI for ALE settings
    Check these links for more details on IDoc's:
    ALE/ IDOC
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
    http://www.allsaplinks.com/idoc_sample.html
    http://www.sappoint.com/abap.html
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.allsaplinks.com/idoc_sample.html
    ALE/ IDOC/ XML
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://www.thespot4sap.com/Articles/SAP_XML_Business_Integration.asp
    http://help.sap.com/saphelp_srm30/helpdata/en/72/0fe1385bed2815e10000000a114084/content.htm
    IDOC Convertion
    /people/kevin.wilson2/blog/2005/12/07/changing-fields-in-an-idoc-segment
    http://www.intelligententerprise.com/channels/applications/feature/archive/kasturi.jhtml
    Hope this will help.
    Regards,
    Priyanka.

  • ABAP Programm(RSIMPCURFILE) in Process Chain

    Hello,
    i have a problem with the Process Chain. I Would like to run an Process Chain with an ABAP Programm to load a Currency File automatic.
    The Program Name ist: RSIMPCURFILE.
    I have define an Programm variant with some Parameters  but i dosn't work. In the Batch Window i became a mistake like : "The Frontend Function is not working"
    Did someone know this problem?
    Kind regards
    Mino

    Great ... it works
    Thank u very much.

  • 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

  • How to findout Database view assign to ABAP Programme (finding tables known

    Any way to find out Database views assign to ABAP Programme.
    Need to secure Programme through SE54 by assigning Authrization group to Views But dont know the views.
    Through se93 and then se80 gives only tables used in Trx not views.
    Any help?

    Try if the t-code SE12 is of any help to you. For more details on your query, a search or posting in the ABAP forum will be helpfull.
    [ABAP Dictionary;
    Regards,

  • Is there online platform where we can execute our ABAP Programme

    Hi Buddies,
    Could some one let me know where i can execute my abap programmes online.
    Because most of the time i used to implement outside the home. where abap software installation is not possible.
    So that i need a platform where i can execuet my programme online.
    ~Rashid

    I found this site host free Ides Service, www.ides.consolut.eu  you need to register with this. It is a training server, so Most of the features will be disabled, If you are looking out for a basic, functionality yo can go with this one. I am not sure if you can access this from india. You can try it.

  • Calling of webmethods through abap programme

    Hello experts,
    There is requirement in my project related to webmethods.i have to create an ABAP programme(REPORT) To download a report using a new webmethod service.The programme will call the webmethod service using the following parameters:
    - Merchant ID
    - Password
    - Report Name/Format
    - Report Date.
    The wM service will pass back the report contents to the calling program.  The program will then build an output file onto the SAP UNIX interface directory for subsequent processing by  another program .
    can any one please send me a brief pseudocode,as i don't know webmethods.
    please help me as this is a very crunch situation.
    regards
    Prasun

    Hi Prateek,
    i don't know which version i am using,i don't know how to invoke webmethods through ABAp programme.i just wanta a brief pseudocode for the same.
    regards
    Prasun

  • The programme keeps 'not responding' and I am unable to view options as the programme keeps freezing. Help

    The programme keeps ‘not responding’ and I am unable to view options as the programme keeps freezing.
    I am unable to use Firefox on many sites as it keeps not responding. Every time I click tools and then options the programme freezes. I have tried starting in safe mode still did not work I have re-installed Firefox and that has not worked. I have not used ‘Explorer’ for at least 10 years but I may have to change soon as I am unable to work with Firefox at present.
    John

    Spent about 4 hours yesterday trying to figure out why bookmarks is behaving so poorly with such a slow response. The response time is directly related to the number of bookmarks in each folder. It takes 8 seconds to process a bookmark. The 8 seconds occur between an sqlite shm unlock and the next sqlite lock.
    At the start, the first and 3rd systems were behaving OK, the 2nd system was responding poorly. Did all the usual basic, restarted FF, rebooted system, etc.
    THEEEENNNNN--the 3rd system started acting up. Tried tracing, etc. -- didn't see anything specific. Messed around with systems 2 and 3 and ,THEEENNNN, the both started working OK!
    '''And about a minute later, the first system crapped out! '''
    Screwed around another 1/2 hour and THEEEENNNN, all 3 systems started working OK. Cannot recreate the problem and I don't have a clue as to what I did to correct the problem!
    All 3 systems are on the same internal network--192.168...... This leads me to believe that there is some kind of cross communications between systems. I do have Sync turned off, so I don't think that's the problem. But what.....????
    rjmoses

  • Tips for a new ABAP programmer...

    Hello experts,
    I am a fairly new ABAP programmer that usually modifies existing reports. I am really having a hard time on understanding all those synatx. Can you guys give me tips on how to better understand reports/programs?how do you analyze reports? any tips and suggestions would really helpful to me.Thanks a lot guys!

    Hi,
    No Problem dont worry SDN will help you a lot.
    Actually every one is new for the new technologies.
    Actually here as an ABAPer 1st try to learn DE-BUGGING as much as you can.
    Try to do it from START-OF-SELECTION event 1st line on wards.
    Put a break point on start of selection line event and execute it.
    Here in debugging you need to carefully observe the behaviour of the program, logic etc etc.
    Next understand the FORMS when they are triging and their reusability.
    Under stand the Events sequence.
    Later try to obsorbe the Syntax of the commands as much as you can.
    Thanks.
    If this helps you reward with points.

Maybe you are looking for

  • Droid2 data usage jumps from zip to 100's of MB a week

    After seeing similar threads with sudden and unexplained data usage, I want to share my problem with one possible SOLUTION! I was alerted that my account was going over the 150mb limit. I checked online my usage and saw nothing, the usual flat line a

  • Embed OVP in custom Web Dynpro

    Hi, I'm experiencing a similar problem as described [here|How to Embed FPM ABAP into a WebDynpro ABAP Application;, but that thread is closed (unanswered). I want to embed an (ESS) OVP component in my Z Web Dynpro. I defined a component usage for the

  • Issues with limit/filter on outer join table in BQY

    I'm converting a series of BQY's from Brio 6.6 to Hyperion 9.3. I have some questions about the "use ODBC outer join syntax on limits" option in the OCE. I sort of understand this option's purpose, but I don't completely understand the SQL I'm seeing

  • Problem to run dispatcher

    I have a SOMS 5.2 on a SODS 5.2. When i start the messaging, i have a message : Starting disp daemon... The iPlanet Dispatcher (SMTP inbound) (rome) service is starting. The iPlanet Dispatcher (SMTP inbound) (rome) service could not be started. A sys

  • HT201412 what chance do i have of recovering my data if i try restoring with iTunes?

    i have a black screen with apple logo and cursor (appearing as rays) overlapping the apple. tried draining it, didn't work. tried pressing power and menu bars simultaneously but didn't work either. if i restore with iTunes, what is the chance i will