08-17-2007 5:19 AM
hello,
i had created smartform, in that i had created the template. Now the driver program had passing two records. But the template at a time will process the one record. So can we please specify how to loop into internal table which is coming into smartform from driver program. I had check in the driver program the internal table conatins two record but at the time of execution ie after passing to smartform it is taking latest record ie second record.
08-17-2007 5:23 AM
Hi..
Template is not the Right node for this bcoz it will display only Static values.
Create a <b>Table Node</b> where you the Option to Loop the Internal table and Display.
<b>Reward if Helpful.</b>
08-17-2007 5:32 AM
HI,
Let me say the clear picture..
Let us take the table below
Fields:
matnr werks lgort -
This is the template static value
1001 09 1001 -
This is an internal table
1003 09 1001
Template just takes static values you cannot loop into it..
please define a table by right click and pass the values.
rewards if useful,
regards,
nazeer
08-17-2007 5:48 AM
Hi,
Template is not used for looping purpose . U can use tables in place of templates .
Or
If it is mandatory for u to use loop in template . Then put the template inside the loop in smartform .
Regards
08-17-2007 6:08 AM
Hi Neetesh,
I did the same ie. first i had created the loop and inside that loop i had put the template. But the problem is both the records are coming on one page. I want to display on per page the single record.
Can you please help me to do this.
thanks
08-17-2007 5:52 AM
I think ur problem can be solved only by creating table.
You can not display variable no of records using template.
Either use table. Or u can do one thing create a loop and then under that loop u can keep ur template.
08-17-2007 6:05 AM
Hi suman,
I did the same ie. first i had created the loop and inside that loop i had put the template. But the problem is both the records are coming on one page. I want to display on per page the single record.
Can you please help me to do this.
thanks
08-17-2007 6:09 AM
Hi Darshana,
For every record in your internal table, trigger the NEXT-PAGE event.
I mean there is a node for triggering next-page, based on few conditions.
Best Regards,
Ram.
08-17-2007 6:13 AM
Hi ram,
how to trigger the next-page based on the condition.
Please help me to solve this.
Thanks
08-17-2007 6:15 AM
Hi Darshana,
There is a node called "COMMAND".
Create the command node just before the end of the loop after you print the template. In this you have an option called "GO TO" where you can set it to next page.
Best Regards,
Ram.
08-17-2007 6:24 AM
Hi Ram,
I had created the command, but there is only one page selected and it is giving error -%COMMAND1 No new page allowed in secondary window.
I had created like this PAGE-WINDOW-LOOP-TEMPLATE. There is no main window.
Please help me to do this
08-17-2007 6:35 AM
Hi darshana,
I guess you need to have MAIN window.
Try introducing a MAIN window and two pages.
Trial and error would definitely help you solve the issue.
Best Regards,
Ram.