Application Development and Automation 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: 
Read only

Run time error when clicking on sum button

Former Member
0 Likes
1,226

Hi,

I have used a field (data type-QUAN,length-10,Decimal Places-3)

in an internal table. I have passed this table in 'REUSE_ALV_GRID_DISPLAY'.

When I wan to see the 'sum' by clicking the button on the application tool bar , There is always a run time error.

Please help as quick as possible.

Regards,

Sourav Paul.

8 REPLIES 8
Read only

Former Member
0 Likes
966

Hi Sourav,

It must be some fi eldcatlog error.Can u pls copy paste the dump so that it will be esy for us to help u out.

Check this

fieldcatalog-fieldname = 'NETPR'.

fieldcatalog-seltext_m = 'Net Price'.

fieldcatalog-col_pos = 7.

fieldcatalog-outputlen = 15.

fieldcatalog-do_sum = 'X' "Display column total

fieldcatalog-datatype = 'CURR'.

append fieldcatalog to fieldcatalog.

clear fieldcatalog.

Edited by: Raj on Jun 14, 2008 3:45 PM

Read only

0 Likes
966

Hi Raj,

Thank you for your help. I have solved my problem.

Could you please tell me how to use various events IN ABAP(just like EVENT DRIVEN PROGRAMMING ).

I want to use single_click,mouse_over,right_click etc events.

Best regards,

Sourav Paul

Read only

Clemenss
Active Contributor
0 Likes
966

Hi SOURAV PAUL,

this may be due to your data: Before pressing SUM, check the values (i.e. sort descending) for extraordinary big quantities. The run time error may be a numeric overflow as the summing field has the same technical properties as the quantity fields summed up.

So exclude the values that are too big or better redefine your quantity field and let it have some mire digits.

Regards,

Clemens

Addition: Not to forget: Quantity fields should be linked to unit fields so that you get sums for each unit. In the field catalog, you should have something like <alv_fieldcat>-qfieldname = 'MEINS' (or what your unit field name is).

Edited by: Clemens Li on Jun 14, 2008 12:28 PM

Read only

Former Member
0 Likes
966

hi go to st22------> see the error message and proceed

Read only

0 Likes
966

Hi Venkat,

Thank you for your help. I have solved my problem.

Could you please tell me how to use various events IN ABAP(just like EVENT DRIVEN PROGRAMMING ).

I want to use single_click,mouse_over,right_click etc events.

Best regards,

Sourav Paul

Read only

Former Member
0 Likes
966

Pl. check the interface of the ALV by using the given link and if any error present in it then fix it and test the program again. May it will help you to solve the problem.

link:http://www.saptechnical.com/Tutorials/ALV/Interface/check.htm

Regards,

Joy.

Read only

Former Member
0 Likes
966

Hi,

try following,

DATA: GT_EVENTS TYPE SLIS_T_EVENT.

INITIALIZATION.

PERFORM BUILD_EVENTS CHANGING GT_EVENTS.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

IT_EVENTS = GT_EVENTS[]

TABLES

T_OUTTAB = IFINAL.

ENDFORM. " display_output

*********************

FORM BUILD_EVENTS CHANGING GT_EVENTS TYPE SLIS_T_EVENT.

DATA: LINE_EVENT TYPE SLIS_ALV_EVENT.

CLEAR LINE_EVENT.

LINE_EVENT-NAME = 'TOP_OF_PAGE'.

LINE_EVENT-FORM = 'TOP_OF_PAGE'.

APPEND LINE_EVENT TO GT_EVENTS.

ENDFORM. "build_events

Reward pts if usefull.

Regards,

Dhan

Read only

Former Member
0 Likes
966

Thanks.