‎2010 Sep 24 6:31 AM
Hi,
I have written a alv program using function "REUSE_ALV_LIST_DISPLAY". When I execute program , alv list gets displayed, however, when I press change layout or select all or back button it gives below error.
"The current statement only supports character-type data objects."
"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"."
I am not getting why this error is coming only after pressing button on alv toolbar. I have given checkbox in front of each record. I can manually select each check box. but if i press select all button on the toolbar, it gives above error.
Please help.
Regards,
Santosh
‎2010 Sep 24 8:57 AM
Hi Santosh,
The problem is in your field catalogue internal table. When you change the layout, you must have written a code to modify the fieldcatalogue internal table as per the new layout. While modifying the field catalogue internal table, check if the 'DATATYPE' field of that internal table is getting populated with 'CHAR' and 'INTTYPE' is getting populated with 'C' for amount fields, . If yes,make this 'DATATYPE' and 'INTTYPE' fields blank for amount fileds.
Regards,
Pranjali
‎2010 Sep 24 6:39 AM
Hi Santosh
you are getting dump on the statement...
"STRLEN( obj )..." is it from your code or from std sap code ?
Please paste your code here to find out the issue.
Edited by: Sachin Patil on Sep 24, 2010 11:09 AM
‎2010 Sep 24 6:42 AM
‎2010 Sep 24 6:43 AM
I am getting error in below program
Main Program : SAPLKKBL
Source code of : LKKBLF01
Following is the dump text
"The termination occurred in the ABAP program "SAPLKKBL" in "FIELDS_READ".
The main program was "ZCOLLECTION_AGENCY_REPORT ".
The termination occurred in line 5310 of the source code of the (Include)
program "LKKBLF01"
of the source code of program "LKKBLF01" (when calling the editor 53100)."
‎2010 Sep 24 6:48 AM
cehck this program ZCOLLECTION_AGENCY_REPORT for strlen and rectify it.
‎2010 Sep 24 6:49 AM
Hi,
do a consistency check for you ALV.
It will help to remove other inconsistencies in your ALV too.
Press shift in empty area of ALV and right double click.
You will see all the incosistencies your ALV.Regards,
Sumit
‎2010 Sep 24 6:58 AM
Hi,
Check if your program contains any fields of type P in the fieldcatalog.
Regards,
Srini.
‎2010 Sep 24 7:00 AM
The problem lies in your fieldcatalog.please provide field details of your field catalog.
‎2010 Sep 24 7:18 AM
FORM build_catalogue .
CLEAR g_fieldcat.
g_fieldcat-fieldname = 'SEL'.
g_fieldcat-tabname = 'IT_DATA'.
g_fieldcat-seltext_l = 'Sel'.
g_fieldcat-checkbox = 'X'.
g_fieldcat-input = 'X'.
IF r_report = 'X'.
g_fieldcat-no_out = 'X'.
ENDIF.
APPEND g_fieldcat TO g_fieldcat_tab.
CLEAR g_fieldcat.
g_fieldcat-fieldname = 'XBLNR'.
g_fieldcat-tabname = 'IT_DATA'.
g_fieldcat-seltext_l = 'Agent'.
g_fieldcat-no_out = 'X'.
APPEND g_fieldcat TO g_fieldcat_tab.
CLEAR g_fieldcat.
g_fieldcat-fieldname = 'POST_DOC'.
g_fieldcat-tabname = 'IT_DATA'.
g_fieldcat-seltext_l = 'Posted Document'.
IF r_post = 'X'.
g_fieldcat-no_out = 'X'.
ENDIF.
APPEND g_fieldcat TO g_fieldcat_tab.
CLEAR g_fieldcat.
g_fieldcat-fieldname = 'VERTN'.
g_fieldcat-tabname = 'IT_DATA'.
g_fieldcat-seltext_l = 'Contract'.
APPEND g_fieldcat TO g_fieldcat_tab.
CLEAR g_fieldcat.
g_fieldcat-fieldname = 'KUNNR'.
g_fieldcat-tabname = 'IT_DATA'.
g_fieldcat-seltext_l = 'Hirer Code'.
APPEND g_fieldcat TO g_fieldcat_tab.
CLEAR g_fieldcat.
g_fieldcat-fieldname = 'NAME1'.
g_fieldcat-tabname = 'IT_DATA'.
g_fieldcat-seltext_l = 'Hirer Name .'.
APPEND g_fieldcat TO g_fieldcat_tab.
CLEAR g_fieldcat.
g_fieldcat-fieldname = 'XREF3'.
g_fieldcat-tabname = 'IT_DATA'.
g_fieldcat-seltext_l = 'Receipt No.'.
APPEND g_fieldcat TO g_fieldcat_tab.
CLEAR g_fieldcat.
g_fieldcat-fieldname = 'BLDAT'.
g_fieldcat-tabname = 'IT_DATA'.
g_fieldcat-seltext_l = 'Base Line Dt'.
APPEND g_fieldcat TO g_fieldcat_tab.
CLEAR g_fieldcat.
g_fieldcat-fieldname = 'XREF1'.
g_fieldcat-tabname = 'IT_DATA'.
g_fieldcat-seltext_l = 'Receipt Amt'.
APPEND g_fieldcat TO g_fieldcat_tab.
CLEAR g_fieldcat.
g_fieldcat-fieldname = 'BELNR'.
g_fieldcat-tabname = 'IT_DATA'.
g_fieldcat-seltext_l = 'Document No.'.
APPEND g_fieldcat TO g_fieldcat_tab.
CLEAR g_fieldcat.
g_fieldcat-fieldname = 'WRBTR'.
g_fieldcat-tabname = 'IT_DATA'.
g_fieldcat-seltext_l = 'Commision Charges'.
APPEND g_fieldcat TO g_fieldcat_tab.
IF r_post = 'X'.
CLEAR g_fieldcat.
g_fieldcat-fieldname = 'C_WRBTR'.
g_fieldcat-tabname = 'IT_DATA'.
g_fieldcat-seltext_l = 'Add Amount'.
g_fieldcat-input = 'X'.
APPEND g_fieldcat TO g_fieldcat_tab.
CLEAR g_fieldcat.
g_fieldcat-fieldname = 'D_WRBTR'.
g_fieldcat-tabname = 'IT_DATA'.
g_fieldcat-seltext_l = 'Subtract Amt'.
g_fieldcat-input = 'X'.
APPEND g_fieldcat TO g_fieldcat_tab.
ENDIF.
‎2010 Sep 24 7:23 AM
Hi,
Check your fields 'WRBTR' , 'C_WRBTR' , 'D_WRBTR' in internal table 'IT_DATA' ..
These should be declared as char.
Regards,
Srini.
‎2010 Sep 24 8:57 AM
Hi Santosh,
The problem is in your field catalogue internal table. When you change the layout, you must have written a code to modify the fieldcatalogue internal table as per the new layout. While modifying the field catalogue internal table, check if the 'DATATYPE' field of that internal table is getting populated with 'CHAR' and 'INTTYPE' is getting populated with 'C' for amount fields, . If yes,make this 'DATATYPE' and 'INTTYPE' fields blank for amount fileds.
Regards,
Pranjali
‎2010 Sep 24 9:08 AM
thats why you do a REUSE_ALV_FIELDCATALOG_MERGE instead of building it manually.
‎2010 Sep 24 11:54 AM
This problem is not coming in development & quality server. it is only coming in production server. i dont know why this happening ??
‎2010 Sep 24 12:19 PM
Why dnt you use Grid instead of list i.e.'REUSE_ALV_GRID_DISPLAY'
Regards
Rahul
Edited by: drahulmore on Sep 24, 2010 1:20 PM
‎2010 Sep 24 12:21 PM
Just a hunch
are you trying to sum a character field ??? or something related to currency & quantity field.
Anyways as said you can perform the consistency check and find it out.