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

Similar Messages

  • How to print different  header & item data in new pages using smart forms.

    Hi,
    In smart forms I am trying to print header data & their item data. But there are more than one header data for a given input.
    I want to print all the different header data with their item data in new pages using smart forms. Can any one please help to solve the issue.. Its very urgent for me..
    Regards,
    Brajesh

    Hi
    U need to use control break statements to acheive ur requirement.
    Regards,
    Priya

  • How do u get New page in Smart form dynamically

    How do u get New page in Smart form dynamically

    page break in smart form
    Re: New Page in Smart Forms
    Page break inside a loop  in smart form

  • 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 =)

  • Calling OAF Page from Oracle forms

    Hi All,
    Is it possible to call an Oracle Forms from OAF page?
    I need to call a OAF page EAM material cost screen from oracle form using personalization.
    Please any one put on some lights on this issue.
    Thanks in Advance,
    Ramesh reddy
    Edited by: user642447 on May 13, 2011 4:33 AM

    Ramesh,
    yes, its possible to call oaf page from oracle forms.
    This has been specified step by step in Developer Guide. Refer it for more.
    Regards,
    Gyan

  • How to know no of pages in smart forms to be printed ?

    Hi,
         How to know no of pages in smart forms to be printed ?
    though i got SFSY structure during run time of smartform , even that was not useful.
    &SFSY-FORMPAGES&
    Displays the total number of pages for the currently processed form. This  allows you to include texts such as'Page x of y' into your output.
    for that Page &SFSY-PAGE& of &SFSY-FORMPAGES&
    during debug of smart form i don't  understand how it is calculating no of pages  ,as i kept break point before printing page no in smart form.
    please check my  two screen shots, sfsy-formpage still contains current page no only but not total no of pages.
    Help Required.
    Thanks In advance.

    Hi Prakash,
    You will not get these values during debugging.. Let the program execute completely, you will get the right values.
    As Manish said, the value for &SFSY-FORMPAGES& will be known only after all the pages are processed, though it is not necessary that you use them in the final window only. It can be a text node in a window of any type.
    You will get the desired output, just cant see them during debugging within the program. At the time of printing or in the print review, output would be as expected.
    Also, FYI, it would be better to give total pages as &SFSY-FORMPAGES(3ZC)&  as there can be error if the total number of pages exceeds 9, due to lack of sufficient space to print more digits

  • How to mention two different next pages in smart forms

    Hi
    In our scenario there is smart form in which we have one main window, after that we need to print two different pages one for instructions and other for delivery address.
    In main window we can add a command and mention the condition for a next page e.g Instructions page. but for  delivery address page we are unable to specify condition in main window or in secondary window  in instruction page/main page.
    Kindly help us
    Regards
    Ammad

    Hi Ammad,
    Create two pages(page2 and page3), page2 for printing the "Instructions" and second(page3) for "delivery address".
    in the first page, at the end of main window create the command and specify as below
    general attributes->check the go to new page check box->choose the page which u wanted to be print on the second(for your case it is page2).
    In the page2->general attributes->next page->give "page3".
    Thanks,
    Prabhakaran
    Edited by: prabakar1998 on Dec 12, 2011 9:42 AM
    Edited by: prabakar1998 on Dec 12, 2011 9:44 AM

  • How to print two different multiple pages in smart forms

    Hi All,
    In my form iam printing 12 different pages.In that 11th & 12 th pages are having two different formats and if more records are there for each page i have to print more similar pages.For 12th page iam using main window in that by using command and table nodes iam printing similar pages for 12th one.
    But come to 11th page i don't have more than one main window in my form.So iam unable to use the command node.
    Can anybody help regards to this problem.
    Regards,
    Srinivas Reddy.Ch

    hi Srinivas..
    u don't have multiple main windows in smartform but we can us the same window for multiple number  of pages...
    wht u need to do is use the CONDITIONS Tab of every node..
    in the check <b>only on page</b> PAGE11.. for the node u want to trigger in page11 and for other node <b>only on page</b> PAGE12 for the node u want to trigger in page12.
    i hope it is clear now.. let me know if u want more clarification.
    Please Close this thread.. when u r problem is solved. Reward if Helpful
    Regards
    Naresh Reddy K

  • CREATION OF MULTIPLE PAGES IN SMART FORMS

    Hi,
    I have a smart form in which i need to create 2pages.First will be followed by next and next by next
    I created the first page and then i created the next page .
    when i created first page i got a default main window and when i created a second page i.e the next page ,i did not get any default main window and when i tried to save it gives an error saying page without window cannot be saved.
    WHEN I CREATED A WINDOW WITH MAINWINDOW BUTTON ENABLED IT SAYS ALREADY EXISTS AND TWO MAN WINDOWS CANNOT EXIST .cAN ANYONE PLS HELP ME OUT REGARDING THIS
    THANKS

    hi
    good
    1-go to smartforms
    2-in a smartforms there is only one main window you can create,it is not like sap script that you can create 0 to 98 main windows,so on main window ll come bydefault but if you want to create another window that would be called as subwindow and that you can create by right click on the main window node and select create window.
    3-After selectging the window one small window would arise over the main window screen , you can give any size of that window and on the right hand side of the window node you ll find three tab from there on general attribute would be there,from there you select secondary window ,because every second window other than the main window is called as secondary window.
    now you can try like this it ll definitely work fine.
    thanks
    mrutyun

  • 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 =)

  • Pages in Smart Forms

    Hi Experts...
    I'm having a problem with the paging of a couple of Smartforms...
    I did not develop them but I've been asked to try to fix the issue.
    The forms have something particular, they have different PAGES (2 or more) and the customer wants the page counter to INITIALIZE for each PAGE.
    For example:
    One of the forms is an AUDIT Form. It has the pages FIRST and SECOND.And they're set up like this:
    FIRST:
    - Next Page: SECOND
    - Mode: Initialize Counter
    SECOND:
    - Next Page: SECOND
    - Mode: Increase Counter
    To Print the paging we're using:
    Page &SFSY-PAGE& of &SFSY-FORMPAGES&
    When we print, there are 3 pages on the form (2 for FIRST and 1 for SECOND), BUT, the paging is coming out like this:
    Page 1 of 1
    Page 2 of 1
    Page 1 of 1
    The correct would be:
    1 of 2
    2 of 2
    1 of 1 (because this is "a different form inside the same form")
    First 2 pages are for FIRST... and the last is for SECOND.
    I have already changes the config to both as INCREASE (still wrong 'cause then they show 1 of 3, 2 of 3 and 3 of 3)
    I've tried everything... any ideas?
    Thanks a lot in advance!
    Fernanda

    &SFSY-FORMPAGES& gives the total no of pages in a form and as per your example it is 3 .  You are trying to achieving something which is not possible with system variables.(  print 2 layouts using 1 smart form object ).
    You may review the data and see the how pages are displayed. .. if it is always 3 pages then you can hard code it or reset the counter based on &SFSY-PAGENAME& . otherwise you need to build a logic to determine how many second pages out of &SFSY-FORMPAGES&...
    It would have been better if the second page is kept as a separate smart form, however doing this now would be time consuming .
    In case you are not able to derive the no of pages from the total pages, then I would suggest you to convince the business  to use simple page numbering(1,2,3 ). and then you can reset the page counter based on page name .. ( use variable for page counter ).

  • Display either ( first and second page ) or only second page on smart form

    Hi All,
    There is a requirement in which we get Program name and smart form name from table TNAPR.Now the smart form contains 2 pages.We have to check condition in the program and based on the condition we have to Display either ( first and second page ) or only second page of the smart form.
    Can any one please tell how to solve this .
    Tahnks in advance.

    SSFCOMPOP-SPONUMIV-->Number range number
    SSFCOMPOP-TDPAGESLCT-->Pages selected for printing
    Data: t_out type ssfcompop.
    If COndition.
    t_out-sponumiv = 'Number Range'.             " 1-2  or 2
    ESLE.
    t_out-sponumiv = 'Number Range'.
    ENDIF.
    OR:
    If COndition.
    t_out-TDPAGESLCT = '2'.        " Else Bot pages will print      
    ENDIF.
    Pass T_out to the function module.
    CALL FUNCTION 'FORM'
        EXPORTING
    *   ARCHIVE_INDEX              =
    *   ARCHIVE_INDEX_TAB          =
    *   ARCHIVE_PARAMETERS         =
    *   CONTROL_PARAMETERS         =
    *   MAIL_APPL_OBJ              =
    *   MAIL_RECIPIENT             =
    *   MAIL_SENDER                =
    OUTPUT_OPTIONS             = t_out
    *   USER_SETTINGS              = 'X'.
    Regards,
    Gurpreet

  • Dynamically display the page numbers on forms

    Hi,
    I have 10 pages in a form with the common footer section/fap in all pages. I used the common footer section to maintain the consistent left and right footer (having State specific footer information) on all ten pages. But I would like to display the page number dynamically based on page number as specified below:
    For example, for page 1, it should display the footer as Page 1A,for page 2 it should display as Page 1B, for page 3 it should display as Page 1C etc.,
    Can anyone help me on this issue how can I dynamically display the page number based on the current page as per the above requirement.
    Thanks,
    Srini.
    Edited by: 943696 on Jul 9, 2012 4:39 PM
    Edited by: 943696 on Jul 9, 2012 4:44 PM

    Ignoring the fact that you have 10 pages that you want to label all as "page 1", assuming you have version 11.4 (? or higher) you might be able to do this.
    Somewhere around that version the concept of "Print time" fields was introduced where you can define a field that will make a call-out to generate the value at the point in time when it tries to print.
    You would name the field something like: ~DAL MyPageValue
    Yes, with the tilde next to DAL and a space between DAL and the name of a script you want to execute that would do your calculation. As the previous reply mentions, you would have to keep track of your own page counter to know whether to append the 'A', 'B', 'C', etc. to the "Page 1" description you intend.

  • Blank pages in smart forms

    hi am working on smartforms i developed a smart form in which i designed a selection screen it will take run-date and run-id from the user and displays vendors address iten details and description and amount after tht cheque will be printed.
       giving the adress and item details of each vendor in one go.
      in my test data , three vendors are comming one is having 16 line items and the other 5 and 3  now  i want to put a condition i want to pick only those vendors who r having more than 10 items .
      so am using a codition on address window main vindow
      i declared
    data:  V_LINES(3) type c.
    describe table it_regup1 lines V_LINES.
    and in the conditins options i gave 
       v_lines ge or eq to 10.
    so only one vendor is displaying but two blank pages are
    how to supress them
    pls let me know
    cheers
    uday

    hi thanks for the reply
    there is only one page
    first one address winow is there here am displaying vendor name1 name2 street postal code and all.
      in the main window there is a dynamic table for line items in tht regup-xblnr and sgtxt and regup- dmbtr is comming  below tht am printing a cheque . in a preprinted format
    and tht is fine.
       i put a condition in it tht if line items more than 10. am displaying a text for tht particula vendor 'please see the enclosed attachment'. n its over
       in the second smartform am picking only those vendors who has line items more than 10 and am not printing the cheque as in the first one it will be printed..
       so here i put a condition in the command line
    greater than or equal to 10.  so only those vendor who's having more than 10 line items are comming but the problem is          in  my test data there r three vendors one with
    16 items other with 5 and 3 
      so for the first vendor everything is fine and it is showing
    as the window can hold only 10 its going to the new page thts what i want but after tht its showing blank two blank pages   thts the prob
      hope u got my prob if not pls revert back
    cheers
    uday

  • How to creat 2nd page in smart forms

    hi
    in smart forms iam facing problem i'e if i gave 10 material's it was comming fine if i give 30 materials it was going to 2nd page in that again from starting it was comming like Header delivery adress.
    what i want is if materials increase than main window should increase size & rest of thing(footer )should comes in 2nd  window
    regards
    A K reddy

    Hi,
    For the header details not to print on the second page:
    -> Go to Conditions tab of the window in which u r printing Header  delivery address and check the condition 'Only on first Page'
    This will solve ur problem.
    thanks,
    Anon

Maybe you are looking for

  • Why can't I connect to the itunes store on my windows 7 64 bit pc

    Why can't I connect to the itunes store on my windows 7 64 bit pc?

  • Report:Setting the line-count in the output automatically

    i want to set the line-count in the report automatically irrespective of screen resolution.could you please explain.

  • MESSAGE TYPE X in MCEX extractor

    Hi, I have a problem in my Datasource enhancement. Before i never take car about the fact of having clean delta queue tables to uplaod a modification in a datasource append for the cockpit logistics. Now i have the problem on 2LIS_11_VAITM. But what

  • Having some Issues After Installing Windows Vista

    I just recently installed Windows Vista Ultimate 32 Bit SP1 on my Intel iMac running OS 10.6. I thought everything was good until I noticed 2 things. 1. I did not have a Boot Camp icon in the system try, nor could I find it listed in control panels.

  • Classic to Touch HELP!!!

    Ok, Call me crazy but when I got my touch I was "yea nice" now I am not so sure. On my classic I could go to an artist, sorted by album, hit play all songs and I would get. Album "A" songs 1-10 in order then Album "B" songs 1-10 all in nice order and