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

Making a subscreen field Open for editing

Former Member
0 Likes
1,127

HI experts.

Now I have one Tab strip screen on a main screen. Main screen number is 1000. and tab screen numbers are 1001,1002

I need to check for some values comparing 3 fields A, B , C from 1000 screen and 2 fields from 1001 D, E .

if the check fails then one error message will be displayed but at time all the 5 fields 3 fields of the main screen 1000 and 2 fields of the screen 10001 needs to be open for editing .

I have applied the check in 1000 input screen

CHAIN .

FIELD : A, B,C,

Module Check.

ENDCHAIN.

this is working fine for the 3 fields on the 1000 screen but D,E fields present on the 1001 sub screen will be input off .

but my need is to make all 5 fields A,B, C , D, E Input enabled .

is there any way we can make this input enabled from the main screen while issuing the error message or in otehr words can access the fields of subscreen in chain and endchain from the main screen.

1 ACCEPTED SOLUTION
Read only

Sandra_Rossi
Active Contributor
0 Likes
792

Don't use CHAIN and FIELD.

Just MODULE alone.

3 REPLIES 3
Read only

Sandra_Rossi
Active Contributor
0 Likes
793

Don't use CHAIN and FIELD.

Just MODULE alone.

Read only

0 Likes
792

Hi Sandra Rossi ,

If I remove Chain Endchain and write only module

In that case also How it is going to make the Subscreen fields Input enabled ?

Because the field statement is not recognising D, E fields as they have been declared on the sub screen not on the

main screen is there any way to access the fields of subscreen from Main screen PAI ?

Read only

0 Likes
792

My bad. Sorry, I always forget how that really works.

Without CHAIN and FIELD, all fields get protected. I think this is the SAP screen logic, and I advise to not go against it.

But, if you really want a workaround, you can fool SAP like that:


DATA errorfield TYPE fieldname.

MODULE PBO INPUT.
  IF errorfield IS NOT INITIAL.
  SET CURSOR FIELD errorfield.
  LOOP AT SCREEN.
    IF screen-name = errorfield.
      screen-intensified = 1.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.
  ENDIF.
ENDMODULE.

MODULE PAI INPUT.
  MESSAGE s100(00) DISPLAY LIKE 'E'. "error-like message
  errorfield = 'FIELDNAME'.
  LEAVE TO SCREEN sy-dynnr. "go directly at end of PAI
ENDMODULE.