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

data type STRING..

Former Member
0 Likes
791

Hi All,

Can u plz suggest me wt wrong with this declaration?

PARAMETERS : p_date TYPE bkpf-budat OBLIGATORY,

p_file TYPE string OBLIGATORY

Here error "string is not accepted...". But if i repalce it with datatype c.. am not getting correct o/p.

6 REPLIES 6
Read only

Former Member
0 Likes
697

u can declar like that

data : samt type string .

CHAR 1-255 Character string c(m)

so

PARAMETERS : p_date TYPE bkpf-budat OBLIGATORY,

p_file (30) TYPE c OBLIGATORY.

Read only

Former Member
0 Likes
697

hi,

when u r declaring parameter do not use string type..

for ur requirement do like this..

parameter : p_file type rlgrap-filename.

data : f_file type string.

f_file = p_file.

do in the above way.. it will work..

Rgds,.

subash

Read only

Former Member
0 Likes
697

Hi,

I hope you are using version 4.6 or 4.7 ..

Because in there you cannot declare type string . From versions 5.0 onwards its compatible .

P_file like rlgrap-filename .

You can try this declarations in ur case.

Br,

Vijay.

Read only

Former Member
0 Likes
697

hi it seems u want to read filename

RLGRAP-filename for p_file

if u want string itself declare it as character of some max length.

if the value is move that to string var, then remove the spaces at the end

Read only

Former Member
0 Likes
697

PARAMETERS : p_date TYPE bkpf-budat OBLIGATORY,

p_file(200) OBLIGATORY.

data : l_file type string.

l_file = p_file.

Read only

abdul_hakim
Active Contributor
0 Likes
697

Hi

Below statement is working fine for me in ECC6.0.

PARAMETERS P1 TYPE STRING OBLIGATORY.

I guess you are in some older release which is not supporting STRING type for PARAMETERS.

Cheers,

Hakim