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

HR ABAP: LOOP AT SCREEN: Multiple Fields Disabling.

Former Member
0 Likes
3,214

Experts,

Am a new member in the world of SAP ABAP!

Need ur advice regarding.

Have coded following for disabling a field in PBO based on subtypes.

IF p9235-subty = GC_AICTD.

IF screen-name = 'P9235-ZZ_RC_MDE'.

screen-active = 0.

MODIFY SCREEN.

ENDIF.

ENDIF.

This disables the particular field mentioned in the screen name.

If i want more than on field names to be disabled under single validation, then what should i do?

Your help to this fresher would be appreciated!

Points will be definitely rewarded for your help and time...

Thank you.

Sundar.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,301

Hi

use as

IF p9235-subty = GC_AICTD.

loop at screen.

IF<b> ( screen-name = 'P9235-ZZ_RC_MDE' or screen-name = 'field1' or

screen-name = 'field2' or screen-name = 'field3' ).</b>screen-active = 0.

MODIFY SCREEN.

ENDIF.

endloop.

ENDIF.

Reward points if useful

Regards

Anji

Message was edited by:

Anji Reddy Vangala

6 REPLIES 6
Read only

Former Member
0 Likes
1,302

Hi

use as

IF p9235-subty = GC_AICTD.

loop at screen.

IF<b> ( screen-name = 'P9235-ZZ_RC_MDE' or screen-name = 'field1' or

screen-name = 'field2' or screen-name = 'field3' ).</b>screen-active = 0.

MODIFY SCREEN.

ENDIF.

endloop.

ENDIF.

Reward points if useful

Regards

Anji

Message was edited by:

Anji Reddy Vangala

Read only

0 Likes
1,301

Thanks one and all!

Got the solution

Points rewarded...

Thanks again.

Cheerz

Sundar.

Read only

Former Member
0 Likes
1,301

In the PBO

IF p9235-subty = GC_AICTD.

<b>LOOP AT SCREEN.</b>

IF screen-name = 'P9235-ZZ_RC_MDE'<b> or</b><b> screen-name = 'P_FIELD2' or

screen-name = 'P_FIELD3'.</b>

screen-active = 0.

MODIFY SCREEN.

ENDIF.

<b>ENDLOOP.</b>

ENDIF.

Read only

Former Member
0 Likes
1,301

&----


*

*& Module display OUTPUT

&----


  • text

----


MODULE display OUTPUT.

*break-point.

loop at screen.

if create = 'X'.

if screen-group1 = 'XXX'.

screen-input = 1.

modify screen.

endif.

endif.

if display = 'X'.

if screen-group2 = 'YYY'.

screen-input = 0.

modify screen.

endif.

endif.

endloop.

ENDMODULE. " display OUTPUT

but declare the group!

Read only

Former Member
0 Likes
1,301

if u want more fileds to be disabled then

write other filds names in the same code

IF p9235-subty = GC_AICTD.

IF screen-name = 'P9235-ZZ_RC_MDE'.

screen-name2

screen name3.

screen-active = 0.

MODIFY SCREEN.

ENDIF.

ENDIF.

Read only

0 Likes
1,301

ELSEIF E does not fall. Active is happening but not passive

LOOP AT SCREEN.

         IF screen-name EQ 'TXT1' OR

            screen-name EQ 'TXT2' OR

            screen-name EQ 'TXT3' OR

            screen-name EQ 'TXT4'.

           IF screen-input EQ 0.

             screen-input = 1.

           ELSEIF screen-input EQ 1.

             screen-input = 0.

           ENDIF.

           MODIFY SCREEN.

         ENDIF.

       ENDLOOP.