Create a structure type at runtime

Hi friends,
is it possible to create a local structure type dynamically(at run time).My situation is as follows :
The user gives a period of time - for Example from "05.03.2009" to "04.03.2010"
Depending on the number of months between the period of time 
I have to create a structure with field names as follows:
I have calculated the number of months between a period of time and the field name also(Mar-09.Apr-09 extra) using function modules.
The question that is running around my head now is how to create the local structure type at run time with the field names.
TYPES: BEGIN of st_testStruct
     matnr type string,
     land type string,
     "The above to fields in the structure will always be there but depending on the period of time.
     the following fields have to created dynamically.
     Mar-09 type string,     " as the time period starts from "05.03.2009"
     apr-09 type string,
     may-09 type string,
     ........so on
     dec-09 type string,
     jan-10 type string,
     feb-10 type string,
     mar-10 type string,
end of st_testStruct.
depending on the time range the number of field could be more or less in the structure type.Thats why I want to create it dynamically.
Any sample code for this purpose is useful.....
Thanks
P

ABAP RTTS is what you're looking for - check out this [Wiki page|http://wiki.sdn.sap.com/wiki/display/ABAP/RuntimeTypeServices+%28RTTS%29], which should answer your questions... (here's the link to the [ABAP online docu|http://help.sap.com/abapdocu_70/en/ABENRTTI.htm])
Cheers, harald
p.s.: Don't use the hyphen in your field names. This was a bad practice that was used in some old releases. The problem is that fields in a structure are addressed with a hyphen, e.g. like mara-matnr.

Similar Messages

  • Creating a simple type in runtime

    Hi,
    I'd like to know if it's possible to create a simple type in runtime, and set its constraints.
    I need to do that because I generate UIElements at runtime, and I'd to parameter the type of the attribute bound to that UIElement at runtime.
    I won't know the number of UIElements and their type definitions until I go get them from the backend.
    Is it possible, or I'll have to resolve that through a workaround?
    Thanks in advance.
    Alexis Trudeau

    Hi Alexis,
    it's not possible to create a SimpleType at runtime, but it is possible to modify one. Everything can be changed except the builtin-type, which basically describes the Java class used to store values for this type.
    So you can create your attributes using the predefined SimpleType for your desired class and then call
    getModifiableSimpleType()
    on that attribute. Then you can set the constraints as needed.
    HTH Uwe

  • RTTS - Dynamic Structure/Type Generation

    Hi,
    my apologies if this question has been asked before and in the wrong forum.
    Is it possible to dynamically create a structure/type of variable length without using a fixed type? e.g. I want to create a structure with 4 'fixed' fields followed by a number of variable entries dependent upon an external source. I would normally do something like ..
    types : begin of ty_data,
                  matnr         type matnr,
                  werks         type werks,
                  lifnr             type lifnr,
                  menge_01  type menge_d,
                  menge_02  type menge_d,
              end of ty_data.
    data : it_data    type sorted table of ty_data with unique key  ...
    I want to define he whole structure dynamically at runtime.
    Could someone point me to a blog/bar/exit or better still give me an answer?
    Thanks in advance

    Hello Terry
    Of course you can create all kinds of structures / table types dynamically, e.g.:
    [Creating Flat and Complex Internal Tables Dynamically using RTTI|https://wiki.sdn.sap.com/wiki/display/Snippets/CreatingFlatandComplexInternalTablesDynamicallyusingRTTI]
    Your external source must provide you with the meta-data about the structure. This you can use as input for RTTI in order to create your dynamic data objects.
    Regards
      Uwe

  • Sql*modeler loses size against a Structured Type.

    SQL*Modeler Version 2.0.0. Build 584
    I can create a structured type and save it. Then go back to that type and use the up and down down buttons to move an attribute from one place to another. After moving an attribute it loses the size or precision for the one you have been moving around. If you then cancel the changes the data is still lost.
    Similarly, when I click on a attribute I can see the size of say VARCHAR(4) in the left side of the window but in the right side it does not display any value in the size. If I change the name of the attribute then the size is lost.
    Seems like a little bug or two here me thinks......
    Regards
    Ian

    Thanks Ian,
    it's fixed.
    Regards,
    Philip

  • Create Dynamic Structure at Runtime via ALV-Methods!

    Hi Experts,
    i try to create at the ABAP Runtime a new Structure.
    FOR EXAMPLE: I have a internal Table "database" and i dont know their Structure or Typ.
    MY Question: How can i get the structuretype for this internal Table "database" ??
                                    I thought that it is possible with ALV-Methods, but i dont find the right way.
    First Step:       I must get the structure of this internal Table.
    Second Step: I must create a workarea/ line of this internal Table, that i can work row for row with the table.
    Have someone an code example for me, because iám very confused about this Problem.
    With kind regards.
    Ersin Tosun

    Hello,
    For this specific requirement, SAP has provided RTTI class.
    Below is a code snippet for your ready reference. In this example we're trying to get the structure of the dynamic table <ITAB> whose structure is not defined till run-time.
    TYPE-POOLS: abap.
    PARAMETERS: p_table TYPE tabname.
    DATA: dref TYPE REF TO data.
    FIELD-SYMBOLS <itab> TYPE STANDARD TABLE.
    CREATE DATA dref TYPE STANDARD TABLE OF (p_table).
    ASSIGN dref->* TO <itab>.
    DATA: go_tab_descr TYPE REF TO cl_abap_tabledescr,
          go_struc_descr TYPE REF TO cl_abap_structdescr,
          wa_comp TYPE abap_compdescr.
    go_tab_descr ?= cl_abap_tabledescr=>describe_by_data( <itab> ).
    CHECK sy-subrc = 0.
    go_struc_descr ?= go_tab_descr->get_table_line_type( ).
    LOOP AT go_struc_descr->components INTO wa_comp.
      WRITE: / wa_comp-name.
    ENDLOOP.
    I must create a workarea/ line of this internal Table, that i can work row for row with the table.
    Sorry i missed the Step 2:
    FIELD-SYMBOLS: <itab> TYPE STANDARD TABLE,
                   <wa> TYPE ANY,
                   <val> TYPE ANY.
    LOOP AT <itab> ASSIGNING <wa>.
      LOOP AT go_struc_descr->components INTO wa_comp.
    *   To access the components of the structure dynamically
        ASSIGN COMPONENT wa_comp-name OF STRUCTURE <wa> TO <val>.
      ENDLOOP.
    ENDLOOP.
    BR,
    Suhas
    Edited by: Suhas Saha on Nov 18, 2010 7:26 PM

  • Want to create a type at runtime

    Hi all ,
    I am trying to create a type at run time within my scheme by making use of a table loop.
    [code]
    Report test_data.
    data :
        llv_imp type table of RSIMP,
        gt_imp_par type string occurs 0.
    Field-Symbols :
        <fs_imp_par> like RSIMP,
        <fs_struct> type string.
    Form inst_par_types
      Changing
      lv_imp like llv_imp
      lt_imp_par like gt_imp_par.
    Data :
        lv_str(72)  type c ,
        lv_line     type I ,
        lv_delim    type C value ',' .
    Describe table lv_imp lines lv_line.
    Loop at lv_imp assigning <fs_imp_par>.
        if sy-tabix = lv_line.
           lv_delim = '.'.
        endif.
          if <fs_imp_par>-default is not initial.
            concatenate <fs_imp_par>-parameter 'TYPE' <fs_imp_par>-typ
            'VALUE' <fs_imp_par>-default lv_delim into
            lv_str SEPARATED BY space.
          else.
            concatenate <fs_imp_par>-parameter 'TYPE' <fs_imp_par>-typ
            lv_delim into lv_str SEPARATED BY space.
          endif.
      append lv_str to lt_imp_par.
      clear lv_str.
    endloop.
    Types :
            Begin of l_tabname ,
               <b><i>{T$lt_imp_par$$$&lt_imp_par&$$}</i></b>
            End of l_tabname.
    EndForm.
    [/code]
    But when i instantiate this scheme it dumps as the highlighted line creates 2 different definitions of same variable lt_imp_par (1 as var & another one as table).
    What shall I do to get the solution?

    Please do not post multiple treads for the same question.
    Please refer to other thread.
    want to create an internal table at runtime
    Regards,
    Rich Heilman

  • How to create a reference instead of complex type for record in data structure type in BizTalk schema

    I have created the record in BizTalk schema but i will give to Data Structure Type as reference For eg:Recordname(Reference) instead of recordname(Complex type).
    Please help me to sort this out
     

    You can add a reference to an existing type only.
    You might have to manually edit the XSD file to change the xmlns definiton to xmlns:tns and then after you define the record type, set the datatype to tns:.... this creates the XML Type. Then later in your schema you can instantiate this with a name and
    then set type to tns:.... (Reference)
    Regards.

  • Creating a structure, knowing the name and the type of the components

    hi, following problem:
    i have uploaded an excel file from a different system with the information about the names and the types of the components of several structures.
    how can i create a structure with this informatin on my system?

    ok, i think i have to give you some more details:
    i want to update a table from a table saved on another system using a report.
    (only inserts are important, no updates)
    the problem is, that tables may not have the same components.
    therefore i have created several excel sheets with following content (using mehtod gui_download):
    name1      ; name2        ; name3....                 | name of the component
    typ1         ;  typ2           ; typ3 ...                     | type of the component
    content11 ;  content12   ; content13
    content21 ;  content22   ; content23
    uploading the file into table <uploadtable>
    now need dynamic structure:  let' s say dynamicwa
    name1   typ1
    name2   type2
    then: loop at <uploadtable> into dynamicwa.
                move-corresponding dynamicwa to destinationwa.
                insert destination_wa into destination_table.
            endloop.
    but how can i create this dynamicwa?
    Message was edited by: Michael
            Michael  Dirndorfer

  • Create dynamic data type in structure

    Hi Experts,
    I am new to ABAP.
    In my scenario data type is varying for the field. for that I need to create dynamic data type in structure, this structure I am using for  internal table for OVS search input.
    Please suggest the solution for this.
    Advance thanks,
    Regards,
    BBC

    Thanks for your quick reply,
    I used your logic like this.
    data:
    ls_component type abap_componentdescr,
    lt_component type abap_component_tab.
    *... (1) define structure components :
    clear ls_component.
    ls_component-name = 'NVALUE'.
    ls_component-type ?= cl_abap_typedescr=>describe_by_name( <fs_seg_v>-fieldname ).
    insert ls_component into table lt_component.
    *... (2) create structure
    data lr_strucdescr type ref to cl_abap_structdescr.
    data lr_data_struc type ref to data.
    lr_strucdescr = cl_abap_structdescr=>create( lt_component ).
    create data lr_data_struc type handle lr_strucdescr.
    field-symbols <fs> TYPE any.
    assign lr_data_struc->* to <fs>.
    your logic is working fine.
    here I am getting feild name (<fs_seg_v>-fieldname) from internal table.
    But I need to assign same field name structure to query parameter.
    FIELD-SYMBOLS: <ls_query_params> TYPE lty_stru_input.
    Please can you suggest how I can refer the field name structure?
    Regards,
    BBC

  • Can we create a structure with string type not char??

    Hi All
    Can we create a structure with type STRING not as a CHAR type??
    Please its urgent.
    Regards
    Deepanker

    HI,
    Yes, you can string instead of CHAR.
    Please follow the steps below :
    SE11 --> Table name --> Create Button --> And input the short description and necessary Delivery and Maintenance fields --> Select Fields tab --> Input some name on field --> And Click on Predefined button --> Press F4 on Data type column --> a Pop window will be displayed --> Select String from that.
    Thanks,
    Sriram Ponna.

  • How to create dynamic entity beans at runtime (experts welcome)

    Hi,
    i have a question that i have been trying to figure out however i am still in search of an appropriate solution and thus ask you experts for guidance...
    I am developing a system to house data using ejbs.. however a have a problem i am trying to make the system very dynamic and some of the data that i am trying to store is dynamic in its nature..
    let me explain: i am searching for a solution that would allow a entity ejb to have a dynamic set of properties
    e.g.
    DataEntity could have one or many attributes but those attributes may be string, string, int, int
    or could be int, int, int
    or long, long
    or double..... or any configuration
    this DataEntity would linked to a TypeEntity that would act as a reference to know how to store and retrieve data..
    I have just come across JMX and dynamic Mbeans, and at first glance this seemed like it may be able to help but after further research i think this handles a different problem than i am facing.. (however might be wrong?)
    At the moment i am using toplink as the OR mapping but have also jsut started looking into hibernate..
    So far all i have come up with is to have a FieldEntity as a mappedsuperclass and have sub classes such as IntFieldEntity, LongFieldEntity.... which simple contain one field i.e int value, or long value..
    . and have DataEntity have a one to many relationship with the field superclass..
    the problem with this is how this gets mapped
    my ideal solution would be to have a dynamic DataEntity which could be generated at runtime and have all the required attributes for the particular type..
    so DataEntity would be a mappedsuperclass and then at runtime new types of DataEntity's could get spawned, database table created and OR mapping created linking?
    e.g.
    DataEnity1
    String attribute1;
    String attribute2;
    int attribute3;
    DataEnity2
    int attribute1;
    int attribute2;
    long attribute3;
    Has anyone ever created a structure like this or seen anything like this before?
    any advice would be appreciated
    regards,
    fg

    You cant add controls to the visual tree a runtime which persist beyond the lifetime of the application.  You will have to persist an indicator to your program which tells it to add the control.  Adding a control is as simple as initializing
    it and adding it to a parent already on the tree.  Controls can be created programmatically or using the XamlReader.Load static method.  You can find XamReader.Load in Windows.UI.Xaml.Markup in windows 8.1, Windows 8.1/Windows Phone unified
    projects.  For old windows phone ad just Silverlight I believe it is in System.Windows.Markup.
    Hope this helps.

  • A save request exceeded the quantity limits for a given structure type.

    I am running PI7.1 SP6..
    I have created all the objects and done all of the configuration in the Enterprise Service Builder and the Integration Builder and I am trying to publish the Webservice in the Service Registry, but after displaying the WSDL, and then publishing the Webservice, I get the following error:
    com.sap.aii.ib.core.uddi.RegistryClientException: A save request exceeded the quantity limits for a given structure type.
    Number of Business Entities exceeds your limit of 1 (2)
         at com.sap.aii.ib.server.uddi.RegistryClientDelegateProvider$EjbRegistryClient.publishServices(RegistryClientDelegateProvider.java:338)
         at com.sap.aii.ibdir.server.wsquery.WSQUDDISrvPublishTB.execute(WSQUDDISrvPublishTB.java:112)
         at com.sap.aii.ibdir.core.simulation.DefaultTaskBroker.execute(DefaultTaskBroker.java:158)
         at com.sap.aii.ibdir.server.simulation.TaskQueryService.specialQuery(TaskQueryService.java:31)
         at com.sap.aii.ib.server.query.SpecialQueryServiceProvider$SpecialQueryServiceImpl.specialQuery(SpecialQueryServiceProvider.java:63)
         at com.sap.aii.ib.server.query.QueryServiceImpl.specialQuery(QueryServiceImpl.java:443)
         at com.sap.aii.ib.server.query.QueryServiceBean.specialQuery(QueryServiceBean.java:112)
         at sun.reflect.GeneratedMethodAccessor534.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:43)
         at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166)
         at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19)
         at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
         at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:71)
         at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
         at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:38)
         at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:22)
         at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
         at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:189)
         at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:16)
         at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
         at com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:21)
         at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
         at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:16)
         at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
         at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:133)
         at com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:164)
         at $Proxy2177.specialQuery(Unknown Source)
         at sun.reflect.GeneratedMethodAccessor533.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sap.engine.services.rmi_p4.P4DynamicSkeleton.dispatch(P4DynamicSkeleton.java:234)
         at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:351)
         at com.sap.engine.services.rmi_p4.server.ServerDispatchImpl.run(ServerDispatchImpl.java:70)
         at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:62)
         at com.sap.engine.services.rmi_p4.P4Message.execute(P4Message.java:37)
         at com.sap.engine.services.cross.fca.FCAConnectorImpl.executeRequest(FCAConnectorImpl.java:872)
         at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:53)
         at com.sap.engine.services.cross.fca.MessageReader.run(MessageReader.java:58)
         at com.sap.engine.core.thread.execution.Executable.run(Executable.java:108)
         at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:304)
    Caused by: com.sap.esi.uddi.sr.api.ws.PublishServicesFault: A save request exceeded the quantity limits for a given structure type.
    Number of Business Entities exceeds your limit of 1 (2)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
         at com.sap.engine.services.webservices.espbase.client.bindings.impl.JAXWSUtil.deserializeException(JAXWSUtil.java:357)
         at com.sap.engine.services.webservices.espbase.client.bindings.impl.JAXWSUtil.processFault(JAXWSUtil.java:327)
         at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.call_SOAP(SOAPTransportBinding.java:987)
         at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.callWOLogging(SOAPTransportBinding.java:703)
         at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.call(SOAPTransportBinding.java:673)
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.processTransportBindingCall(WSInvocationHandler.java:167)
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.invokeSEISyncMethod(WSInvocationHandler.java:120)
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.invokeSEIMethod(WSInvocationHandler.java:83)
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.invoke(WSInvocationHandler.java:64)
         at $Proxy2689.publishServices(Unknown Source)
         at com.sap.esi.uddi.sr.api.ws.ejb.ServicesRegistryProxyFacade.publishServices(ServicesRegistryProxyFacade.java:358)
         at sun.reflect.GeneratedMethodAccessor1059.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:43)
         at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166)
         at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19)
         at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
         at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:71)
         at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
         at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:38)
         at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:22)
         at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
         at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:189)
         at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:16)
         at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
         at com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:21)
         at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
         at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:16)
         at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
         at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:133)
         at com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:164)
         at $Proxy255.publishServices(Unknown Source)
         at com.sap.aii.ib.server.uddi.RegistryClientDelegateProvider$EjbRegistryClient.publishServices(RegistryClientDelegateProvider.java:335)
         ... 41 more
    As always, these errors are so informative! 
    It has published the Webservice in the Service Registry, but not with the End Points...
    has anyone come across the message before and know how to fix it so I can successfully publish the Webservice???
    I have searched SDN and OSS - also opened an OSS note about another error I am experiencing...

    Hi Barry
    Have you already published for the same server or this is first time you tried and got error ?
    Did you referred Troubleshooting guide
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e05829a5-55aa-2a10-f694-ba8e30c3c122
    Master installation guide
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e0301486-758c-2a10-9d84-a195556df422
    Thanks
    Gaurav

  • Assigning Table/Structure Types using Field-Symbols

    Hello Gurus,
    How can we assign a table or structure type to a particulart internal table?
    What I want to do is to make my data declaration for i_tab reusable.
    i.e.
    DATA: v_tab  TYPE string.
    v_tab = 'MARA'.
    DATA  : i_tab  TYPE STANDARD TABLE OF v_tab.
    The purpose is to make the declaration flexible so program can change v_tab to any table names like LIPS, KNA1...etc making the i_tab flexible and reusable enough. Can anyone help me please? I try to use field-symbols, but I can not achieve what I want. Any bright ideas please?

      DATA: dref TYPE REF TO data.
      FIELD-SYMBOLS: <table> TYPE STANDARD TABLE,
                     <line>  TYPE ANY.
      PARAMETERS: pa_tab TYPE tabname DEFAULT 'BUT000'.
      CREATE DATA dref TYPE STANDARD TABLE OF (pa_tab).
      ASSIGN dref->* TO <table>.
      SELECT * FROM (pa_tab) INTO TABLE <table>
               UP TO 10 ROWS.
    LOOP AT <table> ASSIGNING <line>.
    ENDLOOP.
    <LINE> will take the structure of the table line at runtime.
    This is quite flexible.
    But you can also declare it like this, as we did with the <table>:
    DATA: dref1 TYPE REF TO data.
    CREATE DATA dref1 TYPE (pa_tab).
    ASSIGN dref1->* TO <line>.
    This way <line> will already have the correct structure, even before the <ASSIGNING>.
    Edited by: Micky Oestreich on Mar 24, 2009 8:21 AM

  • Is there a way to create a structure or a local class inside of another?

    In VB you can create a private type I believe in C++ it's called a struct I was wondering is there a way with Java to create a local class or structure to store variables in a group inside of another class. I'd rather have them in an structure for readability.

    you can do something like this.
    public class MyStruct {
    public String name;
    public int number;
    public double value;
    public class Test {
    private MyStruct struct = new MyStruct();
    private void setValue() {
    struct.name = "my name";
    struct.number = 1;
    struct.value = 20.0;
    public void setStruct(MyStruct newStruct)
    struct = newStruct;
    };

  • How to create a line type in data dictionary

    How to create a line type in data dictionary?Please explain step by step?
    Thanks & Regads,
    Sairam

    Hi,
    the details abbout the line type.
    The line type of a table type can be defined by:
    o Specification of a type that already exists (data element,
    structure, table type, table, view) whose properties are then copie
    as properties of the defined table line.
    o Direct type input, where data type, number of positions, and, if
    required, decimal places, are entered directly.
    o Specification of a reference type.
    and SE11 and click on datatype and click on table type and enter the line type.
    Thanks
    Shiva

Maybe you are looking for