‎2007 Aug 03 8:06 AM
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.
‎2007 Aug 03 8:07 AM
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
‎2007 Aug 03 8:10 AM
Hi sai ram.
i want this fields as output field only when i press DISPLAY button.
‎2007 Aug 03 8:18 AM
write it in PAI event...
Using your OK_code
LOOP AT SCREEN.
IF Screen-name = <FIELD NAME>
Screen-input = 0.
ENDIF.
ENDLOOP.
Regards,
Sairam
‎2007 Aug 03 8:08 AM
see example programs
transcation
abapdocu see example programs
‎2007 Aug 03 8:14 AM
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
‎2007 Aug 03 8:25 AM
Hi ANJI
its giving error.
Statement "CASE" is not defined. Check your spelling.
‎2007 Aug 03 8:33 AM
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
‎2007 Aug 03 8:34 AM
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.
‎2007 Aug 03 9:18 AM
Thanks to all .
But am still getting runtime error.
Unable to interpret "OK_CODE " as a number
am using CASE SY-UCOMM statement.
‎2007 Aug 03 8:18 AM
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.
‎2007 Aug 03 8:29 AM
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
‎2007 Aug 03 8:32 AM
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