String Fields Length
Hi,
Length of string fields in my crystal report are locked to 20 by default, but my data source's query's field length is 50. How can I fix the crystal report to show all 50 characters in the report?
Thanks and regards,
Al
Hi Hitesh and Crystalier,
Thanks for your replies.
I check marked "Can Grow" option and it didn't work.
Database is SQL Server 2005 and my connection is OLE DB (ADO). The database field is VARCHAR(50).
I noticed, under the Field Explorer --> Database Fields, the type of the field is showing as "String [20]". But the field in the datasource (SQL Server 2005) is Varchar(50). Also, when I right-clicked Browse Data on the field on Field Explorer, the data that was returned are all trimmed to 20 characters.
Thanks and regards,
Al
Similar Messages
-
Possibility to define length of String fields for POJO Reporting
<p>It would be a nice feature if you could set the length of a String field in POJO Reporting.</p><p>Right now the max length is set to 127 characters and that is not sufficient for our needs.</p><p>/Thanks</p><p>Mattias Melin</p><p>IST International</p><p>Sweden </p>
Bascotie wrote:
To make sure it was not blank I had been using
if (aCust.state.equalsIgnoreCase("") || aCust.state.length() != 2){
The first condition is redundant and pointless here, since, if it's true, the second one will always be true. -
Hi Team,
We r tring to create table with field length 250 and 'CHAR' type and one more field 'STRING 'for unlimited length.While creating table entries ,it is tsking only 130 length for all fields.it is not taking 250 characters for 250 length field.and it is not taking unlimited length for String field.Plz let me know.Hello Mohan,
CHAR 250 is right. i am not facing any problem.
can you please explain in detail what you have done and what error you are getting.
Regards,
Sujeet
Edited by: Sujeet Mishra on Dec 2, 2009 4:42 AM -
What is the best way to declare field length 500 in internal table?
Hi all,
what is the best way to declare field length 500(constant value allways) in internal table?
I am trying to send data from internal table to file format, and I have a field in internal table with 500 length (constant value always). So how do I can declare and append this field value to table?
Thanks
MuraliHi. Please see the following example program, notice how I am filling the field with the constant value.
report zrich_0001.
* CLASS lcl_main DEFINITION
class lcl_main definition.
public section.
types: begin of ttab,
fld1(500) type c,
end of ttab.
data: itab type table of ttab.
data: xtab type ttab.
methods: constructor,
write_itab.
endclass.
* CLASS lcl_main IMPLEMENTATION
class lcl_main implementation.
method constructor.
<b>
xtab-fld1 =
'This is one part of the total string which needs to be really' &
' long and this is a constant and we need to move it to a work' &
' area and then append it to the internal table which has a' &
' field with a length of five hundred characters'.
append xtab to itab.</b>
endmethod.
method write_itab.
loop at itab into xtab.
write:/ xtab-fld1.
endloop.
endmethod.
endclass.
data: o_main type ref to lcl_main.
start-of-selection.
create object o_main.
call method o_main->write_itab.
Regards,
Rich Heilman -
how to use string field and its purpose...
STRING: Character string with variable length This data type can be used only in types (data elements, structures, table types) and domains. In the dictionary a length can be specified for this type (at least 256 characters). It can be used in database tables only with restrictions. For a description of them, refer to the documentation of the ABAP statement 'STRING'. In ABAP, this type is implemented as a reference to a storage area of variable size. The system proposes 132 characters as default for the output length. You cannot attach search helps to components of this type.
SSTRING: Short character string with variable length. In the Dictionary the number of characters can be specified for this type (from 1 to 1333). This data type can be used only in types (data elements, structures, table types) and domains. It can be used in database tables. To do so, refer to the documentation of the ABAP statement 'STRING'. In ABAP, this type is implemented as a reference to a storage area of variable size. String fields of this type can be used in indexes and in the WHERE condition of a SELECT statement. You cannot use them in table keys -
UDF for Splitting the nodes based on the field length
HI All,
Target records Record1 to Record4 must be created based on the length of the source field length i.e, if the source field length is only 90 then only 3 records must be created.maximum length of the source field is 120.The source and the target structure are as shown
Source Target
Record Record(30)
Field(120) -------------> Field1(10)
Field2(10)
Field3(10)
After mapping:-
Source -----------> Target
Record Record1(0 to30)
Field(120) -------------> Field1(0 to 10)
Field2(10 to 20)
Field3(20 to 30)
Record2(30 to 60)
-------------> Field1(30 to 40)
Field2(40 to 50)
Field3(50 to 60)
Record3(60 to 90)
-------------> Field1(60 to 70)
Field2(70 to 80)
Field3( 80 to 90)
Record3(90 to 120)
-------------> Field1(90 to 100)
Field2(100 to 110)
Field3(110 to 120)
Can any one provide me the code to get this done.
Thanks ,
VikramYou need no UDF. You can use the substring function, but you should check the length of the string to prevent mapping errors due to the substring function.
-
How to add field length constraints when using an existing JavaBean model
Within our current project we used a O/R mapping tool to generate our JavaBean model. For e.g.
<b>public class Person{
private String name; ...getName() ...setName(...)
}</b>
The whole model is used within our Web Dynpro project. Now it's a requirement to implement field length constraints. Normally this is no problem using ISimpleType like the following:
<b>attributeInfo = wdContext.nodePerson().getNodeInfo().getAttribute
(IPrivate...IPersonElement.NAME);
ISimpleTypeModifiable type = attributeInfo.getModifiableSimpleType();
type.setLength(60);</b>
But we've got an runtime exception that it is not allowed to modify the models datatype:
com.sap.tc.webdynpro.progmodel.context.ContextException: AttributeInfo
<b>(Basics.Person.name): must not modify the datatype of a mapped attribute</b>
at
com.sap.tc.webdynpro.progmodel.context.AttributeInfo.getModifiableSimpleType
(AttributeInfo.java:337)
The question is how could a workaround look like. Or is there nothing like that and we have to build a dictionary type tier upon our JavaBean model. Any ideas ?
thx,
s.w.Sabine,
You may:
1. Import JavaBeans model
2. Create DDIC type with necessary constarints (string-based, max. length 60)
3. Open editor for target model class and change type of property.
See my blog /people/valery.silaev/blog/2005/06/29/apojo--almostplain-old-java-objects-as-model (section "Tweaking model classes") for details.
Valery Silaev
EPAM Systems
http://www.NetWeaverTeam.com -
Incoming Email Subject Field length increase
Hi,
In CRM 7.0,I need to increase the incoming email Subject Field length ,When i try to modify UI configuration,Subject fields are not enabled for configuration (Other fields in the same screen are enabled for modifications)..
Please give your inputs whether incoming email Subject Field length can be increased? if so,this should be done at UI level or mail form?
Regards
ShanHi Prasenjit,
Thanks for your interaction and response.
Actually I can to find out views and class details in CRM 7.0 by using F2 key..
The UI component is CRMCMP_CCS_EML and view is CRMCMP_CCS_EML/MailBody. The implementation class is ZL_CRMCMP_C_MAILBODY_IMPL. Since all the page attributes are string, There is a context class ZCL_CRMCMP_C_MAILBODY_CTXT, But no context node (Like you mentioned type CN as in *CN00, *CN01) within page attribute.
The main issue am facing here is that couldnu2019t figure out where to start the debugging for inbound mails where the subject field is truncated. I usually process inbound mails from SOIN transaction.
Moreover subject field can have more than 40 characters in outgoing mail, but the inbound mail subject field limited to 40 character and rest of them truncated.
Hope you understand my area of concern and provide me your input.
Regards,
Shan -
Removing last 2 characters from string field
I am trying to remove the last 2 characters of a string field.
there is no consistant length in the field
316R1
12364R1
i want to remove everything after R
i tried instrrev but i that didnt do it.
is there a way to say
start position1 and go the R
thanksformula,
left (field, length_formula) is the solution
the length_formula is the number of chars form left
f.i
left(field, length (field)-2)
left (field, InstrRev, field,"R")
of course a combination with Right is also possible -
HI Experts,
In SAP normally max field length is 255 characters.....but if i want to store 1000 character string into my field how can i do this..
any ideas..
Thanks
PTHi,
We can store in another way.
By creating table with the fields as in the structure 'TLINE'.
Two fields are there, one is for Line format and another one for Line Content.
In SAPscript, this is the concept used.
Using function module 'CONVERT_ITF_TO_ASCII', you will get your original text.
Regards,
R.Nagarajan. -
In ECC 6.0, the "reference" field on the Confirmation tab of the PO is only 35 characters long. Is there anything out there that will increase the field length to 70?
The domain XBLNR_LONG attach to the field EKES-XBLNR is of
35 Character String.
In standard system it is not possible to customize the field
EKES-XBLNR length to more than 35 character. Because field length is defined at domian level which effects at system level i.e all applications ,trasations etc.If you want to change the field
EKES-XBLNR lenegth to more than 35 char then you need to change this at database level i.e domain level in tcode SE11
Please note that if you change at domain level then will effect to all other applications also. -
How to restrict field length upon Export - OFR
Hi,
I am working with the standard AP solution. We are experiencing an issue with the Invoice Number and PO Number exporting lengths that are longer than we have allowed in IPM. Therefore, we are having multiple documents fail with input agent in IPM because the number of characters are over the limit in the .txt file for those fields.
Thanks,
NatalieHave your tried to adjust the application fields' lengths?
(see http://docs.oracle.com/cd/E23943_01/admin.1111/e12782/c04_applications.htm#CIHCJFEF )
Note that if you exceed the type's limits (like mentioned 'Possible string length is specified in the Length element with a maximum of 200 characters supported.') you might have to go with a workaround, but for fields like Invoice Number it can be a challenge (this field is probably heavily used in searching). -
Removing number appended at the end from a string field
Hi,
I have a string field which has numbers appended to its end. I need to remove the numbers and display only the string values.
The string is not of fixed length, and the numeric values can be single digit or 2 digits and might be separate by a space but not always.
Here is some sample data:
SHOWCASE NOTT12
SHOWCASE PETE12
SHOWCASE BRIST7
SHOWCASE READI1
CINEDROME PAD1
RITZ BELPER 1
STEPH.JOSEPH S1
I need to display this as below (without any numbers appended at the end)
SHOWCASE NOTT
SHOWCASE PETE
SHOWCASE BRIST
SHOWCASE READI
CINEDROME PAD
RITZ BELPER
STEPH.JOSEPH S
Please let me know how this can be achieved.
Thanks!Hi there,
Just a quick option is to use the REPLACE function, i.e.
REPLACE(REPLACE(REPLACE({contr_actv.dept_id},'1' ,''),'2', ''), '3', '');
You just have to build it up a little more so it caters for numbers 0 - 9. At the moment it only works for numbers 1 - 3. Another way you could do this is write some code to loop through the length of the string looking at each individual character to test for a number.
I don't have time today to write something like that but the above should work as long as you don't have numbers in the middle of names etc.
Cheers,
Chris -
Restrict TextEdit field length to 240 chars
Hi,
In my Web-Dynpro application, I need to restrict the TextEdit field length to 240 chars maximum size.
The users shouldn't be allowed to enter more than 240 characters!
Best Regards,
AmolHi,
try creating a simple type under the dictionaries->logical dictionary->data types->simple type of type String and in the Definition tab set the max length to 240. create a value attribute under the context and set the type to the simple type created and bind it to the Input field.
This will restrict the length to 240.
Regards,
Poojith MV -
Htmleditformat & Database Field Lengths
I happened across an article about SQL injection, a topic I frequently look back into to see what new threats have been discovered, and this particular author was pushing for the use of htmleditformat on all form data being inserted into a database. Now I have coded and secured several different websites against SQL injection, each using simlar to slightly-varied techniques at blocking those pesky hackers, so my question is not how to prevent SQL injections, but instead my question is more about htmleditformat and database field lengths.
htmleditformat on user-inserted data is part of my SQL injection prevention scheme, but on rare occasion I have this problem:
Let's say I have a field in my database for the user's first name, with a generous length of 20 characters.
The user's name, just as an example, is 18 characters long. No problem, right?
But let's say that user's name has a symbol, or foreign language character, that then gets converted by htmleditformat behind the scenes? Suddenly that 18 characters balloons up to 23 characters, generating an error because my CFQUERYPARAM maxlength is 20, not to mention the field in the database.
So, for those who do scrub user data with htmleditformat, how do you handle this, if at all?I agree with mack. HtmlEditFormat is intended for displaying strings, not making them safe. You might try using the StripHtml or SafeText user defined functions from cflib.org to remove undesired HTML from your input.
http://www.cflib.org/udf/stripHTML
http://www.cflib.org/udf/SafeText
Maybe you are looking for
-
Excise Invoice number range not being picked by crystal reports
Hi all, We have a Crystal Report that generates the Invoice document based on the invoice number which is an input a parameter. The report is built on 'SAP Table,Cluster or Function' type connection. The Invoice numbers are updated into the source sy
-
Sharing only one calendar in ICAL
I have several calendars set up in my ICAL. I want to share only one via email but when I try the file gives access to all of my calendars. How do I provide access to one not all? Thanks
-
I can open a pdf from a website but when I click on save as it only lets me save it as a 'web page complete'....I cannot therefore save a pdf as a pdf, even though I have adobe reader.
-
Need hosted mail service for managing my 60 email accounts in one place.
I have 60 mail accounts in my email client on personal computer (such as [email protected], [email protected], [email protected], etc.). I can retrieve mails from this accounts and send mails using their own SMTPs. Now I need do the same on server ho
-
Hi. I am just starting to learn how to develop asp.net for mobile devices. I was wondering if there is any way to do this in Dreamweaver 8. I noticed that the tag set is not built into Dreamweaver. Is there a place to download an extension for the ta