Retrieving Data from different Tables with same tuple name
Hi,
I am made the following query from different tables. A tuple "name" is appearing in some tables. So when I run the qiery in a Java class, it delivers the same result of c.name, bpl.name and p.name. The result of c.name is correct, but the other 2 names are overwritten. It works perfect in a postgreSql query tool. How can I correct it, plz?
SELECT c.ad_client_id, c.name, o.c_order_id, o.ref_order_id, bp.name, bpl.name, o.dateordered, o.datepromised, od.c_orderline_id,p.m_product_id,p.name, cur.iso_code, od.qtyordered
FROM adempiere.ad_client c, adempiere.c_order o, adempiere.c_orderline od, adempiere.c_bpartner bp, adempiere.m_product p, adempiere.c_bpartner_location bpl, adempiere.c_currency cur
WHERE c.ad_client_id =11 and c.ad_client_id = o.ad_client_id and bp.c_bpartner_id=o.c_bpartner_id and o.c_order_id = od.c_order_id and od.m_product_id = p.m_product_id and o.c_bpartner_location_id =bpl.c_bpartner_location_id and o.c_currency_id=cur.c_currency_id;
Cheers
Hi,
create alias, if u have similar field names as below. Use the alias name (rs.getString("cname") and rs.getString("bpname") and so on ) to retrive data.
SELECT c.ad_client_id, c.name as cname, o.c_order_id, o.ref_order_id, bp.name as bpname, bpl.name as bplname, o.dateordered, o.datepromised, od.c_orderline_id,p.m_product_id,p.name as pname, cur.iso_code, od.qtyordered
FROM adempiere.ad_client c, adempiere.c_order o, adempiere.c_orderline od, adempiere.c_bpartner bp, adempiere.m_product p, adempiere.c_bpartner_location bpl, adempiere.c_currency cur
WHERE c.ad_client_id =11 and c.ad_client_id = o.ad_client_id and bp.c_bpartner_id=o.c_bpartner_id and o.c_order_id = od.c_order_id and od.m_product_id = p.m_product_id and o.c_bpartner_location_id =bpl.c_bpartner_location_id and o.c_currency_id=cur.c_currency_id;Regards,
Ram
Similar Messages
-
Retrieving data from different tables in the same time crash
Hi
this is probably the wrong way to do it, but this is how I did:
- I wanted a screen with 3 datagrids components retrieving data from 3 different tables.
- I could make it work while enabling 1 or 2 of them. When the 3 are enabled, I get this error:
btw its a huge msg, I will trim it:
ArgumentError: Can't find ManagedQuery or ManagedOperation named: getItems_paged at mx.data::RPCDataServiceAdapter/executeQuery()[C:\depot\DataServices\branches\lcds_modeler 101\frameworks\projects\data\src\mx\data\RPCDataServiceAdapter.as:325] at mx.data::RPCDataServiceAdapter/processDataMessage()[C:\depot\DataServices\branches\lcds_m odeler101\frameworks\projects\data\src\mx\data\RPCDataServiceAdapter.as:920] at RPCDataServiceRequest/invoke()[C:\depot\DataServices\branches\lcds_modeler101\frameworks\ projects\data\src\mx\data\RPCDataServiceAdapter.as:1668] at mx.data::DataStore/http://www.adobe.com/2006/flex/mx/internal::invoke()[C:\depot\DataServices\branches\lcds_m odeler101\frameworks\projects\data\src\mx\data\DataStore.as:3343] ... it continues forever.
the getItems_paged is a auto generated function inside the php class flex generates to handle the tables.
Each of the datagrid is a custom component. I made so to avoid keeping a bunch of code lines in the main 'page'.
Any suggestion to make it work smoothly?
Thanks in advance,
btp~Hi
this is probably the wrong way to do it, but this is how I did:
- I wanted a screen with 3 datagrids components retrieving data from 3 different tables.
- I could make it work while enabling 1 or 2 of them. When the 3 are enabled, I get this error:
btw its a huge msg, I will trim it:
ArgumentError: Can't find ManagedQuery or ManagedOperation named: getItems_paged at mx.data::RPCDataServiceAdapter/executeQuery()[C:\depot\DataServices\branches\lcds_modeler 101\frameworks\projects\data\src\mx\data\RPCDataServiceAdapter.as:325] at mx.data::RPCDataServiceAdapter/processDataMessage()[C:\depot\DataServices\branches\lcds_m odeler101\frameworks\projects\data\src\mx\data\RPCDataServiceAdapter.as:920] at RPCDataServiceRequest/invoke()[C:\depot\DataServices\branches\lcds_modeler101\frameworks\ projects\data\src\mx\data\RPCDataServiceAdapter.as:1668] at mx.data::DataStore/http://www.adobe.com/2006/flex/mx/internal::invoke()[C:\depot\DataServices\branches\lcds_m odeler101\frameworks\projects\data\src\mx\data\DataStore.as:3343] ... it continues forever.
the getItems_paged is a auto generated function inside the php class flex generates to handle the tables.
Each of the datagrid is a custom component. I made so to avoid keeping a bunch of code lines in the main 'page'.
Any suggestion to make it work smoothly?
Thanks in advance,
btp~ -
Where statement on two different tables with same column name
Hello,
I have 2 financial tables:
tblincome, tblexpenses
in each table I have column name "monthPayed" (have values of all the months of the year).
I would like to create a balance view table that will show me the financial status for the Q1 (for example).
I have a column totalIncome and totalExpended respectively.
I've create a view table that shows me the financial balance at the moment but I want it to be devide to Quarters of the year...
Regards
Please post DDL, so that people do not have to guess what the keys, constraints, Declarative Referential Integrity, data types, etc. in your schema are. Learn how to follow ISO-11179 data element naming conventions and formatting rules. Temporal data should
use ISO-8601 formats. Code should be in Standard SQL as much as possible and not local dialect.
This is minimal polite behavior on SQL forums. Where is the code you already tried? Or are you so lazy, so rude or so privileged that you did not do anything for yourself?
In fact that silly “tbl-” prefix is so bad that it has a name! It is called Tibbling and Phil Factor even wrote a humor article on bad programmers that use it.
Your narrative is vague; it sounds like this is the DDL:
CREATE TABLE Incomes
(payment_month CHAR(10) NOT NULL PRIMARY KEY,
income_amt DECIMAL(12,2) NOT NULL
CHECK (income_amt > 0.00),
CREATE TABLE Expenses
(payment_month CHAR(10) NOT NULL PRIMARY KEY,
expense_amt DECIMAL(12,2) NOT NULL
CHECK (expense_amt > 0.00),
>> in each table I have column name "monthPayed" (have values of all the months of the year). <<
I hope not! 2014 has not gotten to September, November or December yet! And the ISO-11179 data element name should be “payment_month”; but it is still wrong! An expense is not a payment! An income is not a payment!
>> I would like to create a balance view table that will show me the financial status for the Q1 (for example). <<
Report Period Table
Since SQL is a database language, we prefer to do look ups and not calculations. They can be optimized while temporal math messes up optimization. A useful idiom is a report period calendar that everyone uses so there is no way to get disagreements in the DML.
The report period table gives a name to a range of dates that is common to the entire enterprise.
CREATE TABLE Something_Report_Periods
(something_report_name CHAR(10) NOT NULL PRIMARY KEY
CHECK (something_report_name LIKE <pattern>),
something_report_start_date DATE NOT NULL,
something_report_end_date DATE NOT NULL,
CONSTRAINT date_ordering
CHECK (something_report_start_date <= something_report_end_date),
etc);
These report periods can overlap or have gaps. I like the MySQL convention of using double zeroes for months and years, That is 'yyyy-mm-00' for a month within a year and 'yyyy-00-00' for the whole year. The advantages are that it will sort with the ISO-8601
data format required by Standard SQL and it is language independent. The pattern for validation is '[12][0-9][0-9][0-9]-00-00' and '[12][0-9][0-9][0-9]-[01][0-9]-00'
Now figure it out for yourself, show us what effort you put into this, then we will help you.
--CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
in Sets / Trees and Hierarchies in SQL -
SQL Statement that will retrieve data from 1 table with 2 conditions
Hi,
I have a table "hz_cust_site_uses_all" and I need to retrieve primary_salesrep_id but with the following conditions:
IF site_use_code = 'SHIP_TO' then
if primary_salesrep_id is null then
GET primary_salesrep_id where site_use_code = 'BILL_TO'
else
GET primary_salesrep_id;
Sample Data:
cust_acct_site_id primary_salesrep site_use_code
1111 1000 BILL_TO
1111 1001 SHIP_TO
How will I convert it in an SELECT SQL statement.
Thank you.
Regards,
DianeStarting in Oracle 9i, you can use the case statement within an SQL statement. It has the functionality of an IF-THEN-ELSE statement.
The syntax for the case statement is:
CASE [ expression ]
WHEN condition_1 THEN result_1
WHEN condition_2 THEN result_2
WHEN condition_n THEN result_n
ELSE result
END
For example:
Select case when site_use_code ='SHIP_TO'
and primary_salesrep_id is null
then
(select primary_salesrep_id
from hz_cust_site_uses_all
where site_use_code = 'BILL_TO')
else
primary_salesrep_id
end
from hz_cust_site_uses_all;
hope this help you -
How to display multiple data from different table in one table? please help
Hi
I got sun java studio creator 2(the separate installation not the one in the net beans)....
My question is about displaying data that have been taken from the database.... I know how to display data in a table(just click on the table "bind data" )... but my question is that:
when i want to use a sql statement that taken the data from different table...
how can i display that data in the table(that will be shown in the web) ??? when i click bind data on the table i can only select one table i can't select more than one....
Note:
1) i'm using the rowset for displaying the data in the table, since the sql statement is depending on a condition(i.e. select a from b where c= ? )...
2) i mean by different table is that( i.e. select a from table1,table2 )..
thanks in advance...Hi,
937440 wrote:
Hi every one, this is my first post in this portal. Welcome to the forum!
Be sure to read the forum FAQ {message:id=9360002}
I want display the details of emp table.. for that I am using this SQL statement.
select * from emp where mgr=nvl(:mgr,mgr);
when I give the input as 7698 it is displaying the corresponding records... and also when I won't give any input then it is displaying all the records except the mgr with null values.
1)I want to display all the records when I won't give any input including nulls
2)I want to display all the records who's mgr is null
Is there any way to incorporate to include all these in a single query..It's a little unclear what you're asking.
The following query always includes rows where mgr is NULL, and when the bind variable :mgr is NULL, it displays all rows:
SELECT *
FROM emp
WHERE LNNVL (mgr != :mgr)
;That is, when :mgr = 7698, it displays 6 rows, and when :mgr is NULL it displays 14 rows (assuming you're using the Oracle-supplied scott.emp table).
The following query includes rows where mgr is NULL only when the bind variable :mgr is NULL, in which case it displays all rows:
SELECT *
FROM emp
WHERE :mgr = mgr
OR :mgr IS NULL
;When :mgr = 7698, this displays 5 rows, and when :mgr is NULL it displays 14 rows.
The following query includes rows where mgr is NULL only when the bind variab;e :mgr is NULL, in which case it displays only the rows where mgr is NULL. That is, it treats NULL as a value:
SELECT *
FROM emp
WHERE DECODE ( mgr
, :mgr, 'OK'
) = 'OK'
;When :mgr = 7698, this displays 5 rows, and when :mgr is NULL, it displays 1 row. -
Cartesian of data from two tables with no matching columns
Hello,
I was wondering – what’s the best way to create a Cartesian of data from two tables with no matching columns in such a way, so that there will be only a single SQL query generated?
I am thinking about something like:
for $COUNTRY in ns0: COUNTRY ()
for $PROD in ns1:PROD()
return <Results>
<COUNTRY> {fn:data($COUNTRY/COUNTRY_NAME)} </COUNTRY>
<PROD> {fn:data($PROD/PROD_NAME)} </PROD>
</Results>
And the expected result is combination of all COUNTRY_NAMEs with all PROD_NAMEs.
What I’ve noticed when checking query plan is that DSP will execute two queries to have the results – one for COUNTRY_NAME and another one for PROD_NAME. Which in general results in not the best performance ;-)
What I’ve noticed also is that when I add something like:
where COUNTRY_NAME != PROD_NAME
everything is ok and there is only one query created (it's red in the Query plan, but still it's ok from my pov). Still it looks to me more like a workaround, not a real best approach. I may be wrong though...
So the question is – what’s the suggested approach for such queries?
Thanks,
Leszek
Edited by xnts at 11/19/2007 10:54 AMWhich in general results in not the best performanceI disagree. Only for two tables with very few rows, would a single sql statement give better performance.
Suppose there are 10,000 rows in each table - the cross-product will result in 100 million rows. Sounds like a bad idea. For this reason, DSP will not push a cross-product to a database. It will get the rows from each table in separate sql statements (retrieving only 20,000 rows) and then produce the cross-product itself.
If you want to execute sql with cross-products, you can create a sql-statement based dataservice. I recommend against doing so. -
Hi,
I am working on a report where I have to retrieve data from 3 tables(marc,mara,makt).For this I have used 3 select statements for retriving data from 3 tables.There r some fields which r not present in marc table where as present in mara and makt tables.So added thos fields in marc internal table t_marc.I have looped at marc table and used the read statement to read the data from mara table using the key field matnr from both the tables.This read statement is giving the sy-subrc value as 4.Could u pls tell me why this is happening?I am sending my code.
SELECT matnr
werks
pstat
lvorm
FROM marc
INTO TABLE t_marc
PACKAGE SIZE 500
WHERE matnr IN s_matnr
AND werks IN s_werks.
IF NOT t_marc[] IS INITIAL.
SELECT matnr
ersda
laeda
meins
FROM mara
INTO TABLE t_mara
FOR ALL ENTRIES IN t_marc
WHERE matnr = t_marc-matnr
AND ersda IN s_ersda
AND laeda IN s_laeda.
IF NOT t_mara[] IS INITIAL.
SELECT matnr
maktx
FROM makt
INTO TABLE t_makt
FOR ALL ENTRIES IN t_mara
WHERE matnr = t_mara-matnr.
LOOP AT t_marc INTO wa_marc.
READ TABLE t_mara INTO wa_mara WITH KEY matnr = t_marc-matnr.
IF sy-subrc IS INITIAL.
wa_marc-meins = wa_mara-meins.
MODIFY t_marc.
APPEND wa_marc TO t_output.
ENDIF.
READ TABLE t_makt INTO wa_makt WITH KEY matnr = t_marc-matnr.
IF sy-subrc IS INITIAL.
wa_marc-maktx = wa_makt-maktx.
MODIFY t_marc.
APPEND wa_marc TO t_output.
ENDIF.
ENDLOOP.hi hema,
Dont use three select stements for this scenario.
Just use innerjoin and join all the three tables.
Three tables should contain MATNR (material number).
By using that retrieve data from 3 tables by using a single select statement.
Eg:
SELECT DISTINCT a~matnr "MATERIAL NUMBER
a~ersda "CREATED ON
a~mtart "MATERIAL TYPE
a~meins "BASE UNIT OF MEASURE
a~bstme "ORDER UNIT
b~maktx "MATERIAL DESCRIPTION
c~bwkey "VALUATION AREA
c~lbkum "TOTAL VALUED STOCK
c~salk3 "VALUE OF TOTAL VALUED STOCK
c~stprs "STANDARD PRICE
c~peinh "PRICE UNIT
c~bklas "VALUATION CLASS
INTO TABLE it_matdetails
FROM mara AS a INNER JOIN makt AS b ON a~matnr = b~matnr
INNER JOIN mbew AS c ON a~matnr = c~matnr
INNER JOIN marc AS d ON a~matnr = d~matnr
INNER JOIN mard AS e ON a~matnr = e~matnr
WHERE b~spras = sy-langu AND a~matnr IN matnr AND d~werks IN werks AND e~lgort IN lgort.
pls reward if helpful. -
Select max date from a table with multiple records
I need help writing an SQL to select max date from a table with multiple records.
Here's the scenario. There are multiple SA_IDs repeated with various EFFDT (dates). I want to retrieve the most recent effective date so that the SA_ID is unique. Looks simple, but I can't figure this out. Please help.
SA_ID CHAR_TYPE_CD EFFDT CHAR_VAL
0000651005 BASE 15-AUG-07 YES
0000651005 BASE 13-NOV-09 NO
0010973671 BASE 20-MAR-08 YES
0010973671 BASE 18-JUN-10 NOHi,
Welcome to the forum!
Whenever you have a question, post a little sample data in a form that people can use to re-create the problem and test their ideas.
For example:
CREATE TABLE table_x
( sa_id NUMBER (10)
, char_type VARCHAR2 (10)
, effdt DATE
, char_val VARCHAR2 (10)
INSERT INTO table_x (sa_id, char_type, effdt, char_val)
VALUES (0000651005, 'BASE', TO_DATE ('15-AUG-2007', 'DD-MON-YYYY'), 'YES');
INSERT INTO table_x (sa_id, char_type, effdt, char_val)
VALUES (0000651005, 'BASE', TO_DATE ('13-NOV-2009', 'DD-MON-YYYY'), 'NO');
INSERT INTO table_x (sa_id, char_type, effdt, char_val)
VALUES (0010973671, 'BASE', TO_DATE ('20-MAR-2008', 'DD-MON-YYYY'), 'YES');
INSERT INTO table_x (sa_id, char_type, effdt, char_val)
VALUES (0010973671, 'BASE', TO_DATE ('18-JUN-2010', 'DD-MON-YYYY'), 'NO');
COMMIT;Also, post the results that you want from that data. I'm not certain, but I think you want these results:
` SA_ID LAST_EFFD
651005 13-NOV-09
10973671 18-JUN-10That is, the latest effdt for each distinct sa_id.
Here's how to get those results:
SELECT sa_id
, MAX (effdt) AS last_effdt
FROM table_x
GROUP BY sa_id
; -
Retrieve data from nested tables
Hi All,
I have big trouble to retrieve data from nested tables..
From java code developer are passing struct data type to Oracle procedure.. So equal data type in oracle has been created as created as object
CREATE OR REPLACE TYPE TXNDATA AS OBJECT
TRAN_ID NUMBER ,
EVENT_ID NUMBER ,
EVENT_CD VARCHAR2(10 BYTE))and create a procedure which has a IN parameter as TXNDATA
now i need to retrieve the column data's through SELECT clause such as
TYPE Proc_txn IS TABLE OF TXNJOURNALDATA;
EVENT_JOURNAL_SEQ Proc_txn;
select * from table(cast(EVENT_JOURNAL_SEQ));but above SQL will give all column data's but i need to retrieve only 2 column values such as
select EVENT_ID , EVENT_CD from table(cast(EVENT_JOURNAL_SEQ))how can i achieve the above result set?
Thanks & Regards
Sami.use a table alias in your query
SQL> set serveroutput on
SQL> create TYPE TXNDATA AS OBJECT
2 (
3 TRAN_ID NUMBER ,
4 EVENT_ID NUMBER ,
5 EVENT_CD VARCHAR2(10 BYTE));
6 /
Type created.
SQL>
SQL> create type txnjournaldata
2 as table of txndata;
3 /
Type created.
SQL>
SQL> declare
2 txn txnjournaldata := txnjournaldata (
3 txndata(10, 20, 'One')
4 ,txndata(10, 20, 'Two')
5 );
6 begin
7 for rec in (select tx.event_id
8 , tx.event_cd
9 from table (txn) tx
10 )
11 loop
12 dbms_output.put_line (rec.event_id||' - '||rec.event_cd);
13 end loop;
14 end;
15 /
20 - One
20 - Two
PL/SQL procedure successfully completed.Edited by: Alex Nuijten on Oct 24, 2011 12:24 PM -
Procedure to check data from different tables
Hi
I am trying to write a procedure to compare data from a table with another.
Table 1
ID Name Dept
1 ABC Y
2 DEF Z
Table 2
ID Dept
1 Y
2 Z
Table 3
Name ID
1 ABC
2 DEF
I would like to compare each record data in Table 1 with data from different tables table2,table3 by matching ID,name.... Please help me with how I could start writing a procedure and also spool data that does not match from the table1 with other tables
thanks
Edited by: 890563 on Apr 30, 2012 10:34 AMHope below helps you.
CREATE TABLE TABLE1
( ID VARCHAR2(10),
FIRST_NAME VARCHAR2(30),
LAST_NAME VARCHAR2(30),
MIDDLE_NAME VARCHAR2(30)
INSERT INTO TABLE1 VALUES('123456','testfirst','testlast','testmiddle');
INSERT INTO TABLE1 VALUES('123457','testfirst1','testlast1','testmiddle1');
CREATE TABLE TABLE1
( ID VARCHAR2(10),
FIRST_NAME VARCHAR2(30),
LAST_NAME VARCHAR2(30),
MIDDLE_NAME VARCHAR2(30)
INSERT INTO TABLE2 VALUES('123456','testfirst','testlas','testmidd');
INSERT INTO TABLE2 VALUES('123457','testfirst2','testlast1','testmiddle1');
SELECT TABLE1.ID,
-- Match First Name
CASE WHEN TABLE1.FIRST_NAME != TABLE2.FIRST_NAME THEN TABLE1.FIRST_NAME ELSE NULL END TABLE1_FIRST_NAME,
CASE WHEN TABLE1.FIRST_NAME != TABLE2.FIRST_NAME THEN TABLE2.FIRST_NAME ELSE NULL END TABLE2_FIRST_NAME,
-- Match Middle Name
CASE WHEN TABLE1.MIDDLE_NAME != TABLE2.MIDDLE_NAME THEN TABLE1.MIDDLE_NAME ELSE NULL END TABLE1_MIDDLE_NAME,
CASE WHEN TABLE1.MIDDLE_NAME != TABLE2.MIDDLE_NAME THEN TABLE2.MIDDLE_NAME ELSE NULL END TABLE2_MIDDLE_NAME,
-- Match Last Name
CASE WHEN TABLE1.LAST_NAME != TABLE2.LAST_NAME THEN TABLE1.LAST_NAME ELSE NULL END TABLE1_LAST_NAME,
CASE WHEN TABLE1.LAST_NAME != TABLE2.LAST_NAME THEN TABLE2.LAST_NAME ELSE NULL END TABLE2_LAST_NAME
FROM TABLE1, TABLE2
WHERE TABLE1.ID = TABLE2.ID
ID TABLE1_FIRST_NAME TABLE2_FIRST_NAME TABLE1_MIDDLE_NAME TABLE2_MIDDLE_NAME TABLE1_LAST_NAME TABLE2_LAST_NAME
123456 NULL NULL testmiddle testmidd testlast testlas
123457 testfirst1 testfirst2 NULL NULL NULL NULL
{code} -
Hi, experts. I want retrieve data from 8 tables
Hi, experts. I want retrieve data from 8 tables.
On which table i have to write for all entries query.
Thanks in advance.Hai Reddy,
Actually IF we Use Join's Actually The Performance Will Be Good For 4 tables.
So It Is Better To Create Two Joins With 4 Tables Each.
First Retrive The Data For First View.
Then Use For ALL Entries For First Table And Then Get Data For Second data.
Reward If Found usefull.
Regards.
Eshwar. -
Reading Data from a Table With an Expert
Hi all - I'm trying to write an Expert in OWB that would read data from a table and create a new table based on that information. I have the table creation part down, but how can I read data from a table with an Expert? From what I've read, Experts only deal with metadata, and there is no mechanism in Experts to actually read data in the tables. Does OraTcl work in Experts? Has anyone ever came across this problem, and if so, how did you solve it? Thanks in advance for your time! - Don
Hi Don
Can also use Java and JDBC from within Tcl, see the routines in this file below, take modify or whatever;
http://blogs.oracle.com/warehousebuilder/ombora.tcl
source <dir>\ombora.tcl
set g_user scott
set g_upwd zzzzzz
set g_hostname localhost
set g_port 1521
set g_srvname ora111
oraconnect $g_user $g_upwd $g_hostname:$g_port:$g_srvname
oraselect "select * from emp" ""
As well as dumping the results to stdout (you probably want to comment that part out and change any other part you don't like), g_res is a ResultSet object you can use to do whatever.
Cheers
David -
Retriving of data from different tables
retriving of data from different tables depening of the primary key this key field is there in all tables if it is there in one v table it should continue to other tables otherwise it should get exit from that it should display information message or otherwise success message if it is there in all tables .
Im writing the concept, just check it.
SELECT * from kna1 into lt_kna1.
if sy-subrc eq 0.
selest * from lfa1 into lt_lfa1
for all entries in lt_kna1.
endif. -
How to Retrieve data from Variant Table
Can anyone help me by telling how to retrieve data from variant table which was created by user. I am able to see data of variant table only thru cu60 transaction but not se11. I s there any function module to do this?
Hello Mohan,
if u already have data and u want to populate it in F4 help then use below code -
u Have to make use of FM - 'F4IF_INT_TABLE_VALUE_REQUEST'
REPORT ZGILL_VALUE_REQUEST .
data: begin of lt_all occurs 0.
include structure DYNPREAD.
data end of lt_all.
data: begin of lt_selected occurs 0.
include structure DDSHRETVAL.
data: end of lt_selected.
DATA: BEGIN OF lt_code OCCURS 0,
code LIKE zgill_main-PERNR,
END OF lt_code.
data no_dyn like sy-dynnr.
Parameters : ECODE like zgill_main-PERNR.
*parameters: pernr like pa0001-pernr .
no_dyn = sy-dynnr. "give the scren no directly or sy-dynnr in case of report.
At selection-screen on value-request for ECODE.
select PERNR into table lt_code from zgill_main.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'ECODE'
dynpprog = sy-repid
dynpnr = no_dyn
dynprofield = 'ECODE'
window_title = 'Employee Details'
value_org = 'S'
DISPLAY = 'F'
TABLES
value_tab = lt_code
RETURN_TAB = lt_selected.
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
*if sy-subrc eq '0' .
write: 'success'.
*endif.
read table lt_selected index sy-tabix.
move lt_selected-fieldval to ECODE. -
How to retrieve data from catsdb table and convert into xml using BAPI
How to retrieve data from catsdb table and convert into xml using BAPI
Points will be rewarded,
Thank you,
Regards,
Jagrut BharatKumar ShuklaHi,
This is not your requirment but u can try this :
CREATE OR REPLACE DIRECTORY text_file AS 'D:\TEXT_FILE\';
GRANT READ ON DIRECTORY text_file TO fah;
GRANT WRITE ON DIRECTORY text_file TO fah;
DROP TABLE load_a;
CREATE TABLE load_a
(a1 varchar2(20),
a2 varchar2(200))
ORGANIZATION EXTERNAL
(TYPE ORACLE_LOADER
DEFAULT DIRECTORY text_file
ACCESS PARAMETERS
(FIELDS TERMINATED BY ','
LOCATION ('data.txt')
select * from load_a;
CREATE TABLE A AS select * from load_a;
SELECT * FROM A
Regards
Faheem Latif
Maybe you are looking for
-
Both thunderbolt display and ethernet stopped working at the same time
I use recent Macbook pro 13inch retina. I use both of thunderbolt ports on ethernet and display. I was messing around with application, and I found chess game. I played it for while than my display and ethernet suddenly stopped working. I do know et
-
Challenging--- How to use AudioFormat , AudioInputStream in my case
I did a application extracting data in byte format from .wav file, storing them in byte array, and I also have to use those data to do signal processing ,such FFT, convolution,... and so on, In order to do so, i guess I have to convert byte data to d
-
After Effects CC 12.2 crashes after startup with NO error
I've recently updated CC from 12.1 to 12.2 and I cannot launch it anymore. After Effects launches its UI and after 2-3 seconds it crashes without any error message or crash log. My specs: Windows 7 Home Premium 64bit Intel Core i5 3450 3.1GHz Geforce
-
I have a 16gb iphone 4. i recently installed iphoto on it. Its crashing everytime i open it. [URL=http://www.4shared.com/photo/xaoMw_nJ/IMG_0080.html][IMG]http://dc533.4shared.com/img/xaoMw_nJ/0.61489136980091/IMG_0080.PNG[/IMG][/URL] This is what is
-
Download Multiple Documents App from Solutions2Share
Hello, I have downloaded the 'Download Multiple Documents App' from Solutions2Share and installed it on several existing site collections on my SharePoint online office 365 tenant. It works without any problems on all sites on all site collections ap