How to create a structure which can hold a dynamic table as a field in DDIC

Hi ,
       I am designing a solution for a problem and have a unique requirement.  I need to create a structure which can hold a field where dynamic table data can be stored.  Let me illustrate with an example :
My structure  ( say  Z_output_struc ) will have the fields
Table_name  Table_Data
My function module will have a table type of the above structure, so in effect ,my output can have multiple table names and related to each of them, there will be table data of that table name. The issue is how do I configure this in DDIC ?
I tried creating table_data as "Type ref to Data"  but was stuck  inside the func module when I tried to transfer data to this.
Any pointers as to how to think about this differently ? 
Best Regards,
Girish

Hi Girish,
you start directly from the ref to data. You assign it to a field symbol and cast this to the type of the destination of your select. So you can directly add the reference to the cache:
I hope this example helps a bit (I took a form instead of a function module as it is easier to add here and used an hr table as kna1 is empty on my test system):
REPORT  z_rwe_99_dyn_tab_cache.
* type definition
TYPES:
  BEGIN OF _s_cache,
    table TYPE        tabname16,
    cache TYPE REF TO data,
  END   OF _s_cache,
  _t_cache TYPE STANDARD TABLE OF _s_cache.
* data declaration
DATA:
  lv_table     TYPE tabname16,
  lv_condition TYPE string,
  lt_cache     TYPE _t_cache.
* define table and condition
lv_table     = 'HRP1000'.
lv_condition = 'plvar = ''01'' and otype = ''S'' and objid = ''50000016'''.
* get the result of a single table into the cache
PERFORM get_dyn_table USING
                        lv_table
                        lv_condition
                      CHANGING
                        lt_cache.
* form to read a single table
FORM get_dyn_table USING
                     iv_table     TYPE tabname16
                     iv_condition TYPE string
                   CHANGING
                     ct_cache     TYPE _t_cache.
  FIELD-SYMBOLS:
    <lt_table> TYPE ANY TABLE.
  DATA:
    ls_cache TYPE        _s_cache,
    lr_data  TYPE REF TO data.
  CREATE DATA lr_data TYPE STANDARD TABLE OF (iv_table).
  ASSIGN lr_data->* TO <lt_table>.
  SELECT * FROM (iv_table) INTO TABLE <lt_table>
    WHERE
      (iv_condition).
  ls_cache-table = lv_table.
  ls_cache-cache = lr_data.
  APPEND ls_cache TO ct_cache.
ENDFORM.                    "get_dyn_table
If you have more questions just give another post.
Best Regards
Roman

