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 Toolbar Runtime error

Former Member
0 Kudos

Hi

i am enhancing one report.i just added some fields like standard price,special procurement,safety stock.i'm displaying the

report in ALV.my problem is report displaying is fine.but when i click any ALV toolbar buttons like export to local file,print preview.before enhancement,ALV tool bar is working fine.it is showing the runtime error like "The statement strlen(obj) the argument 'obj' can only take a character type data obj.in this case,the operand 'ob' has the non character type".i am unabale to find where exactly error is occuring.. when i start debugger in runtime error 'the cursor going to 'gs_out-hlplen = strlen( <field> ).when i click this one is is showing my standard price value of the first material in ALV like '3367.44'.can anyone suggest on this issue.

Thanks

Arjun

2 REPLIES 2

Former Member
0 Kudos

Could you please share the field catalog that is being populated for that field and the method that is being called for displaying ALV.

If posiible please also share the standard report and form which is throwing error (from runtime debugger).

0 Kudos

Hi PranavJeeth,

this is my field catalog.i'm just showing one field.

PERFORM set_field USING:

FIELD SHORT TEXT LONG TEXT OUTLEN TYP FMT SUM HID

'STPRS' 'STD.PRICE ' 'STANDARD PRICE ' '00011' 'P' ' ' ' ' ' ',

FORM set_field USING pv_fieldname TYPE c

pv_descr_s TYPE c

pv_descr_m TYPE c

pv_length TYPE c

pv_inttype TYPE c

pv_format TYPE c

pv_sum TYPE c

pv_hide TYPE c.

CLEAR gw_fieldcat.

gw_fieldcat-fieldname = pv_fieldname.

gw_fieldcat-seltext_s = pv_descr_s.

gw_fieldcat-seltext_m = pv_descr_m.

gw_fieldcat-outputlen = pv_length.

gw_fieldcat-inttype = pv_inttype.

gw_fieldcat-no_out = pv_hide.

CASE pv_format.

*-- Prices must have corresponding currency for format purposes

  • If no currency field is needed (fixed currency), use

  • GW_FIELDCAT-CURRENCY instead of GW_FIELDCAT-CFIELDNAME

WHEN 'P'. " prices

gw_fieldcat-currency = 'MYR'.

gw_fieldcat-do_sum = pv_sum.

when i excute report is ok.but when we clcik on alv toolbar runtime error occuring.when i run debugger,the code like this

if gs_fc-tech_form ne 99.

gs_out-hlplen = strlen( <field> ).

endif.

when i click on field the values like this

<field> = 100

gs_fc-tech_form = 90.

please suggest on this issue.