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 issues

Former Member
0 Kudos

Hi,

I' ve created a report using ALV. When i click on 'View' Button in ALV toolbar, its' giving me a short dump. This is the details of short dump....Anybody knows the reason....

Runtime Errors OBJECTS_NOT_CHARLIKE

Date and Time 11/28/2007 12:57:54

ShrtText

The current statement only supports character-type data objects.

What happened?

Error in ABAP application program.

The current ABAP program "SAPLKKBL" had to be terminated because one of the

statements could not be executed.

This is probably due to an error in the ABAP program.

Error analysis

In statement

"STRLEN( obj )..."

the argument "obj" can only take a character-type data object.

In this case, the operand "obj" has the non-character type "P".

-


2---

delete it_outtab where not projn1 in s_pspid.

in this statment in opertator is not working properly, i mean it's not deleting the projn1 which are in s_pspid(select option)

Thanks,

Message was edited by:

Sal Khan

Message was edited by:

Sal Khan

8 REPLIES 8

Former Member
0 Kudos

Hi..

Not sure what the problem is..

My guess would be ..

1.Check whether the interface is activated or not.

2.

delete it_outtab where not projn1 in s_pspid.

I think this statment is wrong..

Can you please post the code..

Thanks,

chaithanya.

Former Member
0 Kudos

Hi,

Try this

Data: r_projn type range of proj-pspid.
r_projn1-sign = 'E'.
r_projn1-option = 'BT'. " Just try with 'NB' also
r_projn1-low = s_projn1-low.
r_projn1-high = s_projn1-high.
append r_projn1.
clear r_projn1.

*Now delete
delete it_outtab where projn1 in r_projn1.

Regards,

Satish

0 Kudos

Can anybody tell me the reason of this short dump. I have checked all the objects of my program is active. I have pasted the short dump also..

Pls help..

0 Kudos

Hi,

How did you declared obj?

Regards,

Satish

0 Kudos

PERFORM fillcat USING :

   1 'X' 'EBELN'           ' ' 'CHAR' 'C' '000010' ' ' 'PO Number'      ,
   2 'X' 'EBELP'           ' ' 'NUMC' 'N' '000005' ' ' 'Line '          ,
   3 ' ' 'TXZ01'           ' ' 'CHAR' 'C' '000040' ' ' 'Line item description ' ,
   4 ' ' 'ZEKKN'           ' ' 'NUMC' 'N' '000006' ' ' 'Seq no'                 ,
   5 ' ' 'KNTTP'           ' ' 'CHAR' 'C' '000002' ' ' 'C'                              
   6 ' ' 'ACC_ASMT'        ' ' 'CHAR' 'C' '000024' ' ' 'Acc assignment'       ,          
   7 ' ' 'INI_PO_AMT'      ' ' 'CURR' 'P' '000013' ' ' 'PO amount'         ,         
   8 ' ' 'REL_PO_REV'      ' ' 'CURR' 'P' '000013' ' ' 'PO rev'             ,        
   9' ' 'CUR_PO_AMT'      ' ' 'CURR' 'P' '000013' ' ' 'PO amount1'           ,      
  10 ' ' 'UNREL_PO_REV'    ' ' 'CURR' 'P' '000013' ' ' 'PO1 rev'            .     


ENDFORM.                    " field_catalog

*&---------------------------------------------------------------------*
*&      Form  fillcat
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_ENDFORM  text
*----------------------------------------------------------------------*
FORM fillcat  USING           x_1    TYPE lvc_colpos
                              x_key  TYPE lvc_key
                              x_0172 TYPE lvc_fname
                              x_0173 TYPE lvc_noout
                              x_0174 TYPE datatype_d
                              x_0175 TYPE inttype
                              x_0176 TYPE intlen
                              x_0177 TYPE lowercase
                              x_0178 TYPE reptext
                              x_0179 TYPE scrtext_m
                              x_0180 TYPE c.

* change fieldcatalog
  DATA: ls_fieldcatalog TYPE lvc_s_fcat.
  ls_fieldcatalog-col_pos   = x_1.
  ls_fieldcatalog-key       = x_key.
  ls_fieldcatalog-fieldname = x_0172.
  ls_fieldcatalog-no_out    = x_0173.
  ls_fieldcatalog-datatype  = x_0174.
  ls_fieldcatalog-inttype   = x_0175.
  ls_fieldcatalog-intlen    = x_0176.
  ls_fieldcatalog-lowercase = x_0177.
  ls_fieldcatalog-reptext   = x_0178.
  ls_fieldcatalog-scrtext_m = x_0178.
  ls_fieldcatalog-scrtext_l = x_0179.
  ls_fieldcatalog-scrtext_s = x_0178.
  ls_fieldcatalog-no_sum    = ' '.
*  ls_fieldcatalog-total    = ' '.
  IF x_1 <> 10.
  ls_fieldcatalog-no_zero   = 'X'.
*  ls_fieldcatalog-NO_TOTLINE   = 'X'.

  ENDIF.
  ls_fieldcatalog-do_sum    = x_0180.
  APPEND ls_fieldcatalog TO gt_fieldcatalog.


ENDFORM.                    " fillcat

Thas how i'm defining my field catalog....

Pls suggest...

0 Kudos

Hi,

Try this

PERFORM fillcat USING :
 
   1 'X' 'EBELN'           ' ' 'CHAR' 'C' '000010' ' ' 'PO Number'      ,
   2 'X' 'EBELP'           ' ' 'NUMC' 'N' '000005' ' ' 'Line '          ,
   3 ' ' 'TXZ01'           ' ' 'CHAR' 'C' '000040' ' ' 'Line item description ' ,
   4 ' ' 'ZEKKN'           ' ' 'NUMC' 'N' '000006' ' ' 'Seq no'                 ,
   5 ' ' 'KNTTP'           ' ' 'CHAR' 'C' '000002' ' ' 'C'                              
   6 ' ' 'ACC_ASMT'        ' ' 'CHAR' 'C' '000024' ' ' 'Acc assignment'       ,          
   7 ' ' 'INI_PO_AMT'      ' ' 'CHAR' 'P' '000013' ' ' 'PO amount'         ,         
   8 ' ' 'REL_PO_REV'      ' ' 'CHAR' 'P' '000013' ' ' 'PO rev'             ,        
   9' ' 'CUR_PO_AMT'      ' ' 'CHAR' 'P' '000013' ' ' 'PO amount1'           ,      
  10 ' ' 'UNREL_PO_REV'    ' ' 'CHAR' 'P' '000013' ' ' 'PO1 rev'            .     
 
 
ENDFORM.                    " field_catalog

Regards,

Satish

0 Kudos

Satish,

It did't work...i have changed. But in another it has the same data type as CURR and catalog creation is same. In that report this 'view' button in toolbar is working fine.

Thanks,

former_member191735
Active Contributor
0 Kudos

Well, check out your fieldcatalog. I think you are passing a variable with type p but in fieldcatalog you are not defining it properly. This is due to quantity or currency field. If you are building your own field catalog, use like this

ls_fieldcat-fieldname = 'COST'.

ls_fieldcat-inttype = 'P'.

ls_fieldcat-intlen = 15.

ls_fieldcat-decimals_out = 2.

ls_fieldcat-reptext_ddic = 'CUSTOMER NET COST'.

ls_fieldcat-do_sum = 'X'.

APPEND ls_fieldcat TO rt_fieldcat.

I mean, you have to specify the inttype and intlen and decimals_out.