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

Loop at screen

Former Member
0 Likes
705

In My screen there are five fields..I am using loop at screen concept while i need to make disable a particular field based on some conditions..

Is there any other method is there to make a field invisible,disable with out using the loop at screen and endloop..

becoz its taking time,performance hit is coming..

6 REPLIES 6
Read only

Former Member
0 Likes
677

Hello Mahesh,

there is no other way making fields invisible with out loop.

Coming to performace, it won't take that much time because, consider you have 5 select options. then loop will excute 15 times ((fieldname, low and high)*3).

Reward if helpful.

Regards

--

Sasidhar Reddy Matli.

Read only

Former Member
0 Likes
677

are you sure loop at screen is taking time? i dont think that shud cause any problem!!can u paste ur code here??

did u try checking ur program through se30 and st05?

regards,

madhu

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
677

no chance of error in at sele output..

send that code

Read only

0 Likes
677

loop at screen should not be time consuming...

Please check your code where you are validating the selections .

Send us your code, We can help you further .

Cheers,

Sugopa

Read only

Former Member
0 Likes
677

Hi Mahesh,

Try assigning the selection screens in groups .

Look at the below code this may help you.

FORM modify_screen  USING    in_group1
                             in_active
                             in_invisible
                    CHANGING io_screen.
  IF screen-group1 EQ in_group1.
    screen-active = in_active.
    screen-invisible = in_invisible.
    MODIFY SCREEN.
  ENDIF.

ENDFORM.  
LOOP AT SCREEN.
    IF g_movement EQ c_unun OR g_movement EQ c_qiqi.
      PERFORM modify_screen USING 'MA1' '0' '1'
                            CHANGING screen.
      PERFORM modify_screen USING 'MA2' '0' '1'
                            CHANGING screen.
      PERFORM modify_screen USING 'QA1' '0' '1'
                            CHANGING screen.
      PERFORM modify_screen USING 'QA2' '0' '1'
                            CHANGING screen.
      PERFORM modify_screen USING 'QA4' '0' '1'
                            CHANGING screen.
    ENDIF.

    IF g_movement EQ c_unqi OR g_movement EQ c_qiun.

      PERFORM modify_screen USING 'MA1' '1' '0'
                            CHANGING screen.

      PERFORM modify_screen USING 'MA2' '0' '1'
                            CHANGING screen.

      PERFORM modify_screen USING 'QA1' '0' '1'
                            CHANGING screen.
      PERFORM modify_screen USING 'QA2' '0' '1'
                            CHANGING screen.
      PERFORM modify_screen USING 'QA4' '0' '1'
                            CHANGING screen.
    ENDIF.

    IF g_movement EQ c_unbl OR g_movement EQ c_qibl.
      PERFORM modify_screen USING 'MA1' '1' '0'
                            CHANGING screen.
      PERFORM modify_screen USING 'QA2' '1' '0'
                            CHANGING screen.
      PERFORM modify_screen USING 'QA0' '1' '0'            
                            CHANGING screen.
      PERFORM modify_screen USING 'MA2' '0' '1'
                            CHANGING screen.
      PERFORM modify_screen USING 'QA1' '0' '1'
                            CHANGING screen.
      PERFORM modify_screen USING 'QA4' '0' '1'
                            CHANGING screen.

    ENDIF.

    IF g_movement EQ c_blun OR g_movement EQ c_blqi.

      PERFORM modify_screen USING 'QA1' '1' '0'
                            CHANGING screen.
      PERFORM modify_screen USING 'QA2' '1' '0'
                            CHANGING screen.
      PERFORM modify_screen USING 'QA0' '0' '1'    
                            CHANGING screen.
      PERFORM modify_screen USING 'QA4' '0' '1'
                            CHANGING screen.
    ENDIF.
      PERFORM modify_screen USING 'QA0' '0' '1'
                            CHANGING screen.
      IF v_im_wm = '2' OR v_third_party = '2'.
        PERFORM modify_screen USING 'CHK' '0' '1'
                              CHANGING screen.
      ENDIF.
    ENDIF.
  ENDLOOP.

Read only

Former Member
0 Likes
677

Hi,

There is no other way to enable and disable the selection screen fields based on the condition, we have to use loop at screen method only.

Thanks,

Sriram Ponna.