2008 Apr 29 3:41 PM
I have a run time error 'OBJECTS_NOT_CHARLIKE ' when trying to export the ALV grid to a local file.
It works fine when I use the option 'Export to spread sheet'.
I have a few quantity fields and currency fields in the grid.Now, I don't want to change all these fields into character fields. I feel that there is something in the field catalog that I need to do and that I cannot recall now.
Any tips will be useful. Thanks.
PS : Quantity is a quan type field in table '/BIC/APCA_O0100' and Balance is a currency type field in the same table. I am trying to use these fields as my reference field ,because I also need to do auto summation on some fields by referencing them.QUANTITY ,Sales & Balance are the only real fields in the DDIC table /BIC/APCA_O0100. Rest are just fields of the internal table - total_quantity,total_sales,cash,gascard.
perform append_catalog using 'QUANTITY' '/BIC/APCA_O0100' 'Qty' .
perform append_catalog using 'SALES' '/BIC/APCA_O0100' 'Sales' .
perform append_catalog using 'TOTAL_QUANTITY' '/BIC/APCA_O0100' 'Total Qty' .
perform append_catalog using 'TOTAL_SALES' '/BIC/APCA_O0100' 'Total Sales' .
perform append_catalog using 'CASH' '/BIC/APCA_O0100' ' Cash $' .
perform append_catalog using 'GASCARD' '/BIC/APCA_O0100' 'Gas Card $' .
form append_catalog using value(p_fname)
value(p_tname)
value(p_coltext).
data : v_fcat type lvc_s_fcat.
v_fcat-fieldname = p_fname.
v_fcat-ref_table = p_tname.
if p_fname eq 'QUANTITY' or p_fname eq 'TOTAL_QUANTITY' .
v_fcat-ref_field = 'QUANTITY' .
v_fcat-do_sum = 'X'.
endif.
if p_fname eq 'GASCARD' or p_fname eq 'SALES' or p_fname eq 'TOTAL_SALES' or p_fname eq 'CASH'.
v_fcat-ref_field = 'BALANCE' .
v_fcat-do_sum = 'X'.
endif.
v_fcat-coltext = p_coltext.
append v_fcat to gi_fieldcat.
endform. "APPEND_CATALOG
I have a run time error 'OBJECTS_NOT_CHARLIKE ' when trying to export the ALV grid to a local file.
It works fine when I use the option 'Export to spread sheet'.
I have a few quantity fields and currency fields in the grid.Now, I don't want to change all these fields into character fields. I feel that there is something in the field catalog that I need to do and that I cannot recall now.
Any tips will be useful. Thanks.
PS : Quantity is a quan type field in table '/BIC/APCA_O0100' and Balance is a currency type field in the same table. I am trying to use these fields as my reference field ,because I also need to do auto summation on some fields by referencing them.QUANTITY ,Sales & Balance are the only real fields in the DDIC table /BIC/APCA_O0100. Rest are just fields of the internal table - total_quantity,total_sales,cash,gascard.
perform append_catalog using 'QUANTITY' '/BIC/APCA_O0100' 'Qty' .
perform append_catalog using 'SALES' '/BIC/APCA_O0100' 'Sales' .
perform append_catalog using 'TOTAL_QUANTITY' '/BIC/APCA_O0100' 'Total Qty' .
perform append_catalog using 'TOTAL_SALES' '/BIC/APCA_O0100' 'Total Sales' .
perform append_catalog using 'CASH' '/BIC/APCA_O0100' ' Cash $' .
perform append_catalog using 'GASCARD' '/BIC/APCA_O0100' 'Gas Card $' .
form append_catalog using value(p_fname)
value(p_tname)
value(p_coltext).
data : v_fcat type lvc_s_fcat.
v_fcat-fieldname = p_fname.
v_fcat-ref_table = p_tname.
if p_fname eq 'QUANTITY' or p_fname eq 'TOTAL_QUANTITY' .
v_fcat-ref_field = 'QUANTITY' .
v_fcat-do_sum = 'X'.
endif.
if p_fname eq 'GASCARD' or p_fname eq 'SALES' or p_fname eq 'TOTAL_SALES' or p_fname eq 'CASH'.
v_fcat-ref_field = 'BALANCE' .
v_fcat-do_sum = 'X'.
endif.
v_fcat-coltext = p_coltext.
append v_fcat to gi_fieldcat.
endform. "APPEND_CATALOG
2008 Apr 29 3:49 PM
I think you need to fill up
if p_fname eq 'QUANTITY' or p_fname eq 'TOTAL_QUANTITY' .
v_fcat-quantity = <UOM value> ." Fill up the UOM for quantity
endif.
a®
2008 Apr 29 3:52 PM
Did that earlier, filling the quantity UoM and currency UoM did not help.
2008 Jun 06 7:01 AM
Hi Shareen,
If you change all the fields of your itab that you are passing to the Reuse_ALV RFC to type 'Char' or 'String' then the dump problem won't occur.
Try that and lemme kno if it works...I dunno if this is the right way to do it.But mine worked when i did this.
2008 Jun 06 8:29 AM
Hi,
You can use the SAP Standard table name in the Place of FIELDNAME. The dump will not come.
2011 Jun 13 9:22 AM
while creating the field catalog u using only field ref_table. but ur also use ref_fieldname. Otehrwise u can not use both.
if ur using ref_table and not ref_fieldname program does not understand which field it refers to. so it may change to get the dumps.
Thanks,
Pavan.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |