Dynamic DDIC structure - work at runtime with changes

Hi Experts,
I have a problem in a method of Web Dynpro Abap. Ich have a database structure /SME/DED_DYN and change its fields at runtime. I do that with the function DDIF_TABL_PUT and the activation with DDIF_TABL_ACTIVATE.
I have:
COMMIT WORK and wait.
  CALL FUNCTION 'DDIF_TABL_PUT'
     EXPORTING
         NAME = '/SME/DED_DYN'
     TABLES
         DD03P_TAB = DD03P_TAB
         DD05M_TAB = DD05M_TAB
         DD08V_TAB = DD08V_TAB
         DD35V_TAB = DD35V_TAB
         DD36M_TAB = DD36M_TAB
     EXCEPTIONS
         tabl_not_found          = 1
         name_inconsistent       = 2
         tabl_inconsistent       = 3
         put_failure             = 4
         put_refused             = 5
         others                  = 6.
  COMMIT WORK and wait.
  if sy-subrc = 0.
    call function 'DDIF_TABL_ACTIVATE'
      exporting
          name =  '/SME/DED_DYN'
      IMPORTING
          rc = rc   
      exceptions
            not_found   = 1
            put_failure = 2
            others      = 3.
  endif.
The fields of the DDIC structure /SME/DED_DYN are changed at runtime dynamicly. Not their value, the fields themselves with fieldname and datatype. I need to work with these NEW fields of the DDIC structure at the same runtime. But somewhere the OLD /SME/DED_DYN is buffered I think, because the method only reads this old structure although in Transaction SE11 it changes to the NEW one at runtime correctly. I have to refresh my whole Web Dynpro Application in the browser and then it works with the new structure.What buffer could this be and how can I clear it, so that my method in WebDynpro can proceed with the new DDIC structure?
I hope you understand my problem.
Thanks for your help!!
Best regards,
Ingmar

Hi,
I create a database table which name is ZTABL1 .
The fields of this table are MANDT and FIELDS1 .
Then i write the code below .
It changes the dbtable dynamically and the values of the fields.
I hope this help you.
DATA :      DD03P_TAB LIKE  DD03P OCCURS 0 WITH HEADER LINE .
DATA :      DD05M_TAB LIKE  DD05M OCCURS 0 WITH HEADER LINE .
DATA :      DD08V_TAB LIKE  DD08V OCCURS 0 WITH HEADER LINE .
DATA :      DD12V_TAB LIKE  DD12V OCCURS 0 WITH HEADER LINE .
DATA :      DD17V_TAB LIKE  DD17V OCCURS 0 WITH HEADER LINE .
DATA :      DD35V_TAB LIKE  DD35V OCCURS 0 WITH HEADER LINE .
DATA :      DD36M_TAB LIKE  DD36M OCCURS 0 WITH HEADER LINE .
DATA : lt_fcat TYPE lvc_t_fcat ,
       ls_fcat TYPE lvc_s_fcat .
DATA : lt_table TYPE REF TO data.
DATA :  ZTABL1 .
CALL FUNCTION 'DDIF_TABL_GET'
  EXPORTING
    NAME                = 'ZTABL1'
  TABLES
    DD03P_TAB           = DD03P_TAB
    DD05M_TAB           = DD05M_TAB
    DD08V_TAB           = DD08V_TAB
    DD12V_TAB           = DD12V_TAB
    DD17V_TAB           = DD17V_TAB
    DD35V_TAB           = DD35V_TAB
    DD36M_TAB           = DD36M_TAB
  EXCEPTIONS
   ILLEGAL_INPUT       = 1
    OTHERS              = 2
LOOP AT DD05M_TAB WHERE FIELDNAME NE 'MANDT'  .
DD05M_TAB-FIELDNAME = 'FIELD2' .
MODIFY DD05M_TAB .
ENDLOOP.
LOOP AT DD03P_TAB WHERE FIELDNAME NE 'MANDT'
DD03P_TAB-FIELDNAME = 'FIELD2' .
MODIFY DD03P_TAB  .
ENDLOOP.
LOOP AT DD08V_TAB WHERE FIELDNAME NE 'MANDT' .
DD08V_TAB-FIELDNAME = 'FIELD2' .
APPEND DD08V_TAB .
ENDLOOP.
LOOP AT DD35V_TAB  WHERE FIELDNAME NE 'MANDT' .
  DD35V_TAB-FIELDNAME = 'FIELD2' .
  MODIFY DD35V_TAB .
