How to export dynamic table to changing parameter of a method
Hi ,
There is one method in which i have created a dynamic table and populated the data now i want to send the same dynamic table which is in the form of field symbol to the changing parameters of the method
with data
Hi,
Check these blogs,
SAP Developer Network Blog: Dynamic Internal Tables and Structures - ABAP
SAP Developer Network Blog: Dynamic Internal Table
Regards,
Alok Bansal
Edited by: alok bansal on Dec 6, 2008 10:35 AM
Similar Messages
-
How to set dynamic table name in sql query?
I want set dynamic table name by parameter in sql query,just like:
select * from :tbname
but run report is error,BI P report table name is invalidation.
What can i do? Thanks!Hi,
that's only possible inside a data template with a lexical parameter.
Regards
Rainer -
How to Export EUL tables ?
Hi all,
I have upgraded Discoverer admin/ desktop form 4.1.37 to 4.1.48. When i try to connect to Administrator it asks me to export EUL tables so that it will upgrade EUL. Iam unable to connect to Adminstrator/Desktop 4.1.48 as a Application user.
How to export EUL tables?
ThankyouHi,
Your DBA should export the EUL owner schema using the database command exp. This will export all the EUL tables and will enable you restore the tables if the upgrade fails.
Rod West -
How to pass internal table values to parameter
hi,
how to pass internal table values to parameter in selection screen.if is it possible means please sent codeings.
thanks.
stalin.hi,
tables : mara.
data : begin of itab_mara occurs 0,
matnr like mara-matnr,
ernam like mara-ernam,
end of itab_mara.
selection-screen : begin of block blk1 with frame title text-001.
parameters : p_matnr like mara-matnr.
selection-screen : end of block blk1.
select matnr ernam from mara into corresponding fields of itab_mara
where matnr = p_matnr.
loop at itab_mara.
write :/ itab_mara-matnr,
itab_mara-ernam.
endloop.
<b><REMOVED BY MODERATOR></b>
Message was edited by:
Alvaro Tejada Galindo -
How to export / import tables from UAT Environment to Devlopment in oracle
i wanted to share some points about export/import tables in oracle.
we have two environments one is development and integrated user acceptance test (UAT).
we have finalized table structures with data in UAT. i wanted to move from UAT to Development.
i found some commends in google. I tried but I am not able to export and then its throwing some errors.
i am explaining below what i want to do and what i want did.
Please provide solution what i need to do.
admin credentials in UAT
username :venkat_admin
password :venkat_admin
UAT user/schema
username : ods_inb_stg
password : ods_inb_stg
development environment credentials
admin user name : dev_admin
password : dev_admin
Development user/schema
username :ods_inb_dev
password :ods_inb_dev
Above mentioned schema names i want move data from UAT (ods_inb_stg) to development (ods_inb_dev)
I logged in uat ods_inb_stg user and then
I used this command
Exp ods_inb_stg/ods_inb_stg file=party_pt_address.expdat tables=(party,party_address)
log=party_pt_address.log;
getting error
Unknown command beginning "exp ods_inb_stg/..." - rest of line ignored.
What should I do any one help.
One more thing i have more than 100 tables how to export all tables and which is the easiest way and how to do it.
Thanks in Advance
VenkatHi,
based import and export we need to do.
suppose we think we have created tables in production and data also populated. we need to export the tables with data. i am able to export the tables with data some tables or full database.
suppose we have development environment. in development environment there is no tables. we can treat nothing in development. we have only username,password and hostname.
when you import the tables production to development automatically create the table structures with data.
where ever we wanted to import the tables no need to create table structures. thats why no need to think about table structures. -
How to export oracle table?
Does anybody knows how to export oracle table into sql format? I know by using PL/SQL Developer can do it,but I have a table,it contains a column,it's type is LONG,PL/SQL can't export it! How to export long type table into sql format?
Any idea will be appreciated!My table structure is follows:
create table MyDates
COL1 LONG,
COL2 VARCHAR2(20)
In column col1,I store some date in it,then I want to export this table,but I don't want to export this table into dmp file,I only want to export this table' structure and export it into SQL File,such export filename is mydata.sql
I don't know how to export this table's structure? Because it contains LONG type column.How to export it? By the way,would you tell me how to export other type table,such as it contains column type is blob? -
How to create Dynamic Table Control
Hi
How to create Dynamic Table control , The field names and values to be displayed in table control are to be fetched from Add-on Tables.
Regards
PrasathHi Jonathan,
Actually the columns to be displayed are not constant . It will be increased based on the database values, Anyhow it will not exceed 100.
Please confirm my understanding.
1. In this case I have to create 100 custom columns and make it visible / invisible based on my requirement and I can set the title at runtime.
2. How can i assosicate / reassociate the datadictionary reference for the columns that i use. Because I need to show the search help values for the
dynamic columns.
Your opinion on this will be helpful.
Regards
Prasath -
How to download dynamic table data into CSV format
Hi,
I have data in dynamic table <it_data>, and I want to download that into CSV format.
so I tried to use FM SAP_CONVERT_TO_CSV_FORMAT but how to use this FM with dynamic table?
here <it_data> type standard table, we can pass this to I_TAB_SAP_DATA. but problem is with changing parameter. (TRUXS_T_TEXT_DATA), what type of table it should be?
and one more thing is <it_data> structure is also dynamic , depending on input the structure of <it_data> may vary.
Regards,
MrunalHi,
check this one may be help full to u...........
*Use FM SAP_CONVERT_TO_CSV_FORMAT and pass a Delimiter and ITAB. This
returns an Ouput_String
Convert Internal Table to ; delimited format
There is a filename parameter on this FM but I don't think it's used
call function 'SAP_CONVERT_TO_CSV_FORMAT'
exporting
i_field_seperator = Delimiter "default ';'
i_filename = Filename
tables
i_tab_sap_data = ITAB
changing
i_tab_converted_data = Ouput_String
exceptions
conversion_failed = 1
others = 2.
Regard's
SHAIK. -
Function Modue with Dynamic Table as output parameter
Hi experts,
i have function (below) which reads "dynamically" data from table which is specify as input parameter, the data are "saved" in <ft>.
How can i return <ft> as output parameter of function module (table) ?
function
import parameter - > IC_TABLE
source code
data : lt_OPTIONS type standard table of RFC_DB_OPT,
lt_fields type standard table of rfc_db_fld,
lt_data type standard table of tab512,
la_rfcdata type tab512,
la_rfcfields type rfc_db_fld,
lr_dref type ref to data.
field-symbols: <ft> type table.
field-symbols: <structure> type any.
field-symbols: <field_to> type any.
field-symbols: <field_from> type any.
CALL FUNCTION 'RFC_READ_TABLE'
EXPORTING
query_table = IC_TABLE
DELIMITER = ' '
NO_DATA = ' '
ROWSKIPS = 0
ROWCOUNT = 0
tables
OPTIONS = lt_OPTIONS
fields = lt_fields
data = lt_data
EXCEPTIONS
TABLE_NOT_AVAILABLE = 1
TABLE_WITHOUT_DATA = 2
OPTION_NOT_VALID = 3
FIELD_NOT_VALID = 4
NOT_AUTHORIZED = 5
DATA_BUFFER_EXCEEDED = 6
OTHERS = 7.
create data lr_dref type table of (ic_table).
assign lr_dref->* to <ft>.
Fill data from OLTP table into ct_table.
assign local copy of initial line of <ft> to <structure>.
loop at lt_data into la_rfcdata.
loop at lt_fields into la_rfcfields.
assign component sy-tabix of structure <structure> to <field_to>.
if sy-subrc is initial.
assign la_rfcdata+la_rfcfields-offset(la_rfcfields-length)
to <field_from>.
<field_to> = <field_from>.
endif.
endloop.
append <structure> to <ft>.
endloop.
Thanks in advance
MartinHi Martin,
parameters with generic types are not allowed. So TYPE ANY TABLE etc. will not work. As Alex alreads said, you could return a reference to your table.
Your parameter should be typed like:
re_table type ref to data.
At the end of your function module get a reference of your table into your parameter:
get reference of <ft> into re_table
After the call of your function module you can now handle and work with your table as wished:
* Declaration
data: re_table type ref to data.
field-symbols: <my_table> type standard table.
* Assign reference to fieldsymbol
assign re_table->* to <my_table>
if sy-subrc NE 0.
" Error: Could not assign reference
endif.
Best regards,
Fabian -
How to declare Dynamic table in Tables Parameters of a Function Module...
Hi Gurus,
I would like to Know how to declare a Dynamic table in Tables parameters of a Function Module.
so that it should be able to hold any table data ....
I have tried all possible ways of trying to assign fields-symbol like declarations which doesnt allow here ...
plz Dont reply with the basics of creating dynamic internal tables, coz my case is not an Internal table it is FM table parameter declaration.....Hi,
If you are requirement is to create a function module with tables parameter having a generic line type i.e. no specific line type
just declare it with a name under Parameter name with out specifying the type.
A reference function module with such parameter, i would quote is the standard GUI_UPLOAD/ GUI_DOWNLOAD where the parameters specified under TABLES are generic.
If you want to process the values passed to these parameters in the source code of function module, field symbols would be a preferable option.
Regards,
Sharath Panuganti -
How to export internal table and pass the internal table to another screen?
Hi,
I have a sql SELECT statement that select data from table into internal table. I would like to export out the internal table and pass to another screen and display the data in ALV list. How to export it out? I try but the error given was " The type of "OUT_SELECT_ITAB" cannot be converted to the type of "itab_result".
Another question is, how to pass the internal table that i export out from the function module to another screen?
Here is the code
==============================================================
FUNCTION ZNEW_SELECT_ZSTUD00.
""Local Interface:
*" IMPORTING
*" REFERENCE(IN_SELECT_YEAR) TYPE ZSTUD00-EYEAR
*" EXPORTING
*" REFERENCE(OUT_RESULT) TYPE CHAR9
*" REFERENCE(OUT_SELECT_ITAB) TYPE ZSTUD00
*& Global Declarations
DATA: itab TYPE ZSTUD00,
itab_result TYPE TABLE OF ZSTUD00.
*& Processing Blocks called by the Runtime Environment
itab-eyear = IN_SELECT_YEAR.
SELECT *
FROM ZSTUD00
INTO TABLE itab_result
WHERE eyear = IN_SELECT_YEAR.
IF sy-subrc = 0.
out_result = 'Success'.
OUT_SELECT_ITAB = itab_result.
ELSE.
out_result = 'Fail'.
ENDIF.
ENDFUNCTION.
===============================================================
Please advise. Thanks
Regards,
RaydenHi Nagaraj,
I try to change it in Tables tab page but it state that TABLES parameters are obsolete. when i "Enter". I try to "Enter" again. it seem to be ok but it stil give me the same error.
================================================================
FUNCTION ZNEW_SELECT_ZSTUD00.
""Local Interface:
*" IMPORTING
*" REFERENCE(IN_SELECT_YEAR) TYPE ZSTUD00-EYEAR
*" EXPORTING
*" REFERENCE(OUT_RESULT) TYPE CHAR9
*" TABLES
*" OUT_SELECT_ITAB STRUCTURE ZSTUD00
*& Global Declarations
DATA: itab TYPE ZSTUD00,
itab_result TYPE TABLE OF ZSTUD00.
*& Processing Blocks called by the Runtime Environment
itab-eyear = IN_SELECT_YEAR.
SELECT *
FROM ZSTUD00
INTO TABLE itab_result
WHERE eyear = IN_SELECT_YEAR.
IF sy-subrc = 0.
out_result = 'Success'.
OUT_SELECT_ITAB = itab_result.
ELSE.
out_result = 'Fail'.
ENDIF.
ENDFUNCTION.
===============================================================
regards,
Rayden -
How to export Oracle tables and data to mySQL
Hi,
I am new to Oracle.. and would appreciate all help on the issues below.
Currently, we have Oracle8i on HP-UX, and Oracle8i on IBM-AIX. We would like to be ble to browse the information on the web, thus, a decision to use mySQL as the web database was made. In order to achieve the above, we need to perform the following:
1) Export Oracle tables to mySQL, from both the HP-UX and IBM-AIX machines.
2) Include an additional column to the tables that need to be exported from Oracle to mySQL.
3) Implement the export as a daily extraction that will run at a certain time of the day.
How may I achieve the above?
I have just installed the Oracle Enterprise Manager... will this have any help to the above???
Appreciate all help given... greatly appreciated!
Thanks and Brgds,
AliciaI'd first make sure you really need to create a separate database just for making the data available to the web. The web application you create could just as well query the existing Oracle databases. You don't necessarily have to create a separate database just to display info over the web.
Secondly, if you still want to create a separate database, I'd also question the use of mySQL. In my opinion, mySQL is not a relational database. It acts like a relational database; you can query it via SQL. But because of all the features which mySQL says it does not support yet, I don't consider it to be a true RDBMS. This may not be an issue in your case since you're using it just for read access. Still, I'd take a long look at the list of feature mySQL does not support and make sure you can live with those limitations.
Also, if you create a separate database for the web app and use Oracle for that database instead of mySQL, you could use Oracle's built in data replication to automatically refresh the web db from the existing db
If you conclude that you still want to create a separate database for the web app and use mySQL I think you'll have to write some code to support the interface between the dbs (but hey, I'm a developer). The reason I say this is because it sounds like you're merging data from two databases into one and you may even be merging data from two separate databases into a single table of the new web database. If this is the case, simple data extract utilities will not be sufficient. Also, it sounds like the new column added to the web database may not be able to be populated from existing data. And then there's the question of what you need to do with the existing web data each time you run the data extraction ? The easiest case is that you'll always add data to the web db from existing db. If you have to purge the web db first and then refresh it with existing data then there's another step in the process. Overall, writing code to support an interface like this gives you complete control over the process and provides a lot of flexibility in how it is run. In my experience, there are usually new requirements added to the interface as time goes on. The code based approach can deal with changing requirements. The tools approach eventually falls short.
One other issue to keep in mind is how to protect your existing database while exposing your web database to the Net. Since you need to support an automated interface between the two systems, you'll need to provide a path between the two databases without letting Net users gain access to your internal database. Some serious network security issues to resolve here, but I'm not a network admin.
hth,
Frank
Hi,
I am new to Oracle.. and would appreciate all help on the issues below.
Currently, we have Oracle8i on HP-UX, and Oracle8i on IBM-AIX. We would like to be ble to browse the information on the web, thus, a decision to use mySQL as the web database was made. In order to achieve the above, we need to perform the following:
1) Export Oracle tables to mySQL, from both the HP-UX and IBM-AIX machines.
2) Include an additional column to the tables that need to be exported from Oracle to mySQL.
3) Implement the export as a daily extraction that will run at a certain time of the day.
How may I achieve the above?
I have just installed the Oracle Enterprise Manager... will this have any help to the above???
Appreciate all help given... greatly appreciated!
Thanks and Brgds,
Alicia -
Functional module /table vs changing parameter
Hi ,
I am working in release 6.0 .
In program i have internal table and i have to pass it's content to FM. In FM I tried to declare TABLE parameter but it was not accepted because table parameter is obsolete. I declare Change parameter. like it was suggested in error message dialog.The parameter is declared after same table like internal table from program .
When I run program I saw that only one record is passed to FM parameter. Question is how to pass whole body content of IT to FM parameter .
Thanks
Source code /
- gt_cartscan & cartscan are created after the same DB table.
loop at scantbl.
gt_cartscan-zzcartag = scantbl-zzcartag.
append gt_cartscan.
endloop.
call function 'Z_WM_UPD_ZDTS_GR'
changing
cartscan = gt_cartscan.Hi
See the below example:
types:begin of ty_employee,
pernr type pa0002-pernr,
begda type pa0002-begda,
endda type pa0002-endda,
vorna type pa0002-vorna,
nachn type pa0002-nachn,
end of ty_employee.
*// Declate a types for employee data table
types:tt_employee type standard table of ty_employee.
*//Declate a workarea to hold the Employee data
data: gf_employee type ty_employee.
*Declate a table to hold the Employee data
data: gt_employee type tt_employee.
Letz say the gt_employee has 5 records when it is populated.
Then you have all the records of gt_employee when called through below perform in the subroutine.
perform shuffle_records changing gt_employee.
*& Form SHUFFLE_RECORDS
text
<--P_GT_EMPLOYEE[] text
form shuffle_records changing p_gt_employee type tt_employee.
endform. " SHUFFLE_RECORDS
Regards
Raj -
How to export in table mode if I need to export anotehr user's table
Please let me know how to export table owned by another user if we dont have DBA priv.
Can we do it in table mode of export. If yes, how to specify table mode in export?
Pls give an example also.
Thanks a lot.Tables in other user's schema can only be exported either by being a member of DBA role or EXP_FULL_DATABASE role. Table mode export is initiated by specifying TABLES parameter while running exp export utility.
An example TABLES parameter could be like
TABLES=(dept, mydata)
to export dept and mydata tables.
Message was edited by:
thrilller -
How to use dynamic table as a normal table?
Hi Abapers!
I've searched all SDN but couldn't find any solution for my problem!
I've created a dynamic table with "Date" as dynamic:
Description
Stdtot
Tcode
Unit
Date001
Date002
Date003
Date004
Since it's a field-symbol, I don't know how to manipulate this dynamic table in order to use datas from it (I want to use it like a normal internal table).
Can anyone help me?
Tarick.Hi,
usually you've create a TYPE in your report, like
TYPES:
BEGIN OF ty_s_date,
a TYPE ....,
b TYPE ....,
END OF ty_s_date,
ty_t_date TYPE STANDARD TABLE OF ty_s_date INITIAL SIZE 1000.
DATA:
gr_date TYPE REF TO data.
FIELD-SYMBOLS:
<tab> TYPE ty_t_date,
<lin> TYPE ty_s_date.
CREATE DATA gr_date TYPE ty_t_date.
ASSIGN gr_date->* TO <tab>.
CHECK ( <tab> IS ASSIGNED ).
SELECT ... FROM ... INTO TABLE <tab>
WHERE ...
LOOP AT <tab> ASSIGNING <lin>.
ENDLOOP.
You don't have to use MODIFY ....
If working with FIELD-SYMBOLS, all changes directly takes effect. It's really fast, I like to use them very much.
Regards.
Maybe you are looking for
-
Reg: Using a single masthead par for multiple users
Hi All We need to implement different look and feel in the masthead for different users. For e.g. User A will see a different caption around the logo to that of User B. It could be different images for each user too. We have to achieve this with only
-
Time Machine Unmounts in System Restart
After a restart (all power remains on to all hardware) the Time Machine Icon has vanished from the desktop, and from the Finder Devises list. Powering down the TM external disk, and then on again, brings it all back. The disk is connected via USB. Th
-
I can not buy credit, because de number of credit card is different, unable to change this from my tab?
-
Oracle upgrade exam from oracle 9i to oracle 11g
Hi, I want to give oracle upgrade exam from oracle 9i to oracle 11g release2. But i do not have material for preparation of this exam. Oracle Database 11g: New Features for 9i OCPs", also known as 1z0-055 exam. Please any one give me PPT or PDF or li
-
What is this black sticker on the palmrest of the DV8000? And where can I get it?
I need to know what kind of sticker it is and where I can get one as described from this circle. Please let me know