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 Print Problem. ABAP Dump.

Former Member
0 Kudos

When I try to print a new ALV report I have created usig the print from the ALV grid toolbar. I receive an ABAP dump: OBJECTS_NOT_CHARLIKE..

I have searched OSS and come up with note 638232. Not sure if this will fix my problem however since it seems to indicate a fix for specific ASP rpeorts although sounds like my problem

Has anyone had this problem?

BAR

11 REPLIES 11

former_member188685
Active Contributor
0 Kudos

Hi Bar,

do you have any quantity/currency fields in your alv output.

Regards

vijay

0 Kudos

yeah, I do ..which is what the OSS note seems to indicate the problem might be...

BAR

0 Kudos

Hi,

i think you can fix this using the Fieldcatalog.if you don't pass the parameters properly then it will give dump,so try to give your full fieldcat info, how you are creating and internal table fields and declaration.

Regards

vijay

0 Kudos

internal table

BEGIN OF g_report_type,

VBELN type ebkn-VBELN, "sales order no.

ebeln type eban-ebeln, "PO #

ebelp type eban-ebelp, " PO Item#

flief type eban-flief, " Fixed vendor

aufnr type ebkn-aufnr, "serv order #

matnr type mara-matnr, "material #

maktx type MAKT-maktx, "material description

sernr type equi-sernr, "serial number

preis type EBAN-PREIS, "cost

END OF g_report_type.

field catalog

is_fieldcat-fieldname = 'VBELN'. is_fieldcat-reptext = 'Sales Order Number'.

is_fieldcat-ref_field = 'VBELN'.

is_fieldcat-ref_table = "EBKN'.

is_fieldcat-SCRTEXT_L = 'Sales Order'.

APPEND is_fieldcat TO it_fieldcat.

is_fieldcat-fieldname = 'EBELN'. is_fieldcat-reptext = 'PO Number Applicable'.

is_fieldcat-ref_field = 'EBELN'. is_fieldcat-ref_table = "EBAN".

is_fieldcat-SCRTEXT_L = 'PO Applicable'.

APPEND is_fieldcat TO it_fieldcat.

is_fieldcat-fieldname = 'EBELP'. is_fieldcat-reptext = 'PO Item'.

is_fieldcat-ref_field = 'EBELP'. is_fieldcat-ref_table = "EBAN".

is_fieldcat-SCRTEXT_L = 'PO Item'.

APPEND is_fieldcat TO it_fieldcat.

is_fieldcat-fieldname = 'FLIEF'. is_fieldcat-reptext = 'Vendor'.

is_fieldcat-ref_field = 'FLIEF'. is_fieldcat-ref_table = "EBAN".

is_fieldcat-SCRTEXT_L = 'Vendor'.

APPEND is_fieldcat TO it_fieldcat.

is_fieldcat-fieldname = 'AUFNR'. is_fieldcat-reptext = 'From Service Order'.

is_fieldcat-ref_field = 'AUFNR'. is_fieldcat-ref_table = "EBKN".

is_fieldcat-SCRTEXT_L = 'Service Order'.

APPEND is_fieldcat TO it_fieldcat.

is_fieldcat-fieldname = 'MATNR'. is_fieldcat-reptext = 'Material Number'.

is_fieldcat-ref_field = 'MATNR'. is_fieldcat-ref_table = "MARA". is_fieldcat-SCRTEXT_L = 'Material'.

APPEND is_fieldcat TO it_fieldcat.

is_fieldcat-fieldname = 'MAKTX'.

is_fieldcat-reptext = 'Material Description'.

is_fieldcat-ref_field = 'MAKTX'. is_fieldcat-ref_table = "MAKT". is_fieldcat-SCRTEXT_L = 'Material'.

APPEND is_fieldcat TO it_fieldcat.

is_fieldcat-fieldname = 'SERNR'.

is_fieldcat-reptext = 'Serial Number'.

is_fieldcat-ref_field = 'SERNR'.

is_fieldcat-ref_table = "EQUI".

is_fieldcat-SCRTEXT_L = 'Serial Number'.

APPEND is_fieldcat TO it_fieldcat.

is_fieldcat-fieldname = 'PREIS'. is_fieldcat-reptext = 'Cost on Service Order'. is_fieldcat-ref_field = 'PREIS'. is_fieldcat-ref_table = "EBAN". is_fieldcat-SCRTEXT_L = 'Cost'.

APPEND is_fieldcat TO it_fieldcat.

0 Kudos

Hi,

are you delaing with ALV LVC fm or OO ABAP(i mean Cl_GUI_ALV_GRID class).

Please let me know.

Regards

vijay

0 Kudos

By the way why are you using the double quotes for ref_table.not only here so many places you have used.

<b>is_fieldcat-ref_table = "EQUI".</b>

change that to

is_fieldcat-ref_table = 'EQUI'. "similarly for others.

Regards

vijay

0 Kudos

Hi,

i made some changes now just use this and see.

i assume it_final is the table which you are passing to set display method. if it is not then change it to your itab,replace with your internal table.

  DATA: L_POS TYPE I.
  L_POS = L_POS + 1.

is_fieldcat-fieldname = 'VBELN'.
  is_fieldcat-reptext = 'Sales Order Number'.  
