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

syntax error

Former Member
0 Likes
1,119

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
Read only

Former Member
0 Likes
1,092

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
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
1,092

Hi

DO as follows.

Data: symod type string.

symod = SY-MODNO.

CONCATENATE sy-uname sy-repid symod INTO lv_memid

Regards,

Sesh

Read only

Former Member
0 Likes
1,092

data: z_modno type string.

z_modno = sy-modno.

CONCATENATE sy-uname sy-repid z_modno INTO lv_memid.

Read only

Former Member
0 Likes
1,092

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.

Read only

former_member150733
Contributor
0 Likes
1,092

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 .

Read only

Former Member
0 Likes
1,092

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

Regards.

Aparna

Read only

Former Member
0 Likes
1,092

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

Read only

Former Member
0 Likes
1,092

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

Read only

Former Member
0 Likes
1,093

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

Read only

Former Member
0 Likes
1,092

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

Read only

Former Member
0 Likes
1,092

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.