on 2008 Apr 29 6:15 AM
Hi all,
I have to generate an output letter for each customer using smartform .In the report program I am fetching the customer data and I am populating the data into an internal table say ts_customer. i.e ts_customer will contain the data of all the customers in case of multiple customer output. Suppose ts_customer contains 3 records corresponding to 3 customers.But when I am executing the program only the smartform output corresponding to the first customer is getting displayed i.e only one page is getting displayed.As of now I am looping the table ts_customer in the report program. Is it possible to loop the table ts_customer from within the smartform so that the letter corresponding to each customer will be displayed.
Thanks & Regards,
Neethu.
Hi Neetu,
I guess You declared 2 second page if not declare it..or else
Have You declare the table in main window..if so,
Loop the your final Internal table...with SF...I mean
Loop at ts_...
call Fucntion 'SSF_-----'
end loop.
Try it...
regards,
sg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
problem solved
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In the initialazition tab copy the data of ts_customer into anther internal table like as follows.
data:it_cust type table of ts_customer.
it_cust[] = ts_customer[].
sort it_cust by kunnr.
delete adjacent duplicates it_cust comparing kunnr.
now your internal table contains no duplicate kunnr.
first loop the it_cust.
then loop the ts_cust where kunnr = it_cust-kunnr.
after this loop create a command node
select the go to and give the next page .
now it will give multiple letters for each customers.
Tnks,
NN.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Neethu,
The best solution for this kind of requirement is to add loop inside the smartform and not in the program.
To do this follow the below steps:
1) Declare your Internal table in Form Interface.
2) Declare a work area in Global Definations
3) Add a loop above the window which you want to print.
4) On the Data tab of Loop node enter ts_customers into wa_customers.
Now try to execute your transaction the test it.
Finally, dont forget to give Reward points.
Cheers,
Chaith.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
U created a table regarding customer ts_customer.
u mention loop (table to wa)in the data tab of the table painter.
In order to go to next page use command node at the end of the table.In the command node check the option Go to new page. Give the default page1 only to it in that.
Then it will trigger new page....
it will work surely...... if not get me back,i will give the solution.
thnx
sravani
Plz reward points if helpful..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
I declared the table ts_customer in the form interface parameters.
I am fetching the data in the report program and passing it to the form via the form interface.And in the main window I have created a loop.
i.e loop at ts_customer into wa_customer.
and I am displaying &wa_customer-kunnr&, &wa_customer-kunn2& etc in text elements. At the end of all text elements I have created a command & given go to new page Page1 and also in the command conditions I have checked the check box Only After End of Main Window. But this is not working.Even if I give multiple customer only the page corresponding to the last customer is getting displayed.
I think its overwriting. Please give the solution.
Thanks & Regards,
Neethu.
Hi ,
U have to use page breaks . Once all the details related to a particular customer are printed then use page break using command to display the next customer details in next page .
Regards
Neetesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
69 | |
13 | |
11 | |
10 | |
9 | |
9 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.