Dynamic Declaration

Hi
I was looking into a poosibility of making a dynamic declaration refercing a formal parameter. is it possible. below is my code:
FORM WRITE_DATA  USING P_TYPE   P_SNAME.
  CREATE DATA p_type TYPE (P_SNAME).
ENDFORM
Can you pls let me know on how to acheive it

Hi Prabhu,
if i understood you correctly, it's not possible what you like to do, because
create data just gives you a pointer like for the above example, then you can assign the pointer to
a field symbol that takes over the type of s_name then.
I'm not sure, but i think what you need is the class
CL_APAP_TYPEDESCR and it's subclasses like
CL_ABAP_TYPEDESCR
--CL_ABAP_DATADESCR
--CL_ABAP_ELEMDESCR
--CL_ABAP_REFDESCR
--CL_ABAP_COMPLEXDESCR
--CL_ABAP_STRUCTDESCR
--CL_ABAP_TABLEDESCR
--CL_ABAP_OBJECTDESCR
       |--CL_ABAP_CLASSDESCR
       |--CL_ABAP_INTFDESCR
I think it's able to make dynamic declarations like you need then, but i never
needed it and never used it.
Kind Regards
Henner

Similar Messages

  • "Dynamic Declaration/Variable"

    Hi,
    first sorry for my bad english :)
    I have a Problem with Forms Builder 6
    I want to know if it possible to set dynamic declarations inside a loop
    loop_i := 1;
    WHILE loop_i < 10 LOOP
    go_item('GERAET' || to_char(loop_i) || '.Beginn'); --Geraet1.Beginn to Geraet10.Beginn... this works without problems
    if (':GERAET'||to_char(loop_i)||'.Beginn') is null then
    :GERAET || to_char(loop_i) || .Beginn := ('01-JAN-1234'); -- here is my problem
    END LOOP;
    My Problem is in this Line :GERAET || to_char(loop_i) || .Beginn :=
    I cant fill fields dynamic like this. Is there any way to fill Geraet1.Beginn to Geraet10.Beginn with this Loop? I dont know the syntax for declarations with " : " and a dynamic variable
    i hope you understand what i mean :)

    Use the Name_In() and Copy() built-ins (see the online doc)
    Francois

  • Dynamic Declarative Component managed bean returned null

    Hi,
    In a project from an application a DDC component is defined. This component uses a managed/backing bean with view scope.
    Using this component inside this project is working fine. This component should be used in other view controller projects, and here where the problems are.
    This project(let's call it Common) is deployed as ADF Library jar, and used in the other V-C projects.
    The big problem is that the managed bean defined for the logic of this component is not 'reacheable'.
    (Another problem is that the attribute value is not seen as its EL expression but as string, for this i found a workaround.)
    In project Common the adfc-config.xml file:
    <adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
      <managed-bean id="__4">
        <managed-bean-name id="__2">ExtendedShuttle</managed-bean-name>
        <managed-bean-class id="__1">com.xyz.portal.taskflow.common.extendedshuttle.ExtendedShuttle</managed-bean-class>
        <managed-bean-scope id="__3">view</managed-bean-scope>
      </managed-bean>
    </adfc-config>A part from component declaration:
          <af:table var="row" rowBandingInterval="0" id="ta"
                                  rowSelection="multiple" columnStretching="last"
                                  disableColumnReordering="true" fetchSize="-1"
                                  binding="#{viewScope.ExtendedShuttle.allItemsTable}"
                                  value="#{viewScope.ExtendedShuttle.allModel}"
                                  partialTriggers="::dc_cb5 ::dc_cb3"
                                  filterVisible="true"/>The root exception is :
    javax.el.PropertyNotFoundException: Target Unreachable, 'ExtendedShuttle' returned null
    This exception is throw on com.sun.faces.application.ApplicationImpl.createComponent when *#{viewScope.ExtendedShuttle.allItemsTable}* is evaluated.
    Caused By: javax.faces.FacesException: javax.el.PropertyNotFoundException: Target Unreachable, 'ExtendedShuttle' returned null
         at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:262)
         at javax.faces.webapp.UIComponentELTag.createComponent(UIComponentELTag.java:222)
         at javax.faces.webapp.UIComponentClassicTagBase.createFacet(UIComponentClassicTagBase.java:510)
         at javax.faces.webapp.UIComponentClassicTagBase.findComponent(UIComponentClassicTagBase.java:661)
         at javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTagBase.java:1142)
         at org.apache.myfaces.trinidad.webapp.UIXComponentELTag.doStartTag(UIXComponentELTag.java:70)
         at oracle.adfinternal.view.faces.taglib.UIXTableTag.doStartTag(UIXTableTag.java:41)
         at oracle.adfinternal.view.faces.unified.taglib.data.UnifiedTableTag.doStartTag(UnifiedTableTag.java:50)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:50)
    Caused By: javax.faces.FacesException: javax.el.PropertyNotFoundException: Target Unreachable, 'ExtendedShuttle' returned null
         at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:262)
         at javax.faces.webapp.UIComponentELTag.createComponent(UIComponentELTag.java:222)
         at javax.faces.webapp.UIComponentClassicTagBase.createFacet(UIComponentClassicTagBase.java:510)
         at javax.faces.webapp.UIComponentClassicTagBase.findComponent(UIComponentClassicTagBase.java:661)
         at javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTagBase.java:1142)
         at org.apache.myfaces.trinidad.webapp.UIXComponentELTag.doStartTag(UIXComponentELTag.java:70)
         at oracle.adfinternal.view.faces.taglib.UIXTableTag.doStartTag(UIXTableTag.java:41)
         at oracle.adfinternal.view.faces.unified.taglib.data.UnifiedTableTag.doStartTag(UnifiedTableTag.java:50)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:50)
    Caused by: javax.el.PropertyNotFoundException: Target Unreachable, 'ExtendedShuttle' returned null
         at com.sun.el.parser.AstValue.getTarget(AstValue.java:88)
         at com.sun.el.parser.AstValue.setValue(AstValue.java:133)
         at com.sun.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:255)
         at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:259)
    Can you help figure it out, why is not working or why the managed bean is not visible in other projects but only in the one where the component is defined?
    Thank you for your time,
    Bogdan
    ps: how can i format the source code, on this fourm?

    Hi Frank,
    Thank you for the answer.
    I must say i'm quite new with ADF technology and maybe my questions are silly.
    Here is a Quote from "Oracle Fusion Developer Guide - Building Rich Internet Application with Oracle ADF" by Frank Nimphius and Lynn Munsinger Chapter 15 page 498:
    "You build dynamic declarative components *instead* of tag library based declarative components, if component resuse is required *only within the application* that has the component defined."
    Maybe i misunderstand the meaning of application from this sentence, but i need this component in several ViewController projects from only one application (ADF application).
    Tag lib declarative component I would not like to have, since the (automtically) build process is not my responsability and it will take some time till is pinpointed, but still is a last resort.
    Anyway two things are strange:
    1. Why the component is still available in other projects(and the beans not)?
    2. Why when a binding variable (for example: of type FaceCtrlHierBinding) has the correct type in the declarative project and in the order projects is of type String and its value is the variable name?
    Example:
    <af:declarativeComponent ...
    AllItems="#{bindings.Action}"
    In project where the component is declared its value is an instance of FacesCtrlHierBinding and in the rest of the projects is of type String with value "Action".
    Once again thank you a lot,
    Bogdan

  • Dynamic declarative component won't work properly within table row

    Hi guys,
    I built a dynamic declarative component which basically consists of an af:inputText surrounded by a af:panelLabelAndMessage tag.
    The component works fine until I put it inside a table column, then none of the attribute values get set.
    The problem seems to be related to the table row binding #{row.binding.Name.inputValue} , if I use a regular binding #{binding.Name.inputValue} it works ok.
    The declarative components attribute is defined as
    <attribute>
        <attribute-name>kbez</attribute-name>
        <attribute-class>java.lang.Object</attribute-class>
    </attribute>and is used as the inputText's value attribute
    <af:componentDef var="attrs" componentVar="component">
        <af:panelLabelAndMessage label="#{attrs.label}" id="dc_plam1"
                                 for="dc_it1" labelStyle="white-space:nowrap;"
                                 showRequired="#{attrs.showRequired}"
                                 rendered="#{attrs.rendered}">
            <af:inputText id="dc_it1" value="#{attrs.kbez}"
                          autoSubmit="true" immediate="false" ...>The component inside a table column is set like this
    <af:declarativeComponent viewId="/WEB-INF/ikb.adf.kreda.basis/mitarbeitersuche/ddc/mitarbeiterLOV.jsff"
                             id="ddc1" label="Mitarbeiter"
                             kbez="#{row.bindings.Kbez.inputValue}"/>My JDeveloper version is 11.1.1.5.
    Am I doing it wrong or is this a bug?
    Any help is appreciated.
    Thank you,
    Achim
    Edited by: Achim Rosenfeld on Mar 8, 2013 8:41 AM

    Hi,
    +#{row.binding.Name.inputValue} , if I use a regular binding #{binding.Name.inputValue} it works ok.+
    Don't think that #{binding.Name.inputValue} works okay in a table because it doesn't stamp the component per row. Actually I don't know if we support dynamic declarative components in a stamped environment (table). I know though that we don't for taglib declarative components in this context.
    Reason why it doesn't work: Tables are stamped at runtime, which means that for better performance, only the generated HTML is reused for each row with different data - not the component. Your component requires itself to be re-created for each row so it can re-read the attribute again. This is not the case in a stameped environment
    Solution: For your particular use case I don't think that a dynamic declarative component is needed as you can add the construct (af:inputText surrounded by a af:panelLabelAndMessage) directly into an af:column tag. The declarative component makes more sense for reuse of layout areas (e.g. custom tabs) that are iterated within an af:forEach (in which case instances of the decalarative components would be created).
    Bottom line: tables stamp their components and as such the attribute property exposed on a DDC doesn't seem to be called for each row, which is by design. This can be considered a bug if there is a use case demanding for a DDC in a table. If this is a requirement for you (and you can't directly add the components to the af:column tag) feel free to file this as a service request with customer support (required a support contract) so development can have a look if the requirement is feasible to implement.
    Frank

  • Dynamic Declare Component cannot find property

    We currently have one main page calls a DDC(Dynamic declarative component) page fragment to create/update a record in database. The main page pass in a key to DDC when it loads DDC. The DDC binds to a view object with bind variable (get value from the passed key and load data from table) and several LOV attributes. Once user clicks submit button in main page, we wish that all the fields displayed in DDC could be committed to a database table to save.
    I use 11.1.1.5.
    In order to assign the bind variable of VO, we wrote a method in Application Module and make it invoked as the first executable when the main page is loaded. The deployment is fine. However, the runtime always thrown some exception to complain it cannot find property definition like this:
    ####<Aug 15, 2011 6:32:24 PM CDT> <Warning> <oracle.adfinternal.view.faces.lifecycle.LifecycleImpl> <curmailts1-corp> <AdminServer> <[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <6b1af60b3a40d50a:-6c52e935:131cfc2d522:-8000-000000000000024c> <1313451144494> <BEA-000000> <ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase RENDER_RESPONSE 6
    javax.el.PropertyNotFoundException: Target Unreachable, 'WorkDescription' returned null
         at com.sun.el.parser.AstValue.getTarget(Unknown Source)
         at com.sun.el.parser.AstValue.isReadOnly(Unknown Source)
         at com.sun.el.ValueExpressionImpl.isReadOnly(Unknown Source)
         at oracle.adfinternal.view.faces.renderkit.rich.EditableValueRenderer._getUncachedReadOnly(EditableValueRenderer.java:486)
         at oracle.adfinternal.view.faces.renderkit.rich.EditableValueRenderer.cacheReadOnly(EditableValueRenderer.java:416)
         at oracle.adfinternal.view.faces.renderkit.rich.LabeledInputRenderer.beforeEncode(LabeledInputRenderer.java:128)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:334)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
    Questions: 1) Why my method in Application Module not called?
    2) Whether DDC is a right solution for our use case? Any suggestion or sample are welcomed!
    Thanks,

    Hi,
    I appreciate if you can show your code, but before that, make sure if you're following this tip below:
    "Declarative Components are regular JSF components except that they are built as a composite out of existing ADF Faces components. Declarative components cannot have a PageDef file associated with it and instead use value or method attribute to communicate with the consuming page. When creating a declarative component, the attrs implicit object is defined that allow you to reference the component's exposed value attribute from ADF Faces components within.
    An input text field contained in an declarative component may reference a value attribute "compValue" defined on the declarative component by using the following EL
    #{attrs.compValue}
    The declarative component compValue attribute then would us an EL reference like shown next to read/write values from or to the ADF binding layer:
    #{bindings.attribute_name.inputValue}"
    (Oracle ADF Code Corner)
    Regards,

  • What happens to dynamically declared variables when I'm not using them?

    Hello, I'm making a game using Flash Pro cc. But I wonder what happens to aTile, which is dynamically declared MovieClip variable through a loop. And each aTile gets the 2 EventListener's.
    for(var i:Number=0; i<pVector.length;i++){
        var aTile:ATile=new ATile();
        aTile.x=pVector[i].x;
        aTile.y=pVector[i].y;
        aTile.gotoAndStop(Math.ceil(Math.random()*Color));
        nVector.push(aTile);
        Spr.addChild(aTile);
        aTile.addEventListener(MouseEvent.CLICK,Clicked,false,0,true);
        aTile.addEventListener(Event.COMPLETE, stop,false,0,true);
         // the current function ends here. what happens to aTile now ?? Is it going to be garbage collected? By the way, this piece of code runs whenever a player starts a new level of my game. And I don't make use of the aTile variable in other functions. I use only the nVector variable. And does declaring a dynamic variable in a loop mean a multiple of them are created? For example, if I loop the piece of code above 5 times, does it mean 5 aTile variables are created? Or each time you declare
    var aTile:ATile=new ATile(); again, does it replace the 'old' aTile with the 'new' aTile and therefore only 1 aTile exists after the loop????

    I feel there is a gap in understanding of using variables by reference vs. by value. You should look it up.
    1. new instructs Flash to create a distinct instance that per se has absolutely nothing to do with aTile variable.
    2. REFERENCE to this new instance is assigned to variable aTile. aTile var is a temporary pointer to instance.
    3. It does not replace old tile - it replaces reference.
    4. If reference to the instance is not stored elsewhere - upon exiting of function this instance will be gced.
    5. By creating another reference to the instance you prevent it from GC. One of the ways you preserve instance is by adding it to display list when using addChild.
    You can look at this this way (it is a lame example but still it illustrates parts of the concept)
    Say you have
    1. basket;
    2. basket is small and can hold only one apple;
    3. table;
    4. an apple;
    5. apple can be placed into the basket or table;
    6. dog who love apples.
    7. Dog is trained not to take apples from baskets but table but is free to eat apples that are on the ground.
    So, once apple is in the basket or on the table - it is safe.
    If you move these entities into the realm of AS3, basket and table become declared variables, apple an instance and dog garbage collector.
    What this example demonstrates is that apple exists independently of basket or table. You can put apple to the basket OR on the table OR you can put apple into basket and place basket onto the table.
    1. Find apple instance (if you know whether apple is in the basket, on the table or in the basket on the table)
    2. Prevent dog from eating apple.
    3. Allow dog to eat it (destroy it when garbage collector kicks in) by assuring that apple is in neither basket or on the table.

  • Dynamic declaration for variable.

    Can we declare a variable dynamic with varing data type.
    My req is i have to define a variable to store output from a dynamic select statement. Now since SELECT is dynamic, its output type changes each time and for the same I need a variable defined dynamically.
    Regards,
    Arpit

    Hi Arpit Gattani,
        To store output of an dynamic Select statement you can use dynamic data objects and field symbols.
        To create a data object dynamically during a program, you need a data reference variable and the following statement:
    CREATE DATA <dref> TYPE <type>|LIKE <obj>.
    This statement creates a data object in the internal session of the current ABAP program. After the statement, the data reference in the data reference variable <dref> points to the object. The data object that you create does not have its own name. You can only address it using a data reference variable. To access the contents of the data object, you must dereference the data reference.
    You must specify the data type of the object using the TYPE or LIKE addition. In the TYPE addition, you can specify the data type dynamically as the contents of a field (this is not possible with other uses of TYPE).
    CREATE DATA <dref> TYPE (<name>).
    Here, <name> is the name of a field that contains the name of the required data type.
    <b>Example:</b>
    A specific field is read from database table X031L. Neither the field name nor the table name is known until runtime:
    Read a field from the table X031L
    PARAMETERS:
      TAB_NAME    LIKE SY-TNAME,           "Table name
      TAB_COMP    LIKE X031L-FIELDNAME,   "Field name
      ANZAHL      TYPE I DEFAULT 10.       Number of lines
    FIELD-SYMBOLS: <WA>   TYPE ANY,
                   <COMP> TYPE ANY.
      DATA: WA_REF TYPE REF TO DATA.
      CREATE DATA WA_REF TYPE (TAB_NAME). "Suitable work area
      ASSIGN WA_REF->* TO <WA>.
    SELECT * FROM (TAB_NAME) INTO <WA>
      UP TO anzahl ROWS.
      WRITE: / TAB_COMP, <COMP>.
      ENDSELECT.
    Dont Forget to give points if it helps ;>)
    Regards
    Rakesh.

  • Dynamical declaration of SELECT-OPTIONS / RANGE possible

    Hi fellow programmers,
    does anybody know whether there is a way to declare a
    SELECT-OPTION respectively a RANGE dynamically during
    runtime? I have both the name of the range to be created
    and the DDIC-referencefield stored in variables.
    Thanks in advance for your appreciated help.
    Andreas

    Hi Andreas,
    DYNAMIC PROGAM SHOWS SELECTION-SCREEN.
    1 Sap does not allow execution of dynamic programs from memory.
      (dynamic means, only in memory, not in database)
    2. However, it allows execution of dynamic FORM/ENDFORM.
    3. But your requirement is of selection-screen using parameters and select-options.
    4. Hence, we can use the concept of DYNAMIC PROGRAM
       (build the program code in an internal table)
       using command
       INSERT REPORT 'ZDYN01' FROM itab.
       THIS WILL SAVE / OVERWRITE THE PRGRAM IN DB.
       HENCE, BE CAUTIOUS.
    5. Just Copy/Paste this sample program
       It will generate a dynamic program called ZDYN01.
       it will also execute it and
       SHOW SELECTION-SCREEN
       of the DYNAMIC PROGRAM.
    6. You may build up yuour own logic
        of constructing selection-screen from   
         required data stored in tables.
    7.
    REPORT abc.
    Data
    DATA : BEGIN OF itab OCCURS 0,
           l(72) TYPE c,
           END OF itab.
    DATA : prog(8) TYPE c.
    Make Dynamic Program
    CLEAR itab.
    itab-l = 'REPORT ABC.'.
    APPEND itab.
    itab-l = 'PARAMETERS : MATNR LIKE MARA-MATNR.'.
    APPEND itab.
    itab-l = 'START-OF-SELECTION.'. APPEND itab.
    itab-l = 'WRITE :/  MATNR.'. APPEND itab.
    Generate Program
    INSERT REPORT 'ZDYN01' FROM itab.
    COMMIT WORK. "----- COMMIT NECESSARY FOR DB
    *------ Call Report
    SUBMIT zdyn01 VIA SELECTION-SCREEN.
    HOPE THE ABOVE HELPS.
    Regards,
    Amit M.

  • Dynamic declaration of XSD datatype in Java

    Hi,
    I am writing a dynamic client for invoking web service solely based on the information from their wsdl documents. Suppose the service uses some customized datatype defined with XSD. Assume I have those datatypes in Java class already. Now I can parse the wsdl document to get the name of a specific datatype of an input part. But how can I declare an object of that datatype in Java with the name of that datatypestored in a variable? One possible solution is to compare it against all possible datatype names, like
    if (name.equals("string") {
    String myObject = new String();
    }else if (name.equals("integer") {
    Integer myInteger = new Integer();
    But obviously this isn't a practical solution since thedatatypes are so many, not even mention user defined ones.
    Can anyone giveme some suggestion? Thanks a lot.
    Yu

    Class.forName(String name)
    The Java Tutorial� - Trail: The Reflection API

  • Dynamically Declared Properties in PS CS3's plug-in

    Now Im developing a plug-in for Photoshop CS3, and I want to dynamically change its properties rather than statically define them in PiPL.
    But Photoshop never send message "SP Properties" to my plug-in, so I have no chance to handle SPPropertiesMessage. Id like to appreciate if anyone could let me know how to let PS send message acquiring properties or whether PS really support this kind of approach, thanks!

    PS does not support that kind of approach. PS does not support all of the SP API's. The static PiPL property is all you have for defining a plug-in. (Helps our launch time for warm launch)

  • Dynamic variable declaration

    Hi
    I am writing a procedure in which i get the schema name only as input parameter at run time.
    for e.g.:
    v_id sys.dba_users.username%type;
    In the above datatype declaration, SYS is the schema name, dba_users is the table name and username is the column.
    What if i do not know the schema name up front, is there a way for me to have dynamic declaration?
    p_schema VARCHAR2(30) := 'SYS';
    v_id dba_users.username%type; -- how can i associate this with p_schema
    Is it even possible?

    The bigger picture is this. The same set of tables is copied to new schema once every few months. The tables data structure does not change except for the schema it belongs to. So i have to write a code which will accept the schema name as input parameter and retrieve data from the right tables.
    My question is if there is a way to dynamically specify a schema while declaring variables.
    how can i get the equivalent of v_id sys.dba_users.username%type if schema name 'SYS' is not known upfront.
    If i get to to schema name 'SYS' at run time like below:
    p_schema VARCHAR2(30) := 'SYS';
    v_id dba_users.username%type; -- how can i associate this with p_schema
    If dynamic declaration is not at all possible, i can always declare my variables as follows:
    v_id VARCHAR2(30);
    Thanks everyone for your answers though.

  • 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

  • How to dynamic for declaration variable?

    This is my problems
    I will by PLMK-STELLEN data to determine decimals
    Example:
    IF PLMK-STELLEN = 3
    then data: l_amt1 type p decimals 3.
    IF PLMK-STELLEN = 2
    then data: l_amt1 type p decimals 2.
    For this case, how can i do, please help.
    Thanks a lot!!

    You should use dynamic declaration.
    TYPES:
    p3 TYPE p DECIMALS 3,
    p2 TYPE p DECIMALS 2.
    DATA dref TYPE REF TO data.
    FIELD-SYMBOLS <l_amt1> TYPE ANY.
    IF PLMK-STELLEN = 3
      CREATE DATA dref TYPE p3.
    ELSEif IF PLMK-STELLEN = 2.
      CREATE DATA dref TYPE p2.
    ENDIF.
    ASSIGN dref TO <l_amt1>.
    Hope it helps.

  • Dynamic Data Type declaration from Parameter value

    Hi,
      I have a silly question..
    Is it possible to dynamically declare a variable based on the contents of a parameter...like:
    Tables: RSDUPD.
    Parameter: p_Daty like RSDUPD-DATU
    Data: l_last_day like (p_Daty)
    Thanks

    ok....thanks for the answer but its time to make the question harder. 
    I have the following code:
    DATA: it_query_results TYPE REF TO data.
    PARAMETER: prxy_cls(30).
    CREATE DATA it_query_results TYPE STANDARD TABLE OF (prxy_cls).
    ASSIGN it_query_results->* TO <l_it_query_result>.
    ....I do all sorts of processing with <l_it_query_result>.....then
    CALL METHOD o_query_result->execute_asynchronous
        EXPORTING
           output = <l_it_query_result>.
    only problem is method execute_asynchronous doesnt expect a type ref and only expects table type ZBWCOPA9030V00_QUERY_RESULT1...which is what I am entering in the parameter prxy_cls..
    need help badly..
    thanks

  • Dynamic sizing of RAW datatype

    Hi All,
    I want to read BLOBs out of a table using the DBMS_LOB package
    I would like to do something like...
    my_blob_length := DBMS_LOB.GETLENGTH(my_blob);
    DECLARE
    my_buffer RAW(my_blob_length); -- this is the bit I'm stuck with ;-)
    DBMS_LOB.READ(my_blob, my_blob_length, 0, my_buffer);
    But I don't know how to dynamically size the RAW buffer. Any advice gratefully received.
    Cheers,
    Ewan

    But I don't know how to dynamically size the RAW buffer. Any advice gratefully received.The only way (I can think of) that you can dynamically declare length, precision, or scale for a PL/SQL variable is to do within an anonymous PL/SQL block of Native Dynamic SQL.
    Doing this is probably more of a headache than it is worth - very impractical to code/debug/maintain/scale.
    Michael

Maybe you are looking for

  • How can I sort files in a folder by name?

    How can I sort files in a folder by name? iFS first sort files that starts with upper-case letter and then files with lower-case letter. Like: A_file B_file a_file b_file I want: A-file a_file B_file b_file This doesn't help: String[] sort_attributes

  • Is there a way to create new Barcodes for Adobe Printforms

    Hi All, As far I know there is currently no way to add new barcodes to the Adobe designer..SAP Note #430887 says the same.. Can I get any exact SAP note which states that adding new barcodes is not currently possible.. If there is any way we can do t

  • Copied  using ImportNode,  copied document is not opening in xml editor

    Hi I am copying portion of the the xml into anothe xml file . using Element lElement = (Element) lNewFeedDocument.importNode(lIncomingFeedDocument.getElementsByTagName(                         "content").item(0), true);             lNewFeedDocument.a

  • XSL Mapper JDeveloper plugin fails to launch from App Engine

    XSL Mapper JDeveloper plugin fails to launch from App Engine ONLY WHEN THE TARGET LOCATION OF THE SERVICE CONFIGURATION POINTS TO AN HTTPS URL. If I make the target location field of the service configuration point to an HTTP url, the plugin launches

  • Pdf attachment no iBooks "Open As"

    User has an iPad Air 2 running iOS 8.2 and has received a pdf as an attachment. He goes to "Open As" to open and save the pdf in iBooks but iBooks is not in the listing. Looking in the "More" shows a total of 3 items not 10, and iBooks is not listed