Skip to Content
avatar image
Former Member

how to give loop to the template

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Aug 17, 2007 at 04: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>

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 17, 2007 at 04: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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 17, 2007 at 04: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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • avatar image
    Former Member
    Aug 17, 2007 at 04: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.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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.