2011 Jul 20 9:54 AM
Hello Experts,
I have a scenario where i want to display data in ALV.
But I have to display op by working on different internal tables.
Mean it is not straight one internal table which i can pass to "REUSE_ALV_GRID_DISPLAY".
Following is my code to display output. Please tell me how can i display the same o/p in ALV.
LOOP AT IT_FINAL2 INTO WA_FINAL2." this table contains all the sales offices.
TOTAL_SUM = 0.
TOTAL_TARGET = 0.
TOTAL_VARIANCE = 0.
WRITE:5 'Sales Office Code:', WA_FINAL2-VKBUR, 60'Sales Office Name:', WA_FINAL2-BEZEI.
SKIP.
ULINE.
WRITE:/5 'MONTH',
59'SALES',
89'TARGET SALES',
139'VARIANCE(In %)'.
LOOP AT IT_FINAL INTO WA_FINAL WHERE VKBUR = WA_FINAL2-VKBUR." this table contains sales data.
TOTAL_SUM = TOTAL_SUM + WA_FINAL-SUM.
TOTAL_TARGET = TOTAL_TARGET + WA_FINAL-TARGET.
WRITE:/5 WA_FINAL-MONTHNAME,
45 WA_FINAL-SUM,
80 WA_FINAL-TARGET,
120 WA_FINAL-VARIANCE.
ENDLOOP."end for it_final
ULINE.
TOTAL_VARIANCE = ( ( TOTAL_SUM * 100 ) / TOTAL_TARGET ) - 100.
WRITE: /5 'TOTAL',
45 TOTAL_SUM,
80 TOTAL_TARGET,
120 TOTAL_VARIANCE.
skip.
ENDLOOP."end for it_final2
Regards,
Amar
Moderator Message: First try to figure your own logic & get back to the forums in case you face any difficulty. Don't expect others to spoonfeed you.
Edited by: Suhas Saha on Jul 20, 2011 2:37 PM
Hello Experts,
I have a scenario where i want to display data in ALV.
But I have to display op by working on different internal tables.
Mean it is not straight one internal table which i can pass to "REUSE_ALV_GRID_DISPLAY".
Following is my code to display output. Please tell me how can i display the same o/p in ALV.
LOOP AT IT_FINAL2 INTO WA_FINAL2." this table contains all the sales offices.
TOTAL_SUM = 0.
TOTAL_TARGET = 0.
TOTAL_VARIANCE = 0.
WRITE:5 'Sales Office Code:', WA_FINAL2-VKBUR, 60'Sales Office Name:', WA_FINAL2-BEZEI.
SKIP.
ULINE.
WRITE:/5 'MONTH',
59'SALES',
89'TARGET SALES',
139'VARIANCE(In %)'.
LOOP AT IT_FINAL INTO WA_FINAL WHERE VKBUR = WA_FINAL2-VKBUR." this table contains sales data.
TOTAL_SUM = TOTAL_SUM + WA_FINAL-SUM.
TOTAL_TARGET = TOTAL_TARGET + WA_FINAL-TARGET.
WRITE:/5 WA_FINAL-MONTHNAME,
45 WA_FINAL-SUM,
80 WA_FINAL-TARGET,
120 WA_FINAL-VARIANCE.
ENDLOOP."end for it_final
ULINE.
TOTAL_VARIANCE = ( ( TOTAL_SUM * 100 ) / TOTAL_TARGET ) - 100.
WRITE: /5 'TOTAL',
45 TOTAL_SUM,
80 TOTAL_TARGET,
120 TOTAL_VARIANCE.
skip.
ENDLOOP."end for it_final2
Regards,
Amar
Moderator Message: First try to figure your own logic & get back to the forums in case you face any difficulty. Don't expect others to spoonfeed you.
Edited by: Suhas Saha on Jul 20, 2011 2:37 PM
2011 Jul 20 10:00 AM
why dont you try REUSE_ALV_BLOCK_LIST_DISPLAY if you want he two tables separetely.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |