Calling different pages in smartforms

Dear Friends,
I need one solution in smartforms, i need to print the different labels in my smartform. For example i have to print three labels
and one normal layout. Three labels means having some fixed data of three rows maximum and these labels repetatively i need to print based on some conditions those conditions i am doing in driver program itself.
For example assume first label i need to print 2 times,second 2 times and third 14 times then final layout contains header and items  section as usual.
So here in the first page only i need to print first label then i have to call the new page to print second label then i have to call the
new page to print third label as there are 14 labels in third page i have to print 9 labels and in the fourth page i have to print remaining  5 labels and i need to call new page to print the last section, the last section is like normal layout there mainwindow and everything is there.
Please help me to handle this scenario.
Any help will be highly appreciated.
Thanks a lot in advance.

This approach to make call from SAPscript. Its concept is similar to make call to a subroutine in another program. I would presume you understand how to use USING and CHANGING parameter. =)
SAPscript -
/: Perform get_date in program z_at_date
/:    using &p_year&
/:    changing &new_date&
/: endperform.
program z_at_date -
form get_date TABLES rec_in  STRUCTURE itcsy
                                rec_out STRUCTURE itcsy..
DATA:
   v_year type char10.
sap script and subroutine uses itcsy structure to transmit parameters
first parameter is incoming while second parameter is out going
their function is like an internal table with header line
all data types between SAPscript and subroutine are string.
so, you might need additional conversion.
read incoming parameter with exact name from SAPscript
  READ TABLE rec_in WITH KEY name = 'P_YEAR'.
  IF sy-subrc EQ 0.
    v_year = rec_in-value.
  ENDIF.
to return value, use the exact name on the second structure
    CONCATENATE v_year v_year INTO v_year.
    READ TABLE rec_out WITH KEY name = 'NEW_DATE'.
    IF sy-subrc EQ 0.
      rec_out-value = v_year.
      MODIFY rec_out TRANSPORTING value WHERE name = 'NEW_DATE'.
    ENDIF.
endform.
Hope this helps =)

