2009 Jan 26 4:09 PM
I get the object_not_charlike run time error when i use print option in my ALV grid (I used class objects).
I know that it is because of some quant fields & currency field that are in the columns.
I feel i am not referencing them correctly.
The internal table that I am using doesn't have any Uom field or currency type field. So, I was trying to reference to MARA-MEINS and T001-WAERS. I don't think i am getting it right.
My internal table is called Itab.
and the 2 quant fields are MINBE,EISBE and 2 currency fields are 'VERPR,STPRS. Please advice..Thanks.
perform append_catalog using 'MINBE' 'MARC' .
perform append_catalog using 'EISBE' 'MARC' .
perform append_catalog using 'VERPR' 'MBEW' .
perform append_catalog using 'STPRS' 'MBEW' .
form append_catalog using value(p_fname)
value(p_tname).
data : v_fcat type lvc_s_fcat.
v_fcat-fieldname = p_fname.
v_fcat-ref_table = p_tname.
* v_fcat-tabname = 'ITAB'.
case p_fname.
when 'EISBE' or 'MINBE'.
v_fcat-ref_table = 'MARA'.
* v_fcat-REF_FIELD = 'MEINS'.
v_fcat-qfieldname = 'MEINS'.
when 'VERPR' or 'STPRS'.
v_fcat-ref_table = 'T001'.
* v_fcat-REF_FIELD = 'WAERS'.
v_fcat-cfieldname = 'WAERS'.
endcase.
append v_fcat to gi_fieldcat.
endform. "APPEND_CATALOGI even removed qfieldname and cfieldname from the case-endcase, still it dumps while I click on print option (Export to excel work fine).
2009 Jan 26 4:36 PM
Hi
If you want to indicate the reference field for currency and quantity fields, u need to add these reference fields to your output table:
PERFORM APPEND_CATALOG USING 'MINBE' 'MARC' .
PERFORM APPEND_CATALOG USING 'EISBE' 'MARC' .
PERFORM APPEND_CATALOG USING 'VERPR' 'MBEW' .
PERFORM APPEND_CATALOG USING 'STPRS' 'MBEW' .
PERFORM APPEND_CATALOG USING 'MEINS' 'MARA' . "<-------- Unit
PERFORM APPEND_CATALOG USING 'WAERS' 'T001' . "<-------- Currency
*---------------------------------------------------------------------*
* FORM append_catalog *
*---------------------------------------------------------------------*
* ........ *
*---------------------------------------------------------------------*
* --> VALUE(P_FNAME) *
* --> VALUE(P_TNAME) *
*---------------------------------------------------------------------*
FORM APPEND_CATALOG USING VALUE(P_FNAME)
VALUE(P_TNAME).
DATA : V_FCAT TYPE LVC_S_FCAT.
V_FCAT-FIELDNAME = P_FNAME.
V_FCAT-REF_FIELDNAME = P_FNAME.
V_FCAT-REF_TABLE = P_TNAME.
* v_fcat-tabname = 'ITAB'.
CASE P_FNAME.
WHEN 'EISBE' OR 'MINBE'.
V_FCAT-QFIELDNAME = 'MEINS'.
WHEN 'VERPR' OR 'STPRS'.
V_FCAT-CFIELDNAME = 'WAERS'.
ENDCASE.
APPEND V_FCAT TO GI_FIELDCAT.
ENDFORM. "APPEND_CATALOGMax
I get the object_not_charlike run time error when i use print option in my ALV grid (I used class objects).
I know that it is because of some quant fields & currency field that are in the columns.
I feel i am not referencing them correctly.
The internal table that I am using doesn't have any Uom field or currency type field. So, I was trying to reference to MARA-MEINS and T001-WAERS. I don't think i am getting it right.
My internal table is called Itab.
and the 2 quant fields are MINBE,EISBE and 2 currency fields are 'VERPR,STPRS. Please advice..Thanks.
perform append_catalog using 'MINBE' 'MARC' .
perform append_catalog using 'EISBE' 'MARC' .
perform append_catalog using 'VERPR' 'MBEW' .
perform append_catalog using 'STPRS' 'MBEW' .
form append_catalog using value(p_fname)
value(p_tname).
data : v_fcat type lvc_s_fcat.
v_fcat-fieldname = p_fname.
v_fcat-ref_table = p_tname.
* v_fcat-tabname = 'ITAB'.
case p_fname.
when 'EISBE' or 'MINBE'.
v_fcat-ref_table = 'MARA'.
* v_fcat-REF_FIELD = 'MEINS'.
v_fcat-qfieldname = 'MEINS'.
when 'VERPR' or 'STPRS'.
v_fcat-ref_table = 'T001'.
* v_fcat-REF_FIELD = 'WAERS'.
v_fcat-cfieldname = 'WAERS'.
endcase.
append v_fcat to gi_fieldcat.
endform. "APPEND_CATALOGI even removed qfieldname and cfieldname from the case-endcase, still it dumps while I click on print option (Export to excel work fine).
2009 Jan 26 4:30 PM
in the Note 166681 - Use of ALV components not released externally
When you use the REUSE_ALV_LIST_DISPLAY and REUSE_ALV_HIERSEQ_LIST_DISPLAY
function modules, you can perform a consistency check which closes when an
error log is output.
As an alternative to this (for example, if a short dump occurs before the
list is output), set I_INTERFACE_CHECK = 'X' parameter in the source
code when you call up the function modules.
if you do this the ALV show tou you error
2009 Jan 26 4:34 PM
2009 Jan 26 7:35 PM
2009 Jan 26 7:50 PM
PERFORM APPEND_CATALOG USING 'MINBE' 'MARC' .
PERFORM APPEND_CATALOG USING 'EISBE' 'MARC' .
PERFORM APPEND_CATALOG USING 'VERPR' 'MBEW' .
PERFORM APPEND_CATALOG USING 'STPRS' 'MBEW' .
*---------------------------------------------------------------------*
* FORM append_catalog *
*---------------------------------------------------------------------*
* ........ *
*---------------------------------------------------------------------*
* --> VALUE(P_FNAME) *
* --> VALUE(P_TNAME) *
*---------------------------------------------------------------------*
FORM APPEND_CATALOG USING VALUE(P_FNAME)
VALUE(P_TNAME).
DATA : V_FCAT TYPE LVC_S_FCAT.
V_FCAT-FIELDNAME = P_FNAME.
V_FCAT-REF_TABLE = P_TNAME.
ENDFORM.
2009 Jan 26 4:36 PM
Hi
If you want to indicate the reference field for currency and quantity fields, u need to add these reference fields to your output table:
PERFORM APPEND_CATALOG USING 'MINBE' 'MARC' .
PERFORM APPEND_CATALOG USING 'EISBE' 'MARC' .
PERFORM APPEND_CATALOG USING 'VERPR' 'MBEW' .
PERFORM APPEND_CATALOG USING 'STPRS' 'MBEW' .
PERFORM APPEND_CATALOG USING 'MEINS' 'MARA' . "<-------- Unit
PERFORM APPEND_CATALOG USING 'WAERS' 'T001' . "<-------- Currency
*---------------------------------------------------------------------*
* FORM append_catalog *
*---------------------------------------------------------------------*
* ........ *
*---------------------------------------------------------------------*
* --> VALUE(P_FNAME) *
* --> VALUE(P_TNAME) *
*---------------------------------------------------------------------*
FORM APPEND_CATALOG USING VALUE(P_FNAME)
VALUE(P_TNAME).
DATA : V_FCAT TYPE LVC_S_FCAT.
V_FCAT-FIELDNAME = P_FNAME.
V_FCAT-REF_FIELDNAME = P_FNAME.
V_FCAT-REF_TABLE = P_TNAME.
* v_fcat-tabname = 'ITAB'.
CASE P_FNAME.
WHEN 'EISBE' OR 'MINBE'.
V_FCAT-QFIELDNAME = 'MEINS'.
WHEN 'VERPR' OR 'STPRS'.
V_FCAT-CFIELDNAME = 'WAERS'.
ENDCASE.
APPEND V_FCAT TO GI_FIELDCAT.
ENDFORM. "APPEND_CATALOGMax
2009 Jan 26 5:06 PM
2009 Jan 26 5:07 PM
I think I was doing the right thing. The issue was another field that I had used which was a ratio of quantity field/quantity field and I was not refering it correctly.
2009 Jan 26 5:10 PM
Hi
U should consider if you output table has amount or quantity field, u should add the reference fields for currency and unit.
Max
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |