09-12-2013 2:46 PM
Hi Experts,
I want to change the field length to 80, if the logon language is Russia(RU) in module pool programming. For other languages it should be 40.
Thanks.
09-13-2013 5:32 AM
Create two input fields one with 80 and other with 40.In the PBO event of that screen
loop at screen.
if-sy-langu = ru.
screen-invisible = 1.for 40 lenghth field.
else
screen-invisible = 1 . for 80 length field
endif.
endloop.
09-13-2013 5:42 AM
Hi,
I think that is only possible using two different fields on the dynpro, and only one of them is visible depending on your logon language sy-langu. You can use screen-groups for that. You need a LOOP AT SCREEN in a PBO module for that.
Regards,
Klaus
09-13-2013 6:13 AM
Hi,
It think it is not possible for changing field length for a particular filed, you can follow as suggested by Klaus Babl.
See this link it will be helpful http://wiki.scn.sap.com/wiki/display/Snippets/Module+Pool+Notes
09-13-2013 6:56 AM
Hi,
You can do :
1. Use different fields and making 1 visible at a time according to the need.
2. Set the input type of text field to STRG which will allow the field to get variable length input. Then add a check module for the field in PAI of screen where you can write a code to restrict the length of the input by using STRLEN.
Logic :
When language Russian and STRLEN > 80
discard chars after 80 length.
When other language and STRLEN > 40
discard chars after 40 length.
Regards,
Ashish Rawat