Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

String in ABAP

Former Member
0 Likes
1,020

Dear ALL,

Am just learning SAP ABAP. I would like to know the use of String data type in SAP. When and where we use it and how do we maintain it?. Thanks to ALL in anticipation.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
958

Hi Bhaskar,

You use generally use the string data type when you dont know how much wil be the length of your character field. A string may consist of normal as well as Special character.

You can define the string as DATA : string TYPE string.

Regards

Sourabh Verma

4 REPLIES 4
Read only

Former Member
0 Likes
958

Hi Bhaskar,

data : str type string.

SSTRING 1-255 Character string string

STRING 256-... Character string string

The type SSTRING is available as of release 6.10 and it has a variable length. Its maximum length must be specified and is limited to 255. The advantage of this type compared with CHAR, is that it is assigned to the ABAP type string.

Check the below link for more information:

http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb2fd9358411d1829f0000e829fbfe/content.htm

<b>Kindly Reward points if you found this reply helpful</b>,

Cheers,

Chaitanya.

Read only

Former Member
0 Likes
959

Hi Bhaskar,

You use generally use the string data type when you dont know how much wil be the length of your character field. A string may consist of normal as well as Special character.

You can define the string as DATA : string TYPE string.

Regards

Sourabh Verma

Read only

Former Member
0 Likes
958

by default data type of string is Char255.

and its used tranfer data to files,

performing the concatinate fun. on chars,

holding the text data, etc...

declaration:

data: lv_str type string.

Read only

abdul_hakim
Active Contributor
0 Likes
958

Hi,

String data type is used to hold the string of dynamic length.

Declaration:

__________

DATA name1 TYPE string.

Cheers,

Hakim

Mark all useful answers