Skip to Content
author's profile photo Former Member
Former Member

Displaying Data in ALV

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Jul 20, 2011 at 09:00 AM

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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.