Skip to Content

SMARTFORMS Using tables

Hello guys, i need some help with respect to, designing a smart-forms using tables pa0001, pa0002, pa0006, T527X. Where, i have to fetch a details from a mentioned tables, which will display the PERNR values in two different pages, where-in each page will display only 2 PERNR values, I,e., PERNR Number 1 and PERNR Number 2

Note: Fields from the Tables are:

Table
Field_name
PA0001 ORGEH PA0002

VORNA

NACHN

NATIO

PA0006

PERNR

BEGDA

ENDDA

T527X ORGTX

AND THE OUT-PUT SHOULD LOOK LIKE AS BELOW

PAGE: 1

PERNR
VORNA
NACHN
NATIO
ORGEH
BEGDA ENDDA ORGTX
1 XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX 2 XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX

PAGE: 2

PERNR
VORNA
NACHN
NATIO
PERNR
BEGDA ENDDA ORGTX
3 XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX 4 XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX


NOTE: 'X' some values

Message was edited by: Anand Maverick kindly, replay with a screen shots

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 03, 2013 at 07:57 PM

    create a program lines in main area of your table node.

    here you have to write code:

    g_counter = g_counter + 1.

    abc = g_counter mod 2.

    if abc = 0.

    g_flag = 'X'.

    else

    clear g_flag.

    g_flag = ' '.

    endif.

    you have to put g_flag and g_counter in output parameters of program lines.

    define g_flag and g_counter in global definition part of smartform.

    you have to create a command in main area of table node. select main area of table node and right click on it and create loop. here you have to put your final internal table. then right click on loop node and create command. in your program 8 cell present. right click on any of cell and create program lines. create 1st command, next create program lines. in command, 2 tabs present. general attributes tab-> you have to check go to new page and give next page name like NEXT. in condition tab, put g_flag = 'X'. at last in next page, you have to copy main window node from page 1 .

    i explained details and step by step.. follow it....hope your problem will be solve.........

    Regards

    Sabyasachi

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Sabyasachi,

      I also had similar type of requirement like this displaying one record in one page (multiple records in multiple pages). For this I used the same concept as you said above,but in my case the data in second page is not getting populated.

      I have created smartform as below

      PAGE1

      mainwindow

      code populating final table

      created table

      created loop with final internal table

      created command line(had put the condition w_pgbrk_flg = 'X')

      the rows to be be printed

      Created PAGE2 and copied MAIN WINDOW of page1 to page2.

      The number of pages are coming correct but the data is not getting populated from the second page.

      Can you please help me out with this.what did i miss here.

      Thanks in advance,

      Kumar.

  • author's profile photo Former Member
    Former Member
    Posted on Jan 04, 2013 at 07:20 AM

    Hi,

    1.Collect all the required data into an internal table and pass it to the smartform.

    2.Create a table or a template inside the loop.

    3.Create a variable and increment the counter in the beginning of every loop, create a command and check the box 'Go to Neew Page' and give the current page number.

    In the condition tab give the condition as Counter variable = 2(The new page will be triggered whenever a count of 2 employees has been processed) and clear the counter variable.

    Regards,

    Swarna

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi you can follow sathya's idea to implement your requirement that is the best procedure to achieve page break in smartform. i.e. Put a command to go to new page based on the temporary counter variable.

      Regards,

      Praveen

  • author's profile photo Former Member
    Former Member
    Posted on Jan 04, 2013 at 03:47 AM

    You can create a command with condition to trigger a new page within loop.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.