How to merge 3 different tables using ADF BC?
Hi
I have 3 tables (i.e., Employee, Dept, location)
First i need to merge Employee and Dept as "*EmployeeDept*" table with the primary key(EmployeeID) and then i should merge "*EmployeeDept*" with Dept table with the primary key(DeptID) of Dept table.
I tried "*ViewLink*" however i am able to merge only two tables(i.e., Employee and Dept) as "EmployeeDept", no idea how to merge the third table(Dept) with it.
Please help.
Thanks in advance
Hi Timo
Employee -- EmployeeID,FirstName,LastName,*DepartmentID*, JobID
Dept -- DepartmentID, DepartmentName, ManagerID, LocationID
Location -- LocationID, StreetAddress, City, CountryID
Will join Employee and Dept table as "EmployeeDept" by using Query *( select EmployeeID, FirstName, DepartmentName,*
LocationID From Employee, Dept where Employee.DepartmentID = Dept.DepartmentID)
So now i need to join this new "EmployeeDept" with Location table to get the columns from both using query like
*(select EmployeeID, FirstName, DepartmentName, LocationID, StreetAddress, City, CountryID From EmployeeDept, Location*
where EmployeeDept.LocationID = Location.LocationID)
Thanks
Similar Messages
-
How to insert record in table using ADF Table
Hi,
I am developing and application in ADF .it consist 5 tables.i need to insert into 1 table that contains IDs that are reffered from other tables and on ADF Table fi i dont want to show those IDs. Can somebody provide me solution how to do that?
like i have a SkillTable - that contains attributes Resource No(number) ,module Id(number), Track id(number), skill_type(number), skill_rating(number), experience(number).
Track id is reffered from track table
Module id is reffered from module table
Resource table is reffered from resource table
skill_type and skill_rating from lookup table
and i need to insert into SkillTable using ADF Table. we dont want to show Track id,module id,codes for skill_type nad skill_rating on ADF Table instead we want to show trackname and module name ,code values for skill_type and Skill_rating .
when we create ADF table for this skill table it shows me ids but what i want is that in each row it should show resource name,modulename,track name,and for skill_type and skill_rating it should show name of skill_types and Skill_rating rather than codes for each skill_type and Skill_rating.
we tried to insert by creating view ,but didnot work.
plz provide any solution.
ThnaklsHi,
Thanks for quick reply.but let me tell u my problem in more detail.
To insert into skill_table I have created a VO that contains ResourceNo, track_id, module_id,skill_type,skill_rating,experience. And I drag it on ADF creation form and also have created read only LOV for resource_name from resorce_table, LOV for skill_type,skill_rating from Lookup table,
And mapped those LOV to resource_no,skill_type,skill_rating on insert page.
For track_id I have converted inputtextBox to SelectinputText to create databound LOV which will popup a window that contain master detail for track_table and module_table which shows all track_names in master and corresponding module_names in detail table, and on that window I have select button when we click that button selected track_id and selected module_id will get populated to insert skill page in track_id selectinputtextbox and module_Id inpiuttextbox.
Now what I want is that instead of track_id and module_id populated on insert page coz these are of id's actually and we want to show values of these id's from other tables, I need to show selected track_name and module_name over on insert page.
Not getting any idea how to do that???
Plz help. -
How to join 5 different tables using SQL to make it to a flat file structur
I am trying to load five differnt tables into one flat file structure table without cartesian product.
I have five different tables Jobplan, Jobtask(JT), Joblabor(JL), Jobmaterial(JM) and Jpsequence(JS) and the target table as has all the five tables as one table.
The data i have here is something like this.
jobplan = 1record
jobtask = 5 records
joblabor = 2 records
jobmaterial = 1 record
jpsequence = 3 records
The output has to be like this.
JPNUM DESCRIPTION LOCATION JT_JPNUM JT_TASK JL_JPNUM JL_labor JM_JPNUM JM_MATERIAL JS_JPNUM JS_SEQUENCE
1001 Test Jobplan USA NULL NULL NULL NULL NULL NULL NULL NULL
1001 Test Jobplan USA 1001 10 NULL NULL NULL NULL NULL NULL
1001 Test Jobplan USA 1001 20 NULL NULL NULL NULL NULL NULL
1001 Test Jobplan USA 1001 30 NULL NULL NULL NULL NULL NULL
1001 Test Jobplan USA 1001 40 NULL NULL NULL NULL NULL NULL
1001 Test Jobplan USA 1001 50 NULL NULL NULL NULL NULL NULL
1001 Test Jobplan USA NULL NULL 1001 Sam NULL NULL NULL NULL
1001 Test Jobplan USA NULL NULL 1001 Mike NULL NULL NULL NULL
1001 Test Jobplan USA NULL NULL NULL NULL 1001 Hammer NULL NULL
1001 Test Jobplan USA NULL NULL NULL NULL NULL NULL 1001 1
1001 Test Jobplan USA NULL NULL NULL NULL NULL NULL 1001 2
1001 Test Jobplan USA NULL NULL NULL NULL NULL NULL 1001 3
Please help me out with this issue.
Thanks,
Siva
Edited by: 931144 on Apr 30, 2012 11:35 AMHope below helps you
CREATE TABLE JOBPLAN
( JPNUM NUMBER,
DESCRIPTION VARCHAR2(100)
INSERT INTO JOBPLAN VALUES(1001,'Test Jobplan');
CREATE TABLE JOBTASK
( LOCATION VARCHAR2(10),
JT_JPNUM NUMBER,
JT_TASK NUMBER
INSERT INTO JOBTASK VALUES('USA',1001,10);
INSERT INTO JOBTASK VALUES('USA',1001,20);
INSERT INTO JOBTASK VALUES('USA',1001,30);
INSERT INTO JOBTASK VALUES('USA',1001,40);
INSERT INTO JOBTASK VALUES('USA',1001,50);
CREATE TABLE JOBLABOR
( JL_JPNUM NUMBER,
JL_LABOR VARCHAR2(10)
INSERT INTO JOBLABOR VALUES(1001,'Sam');
INSERT INTO JOBLABOR VALUES(1001,'Mike');
CREATE TABLE JOBMATERIAL
( JM_JPNUM NUMBER,
JM_MATERIAL VARCHAR2(10)
INSERT INTO JOBMATERIAL VALUES(1001,'Hammer');
CREATE TABLE JOBSEQUENCE
( JS_JPNUM NUMBER,
JS_SEQUENCE NUMBER
INSERT INTO JOBSEQUENCE VALUES(1001,1);
INSERT INTO JOBSEQUENCE VALUES(1001,2);
INSERT INTO JOBSEQUENCE VALUES(1001,3);
SELECT JP.JPNUM AS JPNUM ,
JP.DESCRIPTION AS DESCRIPTION ,
NULL AS LOCATION ,
NULL AS JT_JPNUM ,
NULL AS JT_TASK ,
NULL AS JL_JPNUM ,
NULL AS JL_labor ,
NULL AS JM_JPNUM ,
NULL AS JM_MATERIAL ,
NULL AS JS_JPNUM ,
NULL AS JS_SEQUENCE
FROM JOBPLAN JP
UNION ALL
SELECT JP.JPNUM AS JPNUM ,
JP.DESCRIPTION AS DESCRIPTION ,
JT.LOCATION AS LOCATION ,
JT.JT_JPNUM AS JT_JPNUM ,
JT.JT_TASK AS JT_TASK ,
NULL AS JL_JPNUM ,
NULL AS JL_labor ,
NULL AS JM_JPNUM ,
NULL AS JM_MATERIAL ,
NULL AS JS_JPNUM ,
NULL AS JS_SEQUENCE
FROM JOBPLAN JP, JOBTASK JT
UNION ALL
SELECT JP.JPNUM AS JPNUM ,
JP.DESCRIPTION AS DESCRIPTION ,
NULL AS LOCATION ,
NULL AS JT_JPNUM ,
NULL AS JT_TASK ,
JL.JL_JPNUM AS JL_JPNUM ,
JL.JL_labor AS JL_labor ,
NULL AS JM_JPNUM ,
NULL AS JM_MATERIAL ,
NULL AS JS_JPNUM ,
NULL AS JS_SEQUENCE
FROM JOBPLAN JP, JOBLABOR JL
UNION ALL
SELECT JP.JPNUM AS JPNUM ,
JP.DESCRIPTION AS DESCRIPTION ,
NULL AS LOCATION ,
NULL AS JT_JPNUM ,
NULL AS JT_TASK ,
NULL AS JL_JPNUM ,
NULL AS JL_labor ,
JM.JM_JPNUM AS JM_JPNUM ,
JM.JM_MATERIAL AS JM_MATERIAL ,
NULL AS JS_JPNUM ,
NULL AS JS_SEQUENCE
FROM JOBPLAN JP, JOBMATERIAL JM
UNION ALL
SELECT JP.JPNUM AS JPNUM ,
JP.DESCRIPTION AS DESCRIPTION ,
NULL AS LOCATION ,
NULL AS JT_JPNUM ,
NULL AS JT_TASK ,
NULL AS JL_JPNUM ,
NULL AS JL_labor ,
NULL AS JM_JPNUM ,
NULL AS JM_MATERIAL ,
JS.JS_JPNUM AS JS_JPNUM ,
JS.JS_SEQUENCE AS JS_SEQUENCE
FROM JOBPLAN JP, JOBSEQUENCE JS;
JPNUM DESCRIPTION LOCATION JT_JPNUM JT_TASK JL_JPNUM JL_LABOR JM_JPNUM JM_MATERIA JS_JPNUM JS_SEQUENCE
1001 Test Jobplan NULL NULL NULL NULL NULL NULL NULL NULL NULL
1001 Test Jobplan USA 1001 10 NULL NULL NULL NULL NULL NULL
1001 Test Jobplan USA 1001 20 NULL NULL NULL NULL NULL NULL
1001 Test Jobplan USA 1001 30 NULL NULL NULL NULL NULL NULL
1001 Test Jobplan USA 1001 40 NULL NULL NULL NULL NULL NULL
1001 Test Jobplan USA 1001 50 NULL NULL NULL NULL NULL NULL
1001 Test Jobplan NULL NULL NULL 1001 Sam NULL NULL NULL NULL
1001 Test Jobplan NULL NULL NULL 1001 Mike NULL NULL NULL NULL
1001 Test Jobplan NULL NULL NULL NULL NULL 1001 Hammer NULL NULL
1001 Test Jobplan NULL NULL NULL NULL NULL NULL NULL 1001 1
1001 Test Jobplan NULL NULL NULL NULL NULL NULL NULL 1001 2
1001 Test Jobplan NULL NULL NULL NULL NULL NULL NULL 1001 3
{code} -
Hi,
In Jdeveloper 12c I am trying to create a task flow where I have taken 3 pages to insert values in a table. On first page when I put data control of 2 columns as input with label, then on bindings tab I created an action as CreateInsert.
Now when I am trying to create invoke action in executables then this option is not available.
How can I create this task flow where values can be inserted in the table on the 3rd page fragment on commit button???
All 3 pages have data control input boxes to insert values in the table.Hi,
Right click on the task flow page activity, click create page def and add there. If your activity is a page, then you can select the page and generate the pagedef as well.
Then you can add the executables.
Thanks. -
How to perform DML Operations on Spatial Table Using ADF
Hi
I have an urgent requirement. I have a table with Spatial column. I have generated Business components based on Spatial Table.
Now I have to perform Create,Read,Update and Delete operations using ADF Business Components on Spatial Table.
I have written custom create(),read(),update() and delete() methods in my Application Module and i have to implement those methods.
Can any one help me out how to acheive above four functionalities using ADF Business Components.
Thanks in AdvanceHI,
see this example.
u can do like this.
DATA: BEGIN OF seats OCCURS 0,
carrid TYPE sflight-carrid,
connid TYPE sflight-connid,
seatsocc TYPE sflight-seatsocc,
END OF seats.
DATA seats_tab LIKE HASHED TABLE OF seats
WITH UNIQUE KEY carrid connid with header line.
SELECT carrid connid seatsocc
FROM sflight
INTO table seats.
loop at seats.
COLLECT seats INTO seats_tab.
endloop.
LOOP AT seats_tab.
write:/ seats_tab-carrid,seats_tab-connid,seats_tab-seatsocc.
ENDLOOP.
rgds,
bharat. -
How to join THREE different tables into internal table using one select statement .
How to join THREE different tables into internal table using one select statement .
Hi experts,
I would like to request your guidance in solving the problem of joining the data from three different database tables into one internal table
Scenario:
Database tables:
SPFLI
SFLIGHT
SBOOK.
Table Fields:
SPFLI - CARRID CONNID COUNTRYFR CITYFRM COUNTRYTO CITYTO
SFLIGHT - CARRID CONNID FLDATE SEATSMAX SEATSOCC SEATSMAX_C
SEATSOCC_C SEATSMAX_F SEATSOCC_F
SBOOK - CARRID CONNID CLASS
MY INTERNAL TABLE IS IT_XX.
Your help much appreciated.
Thanks in advance.
Pawan.Hi Pawan,
please check below codes. hope it can help you.
TYPES: BEGIN OF ty_xx,
carrid TYPE spfli-carrid ,
connid TYPE spfli-connid ,
countryfr TYPE spfli-countryfr,
cityfrom TYPE spfli-cityfrom ,
countryto TYPE spfli-countryto,
cityto TYPE spfli-cityto ,
fldate TYPE sflight-fldate ,
seatsmax TYPE sflight-seatsmax ,
seatsocc TYPE sflight-seatsocc ,
seatsmax_b TYPE sflight-seatsmax_b,
seatsocc_b TYPE sflight-seatsocc_b,
seatsmax_f TYPE sflight-seatsmax_f,
seatsocc_f TYPE sflight-seatsocc_f,
class TYPE sbook-class,
END OF ty_xx,
t_xx TYPE STANDARD TABLE OF ty_xx.
DATA: it_xx TYPE t_xx.
SELECT spfli~carrid
spfli~connid
spfli~countryfr
spfli~cityfrom
spfli~countryto
spfli~cityto
sflight~fldate
sflight~seatsmax
sflight~seatsocc
sflight~seatsmax_b
sflight~seatsocc_b
sflight~seatsmax_f
sflight~seatsocc_f
sbook~class
INTO TABLE it_xx
FROM spfli INNER JOIN sflight
ON spfli~carrid = sflight~carrid
AND spfli~connid = sflight~connid
INNER JOIN sbook
ON spfli~carrid = sbook~carrid
AND spfli~connid = sbook~connid.
Thanks,
Yawa -
How to get list of tables used in packages
Dear All
Can you pls tell me how to get list of tables used in packages
Regardsselect referenced_name
from user_dependencies
where name = 'your_package'
and referenced_type = 'TABLE'Regards,
Rob. -
How to merge 4 internal tables
Hi,
I have to merge 4 internal tables
Two loops have to create in main loop because getting more than one values from other table.
Like
LOOP AT it_itab1 INTO wa_itab1.
MOVE-CORRESPONDING wa_itab1 TO wa_final.
READ TABLE it_itab2 INTO wa_itab2 WITH KEY pspel = wa_itab1-pspnr.
IF sy-subrc = 0.
wa_final-aufnr = wa_itab2-aufnr.
ENDIF.
READ TABLE it_itab3 INTO wa_itab3 WITH KEY projn = wa_itab1-pspnr.
IF sy-subrc = 0.
wa_final-vornr = wa_itab3-vornr.
ENDIF.
Instead of this READ statement of internal table it_itab3, I need to put loop as follows. But how to merge with final table?
loop at it_itab3 into wa_itab3 where projn = wa_itab1-pspnr.
wa_final-vornr = wa_itab3-vornr.
endloop.
LOOP AT it_itab4 INTO wa_itab4 WHERE aufnr = wa_final-aufnr.
wa_final-kzear = wa_itab4-kzear.
wa_final-matnr = wa_itab4-matnr.
wa_final-lgort = wa_itab4-lgort.
wa_final-sobkz = wa_itab4-sobkz.
wa_final-bdter = wa_itab4-bdter.
wa_final-bdmng = wa_itab4-bdmng.
wa_final-waers = wa_itab4-waers.
wa_final-aufnr = wa_itab4-aufnr.
wa_final-postp = wa_itab4-postp.
wa_final-posnr = wa_itab4-posnr.
wa_final-sanka = wa_itab4-sanka.
wa_final-gpreis = wa_itab4-gpreis.
APPEND wa_final TO it_final.
CLEAR:
wa_itab4.
ENDLOOP.
CLEAR:wa_final,
wa_itab1,
wa_itab2,
wa_itab3,
wa_itab4.
ENDLOOP.
Pls help me to merge this table.
Thanks in advance.
Rajkumar Pandiaraja.Hi Raj,
Do you have common key fields between final int table and other table?
if yes then you can do this by,
LOOP AT it_itab3 INTO wa_itab3 WHERE projn = wa_itab1-pspnr.
wa_final-vornr = wa_itab3-vornr.
MODIFY it_final FROM wa_final TRANSPORTING vornr
WHERE key1 = wa_tab1-key1."Mention your key field here
ENDLOOP.
Regards,
Manoj Kumar P
Edited by: Manoj Kumar on Jan 23, 2009 12:20 PM
Edited by: Manoj Kumar on Jan 23, 2009 12:21 PM -
How to merge cells in excel using X++ in AX 2009
Hi all,
How to merge cells in excel using X++ in AX 2009?
for example i have 3 cells (A3:C3) i need to merge this 3 cells using X++
can any one sujjest please
Thanks in advanceHi,
WinForm technology does not support X++ related cases.
I just checked this link
http://msdn.microsoft.com/en-us/library/aa867122.aspx and haven't found a related forum.
I'll move your case to where is the forum for so that you may get some help about this.
Regards,
Barry Wang
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
How can I sort a table using more than one column in Numbers or in Pages?
How can I sort a table using more than one column in Numbers or in Pages?
Hi Ron,
On the right side of the Toolbar click the Sort and Filter button, then select Sort.
You can then set up a multiple column sort.
Click Add A Column, Specify the sort for that column, Repeat.
Jerry -
How to merge two different images in photoshop?
I am new here. I am starting to learn photoshop.How to merge two different images in photoshop? Please guide me. Thankyou.
http://www.nissiinfotech.com/SPAM
-
How do I rename the table using Impdp?
Using the Impdp/Expdp utility of Oracle, I am trying to import a table. However the target database contains a table with the same name. How do I rename the table using Import?
REgards,
SakthiSAKTHIVEL wrote:
Using the Impdp/Expdp utility of Oracle, I am trying to import a table. However the target database contains a table with the same name. How do I rename the table using Import?
Hmm well why you just can't rename the table on the target db with the rename table to command and then do the import, will be easy right?
Aman.... -
How to fix the financial table using script
Hi All,
How to fix the financial table using script, (for example see below table. i have fixed manually, my document having more than 50 tables)
%, ) are hang aligned.
$ are left aligned as like below.
Regards,
VeluHi Velu
The quality of your screenshot came out pretty bad
Maybe send another higher resolution one which on a smaller part of the table and show the hidden characters -
How to insert into two tables using a Single ADF creation form?
Hi,
I need to make a ADF Creation Form that will insert the data at same time in two tables... Like i have two tables Track (Track_id,Track_Name)
and Module ( Module_id, Track_id, Module_name, Module_Short_name) and i have to insert the data in both the tables using Same Creation Form.
can anybody help me out and gave me the solution,how to do that?
Thanksif you want to insert different data into two different tables then you can drag the two data objects into creation form..
If you want to duplicate the data inserted in the one table to another then you can follow two approach
1. Drag and drop one table, When Save button is invoked then insert data into another table using callable statement.
or
2. Create on-insert trigger in Table1 where you can insert data into table2.
--Prasanna -
How to get different field in two are more different table using open sql
Dear all,
This SenthilMani am very new into sap abap am having doubt in reports how get the different fields from different tables like mara,marc,mard using open sql and native sql program give me some tips to get the data .
with regards,
senthilHI ,
1) If u want to select data from more the two table then u can use FOR ALL ENTRIES.
EX ..Open sql
select matnr from mara into table t_mara.
select matnr werks from marc into table t_marc for all entries in t_mara where matnr = t_mara-matnr.
2) U can join more than one table.
ex:
select mara~matnr
marc~werks
from mara join marc into table t_maramarc
on maramatnr = marcmatnr
3) Using native sql ...only u can use JOIN statement
Maybe you are looking for
-
ITunes will not install - have tried EVERYTHING - please help
I recently (yesterday) bought an iPod and yesterday installed the iPod and iTunes software on my computer, with absolutely no problems. Then today, when I tried to get onto the Music Store, I could not access it. (error -3212 was the number, I think.
-
Dear all Using form6i and run in c\s is it possible to add days of date.. example the format of date is 02-mar-07 in text item i enter 3 then the date will become 05-mar-07. it depends what number will be entered in textitem and it will add to the da
-
Library mode - stuck on working - never loads
In library mode, when I attempt to use loupe view on a file, it shows working, but then never finishes loading. If I move to develop, it will then show loading and load it properly. But it never finishes working if in library mode. If I then switch b
-
Want upgrade graphic card in macbook pro
I have a 15 inch macbook pro of mid 2009, 2.66 daul core/ 9400M and 9600GT card in it/ with the resolution of 1440 * 900/ i need a card that card support 1900*1200 at least
-
SAP Solution Manager key during upgrade
Hi, Im upgrading my 4.7 Enterprice system to 7 (ERP) When running the PREPARE im struggeling with the upgrade key from solution manager. I have generated a key but it Sapup tells me its wrong. I have deleted the system from smsy and the run the Lands