Regarding data declaration

I am writing a report based on the number of customers.
For ex: if the number of customers are greater than 50, peform this, if the number of customers are greater than 100, perform that etc.
My question is - Should I declare 'number of customers' as integer or numeric ? What difference does it make?
Thanks in advance for your input,
Krishen

hi,
Better you declare it as integer.
If you declare it as numeric, you need to know what will be the upper limit to the no. of customers. Ofcourse, integer also has a limit.
data:  v_cnt(4) type n.
it can not hold greater than 9999. So, better declare as integer instead of numeric as you dont know the no of customers.
Regards,
Sailaja.

Similar Messages

  • Doubt regarding data declaration in update routine!

    Hi,
    i had added one field in cube, update rotuine for which is in due.
    in the update routine logic i have to assign this field to another field if some condition satisfies!
    the logic is --
    if Hstatus=c
    close_date=stdatum.
    close_date is the field i had created and added in info cube definition.
    now, how to declare these fileds in routine as it is asking me to declare the fields
    can any body suggest me how to declare those fields!
    Thanks,
    Ravi

    Hi,
    In cube, for updating every keyfigure, all the characteristics will be taken into account. So, in cube if you choose a keyfigure in characteristic tab you can find all the characteristics. Likewise you can find for all the keyfigures.
    So, Transfer routine for all kefigures will transfer the same routine of the characteristic for all the keyfigure. (that means if you choose different keyfigure and if you choose a the same characteristic you can find the same routine, no need to create separate ) If you choose no, it wont transer the same routine to all the keyfigures for the characteristic. You can define the separate routine for the characteristic for every keyfigure.
    in ODS this is not the case. There only Keyfields only will be common for all the datafields.
    rgrds,
    v.sen.
    Message was edited by:
            Senthilkumar Viswanathan

  • Data declaration error in adobe form

    hi,
    i m just remake a smartform into adobeform.but while doing so it's giving me error regarding data declaration.
    I had declare some of internal table as type of defiened type but at code initialzation it giving it's not a internal table.
    global data
    it_abc type ty_abc,
    types :
    types: begin of ty_abc,
               ab(8) type c,
               bc(4) type c,
              end of abc.
    when i m creating a internal table in code initialization it's giving me that already declared.
    code initialization.
    data : it_abc type table of ty_abc.
    Plz help me out.
    Regards
    Ricky

    Hi Maheshwari,
    After the declaration of the TYPES Structure, you need to declare the Internal Table. As follows
    TYPES
    types: begin of ty_abc,
              ab(8) type c,
              bc(4) type c,
              end of abc,
              tt_abc type standard table of ty_abc initial size 0.
    And in Global Declaration you use the newly created Internal Table (which is created using the Types Statement). And in Code Initialization you can use the Global Declaration internal table.
    Regards
    Pradeep Goli

  • What is the use of # in data declaration

    hi experts,
    i am working in one of the old programs, where in data declaration they have used -
    data: matnr like mara-matnr,##
             mfrpn like mara-mfrpn,##
    and when i work in front end editor (4.7c), these data come in red colour. i know when i comment any line with (*), that line comes in red colour.
    i want to know why these lines comes in red colour.
    is it any pseudo comment of older version or what.
    plz rectify my doubt.
    Thanks.
    Sri.

    Hi Sakthi,
    means a character that cannot be displayed. Probably thes are control characters from you old system, e.g. linefeed, tab, carriage return or the like.
    The lines are displayed in red because the editor does not know how to handle. So # is ignored. You can delete the characters to have a better look or you can do the same as the editor does: Ignore them. There is definitely to syntactcal meaning at all.
    Regards,
    Clemens

  • Help reqd - Data declaration

    Hi,
    I have a problem here. I am analyzing an existing program. This is an active prg in Production.
    In that I see usage of an internal table called 'itab1'. On double clicking on it (to find it's data declaration) it takes no-where. It asks if I would like to create it.
    In an include program (which in embedded in this main program), I find some declaration as follows:
      data: itab&1 like &2 occurs 0 with header line.
    Can you help me understand this? I need to change the data declaration for this 'itab1' for an upgrade.
    Regards,
    Sanju.

    Macros are defined using the following statement:
    DEFINE conversion.
      if &1 is not initial.
        &2 = c_X.
      else.
        &2 = space.
      endif.
    END-OF-DEFINITION.
    You apply it like described bellow:
      conversion var_1 var_return.
    My guess is that this internal table is being declared using the macro parameter. so, if &1 is valued with "10", that internal table will be named itab10.
    Not quite sure about that, but maybe that's what is happening. Try to find the place where the macro is being called and see if &1 value is '1'.

  • Dynamic data declaration

    I posted same thread into "Dictionary section"
    Hi,
    I have a following issue - I am not sure whether this is possible - so I need your feedback/expertise.
    I have a custom table (example ZABC) with several fields in it - one of them being TABNAME . Content of that table ZABC is
    MANDT TABNAME FIELDNAME ZCHECK
    800 KNA1                KUNNR
    800 KNA1                NAME1         X
    800 KNA1                NAME2         X
    800 KNA1                KUNNR
    800 KNVV                BZIRK           X
    800 KNAS                KUNNR
    800 KNAS                STCEG
    etc.
    There is no rule how many entries will be in this ZABC table - I guess it will be less than 20 - but this is not business rule. Also do not know how many different "tables" could be specified.
    Fields MANDT and ZCHECK fields are not important at this stage.
    The challenge I have is to fetch data for only those fields from their specified physical tables (KNA1, KNVV, KNAS) in internal tables.
    In this case I would need to have 3 internal tables one for KNA1, one for KNAS and one for KNVV.
    I need to keep those "internal" table with content throughout the entire program for certain validation.
    I know that I should dynamically define those internal tables but I have issues not knowing how many tables will be defined in ZABC table and I personally do not want to declare "<fs_itab> TYPE ANY TABLE" 20 or so times as fs_itab1 - fs_itab20.
    Is there any way I can dynamically create as many internal tables as needed and keep their content throughout program run-time.
    Regards
    Goran

    All those examples you'all posted are great BUT it does not answer my question nor help me to solve my issue. Maybe I was not clear enough ... or something is wrong with me
    Once again.
    I have no problem to get a dynamically defined table and fill its content from ONE physicall table. That is pretty straight forward. The issue I have is that I do not know how many dynamically tables I will have to define and later asign to field symbol. Look at my custom table above and you will understand what I am trying to say.
    What makes this issue more complex is that, once data fetch from those physicall SAP tables, I have to keep the content for all those internal tables during the entire program run . Second the most, I do not want to limit the program by defining FS "n" times in data declaration section. That is really important since I have no idea how many tables will be accessed.
    If I follow the logic from your examples, I will end up overwritting the FS content every time I assign new internal table to FS.
    In order to solve this issue, I was thinking that whenever I get the data from SAP table into internal table (field symbol) i export the content of internal table / FS to memory and then retrieve them when needed. This sounds like waky /fuzzy process and I am not aware of anything better. I am old fashion ABAP guy who got certified 1995 and have not seen ABAP for at least 5 years.
    I would like that someone either tells me whether I am OK going forard with my "memory" solution or ... in few words gives me hint how to handle multiple dynamicall defined tables AT THE SAME TIME with its content using some OO code.
    Thanks
    G
    P.S.
    I have erroneusly opened the same thread twice. Sorry

  • Efficient or Better Ways for Data Declaration

    Hi Guys,
    Basically I've always programmed much the same way for a pretty long time now. Lately I've been asking myself the question - "how can i start improving on my tried and trusted ways".(oftern a linear programming approach). As part of this I'm examining ways to declare data better within in programs and to adopt a neat way to do so.
    This may seem pretty trivial but the first question I want to ask is how to declare data better
    e.g. I need to declare constants - each constant corresponds to a rule number; 1, 2,3,4,5,6 - 23 etc.
    Instead of declaring the following line 23 times - is there a better way to declare in such a way.
    Constants: c_rule_1 type c value '1' ,
                    c_rule_2  type c value '2',
                    etc etc etc
    Your thoughts are greatly appreciated.
    Thanks.
    DK
    Edited by: Damien Kesle on Nov 26, 2008 10:00 AM

    Hi,
    With my knowledge, data declarations for all constants with DATA comamnd itself is good practise in point of performance. Alternative is dynamic creation of variables. But it consumes more time and is not good to practise. Instead of crating individual parameters for each constant, you could create a structure and add all constants as fields as follows:
    constants: begin of con,
                       1 type c value '1',
                       2 type c value '2',
                    end of con.
    Regards,
    Prasanth

  • Doubts in Data Declarations

    Hi Xperts
    I'm posting this thread seeking for a clear clarification on the following and the impact in using them in our program:
    1. <u><b>TYPE REF TO</b></u>  VS <u><b>LIKE REF TO</b></u>
    2. Use of <u><b>ANY</b></u> Vs <u><b>DATA</b></u>
    kindly let me know how much difference it makes when making use of these
    thkx
    Prabhu

    Hi,
    <b>Reference Types</b>
    You can define reference types locally in your programs or globally in the ABAP Dictionary. You use the following syntax:
    TYPES <t> TYPE REF TO ...
    After TYPE, there is no reference to an existing data type. Instead, the type constructor occurs:
    The type constructor
    REF TO DATA
    declares a reference <t> to a data object. Fields with type <t> can contain references (pointers) to data objects, that is, instances of data types
    The type constructor
    REF TO <class>|<interface>
    defines a reference type <t> to the class <class> or interface <interface>. Fields with type <t> can contain references (pointers) to instances of the class <class> or of classes that implement the interface <interface>
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb30ea358411d1829f0000e829fbfe/content.htm
    Regards
    Sudheer

  • Issue in WS based on FM with data declared as TABLES

    Dear all,
    I created enterprise WS with endpoint as function module. The FM has a date declared as TABLES. I see the table data under Output section of External and Internal view in SE80. Also the data is being exposed (check box set). However if I consume the WS either via ABAP consumer proxy or externally outside the SAP system (from JAVA app) the data which is declared as TABLES is not visible in RESPONSE from the WS.
    Is this behavior feature? Shall I always declare (in case of custom FM) all the data as EXPORTING?
    If so what about the SAP standard FMs? In this case do I need to always create custom Z* FM as wrapper?
    thanks
    m./

    Please re-post if this is still an issue to the Business Objects Forum or purchase a case and have a dedicated support engineer work with you directly

  • Appropritate forum to put queries regarding data archiving

    Hi All,
    Which one is the appropriate forum to put queries regarding data archiving?
    Thanks in advance.
    Vithalprasad

    Yes you can use this forum, also there is one forum for Data Transfers.
    Regards,
    Altaf Shaikh

  • Regarding dates.

    hi gurus, i have some doubt regarding dates function.
    if i enter any date of present month i wand the first date of next month.
    for example  if i enter any date in january from 01/01/2007  to 31/01/2007 i want
    first date of february. ie 01/02/2007. plz help me.
    regards
    vamsi.

    Hi
    use this coding
    data : d1 type sy-datum,
            d2 type sy-datum,
            d3 type sy-datum,
            d4(8),
            m(2),
            y(4).
    d1 = sy-datum.
    CALL FUNCTION 'BKK_GET_MONTH_LASTDAY'
      EXPORTING
        I_DATE        = d1
    IMPORTING
       E_DATE        =  d2 .
    write :   d1.
    skip 3.
    m = d2+4(2).
    y = d2+0(4).
    concatenate  y m '01' into d4  .
    d3 = d4.
    write : / d3.
    write : / d2.
    write / '***********2 month****************************'.
    d3 = d2 + 1.
    CALL FUNCTION 'BKK_GET_MONTH_LASTDAY'
      EXPORTING
        I_DATE        = d3
    IMPORTING
       E_DATE        =  d2 .
    write :/ d3,
            / d2.
    write / '**************3 month ***************************'.
    d3 = d2 + 1.
    CALL FUNCTION 'BKK_GET_MONTH_LASTDAY'
      EXPORTING
        I_DATE        = d3
    IMPORTING
       E_DATE        =  d2 .
    write :/ d3,
            / d2.

  • Regarding date types

    hi all,
    i need some information regarding date types infotype 41.
    i need to print date types in sequential manner like dar01 dar02 dar03 like upto 12 date types.
    can you please suggest me how should i print them.
    thanks,
    madhavi.

    Hi,
    Steps to create a HR Infotype:
    1) Go to Transaction PM01.
    2) Enter the custom Infotype number which you want to create (Should be a 4 digit number, start with 9).
    3) Select the 'Employee Infotype' radio button.
    4) Select the 'PS Structure Infotype'.
    5) Click on Create... A separate table maintenance window appears...
    6) Create a PS structure with all the fields you want on the Infotype
    7) Save and Activate the PS structure
    8) Go back to the initial screen of PM01.
    9) Click on 'All' push button. It takes a few moments.
    10) Click on 'Technical Characteristics'. Infotype list screen appears
    11) Click on 'Change'(pencil) button
    12) Select your Infotype and click on 'Detail' (magnifying glass) button
    13) Give 'T591A' as subtype table
    14) Give 'T591S' as subtype txt tab
    15) Give your subtype field as subtype field
    16) Save and come back to PM01 initial screen
    17) Click on 'Infotype Characteristics' ... Infotype list screen appears
    18) Click on 'Change' (pencil) button
    19) Click on 'New Entries'
    20) Enter your Infotype number and short text
    21) Here we have to set different Infotype Characteristics as per the requirement. (Better open another session with some standard Infotype's infotype characteristics screen and use as the reference to fill yours)
    22) Save your entries.
    23) Now the Infotype is created and ready to use.
    24) If you want to change the layout of the Infotype as per your requirement...
    25) In the PM01 initial screen...Select 'Screen' radio button and give 2000 as the screen name, then click on edit.
    26) In the next screen.. Select 'Layout Editor' and click 'Change'.
    27) Screen default layout appears...here you can design/modify the screen..change the attributes of the fields..etc.
    28) Save and activate. (Don't forget to 'Activate at every level)
    Subtype Creation :
    Transaction PM01 Goto Subtype Characteristics. Click on Append and then subtype. Enter the name and description of subtype on screen.
    Then goto technical Characteristics and maintain the details of subtype there. I.e name of subtype i.e. component name defined in PSnnnn. Subtype table is T591A.
    Subty.text tab is T591S and time const tab is T591A.
    See:
    http://help.sap.com/saphelp_46c/helpdata/en/4f/d5268a575e11d189270000e8322f96/content.htm
    HR related site:
    http://www.sapdevelopment.co.uk/hr/hrhome.htm
    Enhancement of Infotype
    Check the following
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAXX/PYINT_INFOTYP.pdf
    Infotype Enhancement overview screen
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/60a7586d-edd9-2910-68a8-8204303835a1
    with regards,
    Hema SUndara.

  • Urgent regarding Data & Task Audits Back Up

    Hi Experts
    Here my question is regarding Data Audit and Task audits in V 11.1.2.1
    -->If we take the back up of Data & Task audit tables data in to other backup_tables in same schema how this can be viewed through task audit and data audit through HFM?
    -->Whether any third part tools available to audit the tasks (DATA & TASK ) information...?
    -->Whether EPM maestro can be used here..?
    Thanks in advance
    Edited by: RajaKK on May 29, 2012 6:19 PM

    Use the Audit Extract utility bundled with HFM 11.1.2.1 to export this information periodically to a CSV file that you can view offline through any text editor, or even Excel. There is a command line feature for this as well, so you could incorporate this into a batch routine.
    For anyone attending Kaleidoscope in San Antonio, TX next month, I will present the various utilities that ship with HFM including this one. Hope to see you there!
    --Chris                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Dynamic data declaration refering to local data defined in another program

    Here is the situation:
    The standard program SAPICP__ , SAPICF__ and several other of same series have a form routine REPOSITORY_DEVCLASS_ADD. this subroutine in all SAPI* programs has parameter REPOSITORY of type REPOSITORY (declared as internal table with header lines) and type REPOSITORY is declared with different component in each program.
    Now the problem is that i need to call subroutine REPOSITORY_DEVCLASS_ADD dynamically from my program and so i want to dynamically declare the table REPOSITORY in my program to pass to this subroutine and as program is not yet loaded into memory i have no way to achieve this.
    Can some one help in achieve this?
    Edited by: Gaurav B. on Jan 30, 2012 4:02 PM

    Hello Fred,
    That's a big task, even if it looks "easy". My first idea is, your request can not be covered by dynamic programming. a) every node has a different structure (I guess), b) the code itself has to be adjusted to the nodes in use as well. I.e. when a dynamic data declaration would be possible, the coding has to adhere the used number of nodes.
    My recommendation:
    - declare as many standard tables (nodes) as possible
    - the code for  each node has to be implemented
    - define the number of used nodes by a parameter or an interface
    Have success,
    Heinz

  • SCAN ABAP-SOURCE : problems to recognize all DATA declarations

    Hi all !
    My problem is simple :
    When I scan a program, all data declarations structures are not recognized :
            SCAN ABAP-SOURCE t_code_prgm  TOKENS into t_tokens
                                      STRUCTURES into t_structures
                                      STATEMENTS into t_statements
                                          LEVELS into t_levels
                                      WITH INCLUDES
                                      WITH ANALYSIS.
    In "t_structures", for some data declarations, the scan find  statement types "d" (DATA) and "t" (TYPES), but not others ("k" --> constants ...etc...)
    With DATA, SCAN recognize itab like  "DATA : BEGIN OF itab ....", but no "DATA wa_data type ..." !!!
    Do someone know why ?
    I need this to scan programs and control how DATA are named.
    Thanks !
    Stephane.

    Hi,
    If RSA3 is giving the error that means the data source is not ready yet.
    May be you should again do the transports and see if there is no difference between the development and production system.
    Also make sure that you have maintained all the settings for the CO-PA to work as it was in the developement system.
    Also
    Try to run a delta after 2 hours of initialization in production dont schedule it immeadiately.
    Are you sure that delta and init and RSA3 was running fine in quality and developmenet system in the same way as you are trying here??
    Thanks
    Ajeet

Maybe you are looking for

  • Itunes wont uninstall on windows 10

    I'm on windows 10 preview and I would like to reinstall iTunes, but when I got to repair or uninstall it, it gives a option to find itunes64.msi, and idk what that is, so I got to my iTunes folder, iTunes isn't even in the folder its like its uninsta

  • Open different URLs in same window

    I'm developing a program that will be run remotely. Next to  each control or indicator, I have a little help button that opens up a URL with some information explaining what the control does or indicator means. The problem is that I don't want each h

  • Is there any paid online Oracle related task?

    I want to work online regarding Oracle related task for earning purpose. I want to solve the problems related to database, code, forms etc. If someone know about it plz inform me. Thanks Madni

  • Validation rule using list

    i had x eo i make enity validator rule type : list rule definition from : city from operator: in List type query result : query: Select * From Bus_Trip_Benefits       Where Btb_City_From = :pbtr_City_From And       :pbtr_Rqst_Date Between Btb_Eff_Fro

  • No completion tracking w/o quiz question in v.7?

    Just noticed today that several courses we had created in 6, but updated in 7, no longer seem to count completers as "complete" in our LMS.  These courses do not contain graded quizzes.  In 6 we had set a % of slide views to indicate completion.  I j