2008 Apr 24 10:44 AM
hi,
i am facing problem in calculating subtotal of the material individually.
in program i am using coding as:-
gs_layout-grid_title = text-006.
SORT gt_so_entered BY matnr.
*Call method set_table_for_first_display
CALL METHOD gr_grid_2000_balance->set_table_for_first_display
EXPORTING
i_structure_name = 'ZZS_SO_RECORD'
is_layout = gs_layout
CHANGING
it_outtab = gt_data
it_fieldcatalog = gt_fieldcat.
where ZZS_SO_RECORD is a structure and gs_layout TYPE lvc_s_layo, gt_data contain data to be displayed and gt_fieldcat TYPE lvc_t_fcat.
In my alv i am getting sum of total matnr but i want to calculate subtotal of each item like follows:-
material qty
pencil 2
pencil 5
-
7
pen 1
pen 3
-
4
can any one help me out with coding for such type of out put with subtotal
Edited by: pankaj prasad on Apr 24, 2008 11:45 AM
hi,
i am facing problem in calculating subtotal of the material individually.
in program i am using coding as:-
gs_layout-grid_title = text-006.
SORT gt_so_entered BY matnr.
*Call method set_table_for_first_display
CALL METHOD gr_grid_2000_balance->set_table_for_first_display
EXPORTING
i_structure_name = 'ZZS_SO_RECORD'
is_layout = gs_layout
CHANGING
it_outtab = gt_data
it_fieldcatalog = gt_fieldcat.
where ZZS_SO_RECORD is a structure and gs_layout TYPE lvc_s_layo, gt_data contain data to be displayed and gt_fieldcat TYPE lvc_t_fcat.
In my alv i am getting sum of total matnr but i want to calculate subtotal of each item like follows:-
material qty
pencil 2
pencil 5
-
7
pen 1
pen 3
-
4
can any one help me out with coding for such type of out put with subtotal
Edited by: pankaj prasad on Apr 24, 2008 11:45 AM
2008 Apr 24 11:51 AM
I can see that you are not using the IT_SORT parameter when calling method set_table_for_first_display.
Have a look at this:
http://help.sap.com/saphelp_nw70/helpdata/EN/0a/b5533cd30911d2b467006094192fe3/frameset.htm
and look at left side of screen also for method: set_sort_criteria.
Also look at the fields of the IT_SORT parameter like SUBTOT.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |