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

plz help me experts getting error

Former Member
0 Likes
979

hi expert need ur help

error coming in this line :

in 4.6 it was not giving any error but nw in ecc 6.0 it giving error

DATA : l_spras_de LIKE sy-langu VALUE 'DE'.

error is :

The VALUE specification is longer than the corresponding field. The

VALUE specification will only be passed up to the length of the field.

FYI:

SELECT tdname tdspras

INTO (stxh-tdname, stxh-tdspras)

UP TO 1 ROWS

FROM stxh

WHERE tdobject = 'TEXT'

AND tdname IN r_text

AND tdid = 'ADRS'

AND tdspras = l_spras_de.

and the length of sy-langu is 1 in the table.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
935

Hi,

in syst table

sy-langu field length is 1.

so you have to give it like

DATA : l_spras_de LIKE sy-langu VALUE 'D'.

then continue..

reward points if helpful.

regards,

venkatesh

hi expert need ur help

error coming in this line :

in 4.6 it was not giving any error but nw in ecc 6.0 it giving error

DATA : l_spras_de LIKE sy-langu VALUE 'DE'.

error is :

The VALUE specification is longer than the corresponding field. The

VALUE specification will only be passed up to the length of the field.

FYI:

SELECT tdname tdspras

INTO (stxh-tdname, stxh-tdspras)

UP TO 1 ROWS

FROM stxh

WHERE tdobject = 'TEXT'

AND tdname IN r_text

AND tdid = 'ADRS'

AND tdspras = l_spras_de.

and the length of sy-langu is 1 in the table.

8 REPLIES 8
Read only

Former Member
0 Likes
935

hi,

sy-langu is 1 char field

so give D instead of DE

Reward points if helpful

Read only

0 Likes
935

but this id the req of prog yar hw i can change the functionality

Read only

Former Member
0 Likes
936

Hi,

in syst table

sy-langu field length is 1.

so you have to give it like

DATA : l_spras_de LIKE sy-langu VALUE 'D'.

then continue..

reward points if helpful.

regards,

venkatesh

Read only

alex_m
Active Contributor
0 Likes
935

The language key maintained in SAP table as a single length field, u have to pass the signle charecter value.

Read only

Former Member
0 Likes
935

Hi,

In that case it seems this has changed with the ECC6.0 version.

Hence you might have to change your code...You might wanna search for the new language codes if it has been changed in ECC6.0.

Hope this helps.

<b><i>Do reward each useful answer..!</i></b>

Thanks,

Tatvagna.

Read only

Former Member
0 Likes
935

instead of passing 'DE' pass only 'D'.

Read only

Former Member
0 Likes
935

Hi,

Goto table T002 and see the values that sy-langu can take..

for german it is DE.

So just Replace DE with D..

This will solve ur problem

Regards,

Aparna

Read only

Former Member
0 Likes
935

Hi Anit,

I hope it must be giving only information message & not an error message.

Field length for sy-langu is 1 only but anyway when we hit the table, a conversion routine is invoked which pass only first character while accessing database.

Hope this helps.

Rgds,

Ashish