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 modification

Former Member
0 Likes
649

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
618

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

5 REPLIES 5
Read only

Former Member
0 Likes
618

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'.

Read only

Former Member
0 Likes
618

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

Read only

Former Member
0 Likes
618

Hi,

use capital letters for the tcodes mentioned inbetween single quotes.

thanks,

sksingh

Read only

Former Member
0 Likes
619

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

Read only

Former Member
0 Likes
618

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>