‎2006 Oct 19 3:14 PM
Hi all !!
I'm dipalying CURR field on alv. When trying to do sum on i get short dump.
that is my fieldcat definition:
ls_fieldcat-fieldname = 'NETWR'.
ls_fieldcat-ref_fieldname = 'NETWR'.
ls_fieldcat-ref_tabname = 'VBRP'.
ls_fieldcat-datatype = 'CURR'.
ls_fieldcat-cfieldname = 'WAERK'.
ls_fieldcat-ctabname = 'VBRK'.
What is my error ??
BR, JAcek
‎2006 Oct 19 3:17 PM
add this and try ..
ls_fieldcat-fieldname = 'NETWR'.
ls_fieldcat-ref_fieldname = 'NETWR'.
ls_fieldcat-ref_tabname = 'VBRP'.
ls_fieldcat-datatype = 'CURR'.
ls_fieldcat-cfieldname = 'WAERK'.
ls_fieldcat-ctabname = 'VBRK'.
<b>ls_fieldcat-do_sum = 'X'.</b>
‎2006 Oct 19 3:19 PM
‎2006 Oct 19 3:20 PM
change the datatype and try out
ls_fieldcat-datatype = 'QUAN'.
‎2006 Oct 19 3:53 PM
‎2006 Oct 19 4:15 PM
Hi Jacek,
do you mean: ls_fieldcat-cfieldname = 'WAERK'
or
ls_fieldcat-cfieldname = 'WAERS'
Regards, Dieter
Sorry the field is in VBRK,
But why do you use
ls_fieldcat-cfieldname = 'WAERK'.
ls_fieldcat-ctabname = 'VBRK'.
Try without this Lines.
regards, Dieter
Message was edited by: Dieter Gröhn
‎2006 Oct 19 4:41 PM
Hi Jacek,
The problem is that the total value that is resulted is bigger than the capacity of the variable.
Declare the variable as a bigger one.
for example. if vbrp netwr is of type p (17,2) 17 before decimal and 2 after it, use another data element which has (19,2) 19 places before decimal and 2 after it.
YOu can change the data type of the variable or
you can give the fie;dcatalog parameters:
ls_fieldcat-ref_fieldname = 'VKWRT'.
ls_fieldcat-ref_tabname = 'AUBF'.
Regards,
Ravi
‎2006 Oct 20 7:23 AM
Nothing of that doesnt work fine on my system (4.7).
(ST22 Error): MESSAGE_TYPE_X
...
assign component
<ls_fieldcat>-fieldname of structure rt_data to <g_field>.
if sy-subrc ne 0.
message x000(0k).
endif.
...
or when using in fieldac:
ls_fieldcat-cfieldname = 'WAERS'.
what was suggested in similiar problem in that formum sone times ago:
(st22)
Invalid dynamic line component.
..
When the ABAP program "SAPLSKBH" attempted to process the internal
table "RT_COLLECT00[]" with "SORT", a component "WAERS " was specified
dynamically
as the contents of the field "L_UFIELDNAME".
One of the following errors then occurred:
- The line type "u" of the internal table "RT_COLLECT00[]" contains no
component "WAERS ".
- "WAERS " contained an invalid offset or length specification (for
example, you may have tried to access part of a field with type I or
STRING).
- The program "SAPLSKBH" is a Unicode program. In Unicode programs, you
can only apply offset/length access to a structure within its
character-type initial section. The system went beyond the
boundaries of "WAERS " 's initial section in this case.
- "WAERS " contains a declaration of the form "A->B" for dynamically
accessing an object attribute. At present, attributes can only be
addressed in this way statically.
- "WAERS " contained significant trailing spaces (only possible with type
STRING).
Message was edited by: Jacek Slowikowski
‎2006 Oct 31 8:33 AM
dear jacek
(ST22 Error): MESSAGE_TYPE_X
...
assign component
<ls_fieldcat>-fieldname of structure rt_data to <g_field>.
if sy-subrc ne 0.
message x000(0k).
endif.
i think the above mentioned is the error in st22.
can u pls tell wht is the value in <ls_fieldcat>-fieldname and also please check that the same value is available in ur internal table which is used for listing the ALV output.
thanks
ambily