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: 

Languages in perform

former_member183164
Active Participant
0 Kudos

Hello,

I have worked on date indicator with using perform, I thought of improve it by using the ‘EN’ language entry in the perform for all the formatting needs and only use the native language entry for the text.This will avoid issue if a customer only partially translated some fields. This way at least the EN language value would be used as default.

I am bit confused about using 'EN' in PERFORM (FORM) and I haven`t worked on that.

So any idea of how to make this work in better way?

Regards,

EH

7 REPLIES 7

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

sy-langu is the one which holds system language. You can refer this.

0 Kudos

Hi,

thanks for the reply.

I know the sy-langu is have a  default logon language of the user.

But, I haven`t used any Select statement in my PERFORM, where i can make langu = sy-langu  or langu = 'EN'.

0 Kudos

Hi,

If you want to restrict it for few statements only for language,

if sy-langu = 'EN',

....

endif.

archanapawar
Contributor
0 Kudos

Hi Ethan,

Your question is not clear. What you need to improve using language?

Are you talking about reports or smartforms? What exactly you are trying to achieve?

former_member188724
Contributor
0 Kudos

Hi Ethan,

You can check for sy-langu initially and if it is 'E' set a flag.

Use this flag in perform.

This is what I understand from your requirement. if not do let me know.

Hope this helps.

Rgds,

K.S

former_member183164
Active Participant
0 Kudos

Hi all,

Sorry for late reply.. Got stuck in other implementation

Well, its seems to be silly, but I couldn`t push further of my thinking for the new improvement.

Here is the subroutine.

FORM build_lst_table_dats USING  p_len     TYPE any

                                   p_stxt    TYPE any

                                   p_fnam    TYPE any

                                   "p_curr    TYPE any

                                   p_hotspot TYPE any.

   DATA: lst_tab LIKE field_cat.

   DESCRIBE TABLE field_lst LINES sy-tfill.

   IF sy-tfill = 0.

     field_pos = 1.

   ELSE.

     ADD 1 TO field_pos.

   ENDIF.

   lst_tab-outputlen = p_len.

   lst_tab-col_pos   = field_pos.

   lst_tab-coltext = p_stxt.

   lst_tab-hotspot   = p_hotspot.

   lst_tab-fieldname = p_fnam.

*  lst_tab-cfieldname = p_curr.

   lst_tab-datatype = 'DATS'.

*  lst_tab-just      = 'R'.

   IF field_pos = 1 OR field_pos = 2.

     lst_tab-fix_column = 'X'.

   ENDIF.

   APPEND lst_tab TO field_lst.

ENDFORM.

Here I thought of providing all formatting IF the language is ENGLISH.... and Native language(sy-langu) for entry of the TEXT.

0 Kudos

Hi

build_lst_table_dats USING  P_LEN    TYPE any

                                                                Text-c01 TYPE any

                                   p_fnam    TYPE any

                                   "p_curr    TYPE any

                                   p_hotspot TYPE any.