Regarding dynamic height of secondary window in smartform.

Hi,
I have a secondary window just above the main window in my form.
Depending upon the number of records the height of seconday window needs to be adjusted .i.e. it has to be dynamic.
Only after the end of secondary window the main window should be printed.
Appreciate any suggestion in this regard.
Thanks.

Hi,
As you are already using smartforms for PO printout(instead of standard form MEDRUCK) , you should have already changed the standard driver program (SAPFM06P) in a zprogram or have done your own driver program which is calling the smartform. So its so simple that you branch your different smartform call in that zprogram. Check which driver program is currently in use in tcode NACE - > Application EF ->Output Type NEU and click processing routine.
Another way is to have a  copy of the secondary window and adjust size and give conditions.
Regards
Karthik D

Similar Messages

  • Dynamic Height of Main Window in Smartform

    Good day experts...
    Actually this problem puzzled me since yesterday when I am developing a customized printout for PO.
    Right now, we have an existing form for our PO.. The management asked me to do another PO form for the second company. Thus, there will be two layouts of PO... Since the content are just the same, I just copied the program of our existing PO and make the necessary adjustment for the new layout for our new PO. My problem now is the Main Window for the second PO...
    As far as I know, only One main window is allowed in every Page. So what I did was, I created two tables (let say Table 1 and Table 2.) inside the main window. I just placed condtions on the condition tab of both tables that when user selected company A, Table 1 will be displayed. Otherwise Table 2 will be displayed  if company B is selected.
    Now, I have produced correct output. My only problem now is, the height of the second window which must be shorter than the first PO. I am aware that the main window's height is fixed and cant be changed dynamically.
    Before I write this post, I google(search) the net to view some possible solutions. One option that it was suggested is to create another page, say Page2... On that second page, create another main window which is smaller in height.. This would be the second PO. On the main window of the first Page, insert a command line. Then, pinpoint to the second page when the condtion is true.
    This technique was not successful when I tried. Since  when i try to see the prinout of the PO, the first page is blank and the detail of the PO is on the second page which should NOT be.
    Another possible way to solve this problem that I think is , create a separate smartform for the second company. In this case, no worry about the height of the main window. However, my problem that I forsee is, how can I implement on ME23N, to pinpoint two separate smartforms?
    Thanks in advance experts... I hope to hear your wonderful ideas...

    Hi,
    As you are already using smartforms for PO printout(instead of standard form MEDRUCK) , you should have already changed the standard driver program (SAPFM06P) in a zprogram or have done your own driver program which is calling the smartform. So its so simple that you branch your different smartform call in that zprogram. Check which driver program is currently in use in tcode NACE - > Application EF ->Output Type NEU and click processing routine.
    Another way is to have a  copy of the secondary window and adjust size and give conditions.
    Regards
    Karthik D

  • Loop secondary windows on smartforms

    Hi experts,
    I want to ask you about smartforms. I want to write data on smartforms using secondary windows which each of the secondary window contain of just one data per page. In one page, I have three secondary windows on one page.
    Can anyone help me...???
    I am newbie on ABAP.
    Thx for your reply and suggestions...

    Hi ,
    you can also do it by using template in main window, please create a main window, and within it create a text page, or else you can create a template with proper height and width, create its cells according to your use, and hide its borders with the following 4 tabs , then you are able to show your data freely
    in the main window too, because main window can be used to loop over a large amount of data.
    Please revert if still if you are not getting, you can use these 4 options to hide your template border, so that it will not visible as a closed one.

  • Problem with Secondary window in smartforms

    Hi Experts,
    I have an issue with smartforms while looping internal table.
    Here is the scenario:
    I have two records in my internal table. For each record, I need to print two pages
    For example: In internal table records like..
    TEST1
    TEST2
    First for TEST1, it supposed to print two pages and then for TEST2, it supposed to print two pages from third page onwards.
    I have designed my smartform with two pages named as.. FIRST and SECOND
    In the FIRST page, I created one window type is MAIN window.
    In the MAIN window...Template1 has designed.
    At the end of Template, I used command option to go to SECOND page.
    In the SECOND page, I created one window type is Seconary window.
    In the Seconadry window...Template2 has designed.
    ==========
    With this design, smartform is working is displaying two pages irrespective of the internal table records.
    Option1:
    When I used LOOP in between MAIN Window and Template1. No output displayed.
    Option2:
    When I tried to change the Secondary window as MAIN window, only second record TEST2 is displaying.
    Option3:
    So, I removed LOOP and written some program lines based on iteration.
    For that, it supposed to go to FIRST page,as soon as SECOND page printing for the record TEST1.
    and then second record TEST2 starts from third page and should print two pages for second record TEST2 and so on.
    When I am trying to use command to go to FIRST page in the sceondary window of SECOND page, it's not allowing.
    I am getting error message like.."No new page allowed in secondary window".
    ====
    Could you please suggest solution for this..
    basically... If the internal table has two records, For each record, it should print two pages.
    Thanks in Advance
    Raghu

    I getting internal table from interface. It has two records.
    Basically.., If the internal table has more than one record, For each record, it should print two pages.

  • Secondary Window looping and lineitems restricting

    Hi All,
    I have some requirement wherein i have to loop the secondary window in smartforms . This is Z smartforms and has standard driver program.
    The main requirement is suppose there are 10 line items , 8 line items should be displayed on Page 1 and the remaining 2line items should be displayed on next page.
    In my current scenario , i am getting same line items on the next page too.
    i tried out using the condition tab but it didnot worked out. If its a main window it goes directly to next page but donot know
    how it works out with secondary window .
    Has anyone come across similar requirement ? Any help would be appreciated ...
    Thanks
    SAM F.

    Hi Sam,
        Since you are using the Secondary window follow the below given method.
    1). In the first page add a LOOP logic to your window and start printing your data.
    2). Keep adding the counter for each and every record you process.
    2). once you have reached the number of data you need to print say 8 records add a command line to move the control to next page ( this can be done by using a condition inside the loop).
    3). In the next page you will have a similar window and in the that window also create a LOOP logic and the Row (belowinternal table field ) give the start row as the next row of the table. i.e., the row after the last row you have displayed in the first page. here you can give the To as (from + no. of rows you need to print in there) .
    Like wise you can keep printing the data you require in the secondary window of a smartform.
    Hope this helps.
    Regards,
    Praveenkumar T.

  • Smartforms secondary window displayed in PDF?

    hello every SDNer,
    i have a question, who can help me ?
    For 'Smartform', I will like certain secondary windows in the PDF file to appear but not  in other PDF files. How can I go about doing so? For example, SF_EXAMPLES_01, address secondary window appears   in this particular PDF file but not in the other PDF files . Is there any parameter it can be set as such?
    thanks in advance
    Yaning

    Hi,
    You can set a condition on the window.
    This will make sure that window contents are displayed only when the condition is satisfied.
    Regards,
    Ravi
    Note : Please mark the helpful answers

  • How to create Dynamic Window in Smartforms

    Hi all,
    Could you please help me out on how to create Dynamic Window in smartforms excluding Main Window.
    Thanks in Advance.
    Vinay.

    hi,
    Hi,
    1.If you are creating the Different windows for the Countries,then In conditions tab of window specify the Condition i.e.
    company -code = '2201'.
    2.Then that window can trigger ofr that condition.
    3.Other wise, if you are using the different layouts ,then write the condition in Print program and call that form .
    reward me if helpful.

  • Smartforms - how to call 2nd secondary window page

    Hi
    How to call 2nd secondary window page from Ist Main window. The scenario is i have one main page. I have already called 2nd page thru command line and now want to call another page (i mean third page) from same main window. How do I do?
    Thanx and regards,
    Rajesh Vasudeva

    Hi Rajesh,
    Go for the below link>>>>>
    [http://help.sap.com/search/highlightContent.jsp]
    thnks.

  • How does SmartForms read secondary windows?

    Hi All,
    Please see the screenshot first.
    http://img693.imageshack.us/img693/2314/sflayoutreadwindowhow.jpg
    I have a SF with multiple secondary windows, and my main window is between them. 
    Does SF read them according to the arrangement in the tree node?
    Question: From top to bottom of tree node?
    I'm asking this because I have a program node inside my secondary windows where I need to add additional logic on the secondary windows.
    Thanks.

    No ,
    Command node  will be the last node in the main window , means after triggering all the nodes in the main window than it will trigger the command node (i.e  your next page will triger).
    Let me know if  any concerns ...

  • Problem in printing multiple main window in smartforms

    Hi Experts,
    I have requirement form client to print PO which consists of 4 page.
    First page is cosists of header and some text.
    In second page different header and line item.
    Thirs page different header and line item.
    4th page different header and line item.
    I have printed tex in main window of first page and called command to trigger
    second page main window, but i am getting dump.
    How to print the line item in the multiple page of smartforms.
    Regards,
    Udupi

    Hello ,
    To print the text below are following steps which you can follow for your requirement :
    1. Create the Four pages having the Main Window, but take care that Logic should be in First Page Main window only , other pages main window will be blank.
    2. Create the Secondary Window in second, third & fourth page  which will be same size as the main window having the text which need to be print in respective pages.
    3. Logic Part - in the main window of first page fill all the data which you need to print in 1st to 4th page in different internal table. Now for example you need to print text in first page then in Main window create table having the data of 1st page.
              To print data in Second page create one more table having data of secondpage and put the Command there (follow the same for next pages,)
    I hope this will  help you
    Thanks
    Romit Raina

  • Issue in seperating lines of ITAB and placing into SF secondary  windows

    Great abapers,
    My itab is having 6 lines item (for ex ) it may 'n' no of line items.
    In smartforms for 1 page max allowed secondary window is 2.so first 2 lines are paced in first page , next 2 lines are place in
    second page ,last 2 will be in 3 page...if it is having hundred means it will be splited into 100 into 50 pages.
    The problem is i dont know the line item which will come, how can i seperate and put into windows...i could not create 'n'no of
    work areas..what is the solution i am in conftion ...any one pls guide me...urgent
    points will be rewarded .........
    Thanks,
    regards,
    lakshmi

    Hi ,
         i hv found PO No and Po line No , based on this we have to print.
    for ex PO1 = 1 st window ,next in second etc...how to place in SF window  ...
    iam hving 'N' no of PO's in my  itab .....
    this is problem...
    thanks & regards,
    Lakshmi

  • Reg- windows in smartforms

    Hi,
    1) What is the difference between the copy and final window in smartforms?
    2) What is the difference between at-selection screen output and initialization in reports?
    Points will be rewarded for correct answer.
    Regards
    sathish

    <i>Copies window:</i>
    You use the copies window to define an output area for the print output, whose content you want to appear either only on the copy or only on the original. This allows you to flag copies as copies when the form is printed.
    <i>Final window:</i>
    You may want to display or query values on the first page that are determined only during processing. For example, you may want to name the grand total in the letter text of an invoice. However, this amount is determined only after listing all individual items. Or you may want to query on the first page within a condition the total number of pages, which the system calculates only after processing all pages.
    Check this link:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/b1/243fe0beee11d4b633006094192fe3/frameset.htm
    <i>AT SELECTION-SCREEN OUTPUT</i>
    This is used to dynamically set the screen field attributes
    <i>initialization</i>
    this is used to set the default values to the scree fields.
    Regards,
    Naimesh Patel

  • Printing dynamic box in main window in scripts

    hi ,
    I want to print the dynamic box in main window of my script.
    Ex. Suppose the content of the main window is 5 lines so it should print box for 5 those lines only.

    Hi,
    Create a Main window with only 2 lines, Give a BOX command it will give u Border for entire Main window.
    /:BOX FRAME 10 TW
    For giving vertical lines Syntax is
    /:BOX XPOS 16 CH YPOS 0 LN WIDTH '0' CM HEIGHT 2 LN FRAME 10 TW
    It gives u a vertical line at 16 character. so for ur requirment add another command at another XPOS.
    Try this below just below ur ITEM ELEMENT which has the display fields.
    Main Window
    /E ITEM_A
    A,,,,&ITAB-ABC&,,&ITAB-XXX&,,&ITAB-CDE&,,&ITAB-GEF&
    /:BOX FRAME 10 TW
    /:BOX XPOS 16 CH YPOS 0 LN WIDTH '0' CM HEIGHT 2 LN FRAME 10 TW
    /:BOX XPOS 26 CH YPOS 0 LN WIDTH '0' CM HEIGHT 2 LN FRAME 10 TW
    /:BOX XPOS 36 CH YPOS 0 LN WIDTH '0' CM HEIGHT 2 LN FRAME 10 TW
    /:BOX XPOS 46 CH YPOS 0 LN WIDTH '0' CM HEIGHT 2 LN FRAME 10 TW
    Change XPOS according to ur requirement.
    Now add another main window to the same page with changing UPPER margin, U can add upto 99 Main windows in one page.
    So add upto ur Page is full.
    For headings
    Create a Variable window same as Main window, in place of fields, give descriptions.
    Make sure that u give BOX command below the field declaration, if u give above, for last record it will not print box.
    Regards
    Bala Krishna

  • How to show a window at end of main window in smartforms

    Hi guys,
    I want my window in smartform to show only after end of showing the main window,,,
    When i tick only after main window in condition tab of window, it shows on the uppermost portion of the output and not below the main window... Do I need to input the upper margin for this?
    How am i going to do it?
    Thanks a lot!

    Thanks guys,,,
    But still not working...
    Do I need to fill the upper margin of the final window?
    Since the height of my main window is dynamic, Im not sure what to fill up on the upper margin...

  • Triggering of copies window in smartforms

    Hi friends,
    Can any one tell me how does the copies windows gets triggered  ie : how does it process..
    As per my knowledge after going through many links and sap help i came to know the main window gets triggered and secondary window gets triggered in the order in which we have defined in the left side node ie: the processing for main and secondary window will be done in the order in which we have defined in the page node and comming to fianl window it gets triggered when the processing is going on for the last time of the node...
    But can any one tell me how does the copies window gets triggered and when...
    Like say in a page the nodes are defined in the below way
    PAGE
       a) secondary window
       b) copies window
      c) main window
      d) copies window
    Now can any one tell me how this copies window gets triggered and how does it create the number of copies which are required using copies window.
    Regards
    Kumar

    Hi Kumar,
    Good question to ponder.. Well the answer is;
    The trigger point for the copy window is from the output command. For eg : if i am tro have  a simple smartform with 2 windows...1 as the main window and the nxt as a cpoy window both have a text element with different texts in each.
    Now in the output options if you mention the number of copies to be printed in the specific printer is "1" then only the main window gets printed. If you provide the number of copies as"2" then there are 2 pages printed..One is only having the main window content and the second with copy window contect. The copy window content is based on teh "OUTPUT TO" option you select for the copy window general attributes.
    Hope this helps!
    Cheers!

Maybe you are looking for