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

Displaying Data in ALV

former_member925838
Participant
0 Likes
433

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

1 REPLY 1
Read only

lijisusan_mathews
Active Contributor
0 Likes
397

why dont you try REUSE_ALV_BLOCK_LIST_DISPLAY if you want he two tables separetely.