Application Development 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: 

To display two reports in one report?

former_member456271
Participant
0 Kudos

Hello All,
My requirement is,

if user gives data of cc and execute. the cc report will display. which was working fine. as shown in below figure.

if user gives data of WBS and execute, the WBS report will display. which was working fine. as shown in below figure.

if user gives data of cc and wbs execute. the cc and bs report will display. which was working fine. as shown in below figure.

For cc and wbs report im not able to display multiple records.
Because cc and wbs don't have common element to display multiple records.
For which i'm using index 1. So it was not displaying multiple records.
Is there any logic to display multiple records, if yes suggest me how.
I'm searching for past 10 days, but no result.

Please help me out in this.

Below is logic i wrote to display multiple records.

    READ TABLE it_final_cc INTO wa_final_cc INDEX 1.
    MOVE wa_final_cc-kostl TO wa_final-kostl.
    MOVE wa_final_cc-ktext TO wa_final-ktext.
    MOVE wa_final_cc-actual TO wa_final-actual_cc.
    MOVE wa_final_cc-budget TO wa_final-budget_cc.
    MOVE wa_final_cc-commit TO wa_final-commit_cc.
    MOVE wa_final_cc-allot TO wa_final-allot_cc.
    MOVE wa_final_cc-avail TO wa_final-avail_cc.

    READ TABLE it_final_wbs INTO wa_final_wbs INDEX 1.
    MOVE wa_final_wbs-pspnr TO wa_final-pspnr.
    MOVE wa_final_wbs-post1 TO wa_final-post1.
    MOVE wa_final_wbs-actual TO wa_final-actual_wbs.
    MOVE wa_final_wbs-budget TO wa_final-budget_wbs.
    MOVE wa_final_wbs-commit TO wa_final-commit_wbs.
    MOVE wa_final_wbs-allot TO wa_final-allot_wbs.
    MOVE wa_final_wbs-avail TO wa_final-avail_wbs.
    APPEND wa_final TO it_final.
    CLEAR : wa_final.
  ENDIF.
3 REPLIES 3

former_member259807
Active Participant
0 Kudos

Just to be clear: do you want cost center data and wbs data which are not related to appear on 1 line in your output, and then do a (as we in the old days used to refer to) "level break" approach to print both internal tables?

So CC table contains 10 records, wbs table contains 8 records. This results in 10 lines in the output with on line 9 and 10 only the CC info. Is that what you are after?

Former Member
0 Kudos

Hi harish,

check your third select query "where" condition ,

if you are using cc and wbs ,, use "or" condition between them.

former_member456271
Participant
0 Kudos

I displayed two reports using DO and ENDDO Loop.