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: 

how to set our own printer to alv grid (objective).

Former Member
0 Kudos

Hi,

Iam giving my code, please observe...

  • DEFAULT PRINTER NAME "A909".

  • NOW IAM SETTING OT "LP01".

GS_PRINT-PRINT = 'X'.

P_PRINTR = 'LP01'.

CALL FUNCTION 'UPDATE_DEFAULT_PRINTPARAMS'

EXPORTING

USER = SY-UNAME

DESTINATION = P_PRINTR

IMMEDIATELY = ' '

RELEASE = 'X'

NEW_LIST_ID = 'X'.

SY-BATCH = 'X'

CALL METHOD GO_GRID->SET_TABLE_FOR_FIRST_DISPLAY

EXPORTING

  • I_BUFFER_ACTIVE =

  • I_BYPASSING_BUFFER =

I_CONSISTENCY_CHECK = G_CONSISTENCY_CHECK

  • I_STRUCTURE_NAME = 'KNA1'

IS_VARIANT = GS_VARIANT

I_SAVE = 'A'

I_DEFAULT = 'X'

IS_LAYOUT = GS_LAYOUT

  • IS_PRINT = GS_PRINT

  • IT_SPECIAL_GROUPS =

IT_TOOLBAR_EXCLUDING = GT_EXCLUDE

  • IT_HYPERLINK =

  • IT_ALV_GRAPHICS =

  • IT_EXCEPT_QINFO =

  • IR_SALV_ADAPTER =

CHANGING

IT_OUTTAB = ITAB2[]

IT_FIELDCATALOG = GT_FIELDCAT

  • IT_SORT =

  • IT_FILTER =

  • EXCEPTIONS

  • INVALID_PARAMETER_COMBINATION = 1

  • PROGRAM_ERROR = 2

  • TOO_MANY_LINES = 3

  • others = 4

.

-


After running this program iam getting the default printer spool request number 'A909', Iam not getting printing form 'LP01' which i gave.

-


Please solve this as early as possible.

4 REPLIES 4

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Please try uncommenting the following line in your method call.

* IS_PRINT = GS_PRINT

Regards,

Rich Heilman

0 Kudos

I tried that one also by commenting is_print, but the spool is generating for the default printer, not for the changed printer (LP01). [ actually i forgot to uncomment that is_print while pasting ]

0 Kudos

sorry, iam mailing again...

I tried that one also by uncommenting is_print, but the spool is generating for the default printer, not for the changed printer (LP01). [ actually i forgot to uncomment that is_print while pasting, in my program it is uncommented ]

0 Kudos

I want to send this alv grid to the printer that we define. (but not to the default printer).

In my case the spool is generating for default printer. So i want for the printer (LP01) that we assign or get from paramter.

Please give me the solution