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: 

To Make screen feild read only in SUBSCREEN

Former Member
0 Kudos

Hi All,

In a module pool program have declared a screen using "selection screen begin...... as subscreen" syntax in the top include. Now please note that this is a subscreen inside a screen but declared like report and not using screen painter.

Now I have to make 1 feild of it as input only, but I am unable to modify the feild of the subscreen using syntax "loop at screen" because it applies the loop at the main screen and not at the sub screen.

Can somebody suggest me syntax for that.

Best Regards,

Chandan Dubey

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

In the attributes tab of the screen layout,Choose Input as Not possible option.

Regards,

Rama.

7 REPLIES 7

Former Member
0 Kudos

Hi,

Write the loop at screen logic in the PBO event of the subscreen

regards

padma

0 Kudos

That SUBSCREEN is getting generated automatically as I am declaring the subscreen in the top include by following syntax -

SELECTION-SCREEN BEGIN OF SCREEN 1100 AS SUBSCREEN.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-100.

PARAMETERS:

SELECT-OPTIONS:

SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN END OF SCREEN 1100.

So it is not possible to write anything in the PBO or PAI of subscreen 1100.

Please suggest.

0 Kudos

see it is possible to do that in the screen where you are calling the subscreen( i mean in the screen where you are calling the subscreen).

PBO

call subscreen etc... <---here you will cal the subscreen

MODULE MODIFY_SCREEN. "<--here you will modify the screen properies.

in the Module you can do loop at screen and modify.

0 Kudos

Actually I tried doinfg this.... but statement "loop at screen" puts a loop at the main screen but not at the subscreen. So i can modify the fields of the main screen but not that of the subscreen (which i have defined in the top include)..

problem is a bit difficult I guess

yes, it is possible to do it in the at slection-screen output event.

REPORT  ztest_sub.

SELECTION-SCREEN BEGIN OF SCREEN 1100 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-100.

PARAMETERS: p_matnr TYPE matnr.

SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN END OF SCREEN 1100.


AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF screen-name cs 'P_MATNR'.
      screen-input = 0.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

START-OF-SELECTION.

  CALL SCREEN 100.
*&---------------------------------------------------------------------*
*&      Module  STATUS_0100  OUTPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE status_0100 OUTPUT.
  SET PF-STATUS 'YYY'.

ENDMODULE.                 " STATUS_0100  OUTPUT
*&---------------------------------------------------------------------*
*&      Module  USER_COMMAND_0100  INPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE user_command_0100 INPUT.
  IF sy-ucomm EQ 'BACK'.
    LEAVE TO SCREEN 0.
  ENDIF.
ENDMODULE.                 " USER_COMMAND_0100  INPUT

flow logic.

PROCESS BEFORE OUTPUT.
  CALL SUBSCREEN sub INCLUDING sy-repid '1100'.
  MODULE status_0100.
*
PROCESS AFTER INPUT.
  MODULE user_command_0100.

this is working for me check it once from your side.

Former Member
0 Kudos

Hi,

In the attributes tab of the screen layout,Choose Input as Not possible option.

Regards,

Rama.

ABAPMarty
Participant
0 Kudos

Thanks Vijay Dudla,

12 years later I couldn't gt my code to work until I spotted the event block you were using! I was using "initialization".

AT SELECTION-SCREEN OUTPUT.

Appreciate the comment.

Regards, Martin.