Application Development 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: 

syntax error

Former Member
0 Kudos
120

hi all

CONCATENATE sy-uname sy-repid sy-modno INTO lv_memid.

syntax error is: "SY-MODNO" must be a character-type data object (data type C, N, D, T or STRING). field string).

please let me how to correct it ?

1 ACCEPTED SOLUTION

Former Member
0 Kudos
93

HI.

Declare data type as char or string.

data:lv_memid. type string.

CONCATENATE sy-uname sy-repid sy-modno INTO lv_memid.

reward all helpfull answers.

regards.

Jay

10 REPLIES 10

0 Kudos
93

Hi

DO as follows.

Data: symod type string.

symod = SY-MODNO.

CONCATENATE sy-uname sy-repid symod INTO lv_memid

Regards,

Sesh

Former Member
0 Kudos
93

data: z_modno type string.

z_modno = sy-modno.

CONCATENATE sy-uname sy-repid z_modno INTO lv_memid.

Former Member
0 Kudos
93

Hi,

Try this code,

data : lv_memid(100).

CONCATENATE sy-uname sy-repid sy-modno INTO lv_memid.

write : lv_memid.

Thanks,

reward If helpful.

former_member150733
Contributor
0 Kudos
93

create a variable of char type.

and move SY-MODNO to mychar.

data : mychar type char15.

mychar = SY-MODNO.

now do the concatenation using mychar instead of SY-MODNO .

Former Member
0 Kudos
93

i copy pasted ur code.. no syntax error.. paste ur full code here

Regards.

Aparna

Former Member
0 Kudos
93

hi..,

Concatenate works only with the character type fields...........

sy-modno is of type I(Integer).

So take a character variable and copy the value of the sy-modno into that and use it in the CONCATENATE Statement.

___________________________________________________________

data w_modno type c.

w_modno = sy-modno.

CONCATENATE sy-uname sy-repid w_modno INTO lv_memid.

Please do remember to close the thread when ur problem is solved !! reward all helpful answers !!!!!!

regards,

sai ramesh

Former Member
0 Kudos
93

Hi,

this is strange - because sy-modno is a character-type data object. I've just tried it in my program and your concatenate worked fine. Could you just let us know which release you're using?

Regards

Nicola

Former Member
0 Kudos
94

HI.

Declare data type as char or string.

data:lv_memid. type string.

CONCATENATE sy-uname sy-repid sy-modno INTO lv_memid.

reward all helpfull answers.

regards.

Jay

Former Member
0 Kudos
93

Hi,

Try doing as shown below:


Data: sy_mod type string.

MOVE SY-MODNO to sy_mod .

CONCATENATE sy-uname sy-repid symod INTO lv_memid

Thanks and Regards,

Kunjal Patel

Former Member
0 Kudos
93

hi,

try like this.

Data: symod type string.

symod = SY-MODNO.

CONCATENATE sy-uname sy-repid symod INTO lv_memid

if useful reward some points.

Regards,

Suresh Babu Aluri.