ENDLOOP.
LOOP AT DD36M_TAB  WHERE FIELDNAME NE 'MANDT' .
DD36M_TAB-FIELDNAME = 'FIELD2' .
MODIFY DD36M_TAB .
ENDLOOP.
CALL FUNCTION 'DDIF_TABL_PUT'
  EXPORTING
    NAME                    = 'ZTABL1'
TABLES
   DD03P_TAB               = DD03P_TAB
   DD05M_TAB               = DD05M_TAB
   DD08V_TAB               = DD08V_TAB
   DD35V_TAB               = DD35V_TAB
   DD36M_TAB               = DD36M_TAB
EXCEPTIONS
   TABL_NOT_FOUND          = 1
   NAME_INCONSISTENT       = 2
   TABL_INCONSISTENT       = 3
   PUT_FAILURE             = 4
   PUT_REFUSED             = 5
   OTHERS                  = 6
COMMIT WORK AND WAIT .
  DATA  : lv_subrc like sy-subrc .
  CALL FUNCTION 'DDIF_TABL_ACTIVATE'
    EXPORTING
      NAME              = 'ZTABL1'
      AUTH_CHK          = ' '
   IMPORTING
     RC                = lv_subrc
    EXCEPTIONS
      NOT_FOUND         = 1
      PUT_FAILURE       = 2
      OTHERS            = 3
COMMIT WORK AND WAIT .
clear : lt_fcat , lt_fcat[] .
LOOP AT DD03P_TAB .
  MOVE-CORRESPONDING DD03P_TAB TO ls_fcat .
  APPEND ls_fcat TO lt_fcat .
ENDLOOP.
PERFORM process.
*&      Form  process
form process.
  FIELD-SYMBOLS : <table> TYPE table .
  FIELD-SYMBOLS : <s_table> TYPE ANY .
  FIELD-SYMBOLS : <f_1> TYPE ANY .
  DATA : ls_ZTABL1 type ZTABL1 .
  CALL METHOD cl_alv_table_create=>create_dynamic_table
                          EXPORTING it_fieldcatalog = lt_fcat
                          IMPORTING ep_table = lt_table.
   ASSIGN lt_table->* TO <table>.
   ASSIGN LOCAL COPY OF INITIAL LINE OF <table> TO <s_table>.
  LOOP AT lt_fcat INTO ls_fcat.
   IF ls_fcat-fieldname = 'FIELD2' .
     ASSIGN COMPONENT ls_fcat-fieldname OF STRUCTURE <s_table> TO <f_1> .
     <f_1> = 'A' .
   ENDIF.
  ENDLOOP.
  MOVE-CORRESPONDING <s_table> TO ls_ZTABL1 .
  INSERT INTO ZTABL1 values ls_ZTABL1.
endform.                    " process

