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

Type string not allowed in PARAMETERS?

Former Member
0 Likes
3,088

Hi,

I'm trying to define a parameter type string to get a file path to upload a file and I receive the following error.

PARAMETERS: var1 TYPE string.

The deep data type "STRING" is not allowed.

But then I use the same type to a DATA statement and I can use it with no problem, for example:

DATA var1 TYPE string.

I've got a code created by me the last year where I declare a TYPE string parameter and that code worked perfectly... The SAP version is 6.4...

1 ACCEPTED SOLUTION
Read only

Simha_
Product and Topic Expert
Product and Topic Expert
0 Likes
1,600

Hi Marshall,

The older releases doesn't support the datatype string for parameters as the newer releases wil take it.

If you still want to achieve that you can use the datatype char<x> for that and x being the number of characters.

Cheers,

Simha.

4 REPLIES 4
Read only

Former Member
0 Likes
1,600

You can use char with the required length

Read only

0 Likes
1,600

Ok ok, I don't understand why isn't working because the release is new (6.4) but doesn't matter... I will use the data type string to pass the string to char255 parameter as you told me and no more complications

Edited by: Marshal Oliveras on Nov 18, 2008 10:43 AM

Read only

Simha_
Product and Topic Expert
Product and Topic Expert
0 Likes
1,601

Hi Marshall,

The older releases doesn't support the datatype string for parameters as the newer releases wil take it.

If you still want to achieve that you can use the datatype char<x> for that and x being the number of characters.

Cheers,

Simha.

Read only

Former Member
0 Likes
1,600

i think ur sap version is 4.6 . In 6.0 this will work .

parameter : pa_file like rlgrap-filename.

data : gv_file type string .

gv_file = pa_file .