Application Development and Automation 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: 
Read only

question about dialog screen element

Former Member
0 Likes
523

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.

4 REPLIES 4
Read only

Former Member
0 Likes
501

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

Read only

0 Likes
501

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?

Read only

0 Likes
501

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

Read only

0 Likes
501

yes,it's right.I also find it.thanks a lot