Similar Messages

  • Calling different pages in a single sap script based on conditions?

    Hi All,
             Can anyone please give me an example of how to call different pages in a single sap script based on condition. Eg., i need to call 5 differnet pages from a single sap script based on 5 company codes.
    Please help
    Regards
    Priya

    This approach to make call from SAPscript. Its concept is similar to make call to a subroutine in another program. I would presume you understand how to use USING and CHANGING parameter. =)
    SAPscript -
    /: Perform get_date in program z_at_date
    /:    using &p_year&
    /:    changing &new_date&
    /: endperform.
    program z_at_date -
    form get_date TABLES rec_in  STRUCTURE itcsy
                                    rec_out STRUCTURE itcsy..
    DATA:
       v_year type char10.
    sap script and subroutine uses itcsy structure to transmit parameters
    first parameter is incoming while second parameter is out going
    their function is like an internal table with header line
    all data types between SAPscript and subroutine are string.
    so, you might need additional conversion.
    read incoming parameter with exact name from SAPscript
      READ TABLE rec_in WITH KEY name = 'P_YEAR'.
      IF sy-subrc EQ 0.
        v_year = rec_in-value.
      ENDIF.
    to return value, use the exact name on the second structure
        CONCATENATE v_year v_year INTO v_year.
        READ TABLE rec_out WITH KEY name = 'NEW_DATE'.
        IF sy-subrc EQ 0.
          rec_out-value = v_year.
          MODIFY rec_out TRANSPORTING value WHERE name = 'NEW_DATE'.
        ENDIF.
    endform.
    Hope this helps =)

  • How to call specific page of smartforms

    i have smartform in which 5 different pages are there
    i want to call PAGE1 when my sy-tcode eq tc1
    and PAGE2 when sy-tcode eq tc2 like wise...
    how to pass the page name in function module of smartforms???

    HI,
    try this...
    case sy-tcode.
    when ' '.
    Populate the TDPAGESLCT of structure SSFCOMPOP include SSFSPOUTOP of OUTPUT_OPTIONS in form interface of the smartform.
    endcase.
    call the smartform functionmodule
    regards
    padma

  • How to call second page in Smartform without calling first page

    Hi Gurus,
    I have two pages in one smartform. I am using this for PWB purpose. PLease tell me how I first or second page will be triggered depending on the conditional flag that has been defined in global variables.
    For first page it is working...but I don't know how to call the second page bypassing the first page on condition basis.
    Thanks in Advance
    Gautam

    Hi,
    The smartform will always start with the first page in the structure by default.  However when you call the smartform you can specify which page to start with in the structure CONTROL_PARAMETERS field STARTPAGE, this does mean you have to change you print program to include the logic, not the form.
    Regards,
    Nick

  • Dynamically call different pages in smart forms

    Hello Abap Gurus:
    I am creating a smart form for cobra letters, in which i need to display one letter for hourly employees, and other for salaried employees.
    For example in my variant if i have two employees one salried and other hourly then my cobra letters should print different letters for salried and hourly employees.
    Any suggestions are helpful.
    Thanks,
    Ratna.

    Hi,
    I am assuming that before coming to the Smartform you know the Status of the Employee. May be you can get the status from the Smartform Interface Parameters or else set the Variable (Used for comtroling the page printing) in the Driver Program and Import that variable to the Smartform.
    Now once 4 letters are printed after the 4th Letter Create a New Page Command and Check the New Page Check and give Page as "5th Letter Page Name" and Under the Condition Tab give your Variable Name with the Set Value.
    Similarly follow the same process for 6th Letter.
    I suggest to set the Variables Values in Driver Program and IMport this Variable to the Smartform unsing the Form Interface.
    Under the Condition Tab V_GROSS_HRLY(Say Identifier)  NE ' '. This is will take of Printing the New Pages. I think this logic should work.
    Let me know in case if you face any problem on this.
    Regards,
    Srinivas

  • (Solved) Calling a different page using HTML Region as a part of other page

    Hi All,
    I want to open a page as a part of other page as it is done using frames in HTML.
    For example :
    <html>
    <head>
    </head>
    <frameset cols="30%,*">
    <frame src="menu.html">
    <frame src="content.html">
    </frameset>
    </html>
    Now I want to use the HTML Region and try calling different page developed in the same application. How can I acheive this task.
    Hoping for a quick and easy solution for this.
    Thanks in advance.
    Regards
    Arif

    Once Agian Thanks Andrews
    http://www.dynamicdrive.com/dynamicindex17/iframessi2.
    htmThis web page i suppose is presently not available, atleast i'm not able to open it.
    Hope there are some more sites.
    I'm trying to search on Google but as I do not have much information about Java Script so cant identify the exact solution.
    Hoping to get some predeveloped JavScript that works with Internet Explorer and Mozilla Firefox atleast.
    Thanks once again.
    Regards
    Arif

  • How to Print two pages in smartforms

    Hi All,
    How to create two different pages in smartforms.In my requirement the first page contains Table data in main window and in second page only the hard coded desription should be printed containg instructions,but the second page is mandatory after first
    page is completed,the first page may have n number of pages after printing those pages my second page should trigger.Help me if any one knows.
    Thanks in advance............
    Regards,
    Satya.

    hi ,
    once a main window size is declared , then that space will be placed in each page created.
    eg. if a table with header and footer is created, first of all the space for header and footer are allocated and body page is allocated.
    so we cannot dynamically change the size of the main window , even it is a copied main window.
    Otherwise another option is to continue the main window into the second page.
    for that first page main window -> create table -> add page break command to page 2 -> hard code description in template.
    page attribute for first page --> GOTO assign same page ( for continuing the same page)
    Page attribute for second page --> no need default is enough

  • How to trigger different page formats dynamically in smartforms

    Hi ,
    I have a requirement in smartform,want to trigger different page formants based on country code  for ex if country code is ZA12  then pageformant should be DINA4 else page format should be LETTER.
    Rgrds
    Vasumathi

    Hi,
    According to me, you have to create 2 smartforms, one in DINA4 and other in LETTER format.
    In your driver program, you have to maintain condtion depending on country code.
    if country code = 'ZA12'.
    call fm <--- DINA4 format
    else.
    call fm  <--- LETTER format
    endif.
    Regards,
    Naveen

  • How to use different page scapes in smartforms

    hi
    How to use different page scapes in smartforms.
    I want Potrait format in the 1st page and Lanscape format in 2nd page is it possible if so plz suggest me an idea

    Hi,
    It is possible in smart forms, but not in scripts.
    we can have 3 tabbed options for pages in smart forms.
    <b>General...
    Output options
    Conditions</b>.
    In <b>output options</b> u can define whether a page can portrait or land scape in <b>print attributes</b>.
    Reward if helpful.
    Regards,
    Sandhya

  • Calling a page in a different region

    Hi,
    I am using Apex 4.0 with oracle 11g.
    I have a requirement where I need to call a page in a region in different page.
    For example.
    I have 2 pages page1 and page2
    I need to call the page1 in page2 region.
    can someone help me how to implement this. Let me know.
    I appreciate your help.
    Thanks,
    Rik.

    Hi Rik,
    I am using Apex 4.0 with oracle 11g.I have a requirement where I need to call a page in a region in different page.
    For example.
    I have 2 pages page1 and page2
    I need to call the page1 in page2 region.
    can someone help me how to implement this. Let me know.
    >
    Depends on what is your precise requirement.
    To include a complete page with its header , footer ,etc. you will perhaps have no choice other than using iFrame to display the page.
    If you just want one of the regions from Page2 to be shown on Page1 then you have multiple options.
    The simplest is to put the common region on Page 0 and include that region on both pages.
    Cheers,

  • Different page orientation in SMARTFORMS

    Hi Experts,
    Is it possible to have different page orientation (portrait/landscape) for different pages in one smartforms? Thanks so much!
    Best Regards,
    randy

    Hi,
    Yes, it is.  Go to the output options of the page and select the portrait/landscape option.
    Regards,
    Nick

  • How to call the new page in smartforms

    Hi friends,
    How to call the new page in smartforms.
    Thanks,
    Ravi

    Hi,
    Create a command node and click the 'Go to new page' check box specifying the page u want to go.
    You can enter your condition for which it should branch to a new page in the 'conditions' tab.
    Regards
    Shiva

  • Smartforms: Creating main windows in different pages

    Hi all!
    I am using smart forms, I tried to create 2 main windows in 2 different pages. I keep getting the following error: "Two main windows are not allowed." However, I have already seen an example where there are 2 main windows created in 2 different pages. Does anyone know of you how to solve this?
    Thanks for your help.
    Message was edited by: Hajar Belahsen

    Hi Hajar,
       You cannot have two main windows. But the main window can be associated to as many different pages that you want.
       Check the program where you saw that the code inside the MAIN window is same. They have actually associated the window with the page. This is what termed as page-window.
       Give feedback.
    Regards,
    Deva.

  • How to call/show  page(s) from different application

    Hi All,
    I'm working on couple of applications and some reports (about 30) are used in all applications. I need your advice on doing this efficiently.
    Is it possible to
    1) Create a separate application with all the reports.
    2) Create a blank page with lists linking to all those reports on the same tab
    Now, is it possible to call that page in a "reports" tab of each application without prompting for login and still have rest of the tabs visible while the user is using the reports?
    Thanks in advance,
    Asha
    Edited by: ashapatil on Jul 29, 2010 1:54 PM
    Edited by: ashapatil on Jul 29, 2010 5:41 PM

    Asha,
    you can create links to call pages from other applications without any problem, just take a look at the structure of APEX URL over here: http://www.oracle-and-apex.com/apex-url-format/
    To avoid re-logins you could either disable security on your application (not recommended) or create a custom authentication scheme which takes logged in users from other applications as granted.
    brgds,
    Peter
    Blog: http://www.oracle-and-apex.com
    ApexLib: http://apexlib.oracleapex.info
    Work: http://www.click-click.at
    Training: http://www.click-click.at/apex-4-0-workshops

  • 2 main windows in 2 different pages with different layouts

    Hi Guru's,
    I'm working on Smartforms.
    My problem is, i have 2 different pages with 2 diiferent main windows.
    The First Page lasts after 7 pages of Data Printing.
    It is coming corrctly.
    I've assign the Next Page as Second Page in the First Page and i'm maintaining a condition in the First Page to go to the Second page.
    Everything is working fine, but in the second page i'm not getting the Main Window.
    What could be the Problem??? Why the control is not going to main window of second page???
    Thanks in advance.
    Regards,
    Adi.

    Try like this:
    1. Set the Next page of the FIRST as FIRST
    2. In the MAIN window of the FIRST, after completing the TABLE, create a command which calls the SECOND PAGE.
    3. In SECOND page, create a MAIN window, with differnet name. If you create a same name, system will automatically refer the MAIN window in the FIRST page.
    4. Set the next page of the SECOND as SECOND.
    Regards,
    Naimesh Patel

Maybe you are looking for