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

screen printer

Former Member
0 Likes
1,546

HI

in screen printer i have created some input/output field. i want make these fields output field when i press display button in my program . how to do this.

12 REPLIES 12
Read only

former_member196280
Active Contributor
0 Likes
1,348

goto screen painter and double click on the field you want to change the properties, on the pop-up of properties window uncheck input/output check box and tick output check box..now field will be available only in display mode.

If you want to do it dynamically, during run time use LOOP AT SCREEN.

***INPUT

ENDLOOP.

regards,

Sairam

Read only

0 Likes
1,348

Hi sai ram.

i want this fields as output field only when i press DISPLAY button.

Read only

0 Likes
1,348

write it in PAI event...

Using your OK_code

LOOP AT SCREEN.

IF Screen-name = <FIELD NAME>

Screen-input = 0.

ENDIF.

ENDLOOP.

Regards,

Sairam

Read only

Former Member
0 Likes
1,348

see example programs

transcation

abapdocu see example programs

Read only

Former Member
0 Likes
1,348

Hi

Write the code in PAI and see

case ok_code.

When 'DISP'.

loop at screen.

if screen-name = <field name>.

screen-input = 0.

endif.

modify screen.

endloop.

endcase.

<b>Reward points for useful Answers</b>

Regards

Anji

Read only

0 Likes
1,348

Hi ANJI

its giving error.

Statement "CASE" is not defined. Check your spelling.

Read only

0 Likes
1,348

Hi,

Write the case OK_CODE inside the PAI module.

For this u have to define u r OK_CODE in u r program and place it in the screen elements.

Regards,

Sankar

Read only

0 Likes
1,348

HI!

Write down in Screen painter under statement

PROCESS AFTER INPUT.

statement

MODULE USER_COMMAND.

Write down in main program code follow statements.

module user_command input.

case ok_code.

When 'DISP'.

loop at screen.

if screen-name = <field name>.

screen-input = 0.

endif.

modify screen.

endloop.

endcase.

endmodule.

Best regards,

Antoshkin Vitaly.

Read only

0 Likes
1,348

Thanks to all .

But am still getting runtime error.

Unable to interpret "OK_CODE " as a number

am using CASE SY-UCOMM statement.

Read only

Former Member
0 Likes
1,348

Hi Prajwal,

Go to se51 and where you have defined your Input/Output field, just double click on it. you will see the Screen painter-Attributes window appear on the screen. There go to the last block named 'Atrributes' and select the tab 'Program'. There select the checkbox 'Output only'. This will make your field as display only and will not allow the user to enter any input values in the same.

You can repeat the same process for any other I/O fiel which you want to make a display field.

Read only

former_member196299
Active Contributor
0 Likes
1,348

hi ..

use this logic in the PAI :

case sy-ucomm .

when

loop at screen .

if screen-name = 'SCREEN-FIELD'.

screen-input = 0.

endif.

endloop .

modify screen .

endcase .

This whould help you out .

Regards,

Ranjita

Read only

Former Member
0 Likes
1,348

Hi Prajwal,

to make input/output field; it deals in PBO section of a screen not in PAI.

in PAI check the user command of display button and make a flag (ws_disp_flag) eq x.

write this piece of code in module of PBO event

<b>

if ws_disp_flag = 'X'

loop at screen.

if screen-name = 'XYZ'.

screen-input = 0.

endif.

modify screen.

endloop.

endif.</b>

do not forget to clear this flag anywhere it is suitable.

Regards,

Krishnendu