Help to set up data in tables
Hi,
i have to tables itab1 and itab2 what is the best way to set up the data like i wont to itab3 .
Regards
i give example:
itab1 :
20071
20072
20073
20074
20081
itab2:
20061
20062
20063
20064
20071
i wont to set data in itab3 like this:
itab3
20071
20061
20072
20062
20073
20063
20074
20064
20081
20071
Regards
Hi Cosmo Kramer,
Suppose your first internal table itab1 has fields like y1, y2...y5
and itab2 has fields y6,y7.y8,y9,y10
wa_tab1 and wa_tab2 are the workareas of respective tables.
wa_tab3 is the workarea of itab3.
Now do the following:
loop at itab1 into wa_tab1.
wa_tab3-y1 = wa_tab1-y1.
wa_tab3-y3 = wa_tab1-y2.
wa_tab3-y5 = wa_tab1-y3.
wa_tab3-y7 = wa_tab1-y3.
wa_tab3-y9 = wa_tab1-y5.
read table itab2 into wa_tab2 with key y10 = wa_tab1-y1.
wa_tab3-y2 = wa_tab2-y6.
wa_tab3-y4 = wa_tab2-y7.
wa_tab3-y6 = wa_tab2-y8.
wa_tab3-y8 = wa_tab2-y9.
wa_tab3-y10 = wa_tab2-y10.
append wa_tab3 to it_tab3.
endloop.
Hope this will work.....
Reward points, if useful.
Regards,
Nitin.
Similar Messages
-
Please help me in inserting data into table from XML message.
Hi Experts,
Please provide a procedure to implement my below requirement.
Since I am new to queue concept.
[code]- <MESSAGES>
- <MESSAGE ID="3026900">
<MSG_ID>3026900</MSG_ID>
<DT_POSTED>6/20/2013 08:15:48</DT_POSTED>
<POSTED_BY>GPD_MSG_EXTRACTOR</POSTED_BY>
<DT_LAST_QUEUED />
- <MSG>
- <WORK_SET TRANSACTION_ID="@TRANS_ID" TRANSACTION_TYPE="Batch" IS_ACID="@IS_ACID">
- <WORK_UNIT GROUP="LEAD_TIME" ACTION="UPDATE" AFFECTED="LEAD_TIME">
- <RECORDSET TABLE_NAME="LEAD_TIME">
- <xml xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema">
- <rs:data>
<z:row business_unit_id="3838" geo="AT" sku="A0814818" dw_maint_flag="False" stock_status_id="0" lead_time="30" est_qty="0" leadtime_lock="False" update_dts="2013-06-12T02:08:30.367" update_uid="DEACTIVATE_SKU_PROCESS" leadtime_dts="2010-05-22T02:21:21.707" leadtime_uid="Lead_Time_Rules" />
<z:row business_unit_id="202" geo="GB" sku="A0814819" dw_maint_flag="False" stock_status_id="0" lead_time="30" est_qty="0" leadtime_lock="False" update_dts="2013-06-12T02:08:30.367" update_uid="DEACTIVATE_SKU_PROCESS" leadtime_dts="2010-05-22T02:21:21.707" leadtime_uid="Lead_Time_Rules" />
<z:row business_unit_id="2828" geo="BE" sku="A0814820" dw_maint_flag="False" stock_status_id="0" lead_time="30" est_qty="0" leadtime_lock="False" update_dts="2013-06-12T02:08:30.367" update_uid="DEACTIVATE_SKU_PROCESS" leadtime_dts="2010-05-22T02:21:21.707" leadtime_uid="Lead_Time_Rules" />
</rs:data>
</xml>
</RECORDSET>
</WORK_UNIT>
- <WORK_UNIT GROUP="LEAD_TIME" ACTION="ADD" AFFECTED="LEAD_TIME">
- <RECORDSET TABLE_NAME="LEAD_TIME">
- <xml xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema">
- <rs:data>
<z:row business_unit_id="202" geo="GB" sku="A0814821" dw_maint_flag="False" stock_status_id="0" lead_time="30" est_qty="0" leadtime_lock="False" update_dts="2013-06-12T02:08:30.367" update_uid="DEACTIVATE_SKU_PROCESS" leadtime_dts="2010-05-22T02:21:21.707" leadtime_uid="Lead_Time_Rules" />
<z:row business_unit_id="2828" geo="BE" sku="A0814822" dw_maint_flag="False" stock_status_id="0" lead_time="30" est_qty="0" leadtime_lock="False" update_dts="2013-06-12T02:08:30.367" update_uid="DEACTIVATE_SKU_PROCESS" leadtime_dts="2010-05-22T02:21:21.707" leadtime_uid="Lead_Time_Rules" />
</rs:data>
</xml>
</RECORDSET>
</WORK_UNIT>
- <WORK_UNIT GROUP="LEAD_TIME" ACTION="DELETE" AFFECTED="LEAD_TIME">
- <RECORDSET TABLE_NAME="LEAD_TIME">
- <xml xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema">
- <rs:data>
<z:row business_unit_id="202" geo="GB" sku="A0814817" dw_maint_flag="False" stock_status_id="0" lead_time="30" est_qty="0" leadtime_lock="False" update_dts="2013-06-12T02:08:30.367" update_uid="DEACTIVATE_SKU_PROCESS" leadtime_dts="2010-05-22T02:21:21.707" leadtime_uid="Lead_Time_Rules" />
<z:row business_unit_id="2828" geo="BE" sku="A0814816" dw_maint_flag="False" stock_status_id="0" lead_time="30" est_qty="0" leadtime_lock="False" update_dts="2013-06-12T02:08:30.367" update_uid="DEACTIVATE_SKU_PROCESS" leadtime_dts="2010-05-22T02:21:21.707" leadtime_uid="Lead_Time_Rules" />
</rs:data>
</xml>
</RECORDSET>
</WORK_UNIT>
</WORK_SET>
</MSG>
</MESSAGE>
</MESSAGES>[/code]
The above XML message is receieved by our oracle queue.Once the message is receieved to our queue.
We have to process the message according to the action(UPDATE ADD DELETE).
From this message we have to process only 3 fields (geo sku lead_time).
These three feilds data should be processed into the SKU_LEAD_TIME table based on the action.
Req1:
IF the action is update then the records should be updated in the "LEAD_TIME_TABLE" table
IF the action is update then the records should be updated in the "LEAD_TIME_TABLE" table
based on the below condition.
[code]UPDATE LEAD_TIME_TABLE SET lead_time= lead time from xml message
WHERE LEAD_TIME_TABLE.SKU=sku from xml message AND LEAD_TIME_TABLE.GEO=geo from xml message;[/code]
Req2:
IF the action is delete then the records should be deleted from the "LEAD_TIME_TABLE" table.
based on the below condition.
[code]DELETE FROM LEAD_TIME_TABLE
WHERE LEAD_TIME_TABLE.SKU=sku from xml message AND LEAD_TIME_TABLE.GEO=geo from xml message;[/code]
Req3:
IF the action is add then the records should be inserted in the "LEAD_TIME_TABLE" and "LEAD_TIME_TABLE_STAGING" table
based on the below conditions.
Req3.1:
If SKU from XML message is available in "SKU_TABLE" table
then the three parameter(GEO SKU LEAD_TIME) values from XML message should be inserted into "LEAD_TIME_TABLE" table.
Req3.2:
If SKU from XML message is not available in "SKU_TABLE" table
then the three parameter(GEO SKU LEAD_TIME) values from XML message should be inserted into "LEAD_TIME_TABLE_STAGING" table.
Req3.3:
Once the new SKU is avilable in "SKU_TABLE" table then the corresponding SKU record should be
inserted into "LEAD_TIME_TABLE" table and that record should be deleted from "LEAD_TIME_TABLE_STAGING" table.
I am posting required scripts and test cases.
[code]CREATE TABLE LEAD_TIME_TABLE(sku VARCHAR2(20),model VARCHAR2(20),class CHAR(1),geo VARCHAR2(6),lead_time NUMBER,created DATE);
CREATE TABLE LEAD_TIME_TABLE_STAGING(sku VARCHAR2(20),geo VARCHAR2(6),lead_time NUMBER);
CREATE TABLE SKU_TABLE(sku VARCHAR2(20),geo VARCHAR2(6),lead_time NUMBER);
INSERT INTO SKU_TABLE VALUES('A0814817','GB',30);
INSERT INTO SKU_TABLE VALUES('A0814818','AT',30);
INSERT INTO SKU_TABLE VALUES('A0814819','GB',30);
INSERT INTO SKU_TABLE VALUES('A0814820','BE',30);
INSERT INTO SKU_TABLE VALUES('A0814821','GB',30);
INSERT INTO LEAD_TIME_TABLE(SKU,GEO,LEAD_TIME) VALUES('A0814817','GB',30);
INSERT INTO LEAD_TIME_TABLE(SKU,GEO,LEAD_TIME) VALUES('A0814818','AT',20);
INSERT INTO LEAD_TIME_TABLE(SKU,GEO,LEAD_TIME) VALUES('A0814819','GB',20);
INSERT INTO LEAD_TIME_TABLE(SKU,GEO,LEAD_TIME) VALUES('A0814820','BE',20);
INSERT INTO LEAD_TIME_TABLE_STAGING VALUES('A0814822','BE',30);[/code]
From the above message.
Test case for req3.1:
The action for SKU numbers "A0814821" "A0814822" are insert.
The SKU number "A0814821" is available in SKU_TABLE table.
so the record should be inserted in the LEAD_TIME_TABLE.
[code]SELECT * FROM LEAD_TIME_TABLE;
SKU GEO LEAD_TIME
A0814817 GB 30
A0814818 AT 20
A0814819 GB 20
A0814820 BE 20
A0814821 GB 30[/code]
Test case for req3.2:
The action for SKU numbers "A0814821" "A0814822" are insert.
The SKU number "A0814822" is not available in SKU_TABLE table.
so the record should be inserted in the LEAD_TIME_TABLE_STAGING.
[code]SELECT * FROM LEAD_TIME_TABLE_STAGING;
SKU GEO LEAD_TIME
A0814822 BE 30[/code]
Test case for req3.3:
The action for SKU numbers "A0814821" "A0814822" are insert.
The SKU number "A0814822" is not available in SKU_TABLE table.
Once I insert SKU number "A0814822" in SKU_TABLE table.
The corresponding records automatically should be inserted in the LEAD_TIME_TABLE
and should be deleted from LEAD_TIME_TABLE_STAGING.
[code]SELECT * FROM LEAD_TIME_TABLE_STAGING; --- should return NULL.
SELECT * FROM LEAD_TIME_TABLE;
SKU GEO LEAD_TIME
A0814817 GB 30
A0814818 AT 20
A0814819 GB 20
A0814820 BE 20
A0814821 GB 30
A0814822 BE 30[/code]
Please help me.
Thanks in advance.Hi,
I have resolved this issue.
But I have stuck up in implementing some of the scenarios.
Req1:
IF the action is update then the records should be updated in the "LEAD_TIME_TABLE" table
IF the action is update then the records should be updated in the "LEAD_TIME_TABLE" table
based on the below condition.
UPDATE LEAD_TIME_TABLE SET lead_time= lead time from xml message
WHERE LEAD_TIME_TABLE.SKU=sku from xml message AND LEAD_TIME_TABLE.GEO=geo from xml message;
Req3:
IF the action is add then the records should be inserted in the "LEAD_TIME_TABLE" and "LEAD_TIME_TABLE_STAGING" table
based on the below conditions.
Req3.1:
If SKU from XML message is available in "schema_name.SKU_TABLE" table.
The schema_name.SKU_TABLE table should be selected based on "business_unit_id" of XML message and "sid" of MAPPING table WHERE business_unit_id=sid.
then the three parameter(GEO SKU LEAD_TIME) values from XML message and two fields MODEL,CLASS from SKU_TABLE
should be inserted into "LEAD_TIME_TABLE" table.
Req3.2:
If SKU from XML message is not available in "schema_name.SKU_TABLE" table
The schema_name.SKU_TABLE table should be selected based on "business_unit_id" of XML message and "sid" of MAPPING table WHERE business_unit_id=sid.
then the four parameter(BUSINESS_UNIT_ID GEO SKU LEAD_TIME) values from XML message
should be inserted into "LEAD_TIME_TABLE_STAGING" table.
Req3.3:
Once the new SKU is avilable in "schema_name.SKU_TABLE" table then the corresponding SKU record should be
inserted into "LEAD_TIME_TABLE" table and that record should be deleted from "LEAD_TIME_TABLE_STAGING" table.
The schema_name.SKU_TABLE table should be selected based on "business_unit_id" of LEAD_TIME_TABLE_STAGING and "sid" of MAPPING table WHERE business_unit_id=sid.
I am posting required scripts and test cases.
[code]CREATE TABLE LEAD_TIME_TABLE(sku VARCHAR2(20),model VARCHAR2(20),class CHAR(1),geo VARCHAR2(6),lead_time NUMBER,created DATE);
CREATE TABLE LEAD_TIME_TABLE_STAGING(business_unit_id NUMBER,sku VARCHAR2(20),geo VARCHAR2(6),lead_time NUMBER);
CREATE TABLE SKU_TABLE(sku VARCHAR2(20),model VARCHAR2(20),class VARCHAR2(10));
CREATE TABLE mapping(sid NUMBER,schema_name VARCHAR2(20));
INSERT INTO LEAD_TIME_TABLE(SKU,GEO,LEAD_TIME) VALUES('A0814817','GB',30);
INSERT INTO LEAD_TIME_TABLE(SKU,GEO,LEAD_TIME) VALUES('A0814818','AT',20);
INSERT INTO LEAD_TIME_TABLE(SKU,GEO,LEAD_TIME) VALUES('A0814819','GB',20);
INSERT INTO LEAD_TIME_TABLE(SKU,GEO,LEAD_TIME) VALUES('A0814820','BE',20);
INSERT INTO SKU_TABLE VALUES('A0814817','M125','C111');
INSERT INTO SKU_TABLE VALUES('A0814818','M127','A111');
INSERT INTO SKU_TABLE VALUES('A0814819','M126','A111');
INSERT INTO SKU_TABLE VALUES('A0814820','N100','B111');
INSERT INTO SKU_TABLE VALUES('A0814821','P123','B111');
INSERT INTO mapping VALUES(202,'WEDB');
INSERT INTO mapping VALUES(2828,'HR');
INSERT INTO mapping VALUES(3838,'BB');
[/code]
Test case for req3.1:
The action for SKU numbers "A0814821" "A0814822" are insert.
The SKU number "A0814821" is available in schema_name.SKU_TABLE table.
so the record should be inserted in the LEAD_TIME_TABLE.
[code]SELECT * FROM LEAD_TIME_TABLE;
SKU MODEL CLASS GEO LEAD_TIME
A0814817 M125 C111 GB 30
A0814818 M127 A111 AT 20
A0814819 M126 A111 GB 20
A0814820 N100 B111 BE 20
A0814821 P123 B111 GB 30
[/code]
Test case for req3.2:
The action for SKU numbers "A0814821" "A0814822" are insert.
The SKU number "A0814822" is not available in SKU_TABLE table.
so the record should be inserted in the LEAD_TIME_TABLE_STAGING.
[code]SELECT * FROM LEAD_TIME_TABLE_STAGING;
BUSINESS_UNIT_ID SKU GEO LEAD_TIME
2828 A0814822 BE 30[/code]
Test case3.3.3:
The action for SKU numbers "A0814821" "A0814822" are insert.
The SKU number "A0814822" is not available in SKU_TABLE table.
Once I insert SKU number "A0814822" in SKU_TABLE table.
The corresponding records automatically should be inserted in the LEAD_TIME_TABLE
and should be deleted from LEAD_TIME_TABLE_STAGING.
[code]INSERT INTO SKU_TABLE VALUES('A0814822','P123','B111');
SELECT * FROM LEAD_TIME_TABLE_STAGING; --- should return NULL.
SELECT * FROM LEAD_TIME_TABLE;
SKU MODEL CLASS GEO LEAD_TIME
A0814817 M125 C111 GB 30
A0814818 M127 A111 AT 20
A0814819 M126 A111 GB 20
A0814820 N100 B111 BE 20
A0814821 P123 B111 GB 30
A0814822 P123 B111 GB 30[/code]
I am able to implement Req1 and Req3.1 for action UPDATE and INSERT in single merge statement.
However my code is not taking care of all my requirements.
Please find my below code.
[code] CREATE OR REPLACE PACKAGE BODY messg_values_process
AS
procedure ProcessInboundLtimeMessage(p_xml_message XmlType)
is
begin
for work_unit in (
select message.MESSAGE_ID
, work_unit.ACTION
, work_unit.LEADTIME_NODES
from XmlTable(
'/MESSAGES/MESSAGE'
passing p_xml_message
columns
MESSAGE_NO for ordinality
, MESSAGE_ID number path '@ID'
, WORK_UNIT_NODES XmlType path 'MSG/WORK_SET/WORK_UNIT'
) message
, XmlTable(
XmlNamespaces(
'urn:schemas-microsoft-com:rowset' as "rs"
, '#RowsetSchema' as "z"
'/WORK_UNIT'
passing message.WORK_UNIT_NODES
columns
WORK_UNIT_NO for ordinality
, ACTION varchar2(10 char) path '@ACTION'
, LEADTIME_NODES XmlType path 'RECORDSET[@TABLE_NAME="LEAD_TIME"]/xml/rs:data/z:row'
) work_unit
LOOP
CASE work_unit.ACTION
WHEN 'ADD' THEN MergeData(work_unit.LEADTIME_NODES);
WHEN 'UPDATE' THEN MergeData(work_unit.LEADTIME_NODES);
WHEN 'DELETE' THEN RemoveData(work_unit.LEADTIME_NODES);
ELSE null;
END CASE;
END LOOP;
END ProcessInboundLtimeMessage;
procedure MergeData(p_leadtime_nodes XmlType)
is
begin
if (p_leadtime_nodes is not null) then
merge into LEAD_TIME_TABLE old
using(
select *
from XmlTable(
XmlNamespaces(
'urn:schemas-microsoft-com:rowset' as "rs"
, '#RowsetSchema' as "z"
'/z:row[not(@business_unit_id=following-sibling::z:row/@business_unit_id)]'
passing p_leadtime_nodes
columns
ITEM_NO for ordinality
, BUSINESS_UNIT_ID number path '@business_unit_id'
, GEO varchar2(20 char) path '@geo'
, SKU varchar2(20 char) path '@sku'
, LEAD_TIME number path '@lead_time'
) NEW
ON (old.VK_UNIT = new.SKU
AND old.GEO=new.GEO)
when matched then update
set old.LEAD_TIME = new.LEAD_TIME
when not matched then INSERT
( old.VK_UNIT
, old.MODEL
, old.CLASS
, old.GEO
, old.LEAD_TIME
, old.COUNTDOWN
, old.LAST_UPDATED_DATE
values
( new.SKU
,'A123'
,'A1234'
, new.GEO
, new.LEAD_TIME
, 'N'
, sysdate
end if;
exception
when others then
LogDataError(
'MergeData Procedure Failed #: '||chr(10)||sqlerrm
, null
, null
END MergeData;
END messg_values_process;
/[/code]
Please help me.
Thanks. -
Help needed in pushing data into Table view Popup
Hi All,
I am trying to create a custom pop up and populate this with Reason code and descriptions. For this, i have created a popup and placed a table view on the popup. But when i am stuck how to push data into the popup from an internal table.
Any pointers on this will be really helpful.
Regards,
UdayaHi,
Even I am facing the similar issue. I have created custom component with four views for my requirement and created one view set and displaying the viewset in the pop up screen. I also created event handler and added required coding to open the pop up screen.
I have added event handler in BT116H_SRVO component and now the pop up is opend with the required fields but the field is not having any data the value is empty in the pop up screen. I also binded context node details in the standard component.
While debugging I found that the collection wrapper is empty, so the data is not populated in the pop up screen. So kindly hlep me how to fill the collection wrapper and populate data inside the pop up screen.
kindly let me know how to overcome this issue.
Thanks and Regards,
Kannan. -
Plz help for set focus in the table column
hi
I have aproblem like i want that when i click on submit button aftr filling tables column value if there is any error the error massage displaying after that click on masaage ok button get focus of my cursor on the same column where i was not fill any value .
i am giving a piece of code also with this also
thanks in advance
else if(!checkResources())//check if all resource brackets are set
JOptionPane.showMessageDialog(this, "Resource Brackets are not correct or complete." , "Error", JOptionPane.OK_OPTION);
//resourceTable.requestFocus(true);
return;
private boolean checkResources()
try
float number = -999999999.0F;
float[] lowerRange = new float[ resourceModel.getRowCount()];
float[] upperRange = new float[ resourceModel.getRowCount()];
allResource.setVisible(false);
overlapRes.setVisible(false);
for( int i =0; i< resourceModel.getRowCount(); i++)
if(((Boolean)resourceModel.getValueAt(i,4)).booleanValue())
lowerRange[i] = -999999999.0F;
else
lowerRange[i] = ((Float)resourceModel.getValueAt(i,2)).floatValue();
if(((Boolean)resourceModel.getValueAt(i,5)).booleanValue())
upperRange[i] = 999999999.0F;
else
upperRange[i] = ((Float)resourceModel.getValueAt(i,3)).floatValue();
for(int i =0; i<lowerRange.length-1 ; i++)
{ int temp =i;
for(int j= i+1; j<lowerRange.length; j++)
{ if(lowerRange[temp] > lowerRange[j])
temp = j;
else if(lowerRange[temp] == lowerRange[j])
if(upperRange[temp] > upperRange[j])
temp = j;
if(temp != i)
{ float swapt = lowerRange[i];
lowerRange[i] =lowerRange[temp];
lowerRange[temp] = swapt;
swapt = upperRange;
upperRange[i] =upperRange[temp];
upperRange[temp] = swapt;
for(int i=0; i<lowerRange.length; i++)
{ if(lowerRange[i] != number )
{ if(lowerRange[i] < number)
overlapRes.setVisible(true);
else
allResource.setVisible(true);
return false;
number = upperRange[i];
if(number != 999999999.0F)
{ allResource.setVisible(true);
return false;
return true;
catch(Exception e)
CAT.error("Error in checking wheather resource Bracket is complete or not",e);
return false;
this code belongs to action perform method....
the function for chek rong value is ritten insisde checkresources() function
plz helpplz help ASAP
-
Help needed setting specific date in GregorianCalendar object?
Hi All!
I have set SimpleTimeZone object in GregorianCalendar object. How can I set a new date to the GregorianCalendar object, such that i can find DAY_OF_YEAR specific to this date's day?
URGENT replies will be appreciated!Thanks for ur reply!
but the problem is that i have to create a method:
public int getDayOfYear(int day, int month, int year)
return day_of_the year;
This method should accept user specified day, month and year and passes to GregorianCalendar/Calendar object. I need want to get DAY_OF_YEAR value from Calendar.DAY_OF_YEAR which it will provide, but the change is not affecting!
ACTUAL CODE
===========
public static double getDayofYear(int hr, int min, int sec)
String[] ids = TimeZone.getAvailableIDs(5 * 60 * 60 * 1000);
SimpleTimeZone pdt = new SimpleTimeZone(5 * 60 * 60 * 1000, ids[0]);
for (int i=0; i<ids.length; i++)
System.out.println (ids);
//setting DLS start and end rule
pdt.setStartRule(Calendar.MAY, 1, Calendar.SUNDAY, 00 * 60 * 60 * 1000);
pdt.setEndRule(Calendar.OCTOBER, -1, Calendar.SUNDAY, 00 * 60 * 60 * 1000);
Calendar calendar = new GregorianCalendar(pdt);
//Date trialTime = new Date();//SET DATE
//calendar.setTime(trialTime);
calendar.set(Calendar.HOUR,hr);
calendar.set(Calendar.MINUTE,min);
calendar.set(Calendar.SECOND,sec);
return ((double) calendar.get(Calendar.DAY_OF_YEAR));
This method is giving true output for today [2nd Dec. 2002 -> 336], but only when it accepts current time, not date. Also giving same output on changing arguments!
Hoping ur help! -
Help with setting up date and timer on flash
anyone please help me out how to setup the date and
timer on a flash. i tould be appreciate with this.kicon wrote:
>
anyone please help me out how to setup the date and
timer on a flash. i tould be appreciate with this.
a bit too general, what kind of timer ?
Regards
Urami
Happy New Year guys - all the best there is in the 2006
<urami>
http://www.Flashfugitive.com
</urami>
<web junk free>
http://www.firefox.com
</web junk free> -
Help with setting primary key in table
Hi,
I have created a table in Oracle and populated it with information, but I need a primary key (like an autonumber in Access) to identify each record. How can I do this for an existing table?
Thanks so much for any help you can provide!Hello,
I am assuming you have created the sequence and trigger i posted in my earlier post, here run this and if this answers your question mark post answered and reward points for helpful posts.
INSERT INTO customer1 (FIRST_NAME,
LAST_NAME,
TITLE,
ADDRESS1,
ADDRESS2,
CITY,
STATE,
ZIP,
PHONE,
EXTENSION,
FAX,
WORK_PHONE,
WORK_EXTENSION,
MOBILE_PHONE,
EMERGENCY_PHONE,
PHONE_NOTES,
EMAIL)
SELECT FIRST_NAME,
LAST_NAME,
TITLE,
ADDRESS1,
ADDRESS2,
CITY,
STATE,
ZIP,
PHONE,
EXTENSION,
FAX,
WORK_PHONE,
WORK_EXTENSION,
MOBILE_PHONE,
EMERGENCY_PHONE,
PHONE_NOTES,
EMAIL
FROM CUSTOMER;
COMMIT;Regards -
af:table with 2 sets of data
Hi All,
I have an af table below thats being populated via #{jpabean.myEntityList}. My requirement is to have a search function on this. I created an input text as below that takes the search value, and set the return data which will be #{jpabean.myEmplidList}, I just want to know how to populate my table with this second set of data
<af:table value="#{jpabean.myEntityList}" var="row" rowBandingInterval="0" id="t1"
rowSelection="single" columnSelection="multiple"
columnStretching="column:c4" allDetailsEnabled="true"
disableColumnReordering="true" fetchSize="100" styleClass="AFStretchWidth"
partialTriggers="cb2">
<af:inputText label="Emplid" id="it1" autoSubmit="true"
valueChangeListener="#{jpabean.valueChanged}"/>Hi,
i will suggest to create search form using ebj/jpa or pojo data control. pls refer the below links for guidence.
http://www.oracle.com/technetwork/developer-tools/jdev/index-155270.html
http://www.oracle.com/technetwork/developer-tools/adf/learnmore/73-handson-wsdc-321927.pdf
http://www.oracle.com/technetwork/developer-tools/adf/learnmore/37-adf-pojo-pagination-169179.pdf
~Abhijit -
Fetch data from table and generate attachment than mail it.
Hello Experts,
From couple of day I am searching on Google for a better database procedure that will help me to get data from tables and generate attachment and mail it but i fail.
My Scenario is:
I have a query that will fetch almost 5000 records from database tables. Each record has almost 75 characters
select a.location_code,
a.item_code,
b.description item_desc,
to_char(a.manufact_date,'ddMonyy')mfg,
to_char((a.manufact_date + nvl(b.expiry_period,0)),'ddMonyy')expr,
to_char((a.manufact_date + nvl(b.qurantine_period,0)),'ddMonyy')qrtn,
round(nvl (b.qurantine_period, 0) - (sysdate - a.manufact_date)) days_elapsed,
a.closing_balance_posted quantity
from wms_stock_current_balance_v a, wms_item_setup_mast b
where a.closing_balance > 0
and a.item_code = b.item_code
and a.loc_type in ('RACKING','PICKING','QUICKA','BUNDLED')
and nvl(b.qurantine_period,0) > 0
and round(nvl (b.qurantine_period, 0) - (sysdate - a.manufact_date)) <= 0
order by a.item_code, a.location_code;
Sample data of above query is
LOCATION_CODE
ITEM_CODE
ITEM_DESC
MFG
Expiry
Quarantine
Days Elapse
Quantity
13DL2
000000000000000F0487
CLEAR COOL BLACK 05ML
20-Feb-10
31-Mar-14
4-Jun-13
-122
160
14DL0
000000000000000F0487
CLEAR COOL BLACK 05ML
23-Feb-10
3-Apr-14
7-Jun-13
-119
134
14DL2
000000000000000F0487
CLEAR COOL BLACK 05ML
23-Feb-10
3-Apr-14
7-Jun-13
-119
160
14DR2
000000000000000F0487
CLEAR COOL BLACK 05ML
23-Feb-10
3-Apr-14
7-Jun-13
-119
20
14LL2
000000000000000F0487
CLEAR COOL BLACK 05ML
20-Feb-10
31-Mar-14
4-Jun-13
-122
160
17ER2
000000000000000F0487
CLEAR COOL BLACK 05ML
20-Feb-10
31-Mar-14
4-Jun-13
-122
160
17GL2
000000000000000F0487
CLEAR COOL BLACK 05ML
20-Feb-10
31-Mar-14
4-Jun-13
-122
160
17SL0
000000000000000F0487
CLEAR COOL BLACK 05ML
17-Feb-10
28-Mar-14
1-Jun-13
-125
64
18QL0
000000000000000F0487
CLEAR COOL BLACK 05ML
23-Feb-10
3-Apr-14
7-Jun-13
-119
160
19AR5
000000000000000F0487
CLEAR COOL BLACK 05ML
17-Feb-10
28-Mar-14
1-Jun-13
-125
160
19DL1
000000000000000F0487
CLEAR COOL BLACK 05ML
20-Feb-10
31-Mar-14
4-Jun-13
-122
160
19JR0
000000000000000F0487
CLEAR COOL BLACK 05ML
17-Feb-10
28-Mar-14
1-Jun-13
-125
60
19TL1
000000000000000F0487
CLEAR COOL BLACK 05ML
20-Feb-10
31-Mar-14
4-Jun-13
-122
160
20GR2
000000000000000F0487
CLEAR COOL BLACK 05ML
20-Feb-10
31-Mar-14
4-Jun-13
-122
40
36FL3
000000000000000F0487
CLEAR COOL BLACK 05ML
18-Feb-10
29-Mar-14
2-Jun-13
-124
65
19UR0
000000000000000F0591
COMFORT WHITE 24ML*300
28-Oct-09
28-Oct-11
1-May-11
-887
1
12SL1
000000000000000F0593
COMFORT PINK 24ML*300
28-Oct-09
28-Oct-11
1-May-11
-887
42
12SR1
000000000000000F0593
COMFORT PINK 24ML*300
28-Oct-09
28-Oct-11
1-May-11
-887
42
14OR1
000000000000000F0593
COMFORT PINK 24ML*300
28-Oct-09
28-Oct-11
1-May-11
-887
8
36EL4
000000000000000F0594
CLEAR HF DECRASE 5M*360
14-Feb-10
14-Feb-11
12-Oct-10
-1088
14
13VL1
000000000000000F0595
CLEAR COM SFT CRE 5*360
8-Feb-10
8-Feb-11
6-Oct-10
-1094
160
14ER0
000000000000000F0595
CLEAR COM SFT CRE 5*360
8-Feb-10
8-Feb-11
6-Oct-10
-1094
105
Database Info
Oracle 10g
Version 10.2.0.1.0Look at the sample code for generating a CSV file that I've just posted in response to a similar question:
Re: How to execute a proc and spool files in a database job
And the use the search button in this forum to find sample code for sending a CLOB as a plain/text e-mail attachment using UTL_SMTP. -
NEED HELP... Creating dynamic table from data file...
Hi
I'm writing an application for data visualization. The user can press the "open file" button and a FileChooser window will come up where the user can select any data file. I would like to take that data file and display it as a table with rows and columns. The user needs to be able to select the coliumns to create a graph. I have tried many ways to create a table, but nothing seems to work! Can anyone help me?! I just want to read from the data file and create a spreadsheet type table... I won't know how many rows and columns I'll need in advance, so the table needs to be dynamic!
If you have ANY tips, I'd REALLY appreciated.....Thank you for your help. I tried to use some of the code in the examples... I'm really new at this, so I'm not sure how to set it up. I added the code, but when I open a file, nothing happens. Here's the code I have so far...
package awt;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.net.*;
import java.util.*;
import javax.swing.*;
import javax.swing.event.*;
import java.text.*;
import javax.swing.border.*;
import javax.swing.table.*;
* @author
public class Main {
public static void main(String[] args) {
JFrame frame = new ScatterPlotApp();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.show();
class ScatterPlotApp extends JFrame implements ActionListener{
private JButton openButton, exitButton, scatButton, refreshButton;
private JMenuBar menuBar;
private JMenuItem openItem, exitItem;
private JFileChooser chooser;
private JMenu fileMenu;
private JTextPane pane;
private JTable table;
private DefaultTableModel model;
private JScrollPane scrollPane;
private Container contentPane;
/** Creates a new instance of ScatterPlotApp */
public ScatterPlotApp() {
setTitle("Data Visualizer");
Toolkit tk = Toolkit.getDefaultToolkit();
Dimension d = tk.getScreenSize();
int width = 867;
int height = 800;
setBounds((d.width - width)/2, (d.height - height)/2, width, height);
contentPane = getContentPane();
JPanel panel = new JPanel();
//pane = new JTextPane();
panel.setLayout(new FlowLayout(FlowLayout.CENTER));
contentPane.add(panel, BorderLayout.SOUTH);
//contentPane.add(pane, BorderLayout.NORTH);
scatButton = new JButton("Create ScatterPlot");
scatButton.addActionListener(this);
openButton= new JButton ("Open File");
openButton.addActionListener(this);
exitButton = new JButton ("Exit");
exitButton.addActionListener(this);
refreshButton = new JButton ("Reload Data");
refreshButton.addActionListener(this);
panel.add(openButton);
panel.add(scatButton);
panel.add(refreshButton);
panel.add(exitButton);
fileMenu = new JMenu("File");
openItem = fileMenu.add(new JMenuItem ("Open", 'O'));
openItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, Event.CTRL_MASK));
openItem.addActionListener(this);
exitItem = fileMenu.add(new JMenuItem ("Exit", 'X'));
exitItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, Event.CTRL_MASK));
exitItem.addActionListener(this);
JMenuBar menuBar = new JMenuBar();
fileMenu.setMnemonic('F');
menuBar.add(fileMenu);
setJMenuBar(menuBar);
public void actionPerformed(ActionEvent e){
Vector columnNames = new Vector();
Vector data = new Vector();
try{
Object source = e.getSource();
if (source == openButton || e.getActionCommand().equals("Open")){
chooser = new JFileChooser(".");
int status =chooser.showOpenDialog(this);
if (status ==JFileChooser.APPROVE_OPTION)
File file = chooser.getSelectedFile();
FileInputStream fin = new FileInputStream(file);
BufferedReader br = new BufferedReader(new InputStreamReader(fin));
String line;
//StringBuffer bf = new StringBuffer();
StringTokenizer st1 = new StringTokenizer(br.readLine(), ";");
while( st1.hasMoreTokens() )
columnNames.addElement(st1.nextToken());
// extract data
while ((line = br.readLine()) != null)
StringTokenizer st2 = new StringTokenizer(line, ";");
Vector row = new Vector();
while(st2.hasMoreTokens())
row.addElement(st2.nextToken());
data.addElement( row );
br.close();
model = new DefaultTableModel(data, columnNames);
table = new JTable(model);
scrollPane = new JScrollPane( table );
getContentPane().add( scrollPane, BorderLayout.NORTH );
while((line=br.readLine())!=null)
bf.append(line+"\n");
pane.setText(bf.toString());
//pane.setText(bf.toString());
else if (source == scatButton){
else if (source == exitButton || e.getActionCommand().equals("Exit")){
System.exit(0);
else if (source == refreshButton){
catch (Exception ex){
ex.printStackTrace();
} -
Help on Setting logical Levels in Fact tables and on Dimension tables
Hi all
Can any body provide any blogs or any king of material on what exactly is levelling .
Like after creating the Dimensional hierarchies we need to set the logical levels for the LTS of fact tabels ri8 .So what is the difference between setting logical levels to fact tabels and also Setting levelling on Dimension tables .
Any kind of help is appreciated
Thanks
Xavier.
Edited by: Xavier on Aug 4, 2011 10:50 AMI have read these blogs ,but what my question is
Setting the logical levels in LTS of Fact tables i understood .
But we can also set the logical levels for dimensions also ri8 .I didn't understand why do we set the logical levels for dimensions .Is there any reason why we go with the levelling at dimensions
Thanks
Xavier
Edited by: Xavier on Aug 4, 2011 2:03 PM
Edited by: Xavier on Aug 4, 2011 2:32 PM -
Issue:
I have SAP BW system and SAP HANA System
SAP BW to SAP HANA connecting through a DB Connection (named HANA)
Whenever I created any Open Hub as Destination like DB Table with the help of DB Connection, table will be created at HANA Schema level ( L_F50800_D )
Executed the Open Hub service without checking DELETING Data from table option
Data loaded with 16 Records from BW to HANA same
Second time again executed from BW to HANA now 32 records came ( it is going to append )
Executed the Open Hub service with checking DELETING Data from table option
Now am getting short Dump DBIF_RSQL_TABLE_KNOWN getting
If checking in SAP BW system tio SAP BW system it is working fine ..
will this option supports through DB Connection or not ?
Please follow the attachemnet along with this discussion and help me to resolve how ?
From
Santhosh KumarHi Ramanjaneyulu ,
First of all thanks for the reply ,
Here the issue is At OH level ( Definition Level - DESTINATION TAB and FIELD DEFINITION )
in that there is check box i have selected already that is what my issue even though selected also
not performing the deletion from target level .
SAP BW - to SAP HANA via DBC connection
1. first time from BW suppose 16 records - Dtp Executed -loaded up to HANA - 16 same
2. second time again executed from BW - now hana side appaended means 16+16 = 32
3. so that i used to select the check box at OH level like Deleting data from table
4. Now excuted the DTP it throws an Short Dump - DBIF_RSQL_TABLE_KNOWN
Now please tell me how to resolve this ? will this option is applicable for HANA mean to say like , deleting data from table option ...
Thanks
Santhosh Kumar -
Best way to set up a custom table using dates ytd, quarters, months
Hello-
I did post this on the crystal forum however it really involves setting up a good structured table in order to get the data to report on which I think we need to change which is why I'm posting here.
I am not a dba but I work with crystal reports and we are working together to get data in tables that we can report on. We are in the process of creating a data warehouse, which will mainly be summarized data we are exporting out of our legacy system and importing into a mysql database. Most of this data will be summarized by month, quarter and year. We will have multiple years of data. A lot of the reports we will be creating will be in a comparison manner such as 2009 vs 2008 or Jan this year compared to Jan last year or list out sales by month Jan-Dec 2009. I would like this data to be easily displayed on a report in a side by side manner. To get this result, what is the best way to structure the data in the tables on a monthly, quarterly and yearly basis? Right now weu2019ve got one field in the table called date (which is a string) which is listed like:
Date
2008YTD
2009YTD
2009Jan
2008Jan
Is it best to break out the date information so that on the report side it will be easier to work with? Also should this be set up in the table as a date instead of a string? If so how do you account for a YTD date? Are we going to need 2 dates, a start and end date to achieve ytd or qtd information? Do you recommend creating just a date table and if so how would that be structured?
So for reporting purposes, using crystal reports, I would like to display comparison data on a report side by side, for this example this year goals compared to last years goals by goal code A-Z (which is a credit code, goals are for the # of credits by code for the year). The end result I would like is to look like this:
code 2009 goal 2008 goal
A 25 20
B 50 60
C 10 15
However the data looks like this (displaying all of the 2009 data first then the 2008 data, not side by side which is how it is in the table):
code 2009 goal 2008 goal
A 25
B 50
C 10
etc to Z
A 20
B 60
C 15
Right now the data is structured in the table like:
Code Goal Date (this is currently a string in the db)
A 25 YTD 2009
B 50 YTD 2009
etc. A-Z for 2009 then:
A 20 YTD 2008
B 60 YTD 2008
Any thoughts on strucuting a table would be appreciated. thanks.Jennifer,
Most of the DW examples I've seen use a dimDateTime table in the database. That table has multiple columns related to the specific time... For example, here are the columns that are in the, SQL Server sample database, "AdventureWorkdDW"... "DimTime" table
COLUMN_NAME COLUMN_INFO
TimeKey (int, not null)
FullDateAlternateKey (datetime, null)
DayNumberOfWeek (tinyint, null)
EnglishDayNameOfWeek (nvarchar(10), null)
SpanishDayNameOfWeek (nvarchar(10), null)
FrenchDayNameOfWeek (nvarchar(10), null)
DayNumberOfMonth (tinyint, null)
DayNumberOfYear (smallint, null)
WeekNumberOfYear (tinyint, null)
EnglishMonthName (nvarchar(10), null)
SpanishMonthName (nvarchar(10), null)
FrenchMonthName (nvarchar(10), null)
MonthNumberOfYear (tinyint, null)
CalendarQuarter (tinyint, null)
CalendarYear (char(4), null)
CalendarSemester (tinyint, null)
FiscalQuarter tinyint, null)
FiscalYear (char(4), null)
FiscalSemester (tinyint, null)
Then all of the fact table receive their date stamps by linking back to this table, using the TimeKey as a foreign key.
HTH,
Jason -
How can I set the data binding between Web Dynpro & Database table
Dear friend,
I am a beginner of Web Dynpro. I want to develop my simple project like these:
1. Create my own database table via Dictionary Project such as TAB_USER and have 3 fields: USER_ID, USER_NAME, USER_POSITION and I have already deployed & archived it.
2. Create my own Web Dynpro Project, and create the input fields as User ID, User name, User position and icon 'Save' on the selection screen and I have deployed it already.
For the process, I want to input data at the screen and save the data in the table, please give me the guide line like these:
1. How can I set the data binding between Web Dynpro and Database table ?
2. Are there any nescessary steps that I will concern for this case?
Sorry if my question is simple, I had try to find solution myself, but it not found
Thanks in advances,
SeMsHi,
You can write your own connection class for establishing the connection with DB.
Ex:
public class ConnectionClass {
static Connection con = null;
public static Connection getConnection() {
try{
Context ctx = new InitialContext();
DataSource ds = (DataSource) ctx.lookup("jdbc/TSPAGE");
con = ds.getConnection();
return con;
}catch(Exception e){
return null;
You can place the above class file in src folder and you can use this class in webdynpro.
You can have another UserInfo class for reading and writing the data into the DB .
Regards, Anilkumar
PS : Refer
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/java/simple java bean generator for database.pdf
Message was edited by: Anilkumar Vippagunta -
How to restrict a table with its set of data based on a column value in it?
Hi,
I have a scenario in which I have to show a set of data of a pivot table by restricting data based on a column value. I am creating BIP report whose source is from BIA ie.RPD. Based on a column value I want to restrict the data being displayed in the table. Since I also want the hidden data in the first table to be displayed in another table in the same report I cannot restrict the data at the query level i.e at RPD or at BIA. For this reason I used
<?xdofx:if saw3_ = 1?>
the pivot table
<?end if?>
But it does not restrict any data.
Also I tried using the if condition inside the table before the row level looping happens. But no good show even then.
How can I forgo this problem?
Regards,
The MMHi,
See : http://download.oracle.com/docs/cd/E12096_01/books/PubUser/T421739T481157.htm#4535373 regarding column and row.
Regards,
Colectionaru
Maybe you are looking for
-
Flash stops playing sounds, then constant crashing.
So this only started happening recently and the only thing I can think of that I have recently done is update my Adobe Flash (directly from their website) and Firefox auto updates itself. I'll be watching a Twitch steam, browsing YouTube or Tumblr an
-
How does one save actions? The 'save' option is greyed out in the actions dropdown panel.
-
How to get rid of black bars on top, bottom and sides??
I am exporting a project from Adobe Premiere Pro (CS3) that is in HD (widescreen) format. The original video is HD, the size option I chose for the project is HD, everything is showing fine when I look at it in the Program window. I admit I am a bit
-
Hi i don't know what happen to my phone since morning my phone is not working properly first it was hanging and over heating, After I reset all setting some of applications didn't work then wifi I am trying to turn on wifi but it's not turning on It'
-
Re-connect to db everytime when logging in
Hi, This issue just happen recently, whenever I try to log in to SAP portal, I have to manually key in the db details everytime in order to establish the connection. In other words, SAP cannot remember the db connection, which make me really troubles