<b>is_FIELDCAT-TABNAME = 'IT_FINAL'.</b>
is_fieldcat-ref_field = 'VBELN'.              
<b>is_fieldcat-ref_table = 'EBKN'.</b>             
is_fieldcat-SCRTEXT_L = 'Sales Order'.   
is_FIELDCAT-COL_POS    = L_POS.            
APPEND is_fieldcat TO it_fieldcat.
clear is_fieldcat.
  L_POS = L_POS + 1.
is_fieldcat-fieldname = 'EBELN'.
is_fieldcat-reptext = 'PO Number Applicable'. 
is_FIELDCAT-TABNAME = 'IT_FINAL'.
is_fieldcat-ref_field = 'EBELN'.
is_fieldcat-ref_table = 'EBAN'.             
is_fieldcat-SCRTEXT_L = 'PO Applicable'.      
is_FIELDCAT-COL_POS    = L_POS.            
APPEND is_fieldcat TO it_fieldcat.
clear is_fieldcat.
  L_POS = L_POS + 1.
is_fieldcat-fieldname = 'EBELP'.
is_FIELDCAT-TABNAME = 'IT_FINAL'.
is_fieldcat-reptext = 'PO Item'.             
is_fieldcat-ref_field = 'EBELP'.
<b>is_fieldcat-ref_table = 'EBAN'. </b>            
is_fieldcat-SCRTEXT_L = 'PO Item'.            
is_FIELDCAT-COL_POS    = L_POS.            
APPEND is_fieldcat TO it_fieldcat.
clear is_fieldcat.
  L_POS = L_POS + 1.
is_fieldcat-fieldname = 'FLIEF'.
is_FIELDCAT-TABNAME = 'IT_FINAL'.
 is_fieldcat-reptext = 'Vendor'.              
is_fieldcat-ref_field = 'FLIEF'
<b>is_fieldcat-ref_table = 'EBAN'.</b>             
is_fieldcat-SCRTEXT_L = 'Vendor'.            
is_FIELDCAT-COL_POS    = L_POS.            
APPEND is_fieldcat TO it_fieldcat.
clear is_fieldcat.
  L_POS = L_POS + 1.
is_fieldcat-fieldname = 'AUFNR'.
is_FIELDCAT-TABNAME = 'IT_FINAL'.
is_fieldcat-reptext = 'From Service Order'.   
is_fieldcat-ref_field = 'AUFNR'. 
is_fieldcat-ref_table = 'EBKN'.             
is_fieldcat-SCRTEXT_L = 'Service Order'.      
is_FIELDCAT-COL_POS    = L_POS.            
APPEND is_fieldcat TO it_fieldcat.
clear is_fieldcat.
  L_POS = L_POS + 1.
is_fieldcat-fieldname = 'MATNR'.
is_FIELDCAT-TABNAME = 'IT_FINAL'.
 is_fieldcat-reptext = 'Material Number'.      
is_fieldcat-ref_field = 'MATNR'.
 is_fieldcat-ref_table = 'MARA'. 
 is_fieldcat-SCRTEXT_L = 'Material'.           
is_FIELDCAT-COL_POS    = L_POS.            
APPEND is_fieldcat TO it_fieldcat.
clear is_fieldcat.
  L_POS = L_POS + 1.
is_fieldcat-fieldname = 'MAKTX'.             
is_FIELDCAT-TABNAME = 'IT_FINAL'.
is_fieldcat-reptext = 'Material Description'. 
is_fieldcat-ref_field = 'MAKTX'.
is_fieldcat-ref_table = 'MAKT'.
is_fieldcat-SCRTEXT_L = 'Material'.        
is_FIELDCAT-COL_POS    = L_POS.            
APPEND is_fieldcat TO it_fieldcat.
clear is_fieldcat.
  L_POS = L_POS + 1.
is_fieldcat-fieldname = 'SERNR'. 
is_FIELDCAT-TABNAME = 'IT_FINAL'.           
is_fieldcat-reptext = 'Serial Number'.      
is_fieldcat-ref_field = 'SERNR'.           
is_fieldcat-ref_table = 'EQUI'.             
is_fieldcat-SCRTEXT_L = 'Serial Number'.   
is_FIELDCAT-COL_POS    = L_POS.            
APPEND is_fieldcat TO it_fieldcat.
clear is_fieldcat.
  L_POS = L_POS + 1.
is_fieldcat-fieldname = 'PREIS'. 
is_FIELDCAT-TABNAME = 'IT_FINAL'.
 is_fieldcat-reptext = 'Cost on Service Order'.
 is_fieldcat-ref_field = 'PREIS'.
 is_fieldcat-ref_table = 'EBAN'. 
 is_fieldcat-SCRTEXT_L = 'Cost'.               
is_FIELDCAT-COL_POS    = L_POS.            
APPEND is_fieldcat TO it_fieldcat.
<b>clear is_fieldcat.</b>

Regards

vijay

0 Kudos

I am using Cl_GUI_ALV_GRID class.

Was not aware that the double quotes were a problem.

0 Kudos

Hi,

please close the thread if your problem solved.and reward for helful answers.

Regards

vijay

0 Kudos

I could not get this working via your suggestion so I came up with a work around which was to disable the printing option for now until I have time to investigate, apply and test the OSS note.

regards BAR

Clemenss
Active Contributor
0 Kudos

Another possible reason is that you have defined special fields like color or checkbox in the layout but those fields are not part of the internal table displayed.

This is what happened to me after copying and modifying an ALV report. The grid display was not effected but when printing (internal transfer to ALV_LIST_DISPLAY) it came to a dump. - just a hint, don't know if it helps.

Regards,

Clemens