Data splitting into different rows
Hi
I have 2 columsn in table. Like this
Record ID Error Code
10 ABC,TRE,SDE,AQX,....
I want to change this format to like this
Record ID Error Code
10 ABC
10 TRE
10 SDE
10 AQX
If anybody knows please reply me.
Thanks
If you have more than one row in your table you have to do something like this, else the examples above will not work:
Based on the examples from Alex, see my previous link
SQL> -- generating sample data:
SQL> with t as (
2 select 10 rec_id, 'ABC,TRE,SDE,AQX' err_code from dual union
3 select 20 rec_id, 'BLA,YADDAH,STR' err_code from dual
4 )
5 --
6 -- actual query
7 --
8 select rec_id
9 , regexp_substr(err_code, '[^,]+', 1, rn) err_code
10 from t
11 cross join ( select rownum rn
12 from ( select max(length(regexp_replace(err_code, '[^,]+'))) + 1 mx
13 from t
14 )
15 connect by level <= mx
16 )
17 where regexp_substr(err_code, '[^,]+', 1, rn) is not null
18 order by rec_id;
REC_ID ERR_CODE
10 ABC
10 SDE
10 TRE
10 AQX
20 STR
20 BLA
20 YADDAH
7 rows selected.
Similar Messages
-
BW gurus,
Hope all are fine. I have an ODS (0FIA_DS13) feeding from two data sources.
They are 0FI_AA_12 and 80FIA_DS11( data mart of 0FIA_DS11).
I enhanced data source 0FI_AA_12 and added 2 extra char fields. After loading data , the data is not emerging into one row. Data coming from 0FI_AA_12 and 80FIA_DS11 coming in separate lines in the data target(0FIA_DS13). Before enhancement was OK. After enhancement this problem is happening.
Please advice.
Any advice/comments greatly appreciated.
Many thanksHi Manoj,
Based on ur scenario, u can ignore source system in reporting as it do not make any sense, if u do not map this field in to the Multiprovider, it wont make any problem. ( u can also make a variable on the source system and putting source sytem in filter in query, so that user can choose source if needed.)
As u are reporting based on business facts ( numerical values ), u just need to tick on source and facts, u need not to tick for both sources.
Let me make it more clear, u are clubbing business facts from both sources (ODS's), if u tick on both sources business facts will be summed up and reporting will be wrong, so u have to decide about perticular business facts for required source and map the fields ( identify ) in multiprovider.
Regards. -
Alv output splitting into two rows when converting into excel sheet.
Hi frends,
I have alv report with 60 fields . The report output is coming currently . But when i am exporting into excel sheet from the option local file--> speadsheet each row is splitting into two rows including header in excel sheet.
Please provide your valuable suggestions to avoid this.
Regards,
Ramu .
Edited by: Ramu.K on Sep 8, 2009 5:59 PMHi,
Please use the grid option and with the Spreadsheet button (CntrShiftF7). Do "Save as" and save it as excel. It should work.
Regards,
Pradyumna -
SCs line items are getting splitted into different POs.
Hi Experts,
I am using SRM 5.0 (EBP4.0) ECS.
When operational purchaser is doing carry out sourcing then SC line items are getting splitted into different POs whereas all the criteria are same I mean all the SC line items are having same
1.Purcg.Grp
2.Purch.Org.
3.Company Code
4.Plant/Location
5.Vendor (Preferred)
6.All product Cat.are assigned to one system only.
(In BBP_PD for the SC I dont see any reason for the split)
7.Using Intended for Gouping Option also at the time of Carry out sourcing.
Earlier also I have raised the same question but I didnt get any reply, only some hints and other reference and help bu Yann but I am still facing the same issue and Pls help me if there is any OSS note for it .
Here I'd like to let you know that I have seen same ticket and checked all the possible cause for split but never find any reason for split in this case.Pls help me on this issue urgently.
Brgds
GopeshHi
As Yann told, there might be some standard BADIs for which we need to either modify the standard code in this case.
Has SAP replied on this problem with any comments - on your OSS message yet ?
<u>As far as I know, the following BADIs are some how, involved in the creation of the Local SRM PO. </u>
<b>BBP_ECS_PO_OUT_BADI </b>
( ECS: PO Transfer to Logistics Backend )
<b>BBP_EXTLOCALPO_BADI </b>
( Control Extended Classic Scenario )
<b>BBP_GROUP_LOC_PO </b>
( Exit Grouping of Items for Local Purchase Orders )
Please send me your detailed requirements at my email id for further analysis.
[email protected]
Hope this will help.
Please reward suitable points, incase it suits your requirements.
Regards
- Atul -
Aggregating data loaded into different hierarchy levels
I have some problems when i try to aggregate a variable called PRUEBA2_IMPORTE dimensinated by time dimension (parent-child type).
I read the help in DML Reference of the OLAP Worksheet and it said the follow:
When data is loaded into dimension values that are at different levels of a hierarchy, then you need to be careful in how you set status in the PRECOMPUTE clause in a RELATION statement in your aggregation specification. Suppose that a time dimension has a hierarchy with three levels: months aggregate into quarters, and quarters aggregate into years. Some data is loaded into month dimension values, while other data is loaded into quarter dimension values. For example, Q1 is the parent of January, February, and March. Data for March is loaded into the March dimension value. But the sum of data for January and February is loaded directly into the Q1 dimension value. In fact, the January and February dimension values contain NA values instead of data. Your goal is to add the data in March to the data in Q1. When you attempt to aggregate January, February, and March into Q1, the data in March will simply replace the data in Q1. When this happens, Q1 will only contain the March data instead of the sum of January, February, and March. To aggregate data that is loaded into different levels of a hierarchy, create a valueset for only those dimension values that contain data. DEFINE all_but_q4 VALUESET time
LIMIT all_but_q4 TO ALL
LIMIT all_but_q4 REMOVE 'Q4'
Within the aggregation specification, use that valueset to specify that the detail-level data should be added to the data that already exists in its parent, Q1, as shown in the following statement. RELATION time.r PRECOMPUTE (all_but_q4)
How to do it this for more than one dimension?
Above i wrote my case of study:
DEFINE T_TIME DIMENSION TEXT
T_TIME
200401
200402
200403
200404
200405
200406
200407
200408
200409
200410
200411
2004
200412
200501
200502
200503
200504
200505
200506
200507
200508
200509
200510
200511
2005
200512
DEFINE T_TIME_PARENTREL RELATION T_TIME <T_TIME T_TIME_HIERLIST>
-----------T_TIME_HIERLIST-------------
T_TIME H_TIME
200401 2004
200402 2004
200403 2004
200404 2004
200405 2004
200406 2004
200407 2004
200408 2004
200409 2004
200410 2004
200411 2004
2004 NA
200412 2004
200501 2005
200502 2005
200503 2005
200504 2005
200505 2005
200506 2005
200507 2005
200508 2005
200509 2005
200510 2005
200511 2005
2005 NA
200512 2005
DEFINE PRUEBA2_IMPORTE FORMULA DECIMAL <T_TIME>
EQ -
aggregate(this_aw!PRUEBA2_IMPORTE_STORED using this_aw!OBJ262568349 -
COUNTVAR this_aw!PRUEBA2_IMPORTE_COUNTVAR)
T_TIME PRUEBA2_IMPORTE
200401 NA
200402 NA
200403 2,00
200404 2,00
200405 NA
200406 NA
200407 NA
200408 NA
200409 NA
200410 NA
200411 NA
2004 4,00 ---> here its right!! but...
200412 NA
200501 5,00
200502 15,00
200503 NA
200504 NA
200505 NA
200506 NA
200507 NA
200508 NA
200509 NA
200510 NA
200511 NA
2005 10,00 ---> here must be 30,00 not 10,00
200512 NA
DEFINE PRUEBA2_IMPORTE_STORED VARIABLE DECIMAL <T_TIME>
T_TIME PRUEBA2_IMPORTE_STORED
200401 NA
200402 NA
200403 NA
200404 NA
200405 NA
200406 NA
200407 NA
200408 NA
200409 NA
200410 NA
200411 NA
2004 NA
200412 NA
200501 5,00
200502 15,00
200503 NA
200504 NA
200505 NA
200506 NA
200507 NA
200508 NA
200509 NA
200510 NA
200511 NA
2005 10,00
200512 NA
DEFINE OBJ262568349 AGGMAP
AGGMAP
RELATION this_aw!T_TIME_PARENTREL(this_aw!T_TIME_AGGRHIER_VSET1) PRECOMPUTE(this_aw!T_TIME_AGGRDIM_VSET1) OPERATOR SUM -
args DIVIDEBYZERO YES DECIMALOVERFLOW YES NASKIP YES
AGGINDEX NO
CACHE NONE
END
DEFINE T_TIME_AGGRHIER_VSET1 VALUESET T_TIME_HIERLIST
T_TIME_AGGRHIER_VSET1 = (H_TIME)
DEFINE T_TIME_AGGRDIM_VSET1 VALUESET T_TIME
T_TIME_AGGRDIM_VSET1 = (2005)
Regards,
Mel.Mel,
There are several different types of "data loaded into different hierarchy levels" and the aproach to solving the issue is different depending on the needs of the application.
1. Data is loaded symmetrically at uniform mixed levels. Example would include loading data at "quarter" in historical years, but at "month" in the current year, it does /not/ include data loaded at both quarter and month within the same calendar period.
= solved by the setting of status, or in 10.2 or later with the load_status clause of the aggmap.
2. Data is loaded at both a detail level and it's ancestor, as in your example case.
= the aggregate command overwrites aggregate values based on the values of the children, this is the only repeatable thing that it can do. The recomended way to solve this problem is to create 'self' nodes in the hierarchy representing the data loaded at the aggregate level, which is then added as one of the children of the aggregate node. This enables repeatable calculation as well as auditability of the resultant value.
Also note the difference in behavior between the aggregate command and the aggregate function. In your example the aggregate function looks at '2005', finds a value and returns it for a result of 10, the aggregate command would recalculate based on january and february for a result of 20.
To solve your usage case I would suggest a hierarchy that looks more like this:
DEFINE T_TIME_PARENTREL RELATION T_TIME <T_TIME T_TIME_HIERLIST>
-----------T_TIME_HIERLIST-------------
T_TIME H_TIME
200401 2004
200402 2004
200403 2004
200404 2004
200405 2004
200406 2004
200407 2004
200408 2004
200409 2004
200410 2004
200411 2004
200412 2004
2004_SELF 2004
2004 NA
200501 2005
200502 2005
200503 2005
200504 2005
200505 2005
200506 2005
200507 2005
200508 2005
200509 2005
200510 2005
200511 2005
200512 2005
2005_SELF 2005
2005 NA
Resulting in the following cube:
T_TIME PRUEBA2_IMPORTE
200401 NA
200402 NA
200403 2,00
200404 2,00
200405 NA
200406 NA
200407 NA
200408 NA
200409 NA
200410 NA
200411 NA
200412 NA
2004_SELF NA
2004 4,00
200501 5,00
200502 15,00
200503 NA
200504 NA
200505 NA
200506 NA
200507 NA
200508 NA
200509 NA
200510 NA
200511 NA
200512 NA
2005_SELF 10,00
2005 30,00
3. Data is loaded at a level based upon another dimension; for example product being loaded at 'UPC' in EMEA, but at 'BRAND' in APAC.
= this can currently only be solved by issuing multiple aggregate commands to aggregate the different regions with different input status, which unfortunately means that it is not compatable with compressed composites. We will likely add better support for this case in future releases.
4. Data is loaded at both an aggregate level and a detail level, but the calculation is more complicated than a simple SUM operator.
= often requires the use of ALLOCATE in order to push the data to the leaves in order to correctly calculate the aggregate values during aggregation. -
Splitting of records into different rows
Hi,
I have a table 'test' which has three columns :
ID varchar2(10), Product varchar2(100), source varchar2(100).
I have provided two sample records below :
ID PRODUCT SOURCE
ID1 | P1,P2 | S1,S2
ID2 | P1,P3 | S2,S3
I need to split the product and source values (they are comma separated) and make different rows out of them. The result set required looks like below :
ID PRODUCT SOURCE
ID1 | P1 | S1
ID1 | P1 | S2
ID1 | P2 | S1
ID1 | P2 | S2
ID2 | P1 | S2
ID2 | P1 | S3
ID2 | P3 | S2
ID2 | P3 | S3
Could someone help me regarding this ? The number of comma separated values will be dynamic and we can have null between two commas too.
Kind regards,
Mainak
Edited by: user11183570 on Jul 14, 2011 4:43 AMSQL> CREATE TABLE test (ID varchar2(10), Product varchar2(100), source varchar2(100));
Table created.
SQL> insert into test values ('id1','P1,P2','S1,S2');
1 row created.
SQL> insert into test values('id2','P1,P3','S2,S3');
1 row created.
SQL> commit;
Commit complete.
SQL> WITH tbl AS
( SELECT DISTINCT id col1,
regexp_substr (product, '[^,]+', 1, level) col2 ,
source col3
FROM test
CONNECT BY level <= LENGTH (regexp_replace (product, '[^,]+')) + 1
SELECT DISTINCT col1,
col2,
regexp_substr (col3, '[^,]+', 1, level) col3
FROM tbl
CONNECT BY level <= LENGTH (regexp_replace (col3, '[^,]+')) + 1
ORDER BY 1; 2 3 4 5 6 7 8 9 10 11 12 13 -
How to display data as separate clumns when db data is as different rows
Hi,
I think i have been confusing the group with UI details.
The basic requirement is " To display the data as columns which is present as rows in the table"
For example : For customer 1 ,there are 4 accounts. This info is available in the db table as 4 rows.
But the OAF display has to be like customer <<account 1 name>><<account 2 name>><<account 3 name>><<account 4 name>>
Also these needs to be advanced table in advanced table in the same feature.
Also all the account name columns are dynamic. There can be 3 accounts for one case and 4 for other and hence needs to be built in CO and cant be defined.
Please advise how do i code different row data as columnar data in a table or advanced table in oaf.
Does this description help you to help me .
Thanks,
RmaHi Rma,
Please try something like this:
drop table t_;
create table t_ (
nm Varchar2(20),
pr Char ( 7),
vl Number
insert into t_ values ('company 1','2003-06', 10);
insert into t_ values ('company 1','2003-07', 29);
insert into t_ values ('company 1','2003-08', 39);
insert into t_ values ('company 1','2003-09', 41);
insert into t_ values ('company 1','2003-10', 22);
insert into t_ values ('company 2','2003-06', 13);
insert into t_ values ('company 2','2003-07', 17);
insert into t_ values ('company 2','2003-08', 61);
insert into t_ values ('company 2','2003-09', 55);
insert into t_ values ('company 2','2003-10', 71);
insert into t_ values ('company 3','2003-06', 33);
insert into t_ values ('company 3','2003-07', 18);
insert into t_ values ('company 3','2003-08', 27);
insert into t_ values ('company 3','2003-09', 5);
insert into t_ values ('company 3','2003-10', 32);
select
nm,
jul,
aug,
sep,
jul+aug+sep "Total"
from (
select
nm,
max(case when pr='2003-07' then vl else null end) jul,
max(case when pr='2003-08' then vl else null end) aug,
max(case when pr='2003-09' then vl else null end) sep
from
t_
group by
nm);
This query returns:
NM JUL AUG SEP Total
company 1 29 39 41 109
company 2 17 61 55 133
company 3 18 27 5 50
I took this from http://www.adp-gmbh.ch/ora/sql/examples/pivot.html
Regards,
Reetesh Sharma -
Read line and split into different fields
I have a flat file with space (multiple spaces between different fields) as a delimiter. The problem is, file is coming from 3rd party and they don't want to change the separator as comma or tab delimited CSV file. I have to load data in ODS (BW 3x).
Now I am thinking to load line by line and then split data into different objects in Transfer rules.
The Records looks like:
*009785499 BC 2988 244 772 200
*000000033 AB 0 0 0 0
*000004533 EE 8 3 2 4
Now I want data to split like:
Field1 = 009785499
Field2 = BC
Field3 = 2988
Field4 = 244
Field5 = 772
Field6 = 200
After 1st line load, go to 2nd line and split the data as above and so on. Could you help me with the code pleaseu2026?
Is it a good design to load data? Any other idea?
Thanks.Hi Mau,
First capture the data into the internal table (say itab).
Loop at itab.
it_final-field1 = itab+1(9).
it_final-field2 = itab+12(2).
it_final-field1 = itab+16(4).
it_final-field1 = itab+21(3).
it_final-field1 = itab+25(3).
it_final-field1 = itab+29(3).
Append it_final.
Endloop.
&*********** Reward Point if helpful**********& -
BPM 1:N split into different service interfaces
Hi everyone, just a quick question about multimapping scenarios.
If I want to make a 1:N message split in BPM I should use a transformation step and specify a multiline container element to get the result of the transformation. That multiline container element is bound to a single message type so, If I want to split my incoming interface into different service interfaces (based on different message types), how can I handle that in BPM? Or is it just not possible?
Thanks in advance.Hi,
It is possible to specify more than one container element for the resulting messages of the transformation step
Its possible.
In operation mapping in IR if you add 3 interfaces in Target side and the same mapping if you select in BPM transform step then it will ask for three contaner.
Create 3 contaneir.
Select type as Abstract Interface.
Then select individual interface in those containers. -
Showing report data columns into two rows instead of one row using SSRS 2012
Hi All,
I have a ssrs report with 13 columns and I want to show those 13 columns data into two rows instead of showing in one row. please send me step by step process.
id fullname firstname lastname mailingaddress billingaddress
city state zipcode
1 ABC A C
xyz xyz123 york
PA 12345
homephone cellphone workphone company
1234567890 4567890123 0123456789 ABC,Inc
id fullname firstname lastname mailingaddress billingaddress
city state zipcode
2 XYZ X Z
abc abc123 lewisburg
PA 54321
homephone cellphone workphone company
4567890123 0123456789 1234567890 xyz,Inc
id fullname firstname lastname mailingaddress billingaddress
city state zipcode
3 BCD B D
123abc xyz123 leesburg PA
54123
homephone cellphone workphone company
4567895623 0783456789 1238967890 Hey,Inc
Thanks in advance,
RH
sqlDo a right mouse click on the left, gray row marker => "Insert Row"=> "Inside Group
- Above or Below", then you get a second detail row.
Olaf Helper
[ Blog] [ Xing] [ MVP] -
SSIS excel destination , data loads into header row
I have SSIS package
that is supposed to load data into excel destination (template file).
The destination has first row is Title , 2nd row has headers so I do as follows,
Select
* from [TemplateName$A2:$AD10000]
But what happens is it inserts first set of data (SQL source) into second row of template which contains header names and overwrites but if I select A3 istead,
it gives error since mapping needs column names.
Please suggest, thanksyou dont need to select range like this for that
What you can do is just select property column names in first row in the excel connection manager for that
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page -
Split data and insert into different rows
I have a string like 'sfdsf,sfdsf,sfsd,qweqeqw,iuoi,"
I have created a single column table
I have to extract data from first untill comma(,) occurs and insert into the table like the following
sfdsdf
sfdsf
sfsd
qweqeqw
iuoi
Please help me how to do itOr a Single SQL query
SELECT trim(',' from DECODE(ROWNUM,1,SUBSTR(STR,1,INSTR(STR,',',1)),
LENGTH(STR)-LENGTH(REPLACE(STR,','))+1,SUBSTR(STR,INSTR(STR,',',-1,1)),
SUBSTR(STR,INSTR(STR,',',1,ROWNUM-1), INSTR(STR,',',1,ROWNUM)-INSTR(STR,',',1,ROWNUM-1))
)) STR1
FROM (SELECT 'sfdsf,sfdsf,sfsd,qweqeqw,iuoi' STR FROM DUAL),ALL_TABLES
WHERE ROWNUM <= LENGTH(STR)-LENGTH(REPLACE(STR,','))+1
ORDER BY ROWNUM -
Problems with splitting result into different rows. Group by-issue?
Hi all!
I have a table that looks a bit like this:
Pallet Status Number Time
A MoveIn 48 11:11
A Pick -1 11:11
A Pick -1 11:12
A Pick -1 11:12
A MoveOut 45 11:13
A MoveIn 45 18:20
A Pick -1 18:23
A Pick -1 18:23
A Pick -1 18:23
A Pick -1 18:24
A MoveOut 41 18:25
A MoveIn 41 21:31
A Pick -1 21:55
.....This is logging pallets that is moved to one station and then number of boxes are picked off. (For making it more simple, I only show one pallet in above example.)
I would like to present the result with one row for each time the pallet have been at the station, like:
Pallet Picked Time
A 3 11:11
A 5 18:20
A .... .....This means that the same pallet might be showned on several rows, as it has been to the station several times. I have tried several different "GROUP BY" but I cannot make it work.
For example I have tried to group by hour, but this fails if a pallet is moved twice per hour or if boxes are picket at different hours (eg, first box picked 09:59, last box 10:01)
Does anyone have a suggestion how to solve this?
Thanks in advance and Kind regards / Anders from SwedenHej, Anders,
Can you explain what defines a group?
It looks like you're saying that a group is a sub-set of a pallet. If we arrange all the rows for a pallet in order by time, then a new group will start every time we have a row where status='MoveIn'. That is, a group consists of a row with status='MoveIn', and all the rows immediately following it, in order by time, up to, but not including, the next row with status=-'MoveIn'. Is that right?
If so, you can use the analytic COUNT (or SUM) function to find out how many rows with status='MoveIn' have already occurred, in order by time, like this:
WITH got_grp AS
SELECT pallet, status, time
, COUNT ( CASE
WHEN status = 'MoveIn'
THEN 1
END
) OVER ( PARTITION BY pallet
ORDER BY time
) AS grp
FROM table_x
SELECT pallet
, COUNT ( CASE
WHEN status = 'Pick'
THEN 1
END
) AS picked
, MIN (time) AS start_time
FROM got_grp
GROUP BY pallet
, grp
ORDER BY pallet
, grp
;If you'd care to post CREATE TABLE and INSERT statements for your sample data, then I could test this.
This assumes that the combination (pallet, time) is unique. Your sample data includes:
Pallet Status Number Time
A MoveIn 48 11:11
A Pick -1 11:11I assume that you're just not displaying the full time, and your data is really something like:
Pallet Status Number Time
A MoveIn 48 23-Sep-2011 11:11:01
A Pick -1 23-Sep-2011 11:11:08Otherwise, how do you know if these two rows are in te same group or not? You may need to add a tie-breaker to the analytic ORDER BY clause. For example, if you say "ORDER BY time, *status* ", then, if the two rows above really did have exactly the same time, down to the second, then the one with status='MoveIn' would be considered to be earlier than the row with status='Pick'. -
One SC splitting into different POs
Hi SRM Experts,
There is an incident where user is creating one SC with different line item and it is creating more than one PO while the Basic data are same ie Vendor/Source of Supply,Recipient,PurOrg,Prod Cat etc all are same.
Should purchaser use Submit to Grouping to make different line items into one PO?
When we use Carry Out Sourcing-in the extended search tab one field comes like Intended for Grouping (Chech box) what does it mean when we check this field.Hi,
Please note that when you order a shopping cart, always a split
happens at the item level if there is no Fixed Vendor specified
for the items.
This is the same case if only a preferred vendor is entered
entered, because a preferred vendor cannot necessarily be a
Fixed Vendor.
However, if the same fixed vendor is specified for all the
items in the shopping cart, then there would not be any split.
Unfortunately this is the standard design, as the system cannot put all
items in the single PO since it would provide the user an option to
enter different vendors for each item later.
Apart from the above, the following aspects also need to be ensured :
Same purchase organisation, purchase group, recipient, pc number,
pc institute & number of external quotation, etc. then only one PO
will be created. Otherwise, multiple PO's will be created.
If you mix services and materials different PO's will be created as the
type of line is also a precondition for creating multiple local POs.
Once you ensure that the above is correct, then you should only get one
PO being created in the backend.
Please,reward point if useful.
Christian -
Please help with: A date split into 3 Combo Boxes ....
Can someone help me with this Please?
I have a date for a Date of Birth i.e. dd/MM/yyyy
I need to split it up an place it into 3 combo boxes i.e. Day Combo, Month Combo and Year Combo.
This is the code I have to set the combo boxes, now I need to bring it back into the combo boxes.
can someone help me with the code as I need to have this finish on friday and I am running out of time. I just dont know what to do PLEASE SOMEONE HELP...
Thanks
Craig
// List days
private void DayOfTheMonth(int highNumber,JComboBox comboBox){
comboBox.addItem(" ");
for (int index = 1; index < highNumber; index++) {
comboBox.addItem(String.valueOf(index));
private void DaySpecificComboBox()
DayOfTheMonth( 32, DayjComboBox);
// List Months
private void Month(){
MonthjComboBox.addItem("");
MonthjComboBox.addItem("January");
MonthjComboBox.addItem("February");
MonthjComboBox.addItem("March");
MonthjComboBox.addItem("April");
MonthjComboBox.addItem("May");
MonthjComboBox.addItem("June");
MonthjComboBox.addItem("July");
MonthjComboBox.addItem("August");
MonthjComboBox.addItem("September");
MonthjComboBox.addItem("October");
MonthjComboBox.addItem("November");
MonthjComboBox.addItem("December");
//List Years
private void Year(int highNumber,JComboBox comboBox){
comboBox.addItem(" ");
for (int index = 2002; index > highNumber; index--) {
comboBox.addItem(String.valueOf(index));
private void YearSpecificComboBox()
Year( 1900, YearjComboBox);
private String StringFromDateFields(){
int month =1;
if (MonthjComboBox.getSelectedItem().equals(JANUARY))
month = 1;
else
if (MonthjComboBox.getSelectedItem().equals(FEBRUARY))
month = 2;
else
if (MonthjComboBox.getSelectedItem().equals(MARCH))
month = 3;
else
if (MonthjComboBox.getSelectedItem().equals(APRIL))
month = 4;
else
if (MonthjComboBox.getSelectedItem().equals(MAY))
month = 5;
else
if (MonthjComboBox.getSelectedItem().equals(JUNE))
month = 6;
else
if (MonthjComboBox.getSelectedItem().equals(JULY))
month = 7;
else
if (MonthjComboBox.getSelectedItem().equals(AUGUST))
month = 8;
else
if (MonthjComboBox.getSelectedItem().equals(SEPTEMBER))
month = 9;
else
if (MonthjComboBox.getSelectedItem().equals(OCTOBER))
month = 10;
else
if (MonthjComboBox.getSelectedItem().equals(NOVEMBER))
month = 11;
else
if (MonthjComboBox.getSelectedItem().equals(DECEMBER))
month = 12;
String
DOB = DayjComboBox.getSelectedItem()+"/"+String.valueOf(month)+"/"+YearjComboBox.getSelectedItem();
return DOB;Thanks for your time.
I could not get that to work ??
I have come up with this code whitch seams to work. Thought you may like to see it
String dobxml = xmlDoc.getValueOf(clientInfo, "DOB");
String dob = dobxml.replace('/', ' ');
System.out.println(dob);
StringTokenizer tokenizer = new StringTokenizer(dob);
String day = tokenizer.nextToken();
String month = tokenizer.nextToken();
String year = tokenizer.nextToken();
System.out.println(dob);
DayjComboBox.setSelectedItem(day);
MonthjComboBox.setSelectedIndex(Integer.parseInt(month));
YearjComboBox.setSelectedItem(year);ps thankyou
Craig
Maybe you are looking for
-
How to use one af:query for multiple VOs
Hi all, How can we use an af:query component to query on multiple VOs? Think of a page with search area and a tabbed pannel with two tables based on different view objects. Any ideas? Thanks Version ADF Business Components 11.1.1.56.60 Java(TM) Platf
-
Dock Not Showing on Second Monitor
Dock is only showing on one of two monitors in setup - when I click to second monitor, it doesn't show up as it has in the past. On Friday after install, it was. Setting somewhere? Any insight is appreciated.
-
Why goes my Epson offline?
frequently my iMac looses the wireless connection with my Epson Stylus SX510W. My wife has an macbook uses the same printer and never has a problem. I have really a hard time to understand why the iMac looses contact. Any help any advises? Karladolf
-
How to update one key recovery on a G580
Hi guys, Does anybody know how to update the one key recovery to the current setup? If I allow it to make changes, will it update, or revert to the previous recovery point? Any help greatly appreciated, new to Lenovo, still not sure where I'm at with
-
Process order closing when TECO...
Hi Gurus, Can anybody help me to close the process order having status as... " TECO PRC BASC BCRQ CNC MANC SETC VCAL".... In short...The order was not released and confirmed....Just the order was created and then TECO'ed.... Thanks, Ameya K.