on 07-24-2009 11:33 AM
HI Experts,
I have 2 UI elements (dropdownbyindex and Textedit) in my application and in dropdown i have 2 values named OPEN and Completed.Intalliy i am entering data in Textedit with OPEN mode from dropdown.
For Ex;
TextEDIT UI:
first line
second line
third line
When click on save button the textedit data had saved in backend with same format line wise.
Backend:
first line
second line
third line
Up to here my application is working fine.Now my issue is when i want to edit the same application like i opened the above data and i changed the OPEN to COMPLETED and without doing anything in the text box and clicking on Save button.Here the data is saving in this below format.
firstline ## secondline ## third line.
but if i entered anything in textbox the data saving perfectly.If i enter SPACE also its working fine .Can any body give me your inputs to solve this problem.
Please help me ...
Regards,
Prasad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prasad
Put External debuging in R/3 and check whether data is pulled according to your requirment or not.
I suppose that validation is coming from R/3 side
please check it.
Thanks
Tulasi Palnati
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi murali,
This is my code:
int patNotesIndex = 0;
int beginIndex3 = 0;
int endIndex3 = 0;
String text = wdContext.currentContextElement().getFreetext_value(); //Textedit attribute
int length3 ;
try
{
length3 = text.length();
}
catch(Exception e)
{
length3 = -1;
}
while(beginIndex3 < length3)
{
endIndex3 = text.indexOf("\r\n",beginIndex3);
if(endIndex3 == -1)
endIndex3 = length3;
String line = text.substring(beginIndex3,endIndex3);//get the new line
//start
int strLineLen=line.length();
if(strLineLen>132)//line length > 132
{
for(int i=0;i<strLineLen;i=i+131)
{
Tline patNotesObj = new Tline();
if(i==0)
patNotesObj.setTdformat("*");// line begins
else if(i!=0 && (i+131)<strLineLen)
patNotesObj.setTdformat("=");//intermediate part of the line
else if(i!=0 && (i+131)>strLineLen)
patNotesObj.setTdformat("=");// line finishes
String strTemp="";
if((i+131)<strLineLen)
strTemp=line.substring(i,(i+131));
else
strTemp=line.substring(i,strLineLen);
patNotesObj.setTdline(strTemp);
freetext.addTlines(patNotesObj);
Header.add(patNotesIndex,patNotesObj);
patNotesIndex ++;
msg.reportSuccess("ftext1"+patNotesObj);
}
beginIndex3 = endIndex3 + 2;
if(beginIndex3 >=length3)
break;
}
//end
else// line with length < 132
{
Tline patNotesObj = new Tline();
patNotesObj.setTdformat("*");
patNotesObj.setTdline(line);
freetext.addTlines(patNotesObj);
Header.add(patNotesIndex,patNotesObj);
patNotesIndex ++;
beginIndex3 = endIndex3 + 2;
if(beginIndex3 >=length3)
break;
msg.reportSuccess("ftext2"+patNotesObj);
}
Regards,
Prasad
}
Hi,
I think null values are getting stored
manipulate your code to exclude null values..
and if the fields take strings you can also put trim() method on it and check its length
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.