Application Development 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: 

HR ABAP: LOOP AT SCREEN: Multiple Fields Disabling.

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

Thanks one and all!

Got the solution

Points rewarded...

Thanks again.

Cheerz

Sundar.

former_member223537
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

&----


*

*& 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!

Former Member
0 Kudos

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.

0 Kudos

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.