How to find the container in goods receipt table
hi,
how to find the number of containers with respect to each material document. After posting the material document the number of containers cannot stored in MSEG or MKPF table. i can able to find only in QALS table but how to link the material document and inspection lot.
Thanks
Muthuraman.D
Hi Muthuraman,
Can you check this bapi BAPI_INSPLOT_GETLIST.In this bapi there is a different selection criteria like material,material document no and all. I think you can use this for your report. Check this and post if need help.
Regards,
Madhu.
Similar Messages
-
How to find the 'ReturnQty' in Goods RECEIPT PO
Dear all,
Anybody help me to find the ReturnQty in Goods Receipt Po (PDN1).. say for example i have 100 Qtys in GRPO.Table name pdn1.i have returned 20 Qtys. how can i find the return qty in GRPO..
AnyBody please tell the Field name in Pdn1 for that ReturnQty to be Found
Thanks in Advance..
Regards,
G.shankar Ganeshwhat you are searching for isn't in PDN1.
i explain it
in OPDN and PDN1 (Good Receipt PO) you get Items.
when you return them you use Goods Return (Tables OPRD and RPD1).
that means you have two different documents and you should "connect" them by using
an UDF or for example Supplier Ref. No.
regards
David -
How to find the contain of @list_of_cols_val_tab_del
Hi
Could you please tellme how to find the contain of @list_of_cols_val_tab_del
for a given table when we write a stored procedure in SBO_SP_TransactionNotification.
Thanks
SanjayaThe way I have handled is by inserting the values being passed to this SP to a temp table
INSERT INTO TRANSNOTIFY VALUES (@object_type, @transaction_type, @num_of_cols_in_key, @list_of_key_cols_tab_del, @list_of_cols_val_tab_del)
Use this script to create this table
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo\].[TRANSNOTIFY\](
[ObjType\] [nvarchar\](20) COLLATE SQL_Latin1_General_CP850_CI_AS NULL,
[TransType\] [nchar\](1) COLLATE SQL_Latin1_General_CP850_CI_AS NULL,
[NumCols\] [int\] NULL,
[KeyCols\] [nvarchar\](255) COLLATE SQL_Latin1_General_CP850_CI_AS NULL,
[ColsVal\] [nvarchar\](255) COLLATE SQL_Latin1_General_CP850_CI_AS NULL
) ON [PRIMARY\] -
How to find the level of each child table in a relational model?
Earthlings,
I need your help and I know that, 'yes, we can change'. Change this thread to a answered question.
So: How to find the level of each child table in a relational model?
I have a relacional database (9.2), all right?!
O /* This is a child who makes N references to each of the follow N parent tables (here: three), and so on. */
/↑\ Fks
O"O O" <-- level 2 for first table (circle)
/↑\ Fks
"o"o"o" <-- level 1 for middle table (circle)
↑ Fk
"º"Tips:
- each circle represents a table;
- red tables no have foreign key
- the table in first line of tree, for example, has level 3, but when 3 becomes N? How much is N? This's the question.
I started thinking about the following:
First I have to know how to take the children:
select distinct child.table_name child
from all_cons_columns father
join all_cons_columns child
using (owner, position)
join (select child.owner,
child.constraint_name fk,
child.table_name child,
child.r_constraint_name pk,
father.table_name father
from all_constraints father, all_constraints child
where child.r_owner = father.owner
and child.r_constraint_name = father.constraint_name
and father.constraint_type in ('P', 'U')
and child.constraint_type = 'R'
and child.owner = 'OWNER') aux
using (owner)
where child.constraint_name = aux.fk
and child.table_name = aux.child
and father.constraint_name = aux.pk
and father.table_name = aux.father;Thinking...
Let's Share!
My thanks in advance,
Philips
Edited by: BluShadow on 01-Apr-2011 15:08
formatted the code and the hierarchy for readbilityJustin,
Understood.
Nocycle not work in 9.2 and, even that would work, would not be appropriate.
With your help, I decided a much simpler way (but there is still a small problem, <font color=red>IN RED</font>):
-- 1
declare
type udt_roles is table of varchar2(30) index by pls_integer;
cRoles udt_roles;
begin
execute immediate 'create user philips
identified by philips';
select granted_role bulk collect
into cRoles
from user_role_privs
where username = user;
for i in cRoles.first .. cRoles.count loop
execute immediate 'grant ' || cRoles(i) || ' to philips';
end loop;
end;
-- 2
create table philips.root1(root1_id number,
constraint root1_id_pk primary key(root1_id)
enable);
grant all on philips.root1 to philips;
create or replace trigger philips.tgr_root1
before delete or insert or update on philips.root1
begin
null;
end;
create table philips.root2(root2_id number,
constraint root2_id_pk primary key(root2_id)
enable);
grant all on philips.root2 to philips;
create or replace trigger philips.tgr_root2
before delete or insert or update on philips.root2
begin
null;
end;
create table philips.node1(node1_id number,
root1_id number,
node2_id number,
node4_id number,
constraint node1_id_pk primary key(node1_id)
enable,
constraint n1_r1_id_fk foreign key(root1_id)
references philips.root1(root1_id) enable,
constraint n1_n2_id_fk foreign key(node2_id)
references philips.node2(node2_id) enable,
constraint n1_n4_id_fk foreign key(node4_id)
references philips.node4(node4_id) enable);
grant all on philips.node1 to philips;
create or replace trigger philips.tgr_node1
before delete or insert or update on philips.node1
begin
null;
end;
create table philips.node2(node2_id number,
root1_id number,
node3_id number,
constraint node2_id_pk primary key(node2_id)
enable,
constraint n2_r1_id_fk foreign key(root1_id)
references philips.root1(root1_id) enable,
constraint n2_n3_id_fk foreign key(node3_id)
references philips.node3(node3_id) enable);
grant all on philips.node2 to philips;
create or replace trigger philips.tgr_node2
before delete or insert or update on philips.node2
begin
null;
end;
create table philips.node3(node3_id number,
root2_id number,
constraint node3_id_pk primary key(node3_id)
enable,
constraint n3_r2_id_fk foreign key(root2_id)
references philips.root2(root2_id) enable);
grant all on philips.node3 to philips;
create or replace trigger philips.tgr_node3
before delete or insert or update on philips.node3
begin
null;
end;
create table philips.node4(node4_id number,
node2_id number,
constraint node4_id_pk primary key(node4_id)
enable,
constraint n4_n2_id_fk foreign key(node2_id)
references philips.node2(node2_id) enable);
grant all on philips.node4 to philips;
create or replace trigger philips.tgr_node4
before delete or insert or update on philips.node4
begin
null;
end;
-- out of the relational model
create table philips.node5(node5_id number,
constraint node5_id_pk primary key(node5_id)
enable);
grant all on philips.node5 to philips;
create or replace trigger philips.tgr_node5
before delete or insert or update on philips.node5
begin
null;
end;
-- 3
create table philips.dictionary(table_name varchar2(30));
insert into philips.dictionary values ('ROOT1');
insert into philips.dictionary values ('ROOT2');
insert into philips.dictionary values ('NODE1');
insert into philips.dictionary values ('NODE2');
insert into philips.dictionary values ('NODE3');
insert into philips.dictionary values ('NODE4');
insert into philips.dictionary values ('NODE5');
--4
create or replace package body philips.pck_restore_philips as
procedure sp_select_tables is
aExportTablesPhilips utl_file.file_type := null; -- file to write DDL of tables
aExportReferencesPhilips utl_file.file_type := null; -- file to write DDL of references
aExportIndexesPhilips utl_file.file_type := null; -- file to write DDL of indexes
aExportGrantsPhilips utl_file.file_type := null; -- file to write DDL of grants
aExportTriggersPhilips utl_file.file_type := null; -- file to write DDL of triggers
sDirectory varchar2(100) := '/app/oracle/admin/tace/utlfile'; -- directory \\bmduhom01or02
cTables udt_tables; -- collection to store table names for the relational depth
begin
-- omits all referential constraints:
dbms_metadata.set_transform_param(dbms_metadata.session_transform, 'REF_CONSTRAINTS', false);
-- omits segment attributes (physical attributes, storage attributes, tablespace, logging):
dbms_metadata.set_transform_param(dbms_metadata.session_transform, 'SEGMENT_ATTRIBUTES', false);
-- append a SQL terminator (; or /) to each DDL statement:
dbms_metadata.set_transform_param(dbms_metadata.session_transform, 'SQLTERMINATOR', true);
-- create/open files for export DDL:
aExportTablesPhilips := utl_file.fopen(sDirectory, 'DDLTablesPhilips.pdc', 'w', 32767);
aExportReferencesPhilips := utl_file.fopen(sDirectory, 'DDLReferencesPhilips.pdc', 'w', 32767);
aExportIndexesPhilips := utl_file.fopen(sDirectory, 'DDLIndexesPhilips.pdc', 'w', 32767);
aExportGrantsPhilips := utl_file.fopen(sDirectory, 'DDLGrantsPhilips.pdc', 'w', 32767);
aExportTriggersPhilips := utl_file.fopen(sDirectory, 'DDLTriggersPhilips.pdc', 'w', 32767);
select d.table_name bulk collect
into cTables -- collection with the names of tables in the schema philips
from all_tables t, philips.dictionary d
where owner = 'PHILIPS'
and t.table_name = d.table_name;
-- execution
sp_seeks_ddl(aExportTablesPhilips,
aExportReferencesPhilips,
aExportIndexesPhilips,
aExportGrantsPhilips,
aExportTriggersPhilips,
cTables);
-- closes all files
utl_file.fclose_all;
end sp_select_tables;
procedure sp_seeks_ddl(aExportTablesPhilips in utl_file.file_type,
aExportReferencesPhilips in utl_file.file_type,
aExportIndexesPhilips in utl_file.file_type,
aExportGrantsPhilips in utl_file.file_type,
aExportTriggersPhilips in utl_file.file_type,
cTables in out nocopy udt_tables) is
cDDL clob := null; -- colletion to save DDL
plIndex pls_integer := null;
sTableName varchar(30) := null;
begin
for i in cTables.first .. cTables.count loop
plIndex := i;
sTableName := cTables(plIndex);
* Retrieves the DDL and the dependent DDL into cDDL clob *
* for the selected table in the collection, and writes to file.*
begin
cDDL := dbms_metadata.get_ddl('TABLE', sTableName, 'PHILIPS');
sp_writes_ddl(aExportTablesPHILIPS, cDDL);
exception
when dbms_metadata.object_not_found then
null;
end;
begin
cDDL := dbms_metadata.get_dependent_ddl('REF_CONSTRAINT', sTableName, 'PHILIPS');
sp_writes_ddl(aExportReferencesPhilips, cDDL);
exception
when dbms_metadata.object_not_found2 then
null;
end;
begin
cDDL := dbms_metadata.get_dependent_ddl('INDEX', sTableName, 'PHILIPS');
sp_writes_ddl(aExportIndexesPhilips, cDDL);
exception
when dbms_metadata.object_not_found2 then
null;
end;
begin
cDDL := dbms_metadata.get_dependent_ddl('OBJECT_GRANT', sTableName, 'PHILIPS');
sp_writes_ddl(aExportGrantsPhilips, cDDL);
exception
when dbms_metadata.object_not_found2 then
null;
end;
begin
cDDL := dbms_metadata.get_dependent_ddl('TRIGGER', sTableName, 'PHILIPS');
sp_writes_ddl(aExportTriggersPhilips, cDDL);
exception
when dbms_metadata.object_not_found2 then
null;
end;
end loop;
end sp_seeks_ddl;
procedure sp_writes_ddl(aExport in utl_file.file_type,
cDDL in out nocopy clob) is
pLengthDDL pls_integer := length(cDDL);
plQuotient pls_integer := null;
plRemainder pls_integer := null;
begin
* Register variables to control the amount of lines needed *
* for each DDL and the remaining characters to the last row. *
select trunc(pLengthDDL / 32766), mod(pLengthDDL, 32766)
into plQuotient, plRemainder
from dual;
* Join DDL in the export file. *
* ps. 32766 characters + 1 character for each line break. *
-- if the size of the DDL is greater than or equal to limit the line ...
if plQuotient >= 1 then
-- loops for substring (lines of 32766 characters + 1 break character):
for i in 1 .. plQuotient loop
utl_file.put_line(aExport, substr(cDDL, 1, 32766));
-- removes the last line, of clob, recorded in the buffer:
cDDL := substr(cDDL, 32767, length(cDDL) - 32766);
end loop;
end if;
* If any remains or the number of characters is less than the threshold (quotient = 0), *
* no need to substring. *
if plRemainder > 0 then
utl_file.put_line(aExport, cDDL);
end if;
-- record DDL buffered in the export file:
utl_file.fflush(aExport);
end sp_writes_ddl;
begin
-- executes main procedure:
sp_select_tables;
end pck_restore_philips;<font color="red">The problem is that I still have ...
When creating the primary key index is created and this is repeated in the file indexes.
How to avoid?</font> -
How to find the structural difference between two tables
Hi all,
How to find the structural difference between two tables .
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
PL/SQL Release 11.1.0.7.0 - Production
CORE 11.1.0.7.0 Production
TNS for 32-bit Windows: Version 11.1.0.7.0 - Production
NLSRTL Version 11.1.0.7.0 - Production
Thanks,
P Prakashyou could try something similar to this, for each table pair that you want to compare:
SELECT 'TABLE_A has these columns that are not in TABLE_B', DIFF.*
FROM (
SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH
FROM all_tab_columns
WHERE table_name = 'TABLE_A'
MINUS
SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH
FROM all_tab_columns
WHERE table_name = 'TABLE_B'
) DIFF
UNION
SELECT 'TABLE_B has these columns that are not in TABLE_A', DIFF.*
FROM (
SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH
FROM all_tab_columns
WHERE table_name = 'TABLE_B'
MINUS
SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH
FROM all_tab_columns
WHERE table_name = 'TABLE_A'
) DIFF;that's assuming, column_name, data_type and data_length are all you want to compare on. -
How to find the longest record in a table?
Hello,
Is there a function to find the longest record in a table? Or is there a data dictionary that would tell you which record contains the longest data?
I have a table with five columns and one million records. I want to find the record (5 columns combined) with the longest data. Thank you.Dear watson2000!
The function "VSIZE" tells you the number of bytes in the internal representation of a column which means the size of a value within a column. An example of vsize can be found here:
[http://www.adp-gmbh.ch/ora/sql/vsize.html]
So I think you should try it with this query to get the size of the longest record:
SELECT MAX(VSIZE(column1)) +
MAX(VSIZE(column2)) +
MAX(VSIZE(column3)) +
MAX(VSIZE(column4)) +
MAX(VSIZE(column5)) AS "Maximum Row"
FROM your_table;To identify the longest record try like this:
SELECT rowid
FROM your_table
GROUP BY rowid
HAVING (MAX(VSIZE(column1)) +
MAX(VSIZE(column2)) +
MAX(VSIZE(column3)) +
MAX(VSIZE(column4)) +
MAX(VSIZE(column5))) = (SELECT MAX(VSIZE(column1)) +
MAX(VSIZE(column2)) +
MAX(VSIZE(column3)) +
MAX(VSIZE(column4)) +
MAX(VSIZE(column5))
FROM your_table;)I hope that these two queries could be of help to you.
yours sincerely
Florian W.
Edited by: Florian W. on 23.04.2009 20:53 -
How to find the LOCKED ROWS in a table?
Not locked objects, but for a table the locked rows.
Check below links :
http://www.jlcomp.demon.co.uk/faq/locked_rows.html
How to find the locked row.
who are waiting for same record?
HTH
Girish Sharma -
How to find the function module for standard tables.
Hi
Could any one please tell me how to find the standard function module to update the standard tables
Thanks & Regards
SowmyaHi sowmya,
To find the function modules for standard tables you go for a where used list of that particular table and check only function module interfaces checkbox...
and more over you can go for DB_UPDATE_TABLE will be the function module for updating database table..
Hope this information would help you
Regards
Narin Nandivada -
SAP how to determine the account in Goods receipt for purchase order?
We know when we make a Goods receipt for purchase order,we will use the account in GBB and BSX define in OBYC. But where can we find the rule? I mean why system can find the account in GBB and BSX , not the other TEcode?
HI
This is again based on the movement type which SAP has created a link internally.
So if you see when a document is posted it basically derives the GL accounts based on the Movement type,Valuation class,valaution area and so on.
Good luck
Hari -
How to find the sum of an advanced table column?
Hi All,
Good Morning..
I have requirement where i need to calculate the sum of a column in an advanced table.and i need to put that value into some other field.
i am doing customization so i can't touch the Standard page properties.so i need to achieve it through Pro-grammatically..
my column name is unit price in the advanced table region.so i need the code to calculate the sum of the unit price.
Thanks in advance
BharatHi Bharat,
No need for Programatic way as Advanced Table already provides this facility.
The following steps describe how to enable Totaling for a column in the footer of an advanced table.
Step 1: In the Structure pane of OA Extension, select the column container for which you want to enable Totaling Any column except for the first column can be totaled. Set the Total Value property for this column container to True.
Step 2: In the Structure pane, select your advancedTable region and choose New > footer from the context menu. OA Extension creates an advancedTables Components folder containing a footer named child, that contains a tablefooter container (labeled tableFooter1).
Step 3: Select the tableFooter container and choose New > total from the context menu. OA Extension creates a tableFooter Components folder containing a total named child, that contains a new totalRow item as shown in the figure below.
Please let me know if you are still unable to get the Total Column
HTH,
Regards,
Syed. -
How to find the views created on a table..?
Hi all,
I am having one table name, EMP. I want to know what are the views created on this table. Is there any SQL query is there for this or any another
way to find it.
Thanks in advance.
PalYou can use ALL_DEPENDENCIES for that:
SQL> create view emp_v as select * from emp;
View created.
SQL> select name
2 , referenced_name
3 , referenced_type
4 from all_dependencies
5 where name = 'EMP_V';
NAME REFERENCED_NAME REFERENCED_TYPE
EMP_V EMP TABLE
1 row selected.
SQL> select name
2 , referenced_name
3 , referenced_type
4 from all_dependencies
5 where referenced_name = 'EMP';
NAME REFERENCED_NAME REFERENCED_TYPE
EMP_V EMP TABLE
EMP_TRG EMP TABLE
2 rows selected.
SQL> Keep in mind that it matters whether you restrict on NAME or on REFERENCED_NAME.
http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_1041.htm#sthref935
edit
Ah, spoonfeeding!
Don't you want him to learn something, and to become independent?Now you made me feel guilty ;) ( don't know what Saubhik posted originally, but anyway...)
I blame my currently terribly slow connection for that...
Anyway, OP, always start a quick search from the docs first.
Chances are you'll find your answer yourself.
Homes:
http://www.oracle.com/pls/db102/homepage
http://www.oracle.com/pls/db112/homepage
Edited by: hoek on Oct 15, 2010 2:53 PM -
How to find the Infoset associated with a table
Which table in SAP R/3 4.6c stores the table used in Infoset.
Eg: would like to see table : MSEG used in which Infoset.
I would like to know the Joins used in Infoset
Table : AQGSCAT give only the Main table used in the Infoset.
But, I would like to know where and all MSEG is usedHi,
1. BW infoset is a join between two ODS, so, there is no table.
2. BW infoset is not the same than R/3 infoset. You won't find it in SQ02
go throgh the below the link,
http://help.sap.com/saphelp_bw33/helpdata/en/ed/084e3ce0f9fe3fe10000000a114084/content.htm
Hareesh -
How to find the greatest hiredate in emp table
hi,
how can I find out whose the latest recruit in the demo emp
table.
thanx.
SreekantHello,
Use following query.
select * from emp
where hiredate = (select max(hiredate) from emp);
Adi -
How to find the list of un used table names in a schema?
Hi,
I have a doubt in Oracle. The doubt is that If we are using any tables in Function Or Proc.... Then...We can list all those used table names from USER_DEPENDENCIES system table. Right...
But, If the table is used with Execute Immediate Statement, then, those table names are not coming out with USER_DEPENDENCIES system table. Because they are identified at run time and not compile time.
It is fine. And I agree.. But, If I want to list out those tables also...then...How to do? Any idea?
I think ‘USER_SOURCE’ system table may not be the right one. If there is any other system table avails for this purpose...then..it would be very grateful to extract right...
So I am wanting that exact system table.
Please let me know about this, if you have any idea or check with your friends if they have any idea.
Regards,
Subramanian GHi Guys,
Thanks for all your answers.
Yes....You are all right. We can list out the used tables upto certain extent. Anyhow, I have done some R&D to derive the SQL's which is given below:
SELECT TABLE_NAME FROM USER_TABLES
MINUS
SELECT DISTINCT UPPER(REFERENCED_NAME)
FROM user_dependencies
where
referenced_type='TABLE' and UPPER(NAME) in
select distinct UPPER(object_name) from user_objects where UPPER(object_type) in
'MATERIALIZED VIEW',
'PACKAGE',
'PACKAGE BODY',
'PROCEDURE',
'TRIGGER',
'VIEW',
'FUNCTION'
UNION
SELECT UT.TABLE_NAME FROM
SELECT TABLE_NAME FROM USER_TABLES
MINUS
SELECT DISTINCT UPPER(REFERENCED_NAME)
FROM user_dependencies
where
referenced_type='TABLE' and UPPER(NAME) in
select distinct UPPER(object_name) from user_objects where UPPER(object_type) in
'MATERIALIZED VIEW',
'PACKAGE',
'PACKAGE BODY',
'PROCEDURE',
'TRIGGER',
'VIEW',
'FUNCTION'
AND REFERENCED_OWNER=(SELECT sys_context('USERENV', 'CURRENT_SCHEMA') FROM dual)
) UT,
( SELECT * FROM USER_SOURCE
WHERE NAME IN
( SELECT DISTINCT NAME FROM USER_SOURCE
WHERE TYPE NOT IN ('TYPE')
AND
UPPER(TEXT) LIKE '%EXECUTE IMMEDIATE%'
) US
WHERE
UPPER(US.TEXT) LIKE '%'||UPPER(UT.TABLE_NAME)||'%'
AND
(UPPER(US.TEXT) NOT LIKE '%--%')
The above SQL Query can list out unused tables by checking the Dynamic SQL Statement also upto some level only.
Once we extracted the list of unused tables, having a manual check would be also greater to verify as it is should not impact the business applications.
Regards,
Subramanian G -
How to find the list of Parallel enabled tables for a User?
Hi All,
I created a table with parallel option. Now I want to find out the list of all tables created with that option. I searched in DBA tables but I couldn’t get it. Could some one help in it?
Thanks,
DariusYou'll find this information in user_tables in the column DEGREE.
degree=1 means noparallel
degree=default means parallel default
degree=2 means (parallel, 2)
etc...
Maybe you are looking for
-
HT1386 Multiple Apple products on same Windows Computer
My son has an Ipod4 he needs to update. I have an Iphone3G that I plug into my Windows computer to sync, charge, etc. So my music library is on Itunes. My question is: If I plug my son's Ipod into my computer will my Itunes library be downloaded
-
MacBook magsafe (power) port doesn't look right
I'm coming to the realization that what I thought was a bad-power-adapter problem is actually something worse. About two months ago I replaced my previous power adapter (a MagSafe "T"-style) because I'd been having flakiness problems when trying to c
-
I am trying to link my Disney Movies Anywhere (DMA) account with my iTunes account following the instructions on the DMA website. I am redirected to Apple's website to download iTunes. I already have iTunes on my computer. I followed the Apple pro
-
Hello, I have an Oil and gas project whereby the offshore campaign will be a 7days a week work week. I have changed the default calendar to 7 days a week. However, when i set the task to the 7day calendar the duration of the working days is decreasin
-
Adobe flashplayer has stopped working on this pc
Adobe flashplayer has just stopped. I have tried downloading upto date versions, all my plug-ins are up to date, I have been through all the download suggestions over the last few days, I have had some right crap added and removed from my pc like ann