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

column attributes on screen

Former Member
0 Likes
400

hello!

is it possible to build a screen with table control,

and to load data into the screen table in display mode

where the screen-input = 0, and to be able to scroll down the table.

the problem is that the table has 12 lines and i can see

in display mode only 9 lines without posebility to scroll down.

i am addin the screen code.

regards

yifat

PROCESS BEFORE OUTPUT.

MODULE STATUS_0100.

MODULE GET_ZTABLE.

MODULE GET_COL_ATTRIBUTES.

LOOP AT ZDATA

WITH CONTROL ZZP2

CURSOR ZZP2-CURRENT_LINE.

MODULE ZZP2_GET_LINES.

ENDLOOP.

PROCESS AFTER INPUT.

  • PAI FLOW LOGIC FOR TABLECONTROL 'ZZP2'

LOOP AT ZDATA.

CHAIN.

FIELD ZDATA-NUMDT.

FIELD ZDATA-VERSION.

FIELD ZDATA-VERS_TEXT.

FIELD ZDATA-VERDT.

FIELD ZDATA-TYPEMER.

MODULE ZZP2_MODIFY ON CHAIN-REQUEST.

ENDCHAIN.

FIELD ZDATA-CNT

MODULE ZZP2_MARK ON REQUEST.

ENDLOOP.

MODULE ZZP2_USER_COMMAND.

MODULE USER_COMMAND_0100.

**********************************

MODULE STATUS_0100 OUTPUT.

SET PF-STATUS '100'.

SET TITLEBAR '100'.

ENDMODULE.

MODULE GET_ZTABLE OUTPUT.

  • REFRESH ZDATA.

numdt = 0.

SELECT * FROM ZTABLE where matnr = par1.

IF SY-SUBRC = 0.

numdt = numdt + 1.

move numdt to zdata-numdt.

move ztable-version to zdata-version.

move ztable-VERS_TEXT to zdata-VERS_TEXT.

move ztable-verdt to zdata-VERDT.

move ztable-TYPEMER to zdata-TYPEMER.

APPEND ZDATA .

ENDIF.

ENDSELECT.

MODIFY SCREEN.

ENDMODULE. " GET_ZTABLE OUTPUT

MODULE ZZP2_GET_LINES OUTPUT.

G_ZZP2_LINES = SY-LOOPC.

ENDMODULE.

MODULE get_col_attributes OUTPUT.

LOOP AT ZZP2-COLS INTO COL.

COL-SCREEN-INPUT = '0'.

MODIFY ZZP2-COLS FROM COL.

ENDLOOP.

ENDMODULE. " get_col_attributes OUTPUT

MODULE ZZP2_MODIFY INPUT.

MODIFY ZDATA

INDEX ZZP2-CURRENT_LINE.

ENDMODULE.

MODULE ZZP2_USER_COMMAND INPUT.

OK_CODE = SY-UCOMM.

PERFORM USER_OK_TC USING 'ZZP2'

'ZDATA'

'CNT'

CHANGING OK_CODE.

ENDMODULE.

FORM USER_OK_TC USING P_TC_NAME TYPE DYNFNAM

P_TABLE_NAME

P_MARK_NAME

CHANGING P_OK LIKE SY-UCOMM.

-BEGIN OF LOCAL DATA----


DATA: L_OK TYPE SY-UCOMM,

L_OFFSET TYPE I.

-END OF LOCAL DATA----


  • Table control specific operations *

  • evaluate TC name and operations *

SEARCH P_OK FOR P_TC_NAME.

IF SY-SUBRC <> 0.

EXIT.

ENDIF.

L_OFFSET = STRLEN( P_TC_NAME ) + 1.

L_OK = P_OK+L_OFFSET.

  • execute general and TC specific operations *

CASE L_OK.

WHEN 'P--' OR "top of list

'P-' OR "previous page

'P+' OR "next page

'P++'. "bottom of list

PERFORM COMPUTE_SCROLLING_IN_TC USING P_TC_NAME

L_OK.

ENDCASE.

ENDFORM. " USER_OK_TC

MODULE USER_COMMAND_0100 INPUT.

CASE OK_CODE.

WHEN 'CAN'.

SET SCREEN '0'.

LEAVE SCREEN.

ENDCASE.

*

ENDMODULE. " USER_COMMAND_0100 INPUT

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
357

did u set the no of lines to be displayed in table control

In PBO u set

<table control>-LINES = 12.

and if u have more than 12 records in itab u can see the scroll bar automatically.

regards

gv

1 REPLY 1
Read only

Former Member
0 Likes
358

did u set the no of lines to be displayed in table control

In PBO u set

<table control>-LINES = 12.

and if u have more than 12 records in itab u can see the scroll bar automatically.

regards

gv