Create data reference to a table that is known at runtime

Hi,
I am trying to create a data reference to a table that is known only at runtime. In system 4.6C, I am not able to insert this coding
data: lr_data type ref to data.
CREATE DATA lr_data type table of (structure_name).
In hihger releases, I am able to do so.
Could you please tell me how to solve this problem in 4.6C?
Best regards,
Fabian

Hi fabian,
If i understood,
u want to create a dynamic internal table.
1.
  For this purpose,
  in my program,
  there is an INDEPENDENT FORM
  whose inputs are
  TABLE NAME / STRUCTURE NAME
  and from those, it consructs dynamic table.
2. Here is the program.
the dynamic table name will be
<DYNTABLE>.
3. U can use this program (FORM in this program)
to generate any kind of internal table
by specifying TABLE NAME .
4.
REPORT abc.
COMPULSORY
FIELD-SYMBOLS: <dyntable> TYPE ANY TABLE.
FIELD-SYMBOLS: <dynline> TYPE ANY.
DATA: lt TYPE lvc_t_fcat.
DATA: ls TYPE lvc_s_fcat.
FIELD-SYMBOLS: <fld> TYPE ANY.
DATA : fldname(50) TYPE c.
parameters : iname LIKE dd02l-tabname.
START-OF-SELECTION.
PERFORM
PERFORM mydyntable USING lt.
BREAK-POINT.
INDEPENDENT FORM
FORM mydyntable USING ptabname.
Create Dyn Table From FC
FIELD-SYMBOLS: <fs_data> TYPE REF TO data.
FIELD-SYMBOLS: <fs_1>.
FIELD-SYMBOLS: <fs_2> TYPE ANY TABLE.
DATA: lt_data TYPE REF TO data.
data : lt TYPE lvc_t_fcat .
DATA : ddfields LIKE ddfield OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'DD_NAMETAB_TO_DDFIELDS'
EXPORTING
tabname = iname
TABLES
ddfields = ddfields.
CONSTRUCT FIELD LIST
LOOP AT ddfields.
ls-fieldname = ddfields-fieldname.
APPEND ls TO lt.
ENDLOOP.
ASSIGN lt_data TO <fs_data>.
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = lt
IMPORTING
ep_table = <fs_data>
EXCEPTIONS
generate_subpool_dir_full = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
Assign Dyn Table To Field Sumbol
ASSIGN <fs_data>->* TO <fs_1>.
ASSIGN <fs_1> TO <fs_2>.
ASSIGN <fs_1> TO <dyntable>.
ENDFORM. "MYDYNTABLE
regards,
amit m.

