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: 

Printing with ALV Grid

Former Member
0 Kudos

Hi,

I am using ALV List and ALV grid in one of my custom reports.

There is no issue with ALV List when I print the report after running the program.

But when I use ALV Grid , the report runs good and when I try to print the report I get short dump "OBJECTS_NOT_CHARLIKE" in program "LKKBLF99" of the main program "SAPLKKBL".

I am using the function module "REUSE_ALV_GRID_DISPLAY" to run the report using ALV Grid and I get the above short dump when I try to print the report.

Can anyone help me please?

Thanks,

Ashok.

6 REPLIES 6

Former Member
0 Kudos

just check Unicode checks active checked on the program attributes screen.

In SE38, you can edit the attributes and uncheck this flag. Unicode has very strict data validation.

Former Member
0 Kudos

Hi,

This problem usually comes if you manually build the field catalog and there some fields like DATATYPE, TABNAME are missing.

Try to generate the field catalog using a strcuture / table.

Regards,

Ravi

Note : Please mark the helpful answers

former_member188685
Active Contributor
0 Kudos

Hi Ashok,

can you tell the fields in your ITAB and their type.

and i tested it for me it is not giving any problem.

can you show your ITAB declaration.

Regards

vijay

former_member188685
Active Contributor
0 Kudos

Hi,

i'm sure it is the problem with the declarations of your itab, can you show your code.

Regards

vijay

0 Kudos

just one additional hint:

when an ALV GRID is printed, it is converted into an ALV List. In the list, you have additional events (i.e. TOP_OF_PAGE,...) processed. Also, special table fields for colors or icons may cause trouble if not properly defined.

You can check the behavior using the print-preview icon in the grid top row.

regards,

Clemens

Former Member
0 Kudos

Hai Ashok

Try with the following Code

&----


*& Report ZALV_GRID *

*& *

&----


*& *

*& *

&----


REPORT ZALV_GRID .

TABLES: MARA.

TYPE-POOLS : SLIS.

*----


  • Data declaration

*----


DATA: BEGIN OF I_MARA OCCURS 0.

INCLUDE STRUCTURE MARA.

DATA: END OF I_MARA.

DATA: V_REPID LIKE SY-REPID.

*----


  • selection-screen

*----


SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.

SELECT-OPTIONS : S_MATNR FOR MARA-MATNR.

PARAMETERS: P_MTART LIKE MARA-MTART DEFAULT 'ROH'.

SELECTION-SCREEN END OF BLOCK B1.

*----


  • initialisation

*----


INITIALIZATION.

S_MATNR-LOW = '1400'.

S_MATNR-HIGH = '1500'.

APPEND S_MATNR.

V_REPID = SY-REPID.

*----


  • start-of-selection

*----


START-OF-SELECTION.

SELECT * FROM MARA

INTO TABLE I_MARA

WHERE MATNR IN S_MATNR AND

MTART = P_MTART.

CHECK SY-SUBRC = 0.

*----


  • end of selection

*----


END-OF-SELECTION.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

  • I_INTERFACE_CHECK = ' '

  • I_BYPASSING_BUFFER =

  • I_BUFFER_ACTIVE = ' '

  • I_CALLBACK_PROGRAM = ' '

  • I_CALLBACK_PF_STATUS_SET = ' '

  • I_CALLBACK_USER_COMMAND = ' '

I_STRUCTURE_NAME = 'MARA'

  • IS_LAYOUT =

  • IT_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 = 0

  • I_SCREEN_START_LINE = 0

  • I_SCREEN_END_COLUMN = 0

  • I_SCREEN_END_LINE = 0

  • IMPORTING

  • E_EXIT_CAUSED_BY_CALLER =

  • ES_EXIT_CAUSED_BY_USER =

TABLES

T_OUTTAB = I_MARA

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

Thanks & Regards

Sreenivasulu P