Problem in creating UDF to read multiple rows of IDOC segment
Hi Experts,
I am working on IDOC to File scenario, in message mapping i have to read segment of idoc (occurence of this segment is 0..4) and check the key of this segment and accordingly pass the value. I am creating a UDF to send the data in target field
My logic in UDF is as follows
if id = BB and payment = V
return variable1
else
return variable2
this logic is not working
Note: The id BB is in second line of the segment and first line of the segment has id BA.
Please help me to send me the correct logic.
Regards,
Shradha
Hi Amit,
My source and target structure are as follows
My requirement is if FIIQUALI = BB than return D_1131 = 25 else D_1131= 20.
+Source IDOC structure:+
- <E1IDB02 SEGMENT="1">
<FIIQUALI>BA</FIIQUALI>
<FIIBKENN>206151</FIIBKENN>
<FIIBKCDE>013</FIIBKCDE>
<FIIBKNAM>BARCLAYS BANK PLC</FIIBKNAM>
<FIIBKORT>NORTHAMPTON NN1 4YD</FIIBKORT>
<FIIBLAND>GB</FIIBLAND>
<FIIKONTO>18150680</FIIKONTO>
<FIIKWAER>USD</FIIKWAER>
<CTABNAME>Norman Jackson</CTABNAME>
<FIIBRANCH>NTHAMPTON WELLINBOROUGH RD</FIIBRANCH>
</E1IDB02>
- <E1IDB02 SEGMENT="1">
<FIIQUALI>BB</FIIQUALI>
<FIIBKENN>BOFAUS3NWDC</FIIBKENN>
<FIIBKCDE>002</FIIBKCDE>
<FIIBKUKN>054001204</FIIBKUKN>
<FIIBKUCD>003</FIIBKUCD>
<FIIBKNAM>BOFA</FIIBKNAM>
<FIIBKORT>WASHINGTON DC</FIIBKORT>
<FIIBLAND>US</FIIBLAND>
<FIIKONTO>1920901042</FIIKONTO>
<FIIKNAME>VERISIGN INC</FIIKNAME>
</E1IDB02>
Target File structure:
- <G_SSG2>
- <S_FII>
<D_3035>OR</D_3035>
- <C_C078>
<D_3194>18150680</D_3194>
</C_C078>
- <C_C088>
<D_1131>25</D_1131>
<D_3434>206151</D_3434>
<D_1131_2>154</D_1131_2>
<D_3055_2>133</D_3055_2>
<D_3432>BARCLAYS BANK PLC</D_3432>
<D_3436>NORTHAMPTON NN1 4YD</D_3436>
</C_C088>
</S_FII>
</G_SSG2>
- <G_SSG2>
- <S_FII>
<D_3035>BF</D_3035>
- <C_C078>
<D_3194>1920901042</D_3194>
<D_3192>VERISIGN INC</D_3192>
</C_C078>
- <C_C088>
<D_1131>20</D_1131>
<D_3434>BOFAUS3NWDC</D_3434>
<D_1131_2>154</D_1131_2>
<D_3055_2>133</D_3055_2>
<D_3432>BOFA</D_3432>
<D_3436>WASHINGTON DC</D_3436>
</C_C088>
</S_FII>
</G_SSG2>
Regards,
Shradha
Similar Messages
-
Read multiple rows to do aggregation
Hi All
I need some help here:
1. I have to read multiple rows to check where time stamp is same for example rownum (1-3) : *'2013/03/09 10:54:09 PM'*
2. And status is unique for example *(H,L)*
3. And if TIME_STAMP is between TIME_A and TIME_B then flag it as Y else flag it as N.
and if the above condition is not true then
1. Flag the row with ' Y ' where time_stamp is same i.e. : '2013/03/09 10:54:09 PM'
2. And the status is *( ' O ')*
3. the other rows where time_stamp is same, and unique_id is same, and STATUS is either or both ( ' H ' , ' L ' ) flag it as *' N '*
table structure:
CREATE TABLE T2
TIME_STAMP DATE,
STATUS VARCHAR2(1 BYTE),
UNIQUE_ID NUMBER,
TIME_A DATE,
TIME_B DATE
Insert statement;
SET DEFINE OFF;
Insert into T2
(TIME_STAMP, STATUS, UNIQUE_ID, TIME_A, TIME_B)
Values
(TO_DATE('03/09/2013 22:54:09', 'MM/DD/YYYY HH24:MI:SS'), 'H', 6587797, TO_DATE('03/09/2013 23:00:22', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('03/09/2013 23:03:00', 'MM/DD/YYYY HH24:MI:SS'));
Insert into T2
(TIME_STAMP, STATUS, UNIQUE_ID, TIME_A, TIME_B)
Values
(TO_DATE('03/09/2013 22:54:09', 'MM/DD/YYYY HH24:MI:SS'), 'L', 6587797, TO_DATE('03/09/2013 22:48:35', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('03/09/2013 23:00:22', 'MM/DD/YYYY HH24:MI:SS'));
Insert into T2
(TIME_STAMP, STATUS, UNIQUE_ID, TIME_A, TIME_B)
Values
(TO_DATE('03/09/2013 22:54:09', 'MM/DD/YYYY HH24:MI:SS'), 'O', 6587797, TO_DATE('03/09/2013 23:03:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('03/09/2013 23:05:54', 'MM/DD/YYYY HH24:MI:SS'));
Insert into T2
(TIME_STAMP, STATUS, UNIQUE_ID, TIME_A, TIME_B)
Values
(TO_DATE('03/09/2013 22:54:57', 'MM/DD/YYYY HH24:MI:SS'), 'H', 6587797, TO_DATE('03/09/2013 23:00:22', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('03/09/2013 23:03:00', 'MM/DD/YYYY HH24:MI:SS'));
Insert into T2
(TIME_STAMP, STATUS, UNIQUE_ID, TIME_A, TIME_B)
Values
(TO_DATE('03/09/2013 22:54:57', 'MM/DD/YYYY HH24:MI:SS'), 'L', 6587797, TO_DATE('03/09/2013 22:48:35', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('03/09/2013 23:00:22', 'MM/DD/YYYY HH24:MI:SS'));
Insert into T2
(TIME_STAMP, STATUS, UNIQUE_ID, TIME_A, TIME_B)
Values
(TO_DATE('03/09/2013 22:54:57', 'MM/DD/YYYY HH24:MI:SS'), 'O', 6587797, TO_DATE('03/09/2013 23:03:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('03/09/2013 23:05:54', 'MM/DD/YYYY HH24:MI:SS'));
Insert into T2
(TIME_STAMP, STATUS, UNIQUE_ID, TIME_A, TIME_B)
Values
(TO_DATE('03/09/2013 18:26:55', 'MM/DD/YYYY HH24:MI:SS'), 'L', 6583483, TO_DATE('03/09/2013 18:15:51', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('03/09/2013 18:26:28', 'MM/DD/YYYY HH24:MI:SS'));
Insert into T2
(TIME_STAMP, STATUS, UNIQUE_ID, TIME_A, TIME_B)
Values
(TO_DATE('03/09/2013 18:26:55', 'MM/DD/YYYY HH24:MI:SS'), 'O', 6583483, TO_DATE('03/09/2013 18:27:01', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('03/09/2013 18:33:10', 'MM/DD/YYYY HH24:MI:SS'));
COMMIT;
Query used:
SELECT time_stamp,
UPPER (SUBSTR(status,1,1)) as status,
Unique_ID,
Time_A,
Time_B,
CASE
WHEN time_stamp BETWEEN Time_A AND Time_B
THEN
'Y'
ELSE
'N'
END as flag
FROM t2;
the query provided above doesn't work with these rows:
TIME_STAMP, STATUS, UNIQUE_ID, TIME_A, TIME_B, FLAG
2013/03/09 6:26:55 PM, L, 6583483, 2013/03/09 6:15:51 PM, 2013/03/09 6:26:28 PM, N
2013/03/09 6:26:55 PM, O, 6583483, 2013/03/09 6:27:01 PM, 2013/03/09 6:33:10 PM, N
because here where time_stamp is same and time_stamp is not between time_a and time_b therefore it should be flagged Y on the row where status is *' O '*
Edited by: 855161 on Apr 10, 2013 7:36 AMHi,
Sorry, it's unclear what you want.
855161 wrote:
Hi All
I need some help here:
1. I have to read multiple rows to check where time stamp is same for example rownum (1-3) : *'2013/03/09 10:54:09 PM'*
2. And status is unique for example *(H,L)*
3. And if TIME_STAMP is between TIME_A and TIME_B then flag it as Y else flag it as N.
and if the above condition is not true then
1. Flag the row with ' Y ' where time_stamp is same i.e. : '2013/03/09 10:54:09 PM'
2. And the status is *( ' O ')*
3. the other rows where time_stamp is same, and unique_id is same, and STATUS is either or both ( ' H ' , ' L ' ) flag it as *' N '*
the query provided above doesn't work with these rows:
TIME_STAMP, STATUS, UNIQUE_ID, TIME_A, TIME_B, FLAG
2013/03/09 6:26:55 PM, L, 6583483, 2013/03/09 6:15:51 PM, 2013/03/09 6:26:28 PM, N
2013/03/09 6:26:55 PM, O, 6583483, 2013/03/09 6:27:01 PM, 2013/03/09 6:33:10 PM, Nbecause here where time_stamp is same and time_stamp is not between time_a and time_b therefore it should be flagged Y on the row where status is *' O '*What are the complet, correct results you want from thissample data?
Are they the same as what you are currently getting, except that the 2 rows above should have flag = 'O'?
Why should the row that has status='L' get flag='O'?
Why don't the other rows that currently have status='O' and flag='N' need to be changed?
To see if there are other rows with the same time_stamp, you can use the analytic COUNT function, like this:
SELECT time_stamp,
UPPER (SUBSTR(status,1,1)) as status,
Unique_ID,
Time_A,
Time_B,
CASE
WHEN time_stamp BETWEEN Time_A AND Time_B
THEN
'Y'
WHEN COUNT (*) OVER (PARTITION BY time_stamp) > 1
AND UPPER (SUBSTR (status, 1, 1)) = 'O'
THEN
'O'
ELSE
'N'
END as flag
FROM t2
ORDER BY time_stamp
, status
;The results that this produces are :
` UNIQUE
TIME_STAMP S _ID TIME_A TIME_B F
09-Mar-2013 18:26:55 L 6583483 09-Mar-2013 18:15:51 09-Mar-2013 18:26:28 N
09-Mar-2013 18:26:55 O 6583483 09-Mar-2013 18:27:01 09-Mar-2013 18:33:10 O
09-Mar-2013 22:54:09 H 6587797 09-Mar-2013 23:00:22 09-Mar-2013 23:03:00 N
09-Mar-2013 22:54:09 L 6587797 09-Mar-2013 22:48:35 09-Mar-2013 23:00:22 Y
09-Mar-2013 22:54:09 O 6587797 09-Mar-2013 23:03:00 09-Mar-2013 23:05:54 O
09-Mar-2013 22:54:57 H 6587797 09-Mar-2013 23:00:22 09-Mar-2013 23:03:00 N
09-Mar-2013 22:54:57 L 6587797 09-Mar-2013 22:48:35 09-Mar-2013 23:00:22 Y
09-Mar-2013 22:54:57 O 6587797 09-Mar-2013 23:03:00 09-Mar-2013 23:05:54 OI don't think this is what you wat, but I'm not sure.
Can you explain, in a different way than before, what flag is supposed to show? What role (if any) does the so-called unique_id play in this problem? -
Problem in creating Maintenance Order with multiple operations
Hello all,
I am facing problem while creating Maintenance Order with multiple operations and sub-operations. I am using BAPI : BAPI_ALM_ORDER_MAINTAIN.
For single operation it is working fine,but i am unable to create MO with multiple operations and sub-operations.
Please, provide me the inputs required,
I have used methods :
ORDER CREATE,
OPERATION CREATE
and SAVE.
Regards,
SiddharthaHi,
The FM you are using is a perfect one. This FM is bit tricky to use. You need to perfectly pass the Reference number field. which links various input table parameters of this FM.
Thanks & Regards,
Navneeth K. -
Auto create request by reading a row in MS SQL table?
Auto create request by reading a row in MS SQL table?
If all required data for a particular request type were included in a row of a MS SQL db table (staging table), could a request be created using a db adaptor? Or is web services the only option to auto create a request?By definition, a DB adapter is part of ServiceLink and ServiceLink handles task-level integration, ie, it can externalize a task that's in a request that already exists. Web Services is the only option to create a new request.
-
Creating stacked graph from multiple rows
Hi!
I am trying to create a stacked bar graph from multiple rows. My data looks like this:
Date_Time Error_Code Count
16-01-2011 12:00 100 10
16-01-2011 12:00 200 15
16-01-2011 12:10 100 5
16-01-2011 12:10 200 7
16-01-2011 12:20 300 20
16-01-2011 12:20 400 6
I want to stack the count of each error_code on top of each other for every time group.
Is this possible?
Br
CasperHi,
can you try
- select the graph in the Structure Window or the visual editor
- open Property Inspector
- Press Pencil Icon
- Click "Swap Bars with x-Axis"
Frank -
Read multiple rows in a single time
Dear All,
Does anyone has idea on how to read using java to read 10000 rows and write it to a file
code:
FileReader fr =
new FileReader(fileDir + "/" + orgFiles);
BufferedReader br = new BufferedReader(fr);
String record = br.readLine();
while (record != null) {
String[] afterSplit = record.split(",");
System.out.println("recordLength : " +afterSplit.length);
for (int p = 0; p < 1; p++) {
test= afterSplit[0];
test1= afterSplit[1];
test1 = afterSplit[2];
it reads a single line in a test file and then write it to another file.i have 100000 rows in that file is there any possibility to read 100000 record in a time (ie) instead of record=br.readline and then split that any other way to read all the rows and assign it to afterSplit ?Hi kayaman,
Thanks for ur reply.if there are 100000 records in the text file
For Example,
bsc,bsc1,bsc2,bsc3
bsc4,bsc5,bsc6,bsc7
bsc8,bsc9,bsc10,bsc11
it reads bsc,bsc1,bsc2,bsc3 and then write it to some file
is there any possibility to read all
bsc,bsc1,bsc2,bsc3
bsc4,bsc5,bsc6,bsc7
bsc8,bsc9,bsc10,bsc11
then write there thses 3 in a single time. -
Problem in creating reports with one multiple detail tables
hi,
i tried to create workbook in the discoverer user edition with ONE MASTER TABLES AND MULTIPLE DETAL TABLES. but it does not allow . is there any solution ?
NAreshI've given up on trying to do this in the user edition - the 2 masters to multiple details. Instead, I create custom folders in the admin edition. They never complain about masters and details. If anyone ever figures out how to do this in the User Edition, I'd sure like to hear about it. I do agree that the original problem - 1 master to multiple details works fine in 3.1.44.
-
BAPI_PO_CREATE1 not able to create PO's for multiple rows from the flat fil
Hi
i am uploading PO's from a flat file into SAP using the BAPI_PO_CREATE1. Everything works fine if the flat file hast only one record.
if the flat file has more than one record then while loading the second record the BAPI returns a error message. I am calling the BAPI in a loop.
The strange thing is that if i load the second record individually the program is able to create the PO. So only when i have multiple records in the flat file i am unable to load the PO into SAP. I debugged and checked all the internal tables passed to the BAPI. All seems to have the data correctly but still the BAPI fails.
any idea where i am going wrong?
the code looks something like this.
LOOP AT HEADER_ITAB.
PERFORM FILL_HEADER_RECORDS.
LOOP AT ITEM_ITAB WHERE EBELN eq HEADER_ITAB-EBELN.
PERFORM FILL_ITEM_RECORDS.
ENDLOOP.
PERFORM CERATE_PO_VIA_BAPI.
ENDLOOP.What is the error message. Are you trying something like this:
LOOP AT T_DATA1.
AT NEW LIFNR.
READ TABLE T_DATA1 INDEX SY-TABIX.
PERFORM INIT_TABLES.
PERFORM FILL_DATA.
--Call the BAPI to create PO
PERFORM CREATE_PO.
ENDAT.
ENDLOOP.
FORM CREATE_PO .
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
POHEADER = POHEADER
POHEADERX = POHEADERX
POADDRVENDOR =
TESTRUN =
MEMORY_UNCOMPLETE =
MEMORY_COMPLETE =
POEXPIMPHEADER =
POEXPIMPHEADERX =
VERSIONS =
NO_MESSAGING =
NO_MESSAGE_REQ =
NO_AUTHORITY =
NO_PRICE_FROM_PO =
IMPORTING
EXPPURCHASEORDER = EXPPURCHASEORDER
EXPHEADER = EXPHEADER
EXPPOEXPIMPHEADER = EXPPOEXPIMPHEADER
TABLES
RETURN = RETURN
POITEM = POITEM
POITEMX = POITEMX
POADDRDELIVERY =
POSCHEDULE = POSCHEDULE
POSCHEDULEX = POSCHEDULEX
POACCOUNT = POACCOUNT
POACCOUNTPROFITSEGMENT =
POACCOUNTX = POACCOUNTX
POCONDHEADER =
POCONDHEADERX =
POCOND = POCOND
POCONDX = POCONDX
POLIMITS =
POCONTRACTLIMITS =
POSERVICES =
POSRVACCESSVALUES =
POSERVICESTEXT =
EXTENSIONIN =
EXTENSIONOUT =
POEXPIMPITEM =
POEXPIMPITEMX =
POTEXTHEADER =
POTEXTITEM = POTEXTITEM
ALLVERSIONS =
POPARTNER = POPARTNER
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = RETURN1.
DATA: L_NAME TYPE LFA1-NAME1.
CLEAR L_NAME.
SELECT SINGLE NAME1
FROM LFA1
INTO L_NAME
WHERE LIFNR = POHEADER-VENDOR.
LOOP AT RETURN.
WRITE : / RETURN-TYPE,
RETURN-ID,
RETURN-MESSAGE.
WRITE : '--> For vendor:',
POHEADER-VENDOR,
L_NAME.
ENDLOOP.
ENDFORM. " CREATE_PO -
Problem in creating a view over multiple tables
How do I create a View on top of the bCrelow tables. I have metioned the key fields of each table. How do i join the tables with common fields? I also need to create a Generic Extractor over the View later.
Z3PVR ( Custom Z table ):
Key Fields--> MANDT: Client; BUKRS: Company Code; WERKS: Plant; EBELN: Purchasing Document Number; ELNR: Accounting Document Number.
BSEG ( Cluster Table ):
Key Fields--> MANDT: Client; BUKRS: Company Code; BELNR: Accounting Document Number; GJAHR: Fiscal Year; BUZEI: Number of Line Item Within Accounting Document
CKIS ( Transparent Table ):
MANDT: Client; LEDNR: Ledger for Controlling objects; BZOBJ: Reference Object; KALNR: Cost Estimate Number for Cost Est. w/o Qty Structure; KALKA: Costing Type; KADKY: Costing Date (Key); TVERS: Costing Version; BWVAR: Valuation Variant in Costing; KKZMA: Costs Entered Manually in Additive or Automatic Cost Est.; POSNR: Unit Costing Line Item Number
BKPF ( Transparent Table ):
MANDT:Client; BUKRS: Company Code; BELNR: Accounting Document Number;
GJAHR: Fiscal Year
RV61A ( Structure ):
No Key
T001 ( Transparent Table ):
MANDT:Client; BUKRS:Company CodeHi Chintai,
To create a view you can use Tcode SE11.
In the first screen of view creation you must introduce the tables for the view and the conditions of join, remember to introduce always the field MANDT.
You are introducing too much tables in your view and if I am not wrong you can not introduce Structures in a view.
As a suggestion start introducing in View only the tables that contain all char you need and also the tables with a reduced number of keys (as T001).
You can then obtain other fields from other tables via CMOD.
To built up a Generic extractor on this view you can use Tcode RSO2.
You can find under www.service.sap.com/bi an How to doc on Generic DataSource creation.
Ciao.
Riccardo. -
Problem to create change pointer for custom message type - Idoc creation
Hi,
We want to create IDOC and send it out when the data of "planning calendar" changes. So we are trying to generate change pointers whenever entries in Table T439I (Planniing calendar) data change.
We created a message type, activated change pointers generally and maintained change relevant fields for message type (not sure if this step is done correctly). But not getting any change pointer in table BDCP2 when I create a new planning calendar in MD25.
Can anybody help / guide?Thanks once again,
I had linked idoc type and message type in we82. Now after i activate the change pointers. I try to generate the IDOC type using BD21. It gives me the error message :<b> "Message type ZP2PPROJ_MSG cannot be sent with change pointers"</b>
whereas in my segments i am using all the master data only (i.e. PRPS, PROJ,PRHI). Please throw some light on this.
Also please clarify, do i need to make an entry of this custome message type in the partner profile ?
Rgds
kewal. -
hi..
i've problem in creating data type in xi after importing idoc from the R/3 sender
plz tell me the basic steps for creating data type in the receiver i.e xi.....
thanks in advanceHi,
You don't need to create a data type after importing the IDOC.
Idoc itself acts as message type and message interface.
check this for creating a data type..
http://help.sap.com/saphelp_nw70/helpdata/en/2d/c0633c3a892251e10000000a114084/frameset.htm
Thanks,
Vijaya. -
Multiple rows EIT using Personalization
Any inputs or documents for add multiple rows custom EIT self service applications (iRecruitment)
After creating custom eit for multiple rows and registering in core app, how to add the EIT
using personalization so as to allow viewing and adding records ?
Help appreciated.
ThanksIf this issue is same as this thread,then track it in one of them.
Re: Attach EIT in iRecruitment using Personalization ?
Thanks
Tapash -
Problem to create multiple rows in adf table.
Hi All,
i am using jdev version 11.1.1.5.0. i have facing very strange problem to create row on table.
In my use case i have create row on table under loop statement. so no of rows created based on loop condition. each time on loop we supply diffrenet value for column like subpkgid,sno but row created with same value.
code is following-
public void createRowOptHdr()
boolean flag=false;
ViewObject reqhdrvo= getService().getView("StmReqhdrView1Iterator");
Row reqhdrrow= reqhdrvo.getCurrentRow();
ViewObject pkglist= getService().getView("PkgListOptHdr1Iterator");
ViewObject tskcdvo= getService().getView("GetTskSubtskCd1Iterator");
System.out.println("Subtype===>"+reqhdrrow.getAttribute("Subtype"));
tskcdvo.setNamedWhereClauseParam("stype",reqhdrrow.getAttribute("Subtype"));
Row tskrow=tskcdvo.first();
int count =pkglist.getRowCount();
ViewObject opthdr= getService().getView("StmOpthdrView2Iterator");
opthdr.executeQuery();
Row optrow=null;
Row pkgrow=null;
for(int i=1;i<=count;i++)
if(i==1)
pkgrow=pkglist.first();
else
pkgrow=pkglist.next();
if(pkgrow.getAttribute("Mark")!=null)
flag=(Boolean)pkgrow.getAttribute("Mark");
else
flag=false;
if(flag)
optrow = opthdr.createRow();
optrow.setAttribute("Reqdt",reqhdrrow.getAttribute("Reqdt"));
System.out.println("Pkg Id====>"+pkgrow.getAttribute("Id"));
String id=(String)pkgrow.getAttribute("Id");
System.out.println("id val==>"+id);
optrow.setAttribute("Pkgid",reqhdrrow.getAttribute("V_Pkgid"));
optrow.setAttribute("Subid",id);
optrow.setAttribute("Sno",opthdr.getRowCount());
optrow.setAttribute("ReqStatus","WAIT");
optrow.setAttribute("LHier",reqhdrrow.getAttribute("LHier"));
optrow.setAttribute("Subtype",reqhdrrow.getAttribute("Lanweb"));
optrow.setAttribute("Divn",reqhdrrow.getAttribute("Divn"));
optrow.setAttribute("Status","Y");
optrow.setAttribute("TaskCd",tskrow.getAttribute("TaskCd"));
optrow.setAttribute("SubtaskCd",tskrow.getAttribute("SubtaskCd"));
opthdr.insertRow(optrow);
try
optrow.validate();
catch(Exception e)
System.out.println("Error to validate opt hdr row===>"+e);
//opthdr.executeQuery();
} i have called this method on a button click so no of row selected on pkglist vo same no of row created. and these row are different pkgid but when i again select some row from pkglist and click on button thease row created with same sno ,subpkgid as first row.Have you used the debugger and dropped through the code?
Have you checked that opthdr.getRowCount() returns a different value each time?
Using the method isn't optimal as it will iterate over the towards each time. Next you'll get duplicate numbers if more then one user works with the application and end up clicking the button. You should use a sequence for this.
Timo -
Can we create JTable with multiple rows with varying number of columns ?
Hi All,
I came across a very typical problem related to JTable. My requirement is that cells should be added dynamically to the JTable. I create a JTable with initial size of 1,7 (row, columns) size. Once the 7 columns are filled with data, a new row should be created. But the requirement is, the new row i.e. second row should have only one cell in it initially. The number of cells should increase dynamically as the data is entered. The table is automatically taking the size of its previous row when new row is added. I tried by using setColumnCount() to change the number of columns to '1' for the second row but the same is getting applied to the first row also.
So can you please help me out in this regard ? Is it possible to create a JTable of uneven size i.e. multiple rows with varying number of columns in each row ?
Thanks in Advance.Well a JTable is always going to paint the same number of columns for each row. Anything is possible if you want to rewrite the JTable UI to do this, but I wouldn't recommend it. (I certainly don't know how to do it).
A simpler solution might be to override the isCellEditable(...) method of JTable and prevent editing of column 2 until data in column 1 has been entered etc., etc. You may also want to provide a custom renderer that renderers the empty column differently, maybe with a grey color instead of a white color. -
Hello All,
we have created shared folder on multiple client machine in domain environment on different 2 OS like-XP,Vista, etc.
from some day's When we facing problem when we are access from host name that shared folder is accessible but same time same computer when we are trying to access the share folder with IP it asking for credentials i have type again and again
correct credential but unable to access that. If i re-share the folder then we are access it but when we are restarted the system then same problem is occurring.
I have checked IP,DNS,Gateway and more each & everything is well.
Pls suggest us.
Pankaj KumarHi,
According to your description, my understanding is that the same shared folder can be accessed by name, but can’t be accessed be IP address and asks for credentials.
Please try to enable the option below on the device which has shared folder:
Besides, check the Advanced Shring settings of shared folder and confrim that if there is any limitation settings.
Best Regards,
Eve Wang
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]
Maybe you are looking for
-
My iphone, even though restarted will not updadte to my new apple id??
-
(Solved) Having trouble installing vlc and openoffice
I am having trouble installing both VLC and Openoffice. VLC I tried typing in: yaourt -S vlc At first, it finds the package, and the first time I did it, downloaded quite a bit of stuff, and then it failed after installing a rather large package and
-
ABAP code help for 0PROFIT_CTR (in Update rules)
Hi Can you please give me the update rules code that would do the following in BW 3.5: If Profit Center is 10 digits long, its ok but if Profit Center is 5 digits long, concatenate with 5 zeros. Thanks Jimi Edited by: jimi ogun on Dec 1, 2011 1:44 PM
-
No printables visible in HP Connected
HP 5510. I have had problems with my printer connecting to the server on occasionally. However I now find that I cannot access the apps online. I have the apps page loaded on the pc then I am required to sign in. After signing in I am automatical
-
Unable to open files ive downloaded
Model #: IQ546t Product #: VA284AV-ABA Serial #: {Removed for privacy} Software Build #: 93NAv6PcA5 Service ID #: 092-209 PCBRAND: Pavilion Windows Vista 32-bit I'm unable to open files i've downloaded. ok, i'm trying to open silverlight_x64.exe to g