cancel
Showing results for 
Search instead for 
Did you mean: 

How to fetch data from Internal table in Main Window to the window on top

ksehrawat
Explorer
0 Kudos

Hi All,

I am stuck on this issue where I have to print STATE(T005U-BEZEI) and DEPOT(T001W-NAME1) on the window at top of the page.

I ahve these fields in my final table on which I have a loop on the main window. The requirement in the report is to get Party wise total, Depot wise total and State wise total. While, the calculations have been done, I want to print STATe & DEPOT over the top of the page for for every DEPOT change, there shud be a page-break.

NOTE : I have sort-begin & sort-end events on party, depot & state.

I request the all of the geniuses to step ahead & Pls reply ASAP to this , How to fetch data from main window to the window on top of the page.

Thanks,

Kamal

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

hi kamal,

declare some global variables in the global interface.

just insert a code element in any part before the window you want data. in this code block loop at the table using normal abap and fetch the required fields to the global variables.. and after use clear these variables.

ksehrawat
Explorer
0 Kudos

@ Ray : It din work. My smartform requirement is like :

state:

depot:

main window ( the data showing in the main window will be of the state & depot meintioned above on my seconday widow.

Any suggestions...

Regards,

Kamal Sehrawat

Edited by: Kamal Sehrawat on Sep 8, 2009 1:16 PM

brad_bohn
Active Contributor
0 Kudos

It's really very simple - you just haven't set up your interface, global data and control break processing correctly. You've been given enough suggestions - we can't code it for you...

ksehrawat
Explorer
0 Kudos

Hi All,

the issue has been resolved by using Import & Export in ABAP memory.

@Brad: No need to code for me. But, thanks for the replies.

Thanks,

Kamal Sehrawat

former_member755502
Participant
0 Kudos

Hi,

Suppose you are using text within the window which you want to print at the top, bring that text within mian window. It will solve your problem and with change in STATE and DEPOT it will display the correct data. All you need to do is some design changes. Or one more way I think you can solve it but I am not too sure about it. Put a loop on the whole page, select the records for a particular STATE and DEPOT. Here, populate some local variables with STATE and DEPOT values, use it wherever you require. Store all records for that particular STATE and DEPOT in an internal table and use it for main window. Make sure all these coding should be done before any window.

I hope it will be of some help.

Regards,

Sambaran.

brad_bohn
Active Contributor
0 Kudos

Use your control break processing in your program to set the correct global variable values. The non-MAIN windows will be rendered at the time the page is closed and you move on to the next page, so just make sure that the correct values are stored at that time.

ksehrawat
Explorer
0 Kudos

Hi Brad,

But, that will result in first page as blank. This did something like this.

Any other logic to follow.. Come On frends need your help..