Similar Messages

  • Capturing data from a dynamic table that span multiple pages

    I created a PDF form that contained a dynamic table that can span across multiple pages. Additional rows in the table can be created by the person filling the form as and when needed.
    The PDF form is distributed to the receipient using Adobe LiveCycle Designer.
    However, when the form is "Submitted" back to the originator of the form, only data in the first row of the table is captured in the Response file. All the other rows are left out.
    I would be grateful if anyone can advise me as to how do I or what shall I do to get all the data in all the rows in the table into the Response File?
    Thank you.

    Hi
    Attached are the saved completed PDF-Form and the response file after the completed form has been submitted. I have copied this message to your gMail account.
    Only data in the first row of the table is captured in the Response file.
    If it is working correctly on your side, please let me know what could have gone wrong on my side.
    Thank you.
    Best regards,
    Kim-Siang Ng
    http://www.tipstoenrichyourlife.com/parenting
    With the wish to help all beings, may all my thoughts,words,and actions be void of attachment and ego.
    May they arise from compassion and wisdom.
    May they be imbued with patience and joy.
    The information contained in this transmission may contain privileged and confidential information and is intended only for the use of the person(s) named above. If you are not the intended recipient, any review, dissemination, distribution or duplication of this communication is strictly prohibited. If you received this email in error, please contact the sender immediately by reply e-mail and destroy all copies of the original message. This email is not intended as an offer or solicitation for the purchase or sale of any financial instruments.
    This email is forwarded automatically to a selected list of my buddies for enjoyment. Contents come from various sources and none of the materials I claim as my property. If any belongs to you, please consider it an honor that the content was worthy enough to be shared. No copyright infringement intended!. If any material is not appealing to you DELETE immediately.
    When forwarding this email, please have the courtesy to respect the privacy and confidentiality of the sender by deleting all previous email trails and addresses before you proceed to forward this email to others.

  • How to differentiate the Purch Orders created with reference to in table

    Hi all
      how to differentiate the Purch Orders which are created with reference to Purch requsitions, contract, manual by copying inforecord in the table EKKO/EKPO? Is there any Field Indicators?
    Rgds
    Ramesh

    Hi Ramesh,
    Go through  EKPO there is a Table BANFN it will update when you create a PO with reference to PR
    Do se11 > Table EKPO> CtrlShiftF10 > Assign any of PO no. in the EBELN > Execute > you will find BANFN table
    it indicates Purchase Requisition Number. it will update when you create PO with reference to PR.
    Regards,
    Vraj

  • PLSQL - Creating a cursor for a table that does not exist

    I am writing my first PLSQL program, and I have run into a problem creating a cursor.
    I have a cursor that accesses a table on another database via a database link. The database link does not yet exist, so the first thing that my PLSQL does is create the database link. The problem is that I have to define my cursor before I have executed the code for the database link, and the compiler gives me an error for referring to a table that does not yet exist. How can I get around this?
    Here is the basic structure of my program
    DECLARE
    --cursor defined here
    BEGIN
    --code creates database link if it does not yet exist
    --code executes cursor
    END

    I'm still not sure I understand why the database link can't be created in advance... Once you run your code once, the database link is going to exist permanently. Why not just create it at compile time like every other object in your application?
    It's sort of like trying to create a table at runtime-- if you do that, you can't refer to that table in static SQL later on. You can do everything with dynamic SQL, but that's going to substantially increase the complexity of your code.
    Additionally, you have to have the CREATE DATABASE LINK privilege granted directly to the user running your code, not through a role, which seems like a huge security hole.
    Justin

  • Is there a way to create a calendar with a table that self fills in the dates?

    I am creating a calendar that recognizes a date entered into a numeric cell and then calculates the dates for the rest of the cells.
    Ex:  
    Sun
    Mon
    Tues
    Wed
    Thur
    Fri
    Sat
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    24
    30
    31
    I put in 16th a tuesday then the table automatically will put in numbers associated up to #31, but I can correct if say there are only 30 days in the month, so the cell must be modifiable and I should be able to plug in any number in any cell and it will add 1 to the previous cell up to 31.
    Too complicated????? It is for me?

    AIR 2.7 release notes:
    AIR runs on "iPodTouch 4th generation iPhone 3GS and iPhone 4iPad".
    But:
    AIR 2.7 runs on iPod Touch 3rd Generation, too - but only on the 32GB and 64GB models. The 8GB model is in fact only an older 2nd gen iPod Touch.
    We tested this and we even have some apps in the app store running on the iPod Touch 3rd gen.
    I posted about this, look here:
    http://forums.adobe.com/thread/892541?tstart=0

  • Help needed in creating a table that updates itself at runtime.

    I am working on creating a sniffer in java and need a GUI that will show the incoming packets as they are sniffed. How can I use tables such that they automatically update as and when the packets arrive.
    Any help on this matter would be appreciated thanks
    hasrar

    Hello, I am working in a Sniffer in java too, but I have not information about this.
    I want to tell you if you can send me some information or examples.

  • How to creat  Data source from Multiple Tables in   SAP  BI ?

    Hi Experts,
    1. For Finance & Payments MIS   tables are u2013   BSEG, BSIS,BSAS,PYAR ,BKPF
    2. For Inventory tables are           :           MSEG MKPF.
    3. For Invoices MIS   tables are  -          RBKP & RSEG.
    4. For Taxation MIS  tables  are u2013           J_1IEXCHDR, J_1IEXCDTL, J_1IPART2, J_1IPART1
    5. For Master data  tables  are   -    :         MARA, MAKT, LFA1, J_1IMTCHID
    How to creat   individual  Datasource  for   1.Finance & Payemnt Mis , 2. Inventory, 3. Invoices,  4. Taxation , 5. Mater data. ?

    Hi,
    Go for the generic data sources.
    1. first create the view on all the tables.
            You can only use join conditions but not Union.
            you can specify one table as primary table based on your requirement.
    2. build the data source based on the view.
    Regards,
    Siva
    Edited by: sivaramakrishna on Feb 2, 2012 3:54 PM

  • Array of Data References

    Hi,
    I have a requirement to create data references for a table column data.
    for example, in a table we have 1000 customer numbers. I need to create 1000 data references and need to store in data references table. for example: Here i have a text variable i am able to create 10 data references to each character by moving off-set, similarly i need to move on table entries. Any Idea?
    TYPES c1 TYPE c LENGTH 1.
    DATA: dref TYPE REF TO c1,
          dref_tab LIKE TABLE OF dref.
    DATA: text TYPE c LENGTH 10 VALUE '0123456789',
          off TYPE i.
    DO 10 TIMES.
      off = sy-index - 1.
      GET REFERENCE OF text+off(1) INTO dref.
      APPEND dref TO dref_tab.
    ENDDO.
    LOOP AT dref_tab INTO dref.
      WRITE / dref->*.
    ENDLOOP.
    Thanks,
    Sekhar.J

    You want to put instance of the children in the private data of that parent?
    As far as I know the children know about their heritage but the parents have no knowlge of the children.
    I do not have enough coffee in my head to offer any other ideas at this point.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Creating FK's in tables that are all ready created

    Good afternoon,
    I have 4 tables set up, and need to create foreign keys in three on them relating back to my EMPLOYEE table. The FK will be based on the employee number column in the EMPLOYEE table.
    Once these tables are created and populated, how do I link a PK to a FK, and how do I create a FK in a table that is already created.
    Many Thanks,
    -Robert

    Hello Robert,
    you can do that with APEX as well:
    1. Login to your workspace
    2. Go into "SQL Workshop"
    3. Start the "Object Browser"
    4. Select "Tables" (if not selected already)
    5. Pick your desired table (e.g. CONSULTING) from the table list
    6. Click on "Contraints" in the detail view
    7. Click on "Create"
    8. Enter your desired Contraint Name (e.g. CONSULTING_FK)
    9. Chose your desired Contraint Type (e.g. Foreign Key)
    10. Chose your option for action on delete for that key (see lakes post above)
    11. Chose the column that contains the foreign key (e.g. Cnslt_Emp)
    12. Chose the table to be referenced (e.g. EMPLOYEE)
    13. Chose the column to be reference (e.g. Emp_Num)
    14. Continue
    15. Check if all settings are correct, see the SQL statement if you want, and click Finish.
    To learn more about what you can do with the Object Browser and the other components in the SQL Workshop, you might want to study the [url http://download.oracle.com/docs/cd/E17556_01/doc/user.40/e15520/toc.htm]APEX SQL Workshop Guide. It contains step-by-step guides for almost all functionality you'll need in every day life.
    -Udo

  • Have created PO with reference to a PR that is not fully released

    Dear SAP Experts,
    We are encountering an issue during creation of PO. We can create a PO with reference to a PR that is not fully released. The PR has not been fully released in the past.
    1. PR was created and was released upto web approval (PR is currently not fully approved)
    2. PO was created with reference to the PR that is not fully approved and also with reference to an RFQ. The PO was created even if the PR was not fully approved.
    We tried to simulated the steps above in development server and PO cannot be created because of the error 'Purchase requisition 168151, item 00110, not released for ordering'. However, in production, the PO was created and the PO created was fully released already.
    Any inputs as to why this happened? Your help will be highly appreciated.
    Jessica Cruz
    Software dev. analyst
    Smart Communications, Inc

    Hi Jessica,
    While creating the PO you might have entered the PR No. in PO Item overviewbut it might have happened knowingly or unknowingly the PR No. is deleted from Delivery Schedule tab  at Item details of the PO either during PO creatin or PO change mode.
    Generally system updates the PR status by validating the PR No. in delivery schedule tab of the PO.
    Though the PR No. is reflecting at PO Item  overview,.as there is no PR No. in delivery schedule tab it is not checking wether the PR is released or not.
    Bye
    Sridhar Thota

  • Create Foreing Key to one table in different dataBase

    Hi, I need create a reference to one table in other database. I understand that Database Link can be used to connect me to other database but when I am creating the foreing key in my table, I can see only the tables in the schemas that have my data base not the other schemas. I created a connection with database link but I do not see the form to make reference to this connection from the create table wizard. I am using Oracle 9i and the client is 9.01.01.
    Thanks in advance,
    Mónica Alarcón

    We cannot use tables in another table to enforce data integrity. This makes a lot of sense if you think about what would happen if the remote database goes down.
    If you want to do this, then you need to use replication (materilaized view) to bring the parent table's data into the locaL database.
    Cheers, APC

  • How to recover the data from a  dropped table in production/archive mode

    How to recover the data/change on a table that was dropped by accident.
    The database is on archive mode.

    Oracle Version. ? If 10g.
    Try this Way
    SQL> create table taj as select * from all_objects where rownum <= 100;
    Table created.
    SQL> drop table taj ;
    Table dropped.
    SQL> show recyclebin
    ORIGINAL NAME    RECYCLEBIN NAME                OBJECT TYPE  DROP TIME
    TAJ              BIN$b3MmS7kYS9ClMvKm0bu8Vw==$0 TABLE        2006-09-10:16:02:58
    SQL> flashback table taj to before drop;
    Flashback complete.
    SQL> show recyclebin;
    SQL> desc taj;
    Name                                      Null?    Type
    OWNER                                              VARCHAR2(30)
    OBJECT_NAME                                        VARCHAR2(30)
    SUBOBJECT_NAME                                     VARCHAR2(30)
    OBJECT_ID                                          NUMBER
    DATA_OBJECT_ID                                     NUMBER
    OBJECT_TYPE                                        VARCHAR2(19)
    CREATED                                            DATE
    LAST_DDL_TIME                                      DATE
    TIMESTAMP                                          VARCHAR2(19)
    STATUS                                             VARCHAR2(7)
    TEMPORARY                                          VARCHAR2(1)
    GENERATED                                          VARCHAR2(1)
    SECONDARY                                          VARCHAR2(1)
    SQL>M.S.Taj

  • Exporting form data to a single table

    I have created a form in LiveCycle Designer ES 8.2  and simply want to export the data into a single table that I can then import into Access. It appears that in LiveCycle the row elements of a table are children of the table element and the column elements are children of the row elements.  I am wondering if there is an easy way to design a form in LiveCycle so that each cell of a table is a root element like the rest of the fields in the form.  I basically want to export one row of data from each form and append it to a larger table. Exporting the data as csv or tab-delimited would be sufficient, but neither of these appears to be an option.

    The only way I've found to do this is to open the form in Acrobat, click Forms, mouse over Manage Form Data, then click Export Data. Your only options are to save as .xml or .xdp. I saved my data as .xml. I was then able to import the .xml file into excel by clicking Data, mousing over xml, clicking Import... and browsing to the Acrobat generated .xml file. I know this is convoluted but it's the only way I've found to get the data into a spreadsheet. Acrobat exports the data as filename_data.xml, i.e. a form named contacts will export it's data as contacts_data.xml. Be aware, I've only tested this on a form that had a table in it and nothing else. If your table is part of a form with other fields in it I have no idea how the other data will look after exporting.

  • Add data to a repeating table

    Hi, is it possible to create a submit button in the middle of the form to add data to a repeating table (That repeating table would add an item to a list).

    Hi,
    Please refer to the articles related to repeating section from the following link
    Repeating Tables and Sections in InfoPath
    Please don't forget to mark it as answered, if your problem resolved or helpful.

  • Generic Datasource with Fuction Module with delta on Created Date

    Hi Experts,
    I have created a generic datasource using Function Module RSAX_BIW_GET_DATA. I have copied this function module and created a my own Function Module. I want to load delta using this. But I don't know how to handle delta in the code.
    my code is working for full load but not for delta. I have seen that in ROOSOURCE tabel the Delta field is showing the AIE instead of D and extraction method  is showing as F2. I have searched a lot of forums and articles but didn't get how to handle this.
    Please advice.

    Hi Amit,
    Go through the link as suggested by AKhan which lets you understand the concept of offsets and the last extraction status.
    In case of Table or View based GDS, the system takes care of the deltas based on the selections you make in the "Generic Delta" screen whereas in case of FM based DS, it is your responsibility to handle this part. Within your code, capture if the load is a Delta load (I_UPDMODE = D). Since your delta is on Created Date, maintain a Z table with name of the DS as the Key and a field representing the current value of the Delta field(created date in this case). When you first load the delta, there will be no record for your DS in this table. Create an entry with the current day. Next time when you load a delta, take this value, compare it with sy-datum and get all the records falling within these days. This has to be done in the Select stmt. Once selection happens, replace the value in the Z table with sy-datum. This way you can simulate the delta. The Z table can be used for other FM based Datasources also as it has DS as the key.
    It would be easy if the exact SAP table where RSA7 delta field status is stored is known. Otherwise, the above method can be used.
    Revert for any further queries.

Maybe you are looking for

  • Trouble connecting to mySql database

    Hi Forum I have a site hosted with Godaddy, and have created a database, but I can not connect to the database with DW. 1)  I made made sure that the invisible file _mmServerScripts folder and the Connections folder are present both on my local machi

  • How to search my stolen iPhone if it was not yet registered with iCloud

    How to search my stolen iPhone if it was not yet registered with iCloud

  • Software updater updating problem

    I get this error message when i try to install the newest version of NSU, and i can't update my N73 without the newest update. I use datacable CA-53 "There is a problem with this Windows Installer package. A script required for this install to comple

  • Debit/Credit Indicator for Transaction 'FRL'

    Dear all, In subcontract flow, I would like to separate account determination (split from Return flow) for Debit/Credit in Transaction 'FRL' External activity. But it is not possible in SAP setting that status of 'Debit/Credit indicator is "Not chang

  • Might Mouse Scroll Ball Problem

    I have a wireless mighty mouse, and the ball sometimes the scroll ball stops working. Either I can't scroll down, or I can't scroll up. It seems to me there is gunk in the wheel, just like inside an old mouse with a mouse ball on the bottom. Naturall