Similar Messages

  • How to find out, if a dynamic genereated structure already exists in DDIC?

    Good morning developers,
    can you help me with that above mentioned problem?
    I'm about to write a report which manages to change tablecontrol(s) to alvgrids.
    My current problem is, that i read all fields of a tablecontrol and generate its <b>structure</b> dynamically ( temporary just during runtime of the report, not stored yet ).
    Now I have to know, if this generated structure already exists in the DDIC, or not.
    If not, i have to create a type of my generated structure and store it in the DDiC.
    I know that there s a FM called <b>"COMPARE_STRUCTURE_DATA"</b>.
    But i think i have to know the name of the existing structure in DDiC.
    Is there also a way for a recursive search in ddic?
    If not:  when i read the fields of my tablecontrol from the DDiC, i read from ddic-table D021S. In its field "FNAM" it contains for example SFLIGHT-carrid ( <table><column> ).
    I could split 'FNAM' into table and column. How do i search for the structuretype of a table?
    Thx for your replys, post points waiting
    Regards
    Basti

    Hello Bastian
    All dynpro fields (including table controls) are either based on DDIC structures of program variables. Thus, the following coding will return you the required answer.
    *& Report  ZUS_SDN_RTTI_IS_DDICTYPE
    REPORT  zus_sdn_rtti_is_ddictype.
    TYPE-POOLS: abap.
    TYPES: BEGIN OF ty_s_line.
    TYPES:   field(3)  TYPE n.
    TYPES:   flag(1)   TYPE c.
    " INCLUDE TYPE knb1.
    TYPES: END OF ty_s_line.
    TYPES: ty_t_line    TYPE STANDARD TABLE OF ty_s_line
                        WITH DEFAULT KEY.
    DATA:
      gs_line    TYPE ty_s_line,
      gs_knb1    TYPE knb1,
      go_tabdescr      TYPE REF TO cl_abap_tabledescr,
      go_strucdescr    TYPE REF TO cl_abap_structdescr.
    START-OF-SELECTION.
      go_strucdescr ?= cl_abap_tabledescr=>describe_by_data( gs_line ).
      IF ( go_strucdescr->is_ddic_type( ) = abap_true ).
        WRITE: / 'gs_line is a DDIC type'.
      ELSE.
        WRITE: / 'gs_line is not a DDIC type'.
      ENDIF.
      SKIP.
      go_strucdescr ?= cl_abap_tabledescr=>describe_by_data( gs_knb1 ).
      IF ( go_strucdescr->is_ddic_type( ) = abap_true ).
        WRITE: / 'gs_knb1 is a DDIC type'.
      ELSE.
        WRITE: / 'gs_knb1 is not a DDIC type'.
      ENDIF.
    END-OF-SELECTION.
    However, if a dynpro field is based on a type defined within the program the situation may be more complex if the type includes DDIC structures (as shown above). But I am sure you will master this obstacle.
    Regards
      Uwe

  • Dynamic loading of a class at runtime with known inheritance

    Hi,
    I am trying to dynamically load a class during runtime where I know that the class implements a particular interface 'AInterface'. Also, this class may be linked to other classes in the same package as that class, with their implementations/extensions given in their particular definitions.
    The class is found by using a JFileChooser to select the class that implements 'AInterface', and loaded up.
    Because the name of the class can be practically anything, my current approach only works for certain classes under the package 'Foo' with classname 'Bar'. Some names have been changed to keep it abstract.
    private AInterface loadAInterface(URL url) throws Exception {
         URL[] urls = { url };
         // Create a new class loader with the directory
         URLClassLoader cl = new URLClassLoader(urls);
         // Load in the class
         Class<?> cls = cl.loadClass("Foo.Bar");
         return (AInterface) cls.newInstance();
    }As you can see, all that is being returned is the interface of the class so that the interface methods can be accessed. My problem is that I don't know what the class or package is called, I just know that the class implements AInterface. Also note that with this approach, the class itself isn't selected in the JFileChooser, rather the folder containing Foo/Bar.class is.

    ejp wrote:
    The class is found by using a JFileChooser to select the class that implements 'AInterface', and loaded up.
    Also note that with this approach, the class itself isn't selected in the JFileChooser, rather the folder containing Foo/Bar.class is.These two statements are mutually contradictory...My apologies, I worded that wrong. My current approach (the one given in the code) selects the root package folder. However, what I want to be able to do, is to simply select a single class file. The current code just makes some assumptions so that I can at least see results in the program.
    As you said, if the root of the package hierarchy is known, then this could be achieved. The problem is that the user either selects the package root or the AInterface class, but not both.
    Is there a way to get package details from a .class file to be used in the actual loading of the class?

  • I have recently had my hard drive replaced due to a fault whilst in Germany working. Happy with the replacement, however when i go to log on as a user that screen is in German? Any idea how to change the language?

    i have recently had my hard drive replaced due to a fault whilst in Germany working. Happy with the replacement, however when i go to log on as a user that screen is in German? Any idea how to change the language?

    Greetings Lex,
    Kind of you to comment ... but you are also adding years to my signature!   I know I'm 76 but I don't want to think about it. 
    Regards  71.

  • Simple transformation with reference to ddic structures

    Hi, experts,
    we decide to use xml as the format when exchanging massive data with other applications. and we want to use simple transformation because according to the document it's more fast.
    actually our file structure is determined by certain ddic structures, one xml file main contain several ddic structures , and they are all flat one, not deep structure.
    the xml file may look like this:
    <data>
    <ddic1>[components of ddic structure 1 ]</ddic1>
    <ddic2>[components of ddic structure 2 ]</ddic2>
    </data>
    i am new to ST,i am wondering that is it possible to make the ST more easy with the help of ddic structure? do i still need to declare the components one by one in the ST program?
    BR.
    jun

    It only runs ok with 2 internal tables because of the way you set up the XML string.  It will run ok with 3 internal tables too.  If you strip out the '<C>' nodes or move the '<C>' nodes around, you'll see what I mean (move the C nodes to the last B node).  Each time you start a loop in a simple transformation, the internal table is initialized.  So, you need to form your sample XML string differently, declare your internal tables differently (nested), or use XSLT for a little more power.

  • Issue with changing database location at runtime

    I am having a similar issue to:
    Re: Issue with changing database location at runtime
    where I am using Crystal Reports 2008 SP 3 fix pack 3.3 and a OLE DB connection to a SQL 2008 R2 server. Running on a computer on the network where the report can see the original development server is fast, other computers where that server is not available are hanging 20 seconds before coming up.
    I am using the same code from the Crystal Sample app to change the connection on each table. I found that the slowness comes the first time the ReportDocument object is accessed to get the collection of database tables, before the connection info is set.
    Fix pack 3.4 was mentioned in that post.  Does fix pack 3.4 fix that issue? I don't see fix pack 3.4 on the downloads page (https://websmp130.sap-ag.de/sap%28bD1lbiZjPTAwMQ==%29/bc/bsp/spn/bobj_download/main.htm)

    I just found on the reports that were having the issue there was a SQL Expression.  Per this thread:
    Re: Report load is slow after changing database servers
    There was an issue with that and the fix is not out til the end of Feb so I found a way not to use the SQL Expression and the speed is much better.
    However, your information provided led me to this post:
    Cannot Change Table Location, but Only for One Report
    And I am also experiencing an issue where the table location is not changing on one subreport and I will look into that as a possible solution.
    Thanks so much for your help.

  • IPad is only works with changer , when I unplug it's not working

    My iPad 3 is only works with changer  when I unplug it's not working and not connecting to the PC even please some help?

    Hi,
    "But it didn't work it's just turning them to black gray scale colors not what i was thinking about."
    If you want it to be colored, you'll need to create a color-palette for the 8bppIndexed bitmaps. The keyword for this process is "Color-Quantization".
    The whole yellow-green pie you get is from the wrong format. If you convert the 32bpp bitmaps to 24 bpp bitmaps, you loose the alpha channel ("transparency"). You can manually set one color to "transparent" with the mMakeTransparent-method
    of the Bitmap class, or simply use gif-images (they are 8bpp with a transparent "key"-color)
    Regards,
      Thorsten

  • Defining table from DDIC-structure dynamically

    Hi folks!
    Does anybody know whether it is possible to build an internal table from DDIC-structures dynamically?
    I have a deep structured itab_upload(whose structure is defined in the DDIC), which contains 2 fields(Number Name) and a third field which contains  itab_desc.
    This itab_desc can contain either 2 fields(Number Name) and a third field which contains another itab_desc  <b>or</b>  3 fields for numbers(without any other itab).If itab_desc contains another itab_desc, the second itab_desc contains only 3 fields for numbers and names...
    help will be very appreciated and points will be rewarded!
    Felix

    Hi Felix,
    Please find below the material which will help you to solve your problem :-
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/b332e090-0201-0010-bdbd-b735e96fe0ae
    Please reward points if helpful.
    Regards.
    Srikanta Gope.
    [email protected]

  • When I upgraded to 10.7.4 I lost the ability to use a lot of my previous software that was intel based. My Adobe suites for example. So for $29 i now have to spend $1000's to get these to work. What has changed with Mountian Lion. I am not rich/

    When I upgraded to 10.7.4 I lost the ability to use a lot of my previous software that was intel based. My Adobe suites for example. So for $29 i now have to spend $1000's to get these to work. What has changed with Mountian Lion. I am not rich?

    The reason your applications do not work in Lion/Mountain Lion is that they were written for the older PowerPC CPU that all Macs used up to 2006.  When Apple made its transition to the Intel CPU, they licensed software that they included in all versions of OS X (from Tiger to Leopard and optionally, Snow Leopard) called Rosetta.
    Rosetta miraculously allows PowerPC applications to work on the Intel processor transparently; you do not know it is even present.
    The problem is that after 6 years of the transition, Apple's license to use the underlying software expired for OS X Lion and all version thereafter (and it is doubtful that the current owner of the software, IBM, would relicense it, even if Apple were inclined to do so).
    So you do not have to accept recriminations from others for previously using Rosetta without even knowing it was present and running!
    So for those of use that need to upgrade to Lion/Mountain Lion, I have offered the option to install Snow Leopard (with Rosetta) into Parallels 7:
                             [click on images to enlarge]
    And now Mountain Lion:
    If you are unable or unwilling to update your inventory of PowerPC software, this solution offers you an alternative for not more than the $29 cost of Snow Leopard and $79 cost of Parallels (cheaper via internet sources).
    Full Snow Leopard installation instructions into Parallels 7 are here:
    http://forums.macrumors.com/showthread.php?t=1365439
    Assistance with the installation process is available on this linked forum.

  • How to access a JSON structure key that starts with a number

    I've got an odd issue here.  I'm accessing someone else's JSON structure so I am not able to change it.  The JSON structure keys are named with both characters and numbers like this:
    0
    198456
    product_id
    198456
    1
    Rashaan Houston feat Tony Loreto
    artist
    Rashaan Houston feat Tony Loreto
    So, in other words, there's a key named "0" and a key named "product_id", both of which contain the same key.  Why they did that, I don't know, but they did.
    In one of the instances, the data stored under the text-named key isn't the same as the numerical-named key.  I tried to output the data in the numerical key like this (it's an array of structures):
    #strStompyJSON.data[1].0#
    but I get the following error:
    Invalid CFML construct found on line 41 at column 31.
    ColdFusion was looking at the following text:
    .0
    When I do the following, it works fine:
    #strStompyJSON.data[1].product_id#
    So it looks as though CF doesn't like accessing a variable that starts with a number.  I am able to loop through the structure using a collection loop, and it outputs all of the keys (including the numerical ones) and their values using the following code:
    <cfloop collection="#strStompyJSON.data[1]#" item="key">
    #key#: #strStompyJSON.data[1][key]#<br />
    </cfloop>
    However, that doesn't allow me a way to access specific keys named with a number.  Is there a way that I can specifically access a key that is named with a number?
    thanks!
    Mike

    No problem--glad it worked out.
    As a follow-up to this, I'd encourage you to keep the bracket notation in mind during future development.  It is EXTREMELY useful in a lot of situations.
    For example, if you're building a structure on the fly with dynamic keys, bracket notation is extremely helpful:
         <cfset authors = structnew()>
         <cfloop list="authorlist" index="name">
              <cfset authors[name] = getbooklist(name)>
         </cfloop>
    Also, bracket notation is really nice when creating json from ColdFusion structures.  Consider this:
         <cfset author = structnew()>
         <cfset author.name = "Neil Gaiman">
         <cfset author.genre = "Fantasy">
         <cfset author.awesome = true>
         <cfset authorjson = serializejson(author)>
    By default, the serialized json produced will have all UPPER CASE keys.  Not a big deal in most cases, but if you're returning the json to something (like a JS library) that is expecting keys in a certain case, it can be a problem.  Fortunately, bracket notation allows you to specify exactly what case you want the structure's keys to be in:
         <cfset author = structnew()>
         <cfset author['name'] = "Neil Gaiman">
         <cfset author['Genre'] = "Fantasy">
         <cfset author['AWESOME'] = true>
         <cfset authorjson = serializejson(author)>

  • Can I create a dynamic number of inputs during runtime?

    Can I create a dynamic number of inputs during runtime?
    Oracle 11g
    Application Express 4.0.2.00.06
    Here is my problem:
    We have a table that holds metadata about files (hardcopy or softcopy files).
    We expect we may need more columns in the table at some point and don't want to modify the table or the application.
    So in order to do this I would like to create:
    A table called TBL_FILE with the columns:
    TBL_FILE_ID               NUMBER                (This will be the primary key)
    TBL_FILE_NAME          VARCHAR2(1000) (This will be the name of the file)
    A second table will be called TBL_FILE_META with the columns:
    TBL_META_ID               NUMBER               (This will be the primary key)
    TBL_FILE_ID               NUMBER                (This will be the forign key to the file table)
    TBL_META_COLUMN     VARCHAR2(30)     (This is what the column name would be if it existed in TBL_FILE)
    TBL_META_VALUE          VARCHAR2(1000) (This is the value that record and the 'would be' column)
    So a person can have as much meta data on the file with out having to add columns to the table.
    The problem is how can I allow users to add as much data as they like with out having to re develop the page.
    Other things to note is that we would like this to be on a single page.
    I know how to add we can create multi-row inserts by using a SQL Query (updateable report),
    however the TBL_META_VALUE column in the TBL_FILE_META will sometimes be a select list and other times a text box or number field.
    So I don't see now a SQL Query (updateable report) would work for this and I can't create an array of page items at run time can I?
    Any idea's how I could accomplish this? Is there a better way of doing this?
    Also is there a term or a name for what I am doing by creating these 'virtual' columns in another table?
    I found this method when looking at Oracles Workflow tables.

    Welcome to the Oracle Forums !
    >
    Can I create a dynamic number of inputs during runtime?
    Oracle 11g
    Application Express 4.0.2.00.06
    Here is my problem:
    We have a table that holds metadata about files (hardcopy or softcopy files).
    We expect we may need more columns in the table at some point and don't want to modify the table or the application.
    So in order to do this I would like to create:
    A table called TBL_FILE with the columns:
    TBL_FILE_ID NUMBER (This will be the primary key)
    TBL_FILE_NAME VARCHAR2(1000) (This will be the name of the file)
    A second table will be called TBL_FILE_META with the columns:
    TBL_META_ID NUMBER (This will be the primary key)
    TBL_FILE_ID NUMBER (This will be the forign key to the file table)
    TBL_META_COLUMN VARCHAR2(30) (This is what the column name would be if it existed in TBL_FILE)
    TBL_META_VALUE VARCHAR2(1000) (This is the value that record and the 'would be' column)
    So a person can have as much meta data on the file with out having to add columns to the table.
    The problem is how can I allow users to add as much data as they like with out having to re develop the page.
    >
    Creating Page Items dynamically is not available. You will have to create excess items and hide/show , etc. But you cannot change the Item Type. All in all, too many limitations in this approach.
    >
    Other things to note is that we would like this to be on a single page.
    >
    The 100 item limit will hit you if you go with extra item on page. With Tabular Form that should not be a limitation, unless you are exceeding the 50 item limit of APEX_APPLICATION.G_Fnn items, and the 60 column limitation of Report region with "Use Generic Column Names (parse query at runtime only)" of Dynamic region.
    >
    I know how to add we can create multi-row inserts by using a SQL Query (updateable report),
    however the TBL_META_VALUE column in the TBL_FILE_META will sometimes be a select list and other times a text box or number field.
    >
    If the type if item is variable it only means you need a way to store the item type. Meta Data of the Meta Data.
    >
    So I don't see now a SQL Query (updateable report) would work for this and I can't create an array of page items at run time can I?
    >
    Yes, you can do it. Updatable report/ Tabular Form query can be constructed from the Meta Data using PL/SQL Function Returning SQL Query . It will be a bit of coding in PL/SQL where you use the Meta Data and the Meta Data of the Meta Data to piece together your SELECT with the right APEX_ITEMs. It might have a performance penalty associated with it, but will not be a serious degradation.
    >
    Any idea's how I could accomplish this? Is there a better way of doing this?
    Also is there a term or a name for what I am doing by creating these 'virtual' columns in another table?
    I found this method when looking at Oracles Workflow tables.
    >
    I guess that is just a good TNF. It is the Master-Detail Design Pattern, that sound more modern ? ;)
    Regards,

  • Deep DDIC-Structure - Method to get the Comp.Type of a sub-structure

    Dear colleagues,
    thought the subsequent piece of coding might be helpful for the following problem:
    In DDIC you have created a deep/nested Structure e.g. a complete Business Document representation like
    s_doc_header type struct_doc_header
         (incl.) item  type tab_item
            (incl) party type tab_party etc.
    Now for some purpose you need to access somewhere a sub-part of this structure, e.g. the party-part. You only know (dynamically) the component name "party", but need for dynamic access also the Component Type ("tab_party") (in order to make use of  a "CREATE DATA lr_reftodata TYPE (determined_comp_type)." )
    The following piece of coding should help to query any start component type (here "struct_doc_header") for its embedded components.
    Its a recursive use of features provided by the very nice class(set) of cl_abap_structdescr.
    I implemented it as a static method.
    When doing so, you need to ensure, that the TYPE-GROUP "ABAP" is linked to the class (class properties --> forward declarations),
    Let me know if you find it useful.
    And apologies in advance, if the same problem was already posted in the forum. I did only a rough search before due to a lag of ideas for appropriate search-strings ...
    Best regards,
    Rudy
    Signature:
    Importing:
    IV_COMPNAME     TYPE ABAP_COMPNAME
    IV_START_STRUCTR     TYPE KOMP_TYPE
    Exporting/returning
    EV_DDIC_STRUCT     TYPE KOMP_TYPE
    METHOD search_deep_ddic_by_comp.
    * Description      -------------------------------------------
    *  Methods looks into a deep DDIC-Structure and returns the
    *  corresponding TYPE
    *  Prerequsite for usage: Structures component names are unique.
    * Local Data Defintions --------------------------------------
    * Locals -----------------------------------------------------
    * TYPES:
      DATA: lv_compname                 TYPE abap_compname.
      DATA: lt_componenttable           TYPE abap_component_tab.
      DATA: lv_relative_name            TYPE string.
      DATA: lv_ddic_header                  TYPE x030l.
      DATA: lv_ddic_struct              TYPE komp_type.
      DATA: lv_start_struct             TYPE komp_type.
    * supporting
      DATA: lv_lines                    TYPE i.
      DATA: lv_message                  TYPE string.
      DATA: lt_selopt                   TYPE sesf_selection_parameters_tab.
      DATA: ls_selopt                   TYPE sesf_selection_parameter.
    * References -------------------------------------------------
      DATA: lo_struct_descr             TYPE REF TO cl_abap_structdescr.
      DATA: lo_type_descr               TYPE REF TO cl_abap_typedescr.
    * Field-Symbols ----------------------------------------------
      FIELD-SYMBOLS:
            <fs_struct_descr_component> TYPE abap_componentdescr.
      lo_struct_descr ?= cl_abap_structdescr=>describe_by_name( p_name = iv_start_structr ).
      IF lo_struct_descr IS BOUND.
    *   get all sub-structures/components of iv_start_structr
        CALL METHOD lo_struct_descr->get_components
          RECEIVING
            p_result = lt_componenttable.
        lv_compname = iv_compname.
        READ TABLE lt_componenttable ASSIGNING <fs_struct_descr_component>
                                               WITH KEY  name = lv_compname.
        IF sy-subrc = 0.
    *     matching component found - search for DDIC structure
          CALL METHOD <fs_struct_descr_component>-type->get_relative_name
            RECEIVING
              p_relative_name = lv_relative_name.
          ASSERT lv_relative_name IS NOT INITIAL.
          CASE <fs_struct_descr_component>-type->type_kind.
            WHEN 'u' OR 'v'. "structure
              ev_ddic_struct = lv_relative_name.
              RETURN.
            WHEN 'h'. "table type - derive the line type
              lo_type_descr ?= cl_abap_datadescr=>describe_by_name( p_name = lv_relative_name ).
              CALL METHOD lo_type_descr->get_ddic_header
                RECEIVING
                  p_header = lv_ddic_header.
              IF sy-subrc = 0.
                ev_ddic_struct   = lv_ddic_header-refname.
                RETURN.
              ELSE.
                "error
              ENDIF.
            WHEN OTHERS.
              "error
          ENDCASE.
        ELSE.
    *     go deeper into structure and look into each sub-structure via recursion
          LOOP AT lt_componenttable ASSIGNING <fs_struct_descr_component>.
            CALL METHOD <fs_struct_descr_component>-type->get_relative_name
              RECEIVING
                p_relative_name = lv_relative_name.
            ASSERT lv_relative_name IS NOT INITIAL.
            CASE <fs_struct_descr_component>-type->type_kind.
              WHEN 'u' OR 'v'. "structure
              WHEN 'h'. "table type - derive the line type
                lo_type_descr ?= cl_abap_datadescr=>describe_by_name( p_name = lv_relative_name ).
                CALL METHOD lo_type_descr->get_ddic_header
                  RECEIVING
                    p_header = lv_ddic_header.
                IF sy-subrc = 0.
                  lv_relative_name = lv_ddic_header-refname.
                ELSE.
                  "error
                ENDIF.
              WHEN OTHERS.
                EXIT. "next loop, investigate only struct and table
            ENDCASE.
    *        lv_compname     = <fs_struct_descr_component>-name.
            lv_start_struct = lv_relative_name.
            CALL METHOD /scmtms/cl_ddic_utility=>search_deep_ddic_by_comp
              EXPORTING
                iv_compname      = iv_compname
                iv_start_structr = lv_start_struct
              IMPORTING
                ev_ddic_struct   = lv_ddic_struct.
            IF lv_ddic_struct IS NOT INITIAL.
              ev_ddic_struct = lv_ddic_struct.
              EXIT.
            ENDIF.
          ENDLOOP.
        ENDIF.
      ENDIF.
    ENDMETHOD.

    Using command:
    ASSIGN COMPONENT idx OF STRUCTURE struc TO <fs>.
    For example:
    DESCRIBE FIELD pi_output TYPE pi_output COMPONENTS lv_columns. "For number of columns
    DO lv_columns TIMES.
    ASSIGN COMPONENT SY-INDEX OF
    STRUCTURE (name of structure) TO <l_fs_output>. "<l_fs_output> - field of structure
    DESCRIBE FIELD <l_fs_output>... "with other options.
    ENDDO.

  • Regarding creation of dynamic deep structure

    Hi all,
    I have to construct the dynamic deep structure.
    for example,
    With the help of information about address and t_table, i have to create the deep structure on runtime.
    In one case i need to create the deep strcuture with address alone and in another case i need to create the deep structure with address and t_table.
    DATA : begin of address ,
        address type string ,
        end of address.
    data : begin of t_tab  ,
      name(10) type c,
      age type i,
      address like address,
      end of t_tab,
      t_table like Table of t_tab.
    data: BEGIN OF wa_vig,
       details1 like address,
       details2 like t_table,
       END OF wa_vig.
    data: BEGIN OF wa_vig,
       details1 like address,
       END OF wa_vig.
    Please guide me, how should i acheive this with the help of dynamic declarion .
    regards
    Vignesh

    Hi All,
    I will be happy if i can acheive this using RTTS concept.
    Regards
    Vignesh

  • Dynamic Link Not Working

    To anyone that can help..
    I am having several issues with adobe at the moment and really need some advice. i have tried adobe themselves, they struggled to help too, but that was mainly down to language issues.
    I have a Canon XHA1S camera with an external shotgun mic Rodeo NGP-2. All of which at some point worked through premiere pro CS5 and encore. i was living the dream.
    Then one day, it all started having issues.
    Problem #1 - Dynamic Link stopped working
    Once my project is done, i would send it to Encore via dynamic link and produce my DVD in either regular or blu ray. Now it doesn't. A box 'import premiere pro sequence' comes up but encore crashes before it can complete the import. sometimes a message telling me "the software thats used to decode the media is not available on this system. installing the correct decodes for the file your working with may help correct the problem" comes up too
    Its strange that i've produced about 20 disks with no issues but now a problem. was told by adobe it could relate to the file/pixel size? but again have no idea why this is now a problem now and not before, in fact i would just be happy to know how to change it so it can work? Can anyone help?
    Problem #2 - Audio
    The only way i am able to make a disk at the moment is to produce it on DVD maker - it's the only way until i get my issues resolved. however my external mic is not coming through, this has something to do with the sound quality to the mic being 44.1 and the DVD maker requiring 48mhz. i can't seem to convert this to work in anything but AVI (would like MPEG-2) but then the picture quality drops to something similar to a tribul rubbing.
    If anyone knows of something or can point me in the right direction i would be very greateful
    Thanks

    Especially for Bluray or DVD that is HD to SD, DL must sometimes be avoided.
    But the type of problem you are having may indicate other problems. If regular projects are not working, see these:
    Troubleshoot damaged projects in Encore on Windows
    http://kb2.adobe.com/cps/406/kb406006.html
    Troubleshoot system errors and freezes | Adobe software on Windows
    http://kb2.adobe.com/cps/822/cpsid_82252.html
    Regarding the audio, can't you just export as 48K?

  • Packaging AIR runtime with app?

    Would it be possible to have an option to package the AIR runtime with the APKs
    created through Flash Builder?  Say, a ride-along package that would detect if the
    given or higher runtime of AIR is installed, and if not, install it before launching the
    app.
    For the foreseeable future (the next year, at least), most new users of any given app
    created this way will not already have the AIR runtime on their phone.  This would
    spare them having to initiate another download when they thought they were about
    to enjoy the product.  (No matter how you disclaim it, many customers are going to
    think you can start an app right away after downloading it from the Market, because
    this is how practically all non-AIR apps work.)  Waiting for an install is okay if the app
    automatically launches afterward: this will not take nearly as long, and (importantly!)
    requires no further customer action to actually launch the app.

    I'm sure it would possible, but consider that as soon as someone downloads
    an AIR Android app, they've already got the runtime, and with notifications
    for updates already a common thing, they'll be notified from the Market
    whenever there's an app update (runtime or your app).
    I think it would be nice as an option, but just today I got an email from
    the Android Market explaining important changes to the store, and
    specifically they say no .apk larger than 50 mb. So I'd rather not have the
    runtime packaged with the app, as that adds to the overall filesize. We
    already have to deal with that on iOS devices, since Apple won't let us
    download compiled code. So you get an automatic 3-4 mg overhead with all iOS
    apps. Luckily there's no real limit on iOS app sizes.
    I do agree though it'd be nice to have the install process worked out so the
    app prompts for the runtime if needed (as it works now) but have the runtime
    know to launch the app again once it's installed.
    iBrent

