‎2007 Apr 16 12:49 PM
Hi,
I am designing a table control related with screen exit. It is having 5 fields, among that 4 are only for output and one field is both input and output. when the tcode is va03 or va23 that one field also to be in only display mode. for that i have written the following logic in PBO.
IF sy-tcode EQ va03 OR
sy-tcode EQ 'VA23'.
LOOP AT SCREEN .
IF screen-name EQ 'I_CUSTOM-FIELD5'8'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
But it is not working.
Can anybody tell me what is the problem and how to ressolve that. If any body having logic please provide me.
Thanks in advance,
Vivek.
‎2007 Apr 16 1:05 PM
hi
<b>refer to the following code</b>
i used it in my project and it worked fine,<b>so it will definitely work for u</b>
MODULE status_1012 OUTPUT.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
checking the value of g_ok_code.
on pressing of display button make the fields inactive.
IF g_ok_code = 'PB_DISPLAY'.
DATA: sl_cols LIKE LINE OF schedule_lines-cols.
LOOP AT SCREEN.
screen-input = 0.
MODIFY SCREEN.
ENDLOOP.
LOOP AT schedule_lines-cols INTO sl_cols .
sl_cols-screen-input = '0'.
MODIFY schedule_lines-cols FROM sl_cols .
ENDLOOP.
ELSE.
DESCRIBE TABLE it_scd_lines LINES schedule_lines-lines.
ENDIF.
ENDMODULE. " STATUS_1012 OUTPUT
<b>plz rewqard points if helpful</b>
regards
ravish
‎2007 Apr 16 12:51 PM
IF sy-tcode EQ va03 OR
sy-tcode EQ 'VA23'.
enclose va03 in single quotes with caps as shown below
IF sy-tcode EQ <b>'VA03</b>' OR
sy-tcode EQ 'VA23'.
‎2007 Apr 16 12:53 PM
Hi,
Inmstead of the Screen Name, use the Screen-Group and add one more if condition.
LOOP AT SCREEN .
IF screen-GROUP EQ 'GRP1'.
IF SCREEN-FIELD = 'That 5th Field'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.Regards
Sudheer
‎2007 Apr 16 1:03 PM
Hi,
use capital letters for the tcodes mentioned inbetween single quotes.
thanks,
sksingh
‎2007 Apr 16 1:05 PM
hi
<b>refer to the following code</b>
i used it in my project and it worked fine,<b>so it will definitely work for u</b>
MODULE status_1012 OUTPUT.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
checking the value of g_ok_code.
on pressing of display button make the fields inactive.
IF g_ok_code = 'PB_DISPLAY'.
DATA: sl_cols LIKE LINE OF schedule_lines-cols.
LOOP AT SCREEN.
screen-input = 0.
MODIFY SCREEN.
ENDLOOP.
LOOP AT schedule_lines-cols INTO sl_cols .
sl_cols-screen-input = '0'.
MODIFY schedule_lines-cols FROM sl_cols .
ENDLOOP.
ELSE.
DESCRIBE TABLE it_scd_lines LINES schedule_lines-lines.
ENDIF.
ENDMODULE. " STATUS_1012 OUTPUT
<b>plz rewqard points if helpful</b>
regards
ravish
‎2007 Apr 16 1:07 PM
sorry i forgot to tell u
define controls as following
<b>CONTROLS: schedule_lines TYPE TABLEVIEW USING SCREEN '1012'."table control</b>
ergards
ravish
<b>plz reward points if helpful</b>