Similar Messages

  • How to create a material which can be used in T-Codes VAO1 & MB1C create

    Hello Experts,
    How can I create a material which can be used to create a sales order and can be used to create inventory using VAO1 and MB1C T-Codes respectively.
    What are the configurations that I need to take care of, while creating it?
    I need to create a material which can be used in the whole sales cycle(sales order,goods issue,billing and etc).
    Please Help,
    Thanks in Advance,
    Suma

    Hi
    Thanks for your fast replies.. I have created a new material and was able to create inventory thru MB1C. But I was not able to generate a goods delivery(VL01N) and billing document(VF01)  for the sales order.
    Error: No schedule lines due for delivery up to the selected date
    Message no. VL248
    Diagnosis
    There are no schedule lines due for the given order item up to the date chosen.
    System Response
    The system does not create a delivery item for this order item.
    Procedure
    Check whether the order item to be delivered contains confirmed schedule lines.
    If this is the case, set the selection date further into the future if you still want to create a delivery for this item.
    Please suggest,
    Tanks,
    Suma
    Edited by: Suma B on Sep 23, 2008 3:55 PM

  • How to create a characteristic that can hold decimal values.

    Hi,
    I want to create a characteristic which shoul be able to hold decimal values.
    Because from source system its coming in the format Number(1,1) and it should be a characteristics as per my
    business requirement.
    Please give me the solution if u know.
    Thanks,
    Vijaya

    Hi,
    it depends on your requirements... there are two possibilities
    1. type CHAR - displays the values as they are coming from source system, but I do not think any further calculations will be possible
    2. type NUMC - you can multiply each value from source system with 10 to derive an Integer value if you have format 1,1 for all records. The values will not be displayed as decimals but you can apply further calculations if needed (and divide all numeric values by 10 to transform back to correct decimal value)
    Please elaborate on your requirements, maybe you can meet your requirements using a decimal key figure...
    @Manfred
    I think type amount will be available only for key figures, not for characteristics?
    Best regards,
    Björn

  • How to create dummy pricture which can be used for chart in msword

    I want to create a chart in template,but have problem with creating dummy picture , is there any one could tell me how to create a dummy picture in msword. Thanks

    First create a chart.
    Now right click on chart > format picture > web
    copy the code.
    now you may delete it.
    insert a picture which you want.
    right click > format picture > web
    paste the code.
    done.

  • How to create one procedure which can drop and create materialized view

    Hi,
    I want to create one pl/sql procedure which can first drop materialized view CATEGORY_PK and after that create same materialized view CATEGORY_PK.
    programme is as follows:
    DROP MATERIALIZED VIEW CATEGORY_PK;
    CREATE MATERIALIZED VIEW CATEGORY_PK REFRESH FORCE WITH PRIMARY KEY AS
    SELECT cav1.ownerid AS categoryid, p.uuid AS productid ,p.domainID AS productdomainid,pav.stringvalue AS NAME
         ,pav2.stringvalue AS ID, pav3.stringvalue AS SHORT
    FROM product p, product_av pav, catalogcategory_av cav1, catalogcategory_av cav2,product_av pav2,product_av pav3
    WHERE
    cav1.NAME = 'PRODUCT_BINDING_ATTRIBUTE' AND
    cav2.NAME = 'PRODUCT_BINDING_VALUE' AND
    cav1.ownerid = cav2.ownerid AND
    p.uuid = pav.ownerid AND
              p.uuid = pav2.ownerid AND
              p.uuid = pav3.ownerid AND
    pav.NAME = cav1.stringvalue AND
              pav2.NAME = cav1.stringvalue AND
              pav2.NAME = cav1.stringvalue AND
    pav.stringvalue = cav2.stringvalue AND
              pav2.stringvalue = cav2.stringvalue AND
              pav3.stringvalue = cav2.stringvalue
    UNION
    SELECT catalogcategoryid AS categoryid, productid, repdomainid AS productdomainid,pav1.stringvalue AS NAME
         ,pav2.stringvalue AS ID, pav3.stringvalue AS SHORT
    FROM productcategoryassignment ,product_av pav1,product_av pav2,product_av pav3
         WHERE pav1.ownerid=productid
         AND pav2.ownerid=productid
         AND pav3.ownerid=productid
         AND pav1.NAME='name'
         AND pav2.NAME='productID'
         AND pav3.NAME='shortDescription';

    user498566 wrote:
    I want to create one pl/sql procedure which can first drop materialized view CATEGORY_PK and after that create same materialized view CATEGORY_PK.That sounds like a waste of time and resources. What do you hope to achieve by this? A refresh? If so, a simple refresh of the old materialized view will do.
    If you truly want to continue this road, you'll have to use the EXECUTE IMMEDIATE command to execute DDL commands from within PL/SQL.
    Regards,
    Rob.

  • How to create a program which can be installed as NT service?

    I wrote a server program using LW/CVI 5.5. I want to install it on NT/2000
    OS and running as NT/2000 services. I know SRVANY.EXE can do this, but I
    want to one step do this using INSTSRV.EXE or using install utility to modify
    registry keys.
    Thanks.

    Hi
    Thanks for your fast replies.. I have created a new material and was able to create inventory thru MB1C. But I was not able to generate a goods delivery(VL01N) and billing document(VF01)  for the sales order.
    Error: No schedule lines due for delivery up to the selected date
    Message no. VL248
    Diagnosis
    There are no schedule lines due for the given order item up to the date chosen.
    System Response
    The system does not create a delivery item for this order item.
    Procedure
    Check whether the order item to be delivered contains confirmed schedule lines.
    If this is the case, set the selection date further into the future if you still want to create a delivery for this item.
    Please suggest,
    Tanks,
    Suma
    Edited by: Suma B on Sep 23, 2008 3:55 PM

  • How to create a Choice which can be selected thru keyboard ?

    Hi,
    I am using java.awt.Choice to display all the states in US, Canada and Mexico in that order. I need to make this list selectable using key board. ie, if i press A, it should first go to AL , then to AK etc. I have added the following code in the class which extends from Choice so that it i type A , it will go to AL. But subsequent key types for the same letter are not recognised.Please provide some pointers on how to do this.
    protected void processEvent(AWTEvent evt)
    super.processEvent(evt);
    if( evt instanceof KeyEvent)
    char ch = ((KeyEvent)evt).getKeyChar();
    Character c = new Character(ch);
    if(!Character.isLetterOrDigit(ch))
    return;
    for(int i =0; i < getItemCount(); i++)
    if( getItem(i).substring(0,1).equalsIgnoreCase(c.toString()))
    select(i);
    break;
    Thanks in advance.

    thanks, it worked.
    posting the whole code.
         protected void processEvent (AWTEvent evt)
              super.processEvent(evt);
    if( evt instanceof KeyEvent && evt.getID() == KeyEvent.KEY_PRESSED)
    char ch = ((KeyEvent)evt).getKeyChar();
    Character c = new Character(ch);
    if(!Character.isLetterOrDigit(ch))
    return;
                   int ind = 0;
                   if(getSelectedItem().toUpperCase().startsWith(c.toString().toUpperCase()))
                        ind = getSelectedIndex()+1;
                   boolean matchfound = false;
                   for(int i = ind; i < getItemCount(); i++)
                   if( getItem(i).toUpperCase().startsWith(c.toString().toUpperCase()))
                             matchfound = true;
    select(i);
    break;
                   if(!matchfound)
                        for(int i = 0; i < getItemCount(); i++)
                             if( getItem(i).toUpperCase().startsWith(c.toString().toUpperCase()))
                                  select(i);
                                  break;
         }

  • How to create a text which can support more than 500 chars ?

    Hi all:
        In my interactive form, I have one text, the value inside this text is longtext, the length will be more than 500 chars.
        My problem is now , if there is more than 100 chars, there will be duplicated chars in this text.
        Can I make this text support overlap ? when the value have too many chars, it will display in next row ? is it possible ?

    Hi,
    The 2 points are compulsory for multiline display.
    Could you please let me know the following things.
    1. Is that field is wrapped by any position content subform.If this is the case, try making flow content.
    2. Is there any field below the text field and the 2 fields are wrapped in position content, In this case also make the subform as flow content.
    Refer the example form FP_TEST_01 in SFP transaction.Check the subform and field properties.
    Make a backup before making changes.
    Thanks and Regards,
    Pavan Meda

  • To create workflow process which periodically examines one database table??

    hi.......
    plz tell me the complete details that how to create workflow process which periodically examines one database table??
    also it will send email to specific address if certain condition is not fulfilled??
    help is really appreciated
    thanks nd regards
    manish singla

    Hi,
    I'd be wary of using a WAIT activity, since this will essentially have the workflow running forever in the same SQL session. If you ever need to shutdown the database, then you would have to kill the session (or do a shutdown abort), which will rollback all the Workflow transactional data.
    I would leave the polling logic to a process outside the Workflow engine. In an Applications environment, this should be a Concurrent request. If this is standalone Workflow, then schedule something using DBMS_JOB. The job should check the database, and if necessary, initiate a new workflow to send the notification.
    If the notification does not require a response, then I would be inclined to bypass Workflow competely, and have a job which calls UTL_SMTP to send an email.
    HTH,
    Matt
    Alpha review chapters from my book "Developing With Oracle Workflow" are available on my website:
    http://www.workflowfaq.com
    http://forum.workflowfaq.com

  • Can we create a cursor that can hold records of any table

    DECLARE
         CURSOR cr_tablenames IS
              SELECT tname
              FROM tab;
         v_tablename tab.tname%TYPE;
    BEGIN
         OPEN cr_tablenames;
         LOOP
              FETCH cr_tablenames INTO v_tablename;
              EXIT WHEN cr_tablenames%NOTFOUND;
              DBMS_OUTPUT.PUT_LINE('Table: '||v_tablename);
              -- HERE, I WANT TO PERFORM SELECT * OPERATION ON
              -- EACH TABLE WHOSE NAME COMES INTO v_tablename
              -- AND DISPLAY THE RECORDS
         END LOOP;
    END;
    I want to perform SELECT * operation on each table whose name comes into the variable and display the records. How to achieve it? I am clueless.
    Can this be achieved by something like... using cursors which can be defined dynamically and which can hold records of any table?
    Or, do I need to have some different approach to this problem?
    Edited by: kartins on Nov 5, 2009 11:41 PM

    something like
    SQL> create or replace
      2  function getContent (p_tn in varchar2)
      3     return sys_refcursor
      4  is
      5     retval sys_refcursor;
      6  begin
      7     open retval for
      8       'select * from '||p_tn;
      9     return retval;
    10  end;
    11  /
    Function created.
    SQL>
    SQL> var rc refcursor
    SQL>
    SQL> begin
      2     :rc := getContent ('emp');
      3  end;
      4  /
    PL/SQL procedure successfully completed.
    SQL>
    SQL> print rc
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7369 SMITH      CLERK           7902 17-DEC-80        900                    20
          7499 ALLEN      SALESMAN        7698 20-FEB-81       1700        300         30
          7521 WARD       SALESMAN        7698 22-FEB-81       1350        500         30
          7566 JONES      MANAGER         7839 02-APR-81       3075                    20
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1350       1400         30
          7698 BLAKE      MANAGER         7839 01-MAY-81       2950                    30
          7782 CLARK      MANAGER         7934 09-JUN-81       2551                    10
          7788 SCOTT      ANALYST         7566 19-APR-87       3100                    20
          7839 KING       PRESIDENT            17-NOV-81       5100                    10
          7844 TURNER     SALESMAN        7698 08-SEP-81       1600          0         30
          7876 ADAMS      CLERK           7788 23-MAY-87       1200                    20
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7900 JAMES      CLERK           7698 03-DEC-81       1050                    30
          7902 FORD       ANALYST         7566 03-DEC-81       3100                    20
          7934 MILLER     CLERK           7782 23-JAN-82       1400                    10
    14 rows selected.
    SQL>
    SQL> begin
      2     :rc := getContent ('dual');
      3  end;
      4  /
    PL/SQL procedure successfully completed.
    SQL>
    SQL> print rc
    D
    X

  • How to create a region which should float in a page . (Like as windows cal)

    Hello Friends
    Using
    Apex Version 4 +.
    Oracle database 11g.
    How to create a region which should float in a page .
    ie i can move that region inside that page anywhere like as windows calculator.
    Can anyone please help me.
    Thanks in advance
    regards
    Edited by: A on Apr 13, 2011 1:48 AM
    Edited by: A on Apr 13, 2011 1:48 AM

    Hi,
    You can use a jQuery dialog.
    http://docs.jquery.com/UI/Dialog
    e.g. create html region, just say you give the region static id: floating-region, make it hidden by adding attributes: style="display: none;"then do like: $('#floating-region).dialog();
    I made another post on steps to create a dialog. See: {message:id=9506160}
    Ta,
    Trent

  • How to create new structure for SOP?

    How to create new structure for SOP? and transfer data for long term planning?

    hi dear
    For SOP there are two types
    1. Standard SOP : this the standard SOP  configured by SAP consider the Level by Level planning and planning done for product group .
    2. Flexible planning SOP: this option is given, so that Rough planning/SOP planning can be done as per the client requirement.e.g planning structure can be sales orgn., distribution channel, division, plant, material
    For configuring the flexible planning SOP follow steps
    1. Define info structure in IMG
    where u define the characteristic and Key field
    2. Set parameters for info structures and key figures
    Sales & Operations Planning >Master Data>Set parameters for info structures and key figures
    where u define  Planning method
    Consistent planning
    Level-by-level planning
    Delta planning
    and aggregation type
    1. Average calculated
    2. Total created
    3. No aggregation
    3. create Planning type with reference to info structure
    Regards
    Suresh

  • Step by step on how to create organizational structure(plan) for workflow?

    Hi Experts,
    Can anyone send me a step by step process on how to create organizational structure(plan) for workflow?
    Thanks a lot in advance.
    Rgds,
    TM

    Hi,
    You can use the following accessible transactions to process your organizational plan:
    Transaction     Name of Transaction
    PPO5                     Change Attributes
    PPO6                     Display Attributes
    PPOCE                      Create Organization and Staffing
    PPOCW                      Create Organization and Staffing (WF)
    PPOME                     Change Organization and Staffing
    PPOMW                     Change Organization and Staffing (WF)
    PPOSE                      Display Organization and Staffing
    PPOSW                      Display Organization and Staffing (WF)
    PP01                      Maintain Plan Data (Menu)
    PP01_DISP      Display Plan Data (Menu)
    PP03                       Maintain Plan Data (Actions)
    PP03                       Execute Action Directly
    Regards,
    Deepa Kulkarni

  • How to create accrual WT which is accrual monthly and auto generated?

    Hi Experts,
    How can I create accrual WT which can be automatically generated every month?
    E.g. A WT for Incentive Accrual = Basic Salary 1340/12)*80%
    How can I make this Incentive Accrual WT to be generated automatically base on the above formula and I dont need to input in any infotype?
    Appreciate with your help.
    Thanks!!!

    Hi All,
    If I create a WT and not assign to any infotype but just put in T54C3, and define the processing class 30 as cumulated in current year , will that WT  be cumulated automatically and store in CRT?
    Or do I have other alternatives to handle that?
    Appreciate with all your help.
    Thanks.

  • How to create a JButton that can run other Apps?

    Hi, Every1
    i want to create a JButton which can let the user click it and it runs a
    specified installed app in the system ( say, a JButton that fires up MS
    Outlook). how can i do that?
    thank you very much.
    Yu.

    hi, if i want to execute some kind of the following, how would i handle it?
    mailto:[email protected]
    i tried: Runtime.getRuntime().exec("mailto:[email protected]");
    but it gave me java.io.IOException: CreateProcess: mailto:[email protected] error=2
    i think this problem would be relatively easy but i just cant figure out.
    thanks

