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

why changes can not have effect?

Former Member
0 Likes
984

hi `

i just want to change the name of the text field, which sets in screen painter, however, there is no effect.

Below is my program.

i made it in PBO .

MODULE status_9000 OUTPUT.

LOOP AT SCREEN .

IF screen-name = 'TEXT1'.

text1 = 'this is text1'.

ENDIF.

IF screen-name = 'TEXT2'.

text2 = 'this is text2'.

ENDIF.

ENDLOOP.

ENDMODULE. " STATUS_9000 OUTPUT

9 REPLIES 9
Read only

Former Member
0 Likes
937

Hi ,

Try using MODIFY statement after loop or values.

Read only

Former Member
0 Likes
937

Hi,

MODULE status_9000 OUTPUT.

LOOP AT SCREEN .

IF screen-name = 'TEXT1'.

text1 = 'this is text1'.

MODIFY SCREEN.

ENDIF.

IF screen-name = 'TEXT2'.

text2 = 'this is text2'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDMODULE. " STATUS_9000 OUTPUT

Pls. reward if useful.....

Read only

ak_upadhyay
Contributor
0 Likes
937

Hi,

Try....


MODULE status_9000 OUTPUT.
LOOP AT SCREEN .
IF screen-name = 'TEXT1'. 
text1 = 'this is text1'.
Modify screen.
ENDIF.
IF screen-name = 'TEXT2'.
text2 = 'this is text2'.
Modify screen.
ENDIF.
ENDLOOP.
ENDMODULE. " STATUS_9000 OUTPUT

Reward points if useful....

Regards

AK

Read only

Former Member
0 Likes
937

Hi,

'loop at screen' will effect on screen fields like active, intensified, etc.

It will not efect on field values.

you can initialize that in initilization event.

example:

initialization.

text1 = 'this is text1'.

text2 = 'this is text2'.

Regards,

Read only

Former Member
0 Likes
937

hi guys`

there is still no effect , when i use the MODIFY statement.

any other helpful aid .

Read only

Former Member
0 Likes
937

both text1 and text2 are not the field included in internal table SCREEN. they are control made in screen painter

Read only

0 Likes
937

You can not control the texts using these loop at screen statements.

You jst have to default the values.

Text1= 'This is text1'.

Text2= 'This is text2'.

Now you can control to display Text1 or Text2 accordingly to ur requirement.

Regards

Gopi

Read only

0 Likes
937

do u mean that i put this default statement

'"Text1 = 'this ..' Text2 = 'this is ...' "

in the PBO without using LOOP and ENDLOOP with the SCREEN , however, there is still no effect.

can you explain clearly`?

thx again

Read only

0 Likes
937

Yes, i meant to default them.

But when do u need Text1 & Text2 on the screen, Do you need both of them at a time??

Or do u need either Text1 or Text2 on the screen (based on condition(s) )

if <cond1>.
  loop at screen.
    if screen-name = 'Text1'.
      screen-input = 0.
      clear text1.
      modify screen.
    endif.
  endloop.
elseif <cond2>.
  loop at screen.
    if screen-name = 'Text2'.
      screen-input = 0.
      clear text2.
      modify screen.
    endif.
  endloop.
endif.

Regards

Gopi