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: 

text is not coming in french

Former Member
0 Kudos

hi,

whenever i am executing this in french , the text is not coming in french language .

but in english it is coming perfectly..can some body give the reason??

at selection-screen on value-request for select1.

call function 'F4_DD_TABLE_FIELDS'

exporting

table = 'marc'

object = '*'

suppress_selection = 'X'

  • DISPLAY_ONLY =

importing

result = select1

exceptions

others = 1.

if not select1 is initial.

select single ddtext from

dd03t into a where

fieldname = select1

and ddlanguage in ('E','F').

6 REPLIES 6

Former Member
0 Kudos

Hi,

if not select1 is initial.
select single ddtext from
dd03t into a     -----> A is the work area and will hold the only single value It is fetching the english text
where
fieldname = select1
and ddlanguage in ('E','F').


Instead of workarea use the table to fetch in english and French.  Or use this 

if not select1 is initial.
select single ddtext from
dd03t into a    where
fieldname = select1
and ddlanguage EQ 'F'.
If sy-subrc NE 0.
select single ddtext from
dd03t into a    where
fieldname = select1
and ddlanguage EQ 'E'.

ENDIF.

Former Member
0 Kudos

hi,

as it is a select single u need to give all primary key to it

write as

ranges: r_lang for dd03t-ddlanguage .

declare a table here for storing value

*populate range with the values

*for english

r_lang-LOW = 'EN'.

r_lang-SIGN = 'I'.

r_lang-OPTION = 'EQ'.

append r_lang.

clear r_lang.

*for french

r_lang-SIGN = 'I'.

r_lang-OPTION = 'EQ'.

r_lang-LOW = 'F'. "code for french

append r_lang.

clearr_lang.

if not select1 is initial.

select ddtext from

dd03t into table a

where fieldname = select1 and

ddlanguage in r_lang.

endif.

thanks

Former Member
0 Kudos

Hi Navketan,

Write your select query like this :

data: 
  t_text type table of AS4TEXT.
if not select1 is initial.
select ddtext
  from dd03t 
   into table t_text
where fieldname = select1
and ddlanguage = 'E'
  or ddlanguage = 'F'.
endif.

All the texts maintained in English and French languages would be captured in t_text table.

Regards,

Swapna.

Former Member
0 Kudos

hi,

i am appriciate for ur efforts

0 Kudos

hi,

Execute this program this one will work correctly wat u want....

type-pools: slis.

TABLES: DFIES,X030L,DD03T.

DATA: X_FIELDCAT TYPE SLIS_FIELDCAT_ALV,

IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,

L_LAYOUT TYPE SLIS_LAYOUT_ALV.

types: begin of ty_dd03,

fieldname type FIELDNAME,

desc_1 type AS4TEXT,

desc_2 type AS4TEXT,

end of ty_dd03.

data: it_dd03 type standard table of ty_dd03,

wa_dd03 type ty_dd03.

DATA: BEGIN OF INTTAB OCCURS 100.

INCLUDE STRUCTURE DFIES.

DATA: END OF INTTAB.

DATA: BEGIN OF INTTAB_1 OCCURS 100.

INCLUDE STRUCTURE DFIES.

DATA: END OF INTTAB_1.

DATA:WA_INTTAB_1 TYPE DFIES.

PARAMETERS: TABLENM TYPE DD03T-TABNAME ."DDOBJNAME OBLIGATORY . "DEFAULT, "'MSEG',

parameter: p_lang TYPE TSTCT-SPRSL OBLIGATORY."DD03T-DDLANGUAGE OBLIGATORY. "DEFAULT. "'MENGE'.

call function 'DDIF_FIELDINFO_GET'

exporting

tabname = TABLENM

  • FIELDNAME = FIELDNM

LANGU = p_lang

  • LFIELDNAME = ' '

  • ALL_TYPES = ' '

  • IMPORTING

  • X030L_WA = WATAB

  • DDOBJTYPE =

  • DFIES_WA =

  • LINES_DESCR =