Maybe you are looking for

  • Error while calling servlet in WebLogic

    Hi, We are trying to call servlet in WebLogic by using http://scrmskr.apac.nsroot.net:7801/forms/HelloWorldServlet URL and getting below error. ======================================================================== Error 404--Not Found From RFC 206

  • Foxfire plug-in check page lists 4 "unknown" plug-ins + button to "research" What should I do??

    ''duplicate of https://support.mozilla.com/en-US/questions/904205'' I just asked you a question and it took me to a "sorry, page not found" page! What gives?

  • How do I change the pen pressure in Adobe Elements 11?

    I bought Adobe Photoshop Elements 11 in the hopes that I could finally start to draw and color lineart, but I don't know if it's an old and/or atypical version or what, cause I've tried like four or five different tutorials on how to change the pen p

  • Mac Pro international power cable

    Hello everyone, I am currently abroad, but would like to purchase the Mac Pro via the UK online store to be able to profit from student discount (I study in the UK). I realize that if I order the Mac Pro in the UK store, it will come with a UK power

  • OO:overloading and overriding in tandem..Interesting one

    Assume Dog IS-A Animal class test { public static void main(String[] args){ Animal a = new Dog(); foo(a); void foo(Dog d){ d.printme(); void foo(Animal a){ a.printme(); }//end of class test class Animal{ void printme(){ System.out.println("i am in an