cancel
Showing results for 
Search instead for 
Did you mean: 

FORM-Change value of Secondary Window @ Runtime/values set from Main window

Former Member
0 Kudos

Hi All,

I have to show header data at top of smartform for particular customer and I am getting value of customer loop in main window. Whenever value of customer changes I have to print corresponding details of customer in new page. The problem I am facing is how I can get the value of current customer number which is set during loop defined in main window. I tried using defining final window but itu2019s not working (Setting value of Customer to last value of customer in loop)

Example: Table is having 10 records for 5 customers u2013 2 each.

Output will show at top of page u2013 Customer header Details (Address Info) at top of page and item details in main window (Which can extend to multiple pages).

In output I will be having 5 pages, one page for each customeru2026

I tried to search for exist post for my problem in form but didnu2019t find right link.. Please assist.

Thanks & Regards,

Rajesh

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Instead of having the address in the seperate secondary window,

you can try with the main window itself.

In the Main window,create a table.

In the Table Header area create two row types one for the customer address details and another for the customer item details.

In the Main area display the item details.

Jshree

Former Member
0 Kudos

Thanks Jshree,

I have already explored this option.. its not giving desired output.. I have printed the value in header of table & rest of info in main area of table. Its not picking the First record when it loops through internal table first time (On first page - so values are coming blank) & on the next page its showing value of last record...

Here I require current customer number whose values i am printing... Please suggest more inputs..

Former Member
0 Kudos

Hi,

Each customer number gets printed on new page.

You have the list of customers with you.And you can find out the page nos on which that customer is printed.

Why dont you read the customer number for that particular index based on page no.

I mean if you have customers:

1

2

3

1st page : customer 1

2n page : customer 2

v_index = sfsy-formpage.

read table it_customer into wa_customer index v_index.

Check if thsi helps.

Edited by: sap_wiz on Jun 8, 2011 2:11 PM

Former Member
0 Kudos

Hi,

1.In the Main Window,add a loop for your address table.

2.Inside the loop,add the table which you created before,which displays the address and the item descriptions in the header area and item details in the main area.

3.Make sure that you provide the where condition in the table.(Item customer Num eq address customer)

Jshree.

Edited by: Jshree on Jun 8, 2011 11:02 AM

Former Member
0 Kudos

Yah i am going through same way and counting the number of records been processed... As on new page its giving me the index of last record processed, So at header level I am using this value by incrementing by 1 and reading the table I am looping thru... & If its first page - thn simply reading the first record and displaying the details...

I am nto thru with coding part will update the form abt result..