2007 Mar 27 9:12 PM
Hello All,
I am facing a problem when trying to do calculation based on the button added at the toolbar of interactive ALV list.
When I click on the toolbar button Compute, the ALV should calculate the
multiplication of the Qty (manually entered by a user) & price per unit already available in the ALV & show it the Column Total value.
Presently when I try to do this using
Method handle_user_command.
modifying the inetrnal table GT_FINAL_OUTPUT
with the Total price value .
& updating the column Total price (Qty * price) in the Internal table
After doing this I am agin calling the below function
CALL METHOD g_grid->set_table_for_first_display
EXPORTING
i_structure_name = 'GT_FINAL_OUTPUT'
is_layout = gs_layout
CHANGING
it_fieldcatalog = gt_fieldcat
it_outtab = GT_FINAL_OUTPUT[].
At above function it gives short dump or sometimes it does not update the ALV screen with the new updated value of Total price .
The short dump comes states the error of unassigned field symbol.
Kindly suggest a program where we can do manipulation at the editable ALV.
Or solution to above issue .
Regards,
Anurag
2007 Mar 28 7:56 PM
Hello All,
I am facing a problem when trying to do calculation based on the button added at the toolbar of interactive ALV list.
When I click on the toolbar button Compute, the ALV should calculate the
multiplication of the Qty (manually entered by a user) & price per unit already available in the ALV & show it the Column Total value.
Presently when I try to do this using
Method handle_user_command.
modifying the inetrnal table GT_FINAL_OUTPUT
with the Total price value .
& updating the column Total price (Qty * price) in the Internal table
After doing this I am agin calling the below function
CALL METHOD g_grid->set_table_for_first_display
EXPORTING
i_structure_name = 'GT_FINAL_OUTPUT'
is_layout = gs_layout
CHANGING
it_fieldcatalog = gt_fieldcat
it_outtab = GT_FINAL_OUTPUT[].
At above function it gives short dump or sometimes it does not update the ALV screen with the new updated value of Total price .
The short dump comes states the error of unassigned field symbol.
Kindly suggest a program where we can do manipulation at the editable ALV.
Or solution to above issue .
Regards,
Anurag
2007 Mar 28 7:56 PM
2007 Mar 28 8:05 PM
Hi,
Please check the fieldcatalog fields should exist in the output table, other wise system will give short dump of field symbol not been assigned.
aRs
2007 Mar 28 8:06 PM
You should only be calling the SET_TABLE_FOR_FIRST_DISPLAY one time in the PBO of your screen, otherwise you should be using the REFRESH_TABLE_DISPLAY method. IN your PBO, check that the instance of the alv_container is alive, if so, do not call the SET method, rather call the REFRESH method.
if alv_container is initial.
create object......
create object g_grid.....
call method g_grid->set_table_for_first_display......
else.
call method g_grid->refresh_table_display( ).
endif.Regards,
Rich HEilman
2007 Mar 28 9:48 PM
Hello Colleagues ,
Thanks for your help .
I was using the wrong definition of the fieldcatlog .
when I change the fieldcatlog building with correct mention of table name & fieldname then it solves the problem of shortdump .
regards,
Anurag
2007 Mar 28 9:50 PM