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: 

query in alv report output

Former Member
0 Kudos

Hi all,

I am getting the output in proper format i.e,, with good font size but when i take the print out then it is showing me in small font..

my query is that how to increase the font size....and

i am using function module alv_hirarchy

thanks in advance

Regards

Ravi

4 REPLIES 4

vinod_gunaware2
Active Contributor
0 Kudos

Check SPAD transaaction.

and Check printer attach with device type. and that device type support corresponing font or not.

regard

vinod

former_member188685
Active Contributor
0 Kudos

hi,

it depends on how much data you are printing , based on that it tries to fit into the page.if you have large data then obviously the font will be small.

Not sure this can be controlled with any parameters.

Regards

vijay

Former Member
0 Kudos

Hai Ravi Vardhan

Check with the following Code

REPORT ZALV_HIER .

type-pools:slis.

tables: ekko,ekpo.

data:begin of it_ekko occurs 0,

ebeln like ekko-ebeln,

bukrs like ekko-bukrs,

lifnr like ekko-lifnr,

bedat like ekko-bedat,

end of it_ekko.

data: begin of it_ekpo occurs 0,

sno like ekpo-ebeln,

ebelp like ekpo-ebelp,

menge like ekpo-menge,

netwr like ekpo-netwr,

end of it_ekpo.

data v_repid like sy-repid.

data it_fieldcat type slis_fieldcat_alv occurs 0 with header line.

data x_keyinfo type slis_keyinfo_alv.

select-options:s_ebeln for ekko-ebeln.

initialization.

v_repid = sy-repid.

s_ebeln-low = '1000'.

s_ebeln-sign = 'I'.

s_ebeln-option = 'EQ'.

S_ebeln-high = '5000'.

append s_ebeln.

start-of-selection.

perform get_data.

perform get_field.

perform get_key.

perform key_modify.

perform display.

&----


*& Form get_data

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


form get_data.

select ebeln

bukrs

lifnr

bedat

from ekko into table it_ekko." where ebeln in s_ebeln.

select ebeln

ebelp

menge

netwr from ekpo into table it_ekpo." where ebeln in s_ebeln.

endform. " get_data

&----


*& Form get_field

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


form get_field.

call function 'REUSE_ALV_FIELDCATALOG_MERGE'

exporting

i_program_name = v_repid

i_internal_tabname = 'IT_EKKO'

  • I_STRUCTURE_NAME =

  • I_CLIENT_NEVER_DISPLAY = 'X'

i_inclname = v_repid

  • I_BYPASSING_BUFFER =

  • I_BUFFER_ACTIVE =

changing

ct_fieldcat = it_fieldcat[] .

call function 'REUSE_ALV_FIELDCATALOG_MERGE'

exporting

i_program_name = v_repid

i_internal_tabname = 'IT_EKPO'

  • I_STRUCTURE_NAME =

  • I_CLIENT_NEVER_DISPLAY = 'X'

i_inclname = v_repid

  • I_BYPASSING_BUFFER =

  • I_BUFFER_ACTIVE =

changing

ct_fieldcat = it_fieldcat[]

  • EXCEPTIONS

  • INCONSISTENT_INTERFACE = 1

  • PROGRAM_ERROR = 2

  • OTHERS = 3

.

if sy-subrc <> 0.

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

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

endif.

endform. " get_field

&----


*& Form get_key

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


form get_key.

x_keyinfo-header01 = 'EBELN'.

x_keyinfo-item01 = 'SNO'.

endform. " get_key

&----


*& Form DISPLAY

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


form display.

*loop at it_ekko where ebeln eq '4500005016'.

  • write it_ekko-ebeln.

  • endloop.

*

*loop at it_ekpo where sno eq '4500005016'.

  • write it_ekpo-sno.

  • endloop.

*

**

*loop at it_fieldcat where key eq space .

  • write : / it_fieldcat-fieldname,it_fieldcat-key.

*endloop.

*

*loop at it_ekko.

  • loop at it_ekpo where sno eq it_ekko-ebeln.

  • write : / it_ekpo-menge,it_ekpo-ebelp.

  • endloop.

  • endloop.

*

*

*

call function 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'

exporting

  • I_INTERFACE_CHECK = ' '

i_callback_program = v_repid

  • I_CALLBACK_PF_STATUS_SET = ' '

  • I_CALLBACK_USER_COMMAND = ' '

  • IS_LAYOUT =

it_fieldcat = it_fieldcat[]

  • IT_EXCLUDING =

  • IT_SPECIAL_GROUPS =

  • IT_SORT =

  • IT_FILTER =

  • IS_SEL_HIDE =

  • I_SCREEN_START_COLUMN = 0

  • I_SCREEN_START_LINE = 0

  • I_SCREEN_END_COLUMN = 0

  • I_SCREEN_END_LINE = 0

  • I_DEFAULT = 'X'

  • I_SAVE = ' '

  • IS_VARIANT =

  • IT_EVENTS =

  • IT_EVENT_EXIT =

i_tabname_header = 'IT_EKKO'

i_tabname_item = 'IT_EKPO'

  • I_STRUCTURE_NAME_HEADER =

  • I_STRUCTURE_NAME_ITEM =

is_keyinfo = x_keyinfo

  • IS_PRINT =

  • IS_REPREP_ID =

  • I_BUFFER_ACTIVE =

  • I_BYPASSING_BUFFER =

  • IMPORTING

  • E_EXIT_CAUSED_BY_CALLER =

  • ES_EXIT_CAUSED_BY_USER =

tables

t_outtab_header = it_ekko

t_outtab_item = it_ekpo

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

endform. " DISPLAY

&----


*& Form key_modify

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


form key_modify.

loop at it_fieldcat. "Avoid Repitiotion of data.

case it_fieldcat-fieldname.

when 'SNO'.

if it_fieldcat-tabname = 'IT_EKPO'.

it_fieldcat-no_out = 'X'.

it_fieldcat-key = space.

endif.

endcase.

modify it_fieldcat index sy-tabix.

endloop.

endform. " key_modify

Thanks & regards

Sreenivasulu P

Former Member
0 Kudos

Hi,

The print size can directly be controlled by fixing the no of lines to be printed per page

eg.REPORT ZPSR020 no standard page heading line-size 500. --> Prints 500 char per line.

Also do check the spad settings for your printer.

Select DIN4 Page for printing.

Please try,

Abhishek