12-21-2006 4:16 AM
Hi
If we declare a variable as suppose
data:name types string.
Then what is the maximum length of the data can be stored in name.
Thanking you
Chandrika.
12-21-2006 4:20 AM
The length of a string is not static but variable and adjusts itself to the current field content at runtime. Dynamic memory management is used internally. Strings can have any length. The initial value of a string is an empty string with length 0.
12-21-2006 4:20 AM
The length of a string is not static but variable and adjusts itself to the current field content at runtime. Dynamic memory management is used internally. Strings can have any length. The initial value of a string is an empty string with length 0.
12-21-2006 4:22 AM
hi ,
intially the value of the string is '0',
at the run time the legth of the string is equal to the filed length specified
Regards,
GUDURI
12-21-2006 4:23 AM
Hi Chandrika,
You can store data upto 2 GB inside a string variable.
Regards,
Chetan.
PS:Reward points if this helps.
12-21-2006 4:26 AM
Hi,
There are two predefined types in ABAP with variable length:
STRING for character strings
XSTRING for byte strings
Check this link for more information.
http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3357358411d1829f0000e829fbfe/frameset.htm
12-21-2006 4:27 AM
Hi Sarath ,
There is a limit to the length of the sting , i feel it is based on the basis settings , how much memory is allocated to various areas.
For e.g consider the program
Data : vlabst type string.
vlabst = '000000000000000000000000000000000000000000000000000000000000'.
do 50 times.
concatenate vlabst vlabst into vlabst.
enddo.
write: vlabst.
the program dumps , if i execute it this way , but if i change the do statement and do the iteration 10 times it works.
So please ask your basis team about it.
Regards
Arun
12-21-2006 4:31 AM
hi,
A string is a sequence of characters with variable length. A string can contain any number of alphanumeric characters. The length of a string is the number of characters multiplied by the length required for the internal representation of a single character
When you create a string as a data object, only a string header is created statically. This contains administrative information. The actual data objects are created and modified dynamically at runtime by operational statements.
The initial value of a string is the empty string with length 0. A structure that contains a string is handled like a deep structure. This means that there are no conversion rules for structures that contain strings.
Here is a helpful link
http://help.sap.com/saphelp_erp2005vp/helpdata/en/fc/eb2fcc358411d1829f0000e829fbfe/frameset.htm
Regards,
Sourabh
12-21-2006 4:37 AM
Hi Sarath ,
Please try to execute the code which i have given in my previous post and please tell does it also dump in your system.
Regards
Arun