Maybe you are looking for

  • Can multiple computers manage the same iWeb website?

    Everyone in our family has a Mac and their own blog. Is there any way each of us can use iWeb to access the same site from different computers?

  • "Upright" Content Awareness in Camera Raw 8 / Photoshop CC

    One of the new features in Camera Raw 8, which will ship with Photoshop CC, is the ability for the software to "see" converging lines in your image and try to straighten things up for you, compensating for perspective issues / wide angle lenses, etc.

  • T500 DispalyPort to DVI not working?

    I recently bought a DisplayPort to DVI adapter for my T500 so i could use my monitor, however the mointor isn't being detected i nthe control panel. It worked earlier using VGA, but it won't detect it this way. Is this a Windows 7 problem or a T500 p

  • Extending an Apple network using ethernet

    Hello, I apologise if this question has been asked before, and I only ask due to not really being able to follow the online guides. Due to the structure of my house (big thick stone walls which eschew wi-fi), I want to extend the coverage of my Airpo

  • RFEULIST CZ - No. of tax-relevant docs

    Hi all, In TC RFEULIST (prg. RFASLD15, EU Sales & Purchases list for CZ, PL, HU) there is a column "No. Docs" in the report (field NO_OF_DOCUMENT). This is... Number of Tax-Relevant Documents Specifies the number of documents that the report has sele