TABLES

DFIES_TAB = INTTAB

  • FIXED_VALUES =

EXCEPTIONS

NOT_FOUND = 1

INTERNAL_ERROR = 2

OTHERS = 3.

p_lang = 'EN'.

**

call function 'DDIF_FIELDINFO_GET'

exporting

tabname = TABLENM

  • FIELDNAME = FIELDNM

LANGU = p_lang

  • LFIELDNAME = ' '

  • ALL_TYPES = ' '

  • IMPORTING

  • X030L_WA = WATAB

  • DDOBJTYPE =

  • DFIES_WA =

  • LINES_DESCR =

TABLES

DFIES_TAB = INTTAB_1

  • FIXED_VALUES =

EXCEPTIONS

NOT_FOUND = 1

INTERNAL_ERROR = 2

OTHERS = 3.

X_FIELDCAT-FIELDNAME = 'FIELDNAME'.

X_FIELDCAT-TABNAME = 'IT_DD03'.

X_FIELDCAT-OUTPUTLEN = 10.

X_FIELDCAT-SELTEXT_L = 'FIELDNAME'.

X_FIELDCAT-NO_ZERO = 'X'.

X_FIELDCAT-COL_POS = 1.

APPEND X_FIELDCAT TO IT_FIELDCAT.

CLEAR X_FIELDCAT.

X_FIELDCAT-FIELDNAME = 'DESC_2'.

X_FIELDCAT-TABNAME = 'IT_DD03'.

X_FIELDCAT-SELTEXT_L = 'FIELD DESCRIPTION'.

X_FIELDCAT-NO_ZERO = 'X'.

X_FIELDCAT-OUTPUTLEN = 60.

X_FIELDCAT-COL_POS = 2.

APPEND X_FIELDCAT TO IT_FIELDCAT.

CLEAR X_FIELDCAT.

X_FIELDCAT-FIELDNAME = 'DESC_1'.

X_FIELDCAT-TABNAME = 'IT_DD03'.

X_FIELDCAT-SELTEXT_L = 'TRANSLATED DESCRIPTION IN FOREIGN LANGUAGE'.

X_FIELDCAT-NO_ZERO = 'X'.

X_FIELDCAT-OUTPUTLEN = 60.

X_FIELDCAT-COL_POS = 3.

APPEND X_FIELDCAT TO IT_FIELDCAT.

CLEAR X_FIELDCAT.

LOOP AT INTTAB.

WA_DD03-FIELDNAME = INTTAB-FIELDNAME.

WA_DD03-DESC_1 = INTTAB-FIELDTEXT.

READ TABLE INTTAB_1 INTO WA_INTTAB_1 WITH KEY FIELDNAME = INTTAB-FIELDNAME.

IF SY-SUBRC EQ 0.

WA_DD03-DESC_2 = WA_INTTAB_1-FIELDTEXT.

ENDIF.

APPEND WA_DD03 TO IT_DD03.

ENDLOOP.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = SY-REPID

IS_LAYOUT = L_LAYOUT

IT_FIELDCAT = IT_FIELDCAT

TABLES

T_OUTTAB = IT_DD03

EXCEPTIONS

PROGRAM_ERROR = 1

OTHERS = 2.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Former Member
0 Kudos

Hi,

Do only one thing.

In the code do not use work area.

Instead use a table to store the values.

You see that, workarea can contain only one value at a time.

SO only one value is selected and gets stored in workarea a.

And don't use single also.

Faulty code.

select single ddtext from

dd03t into a where

fieldname = select1

and ddlanguage in ('E','F').

Use the below code

DATA : begin of i_dd03t occurs 0,

ddtext type as4text,

end of i_dd03t.

Select ddtext

from dd03t

into i_dd03t

where fieldname = select1

and ddlanguage in ('E','F').

        • Now the table i_dd03t will contain the ddtext in two languages

Thanks