Query - Table Name
Dear Experts,
Do you know where can I find the contents of Table Name that represents?
I am confuse when I see different table names such as:
1. OINV A/R Invoice
2. Inv1 A/R Invoice - Rows
3. ADO1 A/R Invoice(Rows) - History
4. Inv3 A/R Invoice - Rows
5. Inv9 A/R Invoice - Base Documents
6. ADO9 A/R Invoice(Rows) - History
Could anyone tell me more about this or where I can find relevant info?
Thank you.
Raymond
Dear Raymond
1. OINV A/R Invoice : Header Level Information store in this table
2. Inv1 A/R Invoice - Rows : Row Level Item Detail Qty & Unit Price detail store in this table.
3. ADO1 A/R Invoice(Rows) - History
4. Inv3 A/R Invoice - Rows : Other Charges document level detail store in this table.
5. Inv9 A/R Invoice - Base Documents :
6. ADO9 A/R Invoice(Rows) - History
Thanks
Chetan Vora
Similar Messages
-
Hi Gurus,
In which table I can see roles and its corresponding query name both.
Thanks
LizaHi Liza,
Check this:
Role table
Regards
Asign point if useful -
Bex Query: Too many table names in the query The maximum allowable is 256
Hi Experts,
I need your help, Im working on a Query using a multiprovider of 2 datastores, I need to work with cells to assign specific acconts values to specific rows and columns, so I was creating a Structure with elements from a Hierarchy, but I get this error when I'm half way of the structure:
"Too many table names in the query. The maximum allowable is 256.Incorrect syntax near ')'.Incorrect syntax near 'O1'."
Any idea what is happening? is ti possible to fix it? do I need to ask for a modification of my Infoproviders? Some one told me is possible to combine 2 querys, is it true?
Thanks a lot for your time and pacience.Hi,
The maximum allowable limit is 256 holds true. It is the max no. of characteristics and key figures that can be used in the column side. While creating a structure, you create key figures (restricted or calculated) and formulas etc.. The objects that you use to create these should not be more than 256.
http://help.sap.com/saphelp_nw70/helpdata/EN/4d/e2bebb41da1d42917100471b364efa/frameset.htm
Not sure if combination of 2 query's is possible. You can use RRI. Or have a woorkbook with 2 queries.
Hope it helps. -
How to find table name(s) in a dynamic query
In one of our (9iAS PORTAL)applications, any user can able to run their query statment and get output. All queries will be executed as dynamic SQL thru' a common shema/user who has 'SELECT' privilege on all tables but all users don't have this privilege on all tables. Now, before executing any query I need to find out what are the table name(s) used in this query to check the privilege for the respective user. How do I extract all table names being used in a dynamic query?.
Thanks
-KrishnamurthyI guess that his users log in to application first, then application uses one account to log in to database, so application are not direct database user since all users share the same account to database. If so, when a user lgins in, you may write it down from application to a database audit table, and you need to write down the dynamic query to the database audit table too, then you may query that audit table to find out. up to here, it looks that your application has to do more to assign what role to a user running the application, since database does not know what user is assessing it.
-
Error Messages in NW Log: Unable to run query / Enter table name
Hi all,
I am always wondering about the tons of error messages in the NW log.
Today I opened the workbench and a query (SQL-Query, Mode Fixed Query) and viewed the Fixed Query Details. Then I looked into the NW Log (SAP Logs), and it contained the following errors from my query opening inside the workbench:
com.sap.xmii.Illuminator.logging.LHException:
com.sap.xmii.Illuminator.logging.LHException:
com.sap.xmii.Illuminator.logging.LHException:
Enter a table name
Unable to run the query
All in all 15 error entries have been generated. Unfortunately no more details are contained in the log.
Has anyone an idea why this happens when only opening a query inside the workbench without starting it?
MichaelDo you get similar errors when running a ColumnList query without providing a Table name (with the Group parameter)?
/XMII/Illuminator?Server=XXXXX&Mode=ColumnList
/XMII/Illuminator?Server=XXXXX&Mode=ColumnList&Group=TABLENAME
Just a guess, but perhaps the WB is trying to fill the lower left listbox of available columns without the benefit of a table name being selected from the upper left listbox of available tables.
Regards,
Jeremy -
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 -
Dynamic Select query is failing with error "Invalid Table Name"
OPEN rc FOR 'SELECT count(*) from :s' USING tab_name;
fetch rc into rec_count;
CLOSE rc;
my requirement is to build dynamic select query to retrieve the total count of rows in each table ( variable tab_name contains the table_name )
But I am getting stuck by this errror, not sure if there is any alternative !
ORA-00903: invalid table name
ORA-06512: at line 43OPEN rc FOR 'SELECT count(*) from '||tab_name;
fetch rc into rec_count;
CLOSE rc;
-- This will work
1. Create a sql statement.
2. Open ref cursor for that statement. -
Table name stored in another table and how to Build the Dynamic Query
TblMasterTable
Id
Unqid
Tbl_TemplateNameid
Tbl_Template1
Unqid
Field1
Filed2
Tbl_Template2
Unqid
Field1
Filed2
Filed3
Tbl_Template3
Unqid
Field1
Filed2
Filed3
Filed4
Filed5
TblMasterTable contains the reference for the table names.
TblMasterTable contains the data
1 12 Tbl_Template1
2 22 Tbl_Template2
3 12 Tbl_Template1
4 343 Tbl_Template3
I want to build the query to retrieve all the Template table records based on the TblmasterTable data for a given id.This is possible but you need to understand the performance implications of Dynamic SQL before proceeding with this approach.
<br>
use this logic:<br>
declare sqlstring varchar2(500):=null <br>
select 'select stuff from '|| tbl_templatenameid into sqlstring from MasterTable where id=someid;<br>
execute immediate sqlstring;
<br>
<br>
I have really seen very few cases where this approach is justified.
<br>
<br>
Dave<br>
lehr.servehttp.com -
Changing the table name while drill down at the dashboard query
I have a DAY fact table that has about 1B rows.
The purpose of this table is to store on hand quantity for each item per day.
On the presentation layer I have a dashboard that will display average on hand qty per year and then user can drill down to quarter/month/week and then by day level to see the actual value at evey level.
Its hard to run aggregation on fly as all my 3 TEMP tablespace 32gb each filled and then I get error can not extent TEMP file.
So I thought I will do the aggregation at the database level and store the aggregated data in another table. So at first dashborad will read this new aggregated table to display qty at yearly. As soon as user drill down to quarter the dashbord should query the actual DAY fact table by filtering for specific year and quarter.
IS it possible? Can I change the table name while I drill down to lower level?
Thanks in advance.Hi use,
Yes. This is possible in OBIEE. You need to use Action Links to have navigation between reports. The main idea is to have 2 analysis. One with your aggregated data by year (using your aggregated table), and another one with the rest of the hierarchy and data (using normal fact table)
You add an action link on this report, that can navigate to the second report. showing "the details" (in your case would be the rest of the time dimension).
Please refer to http://www.rittmanmead.com/2010/07/obiee-11gr1-action-framework-and-conditions/ for actions links.
Another way is to create 2 analysis, then go to the 2nd analysis, and filter the column year as "Is based on results of other analysis" and you select there the first analysis. In this case when you click on the year in the first analysis, this value will be passed to the second analysis so you can filter the rest of the hierarchy based on the year you clicked on the first analysis.
If helpful, assign points.
J. -
Dynamic table name, how to query?
Hi!
There is a table name that is decided dynamically. the name is:
someNameYYY where YYY denotes the client number.
I get the client number by sy-mandt and concatenate it with someNameYYY to lc_table_name but then comes the problem:
I cannot do
SELECT *
FROM lc_table_name
because I get compiler error "lc_table_name" is not defined in ABAP dictionary.
How do I query a table with the name decided dynamically?
regards
BaranYou can have do something like this :
REPORT ZTABLE_DOWNLOAD .
tables :
dd02l, "SAP Tables
dd03l, "Table fields
dd04t. "R/3 DD: Data element texts
constants : c_activation_status(1) value 'A',
c_tabclass(6) type c value 'INTTAB',
c_language(2) type c value 'EN'.
type-pools : slis.
selection-screen begin of block b1 with frame title text-003.
*parameters :p_mandt like t001-mandt obligatory default '560'.
parameters :p_table like dd03l-tabname obligatory.
selection-screen end of block b1.
data:
table_desc(70) type c,
table_field like dd03l-fieldname,
total_rows type i,
t_rows(20) type c.
field-symbols:
<fs_line> type any,
<fs_field> type any.
at selection-screen.
*Check for the existence of the table
select single * from dd02l where tabname = p_table
and as4local = c_activation_status.
if sy-subrc ne 0.
*Table is not active in dictionary
message e999(zs) with 'Table is not active in dictionary'.
elseif dd02l-tabclass = c_tabclass.
*It is a structure not a table
message e999(zs) with 'This is a structure not a table'.
endif.
start-of-selection.
perform table_data_display.
end-of-selection.
form table_data_display.
data:
l_long_type type i,
lx_struct type ref to data,
lt_table type ref to data,
lcl_sdescr type ref to cl_abap_structdescr,
lx_lvc_cat type lvc_s_fcat,
lt_lvc_cat type lvc_t_fcat, "Field catalog
lx_fieldcat type slis_fieldcat_alv,
lt_fieldcat type slis_t_fieldcat_alv,
lx_layout type slis_layout_alv,
lt_sort type slis_t_sortinfo_alv, "Sort table
ls_sort type slis_sortinfo_alv.
field-symbols :
<fieldcat> type slis_fieldcat_alv,
<lt_table> type table,
<fs> type any,
<components> type abap_compdescr.
*Dynamic creation of a structure
create data lx_struct type (p_table).
assign lx_struct->* to <fs>.
*Get the field structure
lcl_sdescr ?= cl_abap_typedescr=>describe_by_data( <fs> ).
loop at lcl_sdescr->components assigning <components>.
*Do not display field "MANDT"
IF sy-tabix = 1 AND <components>-name = 'MANDT'.
CONTINUE. "next loop
ENDIF.
*Build fieldcatalog
lx_lvc_cat-fieldname = <components>-name.
lx_lvc_cat-ref_table = p_table.
append lx_lvc_cat to lt_lvc_cat.
lx_fieldcat-fieldname = <components>-name.
lx_fieldcat-ref_tabname = p_table.
append lx_fieldcat to lt_fieldcat.
endloop.
*Create an internal table
call method cl_alv_table_create=>create_dynamic_table
exporting it_fieldcatalog = lt_lvc_cat
importing ep_table = lt_table.
assign lt_table->* to <lt_table>.
*Read the data
select * from (p_table)
into corresponding fields of table <lt_table>
order by primary key.
loop at <lt_table> assigning <fs_line>.
assign component 'MANDT' of
structure <fs_line> to <fs_field>.
<fs_field> = p_mandt.
endloop.
if <lt_table>[] is initial.
*No table enties are existing
message e003(zdynamictable) with p_table.
exit.
else.
describe table <lt_table>[] lines total_rows.
t_rows = total_rows.
shift t_rows left deleting leading space.
endif.
*Specify the layout
lx_layout-zebra = 'X'.
lx_layout-colwidth_optimize = 'X'.
*Display the ALV List
select single ddtext into table_desc from dd02t
where tabname eq p_table and ddlanguage eq c_language.
check not table_desc is initial.
concatenate 'Entries from table:'
p_table '(' table_desc ')' '-:' t_rows 'Entries Found' into
table_desc
separated by space.
*Start - Download the data to excel sheet by validating the file path.
data:
*lv_filename type string,
lv_fname_validate like rlgrap-filename.
*CONCATENATE 'C:\ZTABLE_DWN\' P_TABLE '.Xls' INTO LV_FILENAME.
*CONCATENATE '
Pc-p31061\Harman\Tasks\ZTABLE_DWN\' P_TABLE '.xls' INTO
CONCATENATE 'C:\ZTABLE_DWN\' P_TABLE '.xls' INTO
LV_FNAME_VALIDATE.
call function 'WS_FILE_DELETE'
exporting
file = lv_fname_validate
IMPORTING
RETURN =
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
BIN_FILESIZE = ' '
CODEPAGE = ' '
FILENAME = LV_FNAME_VALIDATE
FILETYPE = 'DAT'
IMPORTING
FILELENGTH =
TABLES
DATA_TAB = <lt_table>.
*call function 'GUI_DOWNLOAD'
exporting
BIN_FILESIZE =
filename = lv_fname_validate
filetype = 'ASC'
write_field_separator = 'X'
IMPORTING
FILELENGTH =
tables
data_tab = <lt_table>.
End of Download.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_background_id = 'ALV_BACKGROUND'
i_grid_title = table_desc
is_layout = lx_layout
it_fieldcat = lt_fieldcat
tables
t_outtab = <lt_table>
exceptions
program_error = 1
others = 2
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
clear table_desc.
endform. " table_data_display -
How to query / list table name with certain data type?
Hi all spatials,
Sorry for the dumb question. I need to make a query that list all table name that contain certain data type, eg. SDO_georaster. How to do this ?
Many thanks in advance
damonSkip it. I figured it : using USER_TAB_COLUMNS will definitely help.
Cheers
damon -
Table name for BW Query Where used list
Hi,
I am looking for Table name where the information of " where used list " of a BW query stores.
Any help ?
Thanks
SatyaVani,
I dont think it is available...
whats your exact requirement???
you can make use of these below tables
RSZELTDIR Directory of the reporting component elements
RSZELTTXT Texts of reporting component elements
RSZELTXREF Directory of query element references
RSRREPDIR Directory of all reports (Query GENUNIID)
RSZCOMPDIR Directory of reporting components
RSZRANGE Selection specification for an element
RSZSELECT Selection properties of an element
RSZELTDIR Directory of the reporting component elements
RSZCOMPIC Assignment reuseable component <-> InfoCube
RSZELTPRIO Priorities with element collisions
RSZELTPROP Element properties (settings)
RSZELTATTR Attribute selection per dimension element
RSZCALC Definition of a formula element
RSZCEL Query Designer: Directory of Cells
RSZGLOBV Global Variables in Reporting -
Hello, I'm trying to create a report on a table name that is in an item. This is the simple query I'm using for the report:
Select * from :P9_MERGE_TABLE;
I get an Invalid Table Name error. Is there any way I can build the query to get around this problem.
thanks,
JanCertainly you can use a bind variable for a table name when building a dynamic sql query. But this is not exactly what I would call "binding the value of variable to a sql statement. You cannot bind a table name to a static sql query (hope this is the correct wording).
For example:
It is ok, to create the following static query:
SELECT * from emp where empno = :P1_EMPNO;But this will not work
SELECT * from :P1_TABLE_NAME;In this case, you have to do it the way discussed in this thread. -
Dynamic table name in native sql query
Can i pass a dynamic table name in this query ---
EXEC SQL PERFORMING APPEND_MTO.
SELECT
LTOG_QUANTITY_TYPE,
FCONO,
WBSELEMENT,
PROJECT
INTO :IMTO
FROM RWORKS.MTO_ISO_V2
WHERE LTOD_DATE > TO_DATE(:MAXD,'YYYYMMDDHH24MISS')
ENDEXEC.
How can i pass this table name RWORKS.MTO_ISO_V2 dynamically in the query
Edited by: Madhukar Shetty on Nov 26, 2009 2:40 PMCan i pass a dynamic table name in this query ---
EXEC SQL PERFORMING APPEND_MTO.
SELECT
LTOG_QUANTITY_TYPE,
FCONO,
WBSELEMENT,
PROJECT
INTO :IMTO
FROM RWORKS.MTO_ISO_V2
WHERE LTOD_DATE > TO_DATE(:MAXD,'YYYYMMDDHH24MISS')
ENDEXEC.
How can i pass this table name RWORKS.MTO_ISO_V2 dynamically in the query
Edited by: Madhukar Shetty on Nov 26, 2009 2:40 PM -
How to assign table name for select query in loop.
Hi friends my requirement is count the no of records of all the database table which comes into an internal table ."Check the below coding". Iam fetching the tables from dd03l table into an internal table .plz give me a sujjesion how to assign a table name in select query in a loop.
SELECT tabname FROM dd09l
INTO TABLE i_dd09l
WHERE protokoll = 'X'.
IF sy-subrc = 0.
SORT i_dd09l BY tabname.
ENDIF.
LOOP AT i_dd09l.
SELECT COUNT(*) INTO val FROM i_dd09l-tabname.
IF sy-subrc = 0.
i_dd09l-count = val.
ENDIF.
MODIFY i_dd09l INDEX sy-index.
CLEAR val.
ENDLOOP.
error : 'I_DD09L-TABNAME' is not defined in the abap dictionary as a table.data: dy_table type ref to data,
dy_line type ref to data,
xfc type lvc_s_fcat,
ifc type lvc_t_fcat,
dy_field type ref to data.
LOOP AT i_dd09l.
perform get_structure using i_dd09l-tabname .
CREATE DATA dy_table TYPE TABLE OF (_dd09l-tab_name).
UNASSIGN <dyn_table>.
ASSIGN dy_table->* TO <dyn_table>.
SELECT COUNT(*) INTO val FROM <dyn_table>.
IF sy-subrc = 0.
i_dd09l-count = val.
ENDIF.
MODIFY i_dd09l INDEX sy-index.
CLEAR val.
ENDLOOP.
form get_structure using p_table.
data : idetails type abap_compdescr_tab,
xdetails type abap_compdescr.
data : ref_table_des type ref to cl_abap_structdescr.
Get the structure of the table.
ref_table_des ?=
cl_abap_typedescr=>describe_by_name( p_table ).
idetails = ref_table_des->components.
loop at idetails into xdetails.
clear xfc.
xfc-fieldname = xdetails-name .
xfc-datatype = xdetails-type_kind.
xfc-inttype = xdetails-type_kind.
xfc-intlen = xdetails-length.
xfc-decimals = xdetails-decimals.
append xfc to ifc.
endloop.
endform. "get_structure
Try like this hope it will work.
Regards,
madan.
Maybe you are looking for
-
Unable to install OS X on Mini Mac
I am trying to install OS X Lion on my Mini Mac. Currently I am running OSX 10.4.11.
-
Diagnostics Agent 7.11 on iSeries
I"ve gone and got the installation master DVD and the Kernel DVD but cannot find the standalone Diagnostics Agent. Following You can download Diagnostics Agent installation DVDs from SAP Service Marketplace at: http://service.sap.com/swdc Download SA
-
Keyboard strokes producing strings of letters. ?
HP G61-429WM Windows 7 Home Premium Keyboard strokes are not working properly. For example. pressing "q" will produce "qew" with the cursor between the e and w. Pressing "a" "s" or "d" will all produce "ads". Right arrow key produces "132". The "i" k
-
Merge documents in Pages?
How can I merge documents in Pages 6. Actually, I have the same document, but with commentaries and alterations from differents authors, in differents files. I would like to merge all the commentaries and alterations into a new final file. Thanks.
-
Hi All, Here is table data. COl1 Col2 R_Status 100 A 100 A 100 A 100 A 101 A 102 A 103 B 103 B 103 B I need output like this COl1 Col2 R_Status 100 A error 100 A error 100 A error 100 A error 101 A error 102 A error 103 B load 103 B load 103 B load E