12-23-2014 7:37 AM
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
12-23-2014 7:40 AM
Hi,
sy-langu is the one which holds system language. You can refer this.
12-23-2014 7:45 AM
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'.
12-23-2014 7:48 AM
Hi,
If you want to restrict it for few statements only for language,
if sy-langu = 'EN',
....
endif.
12-23-2014 7:42 AM
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?
12-23-2014 8:10 AM
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
12-23-2014 9:29 AM
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.
12-24-2014 6:20 AM
Hi Ethan Hunt
The text passed in perform routine is Text-symbols ??
like below
perform 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.