Coding data declaration

data :gs_gsber like tgsb-gsber,
descr_ref type ref to cl_abap_structdescr,
gc_comp(6).
what do u understan by this?

Hi,
I would suggest u post same in ABAP-general forum, since releated to ABAP coding.
Regards
Pradeep

Similar Messages

  • 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

  • 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

  • How to print hard-coded data in multiple language in sapscript.

    Hi All,
    How to print hard-coded data in multiple language in sap-script, here the requirement is when printing the output
    we can see the window heading, description which are mostly hard-coded here I want to print these in both language as fallows,
    Goods to be delivered: = Morada de Entrega:
    Total net value excl. tax = Valor Total (IVA não Incluído)
    Description = Descrição
    Item = linha
    here I want to print in both languages like----       Goods to be delivered:/ Morada de Entrega:
    and the above headings in English are hard-coded.
    Kindly suggest me on this.
    Thanks in advance.
    Arun.

    Hi Arun,
    Use Standard text ade those text elements. Then use those in SAP script using different languages.
    Regards,
    Amitava

  • 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

  • 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

  • Global data declaration in a function group..

    hi,
    i have created a function group and created 2 FM in that. Both use some common data declarations so i declared those variables in the top include of the function group named LZFGXXXTOP.
    is this include automatically recognized in my FM or do i have to include it ? sample statements please ..
    thks

    Sorry Rich, I fail to understand what you are saying.
    in simple terms, i need to have some common data declarations for 2 function modules in a function group. Can u pl outline the steps I need to follow ? also i need to have a common set of form routines (FORM ENDFORM) to be used in these 2 function modules, where do i create these ?
    thks a lot

  • Calendar Application - Colour coding dates?

    Is it possible to colour code a date in the Calendar application?
    At present, I only see a dot when an event is recorded against a particular date. I am a bit surprised that this basic functionality has been left out.....
    Or is there a third party plug-in for colour-coding dates?
    Thanks for any info you may have

    There is no way to do this at present. You can submit feedback to Apple requesting this feature:
    http://www.apple.com/feedback/ipodtouch.html
    Personally, I would like to have the colors from my various iCal calendars carried over.

  • 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

  • DIFFERENCE BETWEEN THE DATA DECLARATIONS NVARCHAR2 AND VARCHAR2(x CHAR)

    CAN ANYONE HELP ME FIND THE DIFFERENCE BETWEEN THE DATA DECLARATIONS; NVARCHAR2 AND VARCHAR2(x CHAR), WHERE X IS THE SIZE OF DATA TO BE HELD WITH THE VARIABLE OR ATTRIBUTE

    Duplicate posting....
    Difference between nvarchar2(10) and varchar2(10 char )
    Difference between nvarchar2( 10) and varchar2( 10 char)
    Please refer also...
    Nvarchar2

  • 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

  • Data declarations

    Hi SAPBW Experts,
    I understand that global data types declared at the top of the start routine code means the variables or internal tables are not cleared or refreshed when the next data_package comes in. Whereas, non-global ones are refreshed.
    So, I would like to  seek advice from you,  when is each situation applied in the form of a simple examples would be helpful.
    Merry X'Mas!
    Sanjay Patel

    Hi,
    you're right.
    A simpel sample to illustrate it:
    In the global section define:
    data: g_t_master like standard table of /bi0/pmaterial.
    In the coding for your startroutine, you can now do the following:
    if g_t_master is initial.
      select * from /bi0/pmaterial into table g_t_master.
    endif.
    read table g_t_master with key material = trans_stru-material.
    If you define the internal table locally, the table g_t_master would be filled with every data package and you would select all materials with each datapackage and globally defined you do it only once which would cause you a very bad performance! Thats the big difference.
    Hope it makes it a bit clearer.
    Regards,
    Juergen

Maybe you are looking for

  • Install oracle9i(9.2.0.4) on Fedora Core3

    Install Oracle9i(9.2.0.4) on Fedora Core 3 I. Prepare the files 1. Download ship_9204_linux_disk1.cpio.gz, ship_9204_linux_disk2.cpio.gz ship_9204_linux_disk3.cpio.gz from www.oracle.com to your local disks.Unzip them all. gunzip ship_9204_linux_disk

  • Role based Firefighter approach in AC 10

    I am in the process of implementing "role based" FF (ID based approach not implemented as users are not comfortable to login to GRC system to execute the tcodes).  I have a query about it. If we maintain the role based FF logins, and we run risk repo

  • Do I need to use iPhoto?

    I am thinking of getting an iPad mainly as a device to carry around to display my photographs, although it is bound to be used for a lot else besides I no doubt. As I don't use iPhoto on my Mac will it be easy to load my photo's on to the iPad?

  • Photo name

    Dear All, I made several photos many times ago... After I put them in several maps, Each photo received there own name, I replaced them from those that the camera gives...So now I want too put each photo on my IPad but when I'm looking too the name h

  • My ipad 2 will not update  my apps?

    when i go onto apps store it said that apps need to be updated,i put in my password to update them as usual ,but they wont a box just opens and said unable to download appliication at this time !!!!!  this has happened for a few days now, i have turn