Application Development 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: 

ALV Grid display in the middle of window

Former Member
0 Kudos

Hi all,

When I m refering to the past queries in the forum I read that specifying these values

I_SCREEN_START_COLUMN

I_SCREEN_START_LINE

I_SCREEN_END_COLUMN

I_SCREEN_END_LINE in the FM reuse_alv_grid_display

we can display the output of alv in the middle of the window. But when I specify these values a new window is popped up in which the o/p of ALV is displayed. Actually what is the significance of thses values ? If I want to display in the middle of the window but not in a new window, so what should I do for this.

Regards,

Vijay.

1 ACCEPTED SOLUTION

former_member186741
Active Contributor
0 Kudos

but it does control the positioning of the report. I don't understand how it can't be working for you. Maybe you have got two calls to the alv function module?..one in User_command to show another report??

Please post your code for us to check out.

4 REPLIES 4

former_member186741
Active Contributor
0 Kudos

but it does control the positioning of the report. I don't understand how it can't be working for you. Maybe you have got two calls to the alv function module?..one in User_command to show another report??

Please post your code for us to check out.

0 Kudos

Hi Neil,

REPORT Z_ALV_CHANGEHEADER.

type-pools slis.

data : begin of itab occurs 0 ,

carrid like sflight-carrid,

connid like sflight-connid,

fldate like sflight-fldate,

end of itab.

select carrid connid fldate from sflight into corresponding fields

of table itab.

data : i_fieldcat type slis_t_fieldcat_alv.

data : wa_fieldcat type slis_fieldcat_alv.

wa_fieldcat-row_pos = 0.

wa_fieldcat-col_pos = 1.

wa_fieldcat-fieldname = 'CARRID'.

wa_fieldcat-tabname = 'ITAB'.

wa_fieldcat-SELTEXT_L = 'Carrier Id'.

append wa_fieldcat to i_fieldcat.

clear wa_fieldcat.

wa_fieldcat-row_pos = 0.

wa_fieldcat-col_pos = 2.

wa_fieldcat-fieldname = 'CONNID'.

wa_fieldcat-tabname = 'ITAB'.

wa_fieldcat-SELTEXT_L = 'Connection Id'.

append wa_fieldcat to i_fieldcat.

clear wa_fieldcat.

wa_fieldcat-row_pos = 0.

wa_fieldcat-col_pos = 3.

wa_fieldcat-fieldname = 'FLDATE'.

wa_fieldcat-tabname = 'ITAB'.

wa_fieldcat-SELTEXT_L = 'Flight Date'.

append wa_fieldcat to i_fieldcat.

clear wa_fieldcat.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

  • I_INTERFACE_CHECK = ' '

  • I_BYPASSING_BUFFER = ' '

  • I_BUFFER_ACTIVE = ' '

I_CALLBACK_PROGRAM = 'Z_ALV_CHANGEHEADER'

  • I_CALLBACK_PF_STATUS_SET = ' '

  • I_CALLBACK_USER_COMMAND = ' '

  • I_CALLBACK_TOP_OF_PAGE = ' '

  • I_CALLBACK_HTML_TOP_OF_PAGE = ' '

  • I_CALLBACK_HTML_END_OF_LIST = ' '

  • I_STRUCTURE_NAME =

  • I_BACKGROUND_ID = ' '

  • I_GRID_TITLE =

  • I_GRID_SETTINGS =

  • IS_LAYOUT =

IT_FIELDCAT = i_fieldcat

  • IT_EXCLUDING =

  • IT_SPECIAL_GROUPS =

  • IT_SORT =

  • IT_FILTER =

  • IS_SEL_HIDE =

  • I_DEFAULT = 'X'

  • I_SAVE = ' '

  • IS_VARIANT =

  • IT_EVENTS =

  • IT_EVENT_EXIT =

  • IS_PRINT =

  • IS_REPREP_ID =

I_SCREEN_START_COLUMN = 30

I_SCREEN_START_LINE = 10

I_SCREEN_END_COLUMN = 90

I_SCREEN_END_LINE = 70

  • IT_ALV_GRAPHICS =

  • IT_HYPERLINK =

  • IT_ADD_FIELDCAT =

  • IT_EXCEPT_QINFO =

  • I_HTML_HEIGHT_TOP =

  • I_HTML_HEIGHT_END =

  • IMPORTING

  • E_EXIT_CAUSED_BY_CALLER =

  • ES_EXIT_CAUSED_BY_USER =

TABLES

t_outtab = itab

  • EXCEPTIONS

  • PROGRAM_ERROR = 1

  • OTHERS = 2

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

I have posted my code . Please check and tell me where I have gone wrong.

Regards,

Vijay.

0 Kudos

Hi Vijay,

I think it worked but just looked a bit odd. Your end line was off the page.

Try using this instead:

I_SCREEN_START_COLUMN = 5

I_SCREEN_START_LINE = 10

I_SCREEN_END_COLUMN = 90

I_SCREEN_END_LINE = 20

0 Kudos

Hi Neil,

Thank you very much.

Regards,

Vijay