2007 Apr 17 8:01 AM
HI all,
I have a problem to make the dialog screen element dynamicly.for example, there is a text field 'test01' and the text is 'test01' ,and a button 'but01' on the screen.when i click the button , the text can be changed to 'test02'. Is there any fonction to execute it?
waiting for ur answers,Thanks a lot.
HI all,
I have a problem to make the dialog screen element dynamicly.for example, there is a text field 'test01' and the text is 'test01' ,and a button 'but01' on the screen.when i click the button , the text can be changed to 'test02'. Is there any fonction to execute it?
waiting for ur answers,Thanks a lot.
2007 Apr 17 8:04 AM
Hi,
for the button, you have an function code. use the below code, this code code should be in PAI
IF SY-UCOMM = 'BUT'.
if test01 = 'test01'.
test01 = 'test02'.
enidf.
ENDIF.Regards
Sudheer
2007 Apr 17 8:18 AM
the question is i can't get the fields text01,but the screen-name = 'text01'.and how the code
IF text01 = 'test01'.
text01 = 'test02'.
enidf.
executed?
2007 Apr 17 10:21 AM
Instead of creating the dynamic element on the screen as text, create it as an input/output field. You can then code the text as follows:
IF field1 IS INITIAL.
field1 = 'Text1'.
ELSE.
field1 = 'Text2'.
ENDIF.
To make the input/output field look like a text label, you can set it to 'Display only' and '2D display' in the screen properties.
Hope this helps.
Sudha
2007 Apr 17 10:38 AM