2011 Dec 17 12:29 PM
Hellow Experts,
i got the some code to genrate auto genrated column based on date my out put is as follow
StudentID Day00 Day01 Day02 ......Day31
178 20 30 40 50
My Code for genrate day is
LOOP AT gt_cols INTO gs_col.
TRY.
CONCATENATE 'DATE' gs_col-date INTO g_col. "Define Column name
gr_column ?= gr_columns->get_column( g_col ). "Get column
CONCATENATE 'Day' gs_col-date+6(2) INTO g_txt. "Define new label (Day01, .., Day31)
gr_column->set_long_text( g_txt ). "Set label long text
CATCH cx_salv_not_found. "#EC NO_HANDLER
ENDTRY.
* CATCH cx_salv_not_found. "#EC NO_HANDLER
* ENDTRY.
ENDLOOP.
My requirment is i dont need 'Day00' like follow
StudentID Day01 Day02 ......Day31
178 30 40 50
PLz help me and Ammend my above code to remove Day00.Thanks
Hellow Experts,
i got the some code to genrate auto genrated column based on date my out put is as follow
StudentID Day00 Day01 Day02 ......Day31
178 20 30 40 50
My Code for genrate day is
LOOP AT gt_cols INTO gs_col.
TRY.
CONCATENATE 'DATE' gs_col-date INTO g_col. "Define Column name
gr_column ?= gr_columns->get_column( g_col ). "Get column
CONCATENATE 'Day' gs_col-date+6(2) INTO g_txt. "Define new label (Day01, .., Day31)
gr_column->set_long_text( g_txt ). "Set label long text
CATCH cx_salv_not_found. "#EC NO_HANDLER
ENDTRY.
* CATCH cx_salv_not_found. "#EC NO_HANDLER
* ENDTRY.
ENDLOOP.
My requirment is i dont need 'Day00' like follow
StudentID Day01 Day02 ......Day31
178 30 40 50
PLz help me and Ammend my above code to remove Day00.Thanks
2011 Dec 17 6:43 PM
LOOP AT gt_cols INTO gs_col.
TRY.
IF gs_col-date+6(2) NE '00'. "Add this IF statement and see if it solves the problem
CONCATENATE 'DATE' gs_col-date INTO g_col. "Define Column name
gr_column ?= gr_columns->get_column( g_col ). "Get column
CONCATENATE 'Day' gs_col-date+6(2) INTO g_txt. "Define new label (Day01, .., Day31)
gr_column->set_long_text( g_txt ). "Set label long text
ENDIF.
CATCH cx_salv_not_found. "#EC NO_HANDLER
ENDTRY.
* CATCH cx_salv_not_found. "#EC NO_HANDLER
* ENDTRY.
ENDLOOP.-- Aniruddha
2011 Dec 18 7:42 AM
Thank a lot Friend its working Fine,
How can i making Do_SUM for Auto Genrated Column Like,User entered date between 01 to 20 so i am able to get 20 column but i need the SUM of column at footer Like Do_SUm , i m not using Field catalog ,Thanks for your help.
2011 Dec 18 8:03 AM
If I understand your requirement correctly:
Do you want to sum up all the dates in a certain column? If that is so, I guess it would produce an absurd result.
Or is it that, I am not understanding your query correctly?
2011 Dec 18 8:12 AM
sorry its my mistake i didnt explain completley.
Actually i m getting the O/P
daye1 day2 day3
20 10 20
10 12 14
And i need only the Sub Total Like Follow
daye1 day2 day3
20 10 20
10 12 14
30 22 34 *this is the sub total i need
I m not using Field catalog .Thanks for reponse.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |