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
Similar Messages
-
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 -
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 -
Print Invoice Header Text In Main Window of Smartforms
Helo Gurus !!!
I want to print Invoice header text in main window of smartform.
There are total 5 columns.
Item Quantity Description UnitPrice Amount
Now what I want is to print header text below Description column, there is a loop on the table in main window.
This header text will be printed only once. This is a standard header text
How to get this?
Points are assured !!!Hi Anay Kulkarni,
I understood that u need to print this header text
Item Quantity Description UnitPrice Amount
So please use TABLE instead of LOOP in the table we can prin header, main area, footer.
place the header text in header area in table... i am sure this can resolve it.....
feel free to contact me if issue is not resolved/.....
dont forget to reward points....
all the best...
Regards,
Sreeniasa Sarma K. -
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... -
Two main windows in smartform or two loops in one main window?
Hello All,
I have requirement in smartform where i want to print two diffrent data header and item data in the same page.
and in between these two data i want one template to be printed for item data .
Smartform is giving me error if i use two main windows
if i use two loop nodes in the main window thn how to restrict the data getting over flowed to template(item data)
scenario is
header data****
**item header**
item data****
Pls comment....
Regards,
SunnyAs main window can only be one, so try it this way:
Under main window create a TEXT1 for header text( first header) than a LOOP1 for looping the header table, under that first create a TEXT2 for header data, than below it create another TEXT3 for header text ( Second header), than below it add a LOOP2 for looping item table and in that add a where condition than under it a TEXT4 for item data .
MAIN_WINDOW
TEXT1 " first header
LOOP1 " header table
TEXT2 " header data
TEXT3 " Second header
LOOP2 " item table with where condition
TEXT4 " item data
With luck,
Pritam. -
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,
UdupiHello ,
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 -
Footer of the Table in Main Window in Smartforms
Hi,
I have a smartform. In that I have declared a main window. And I want the Footer to appear on each page. So, I have checked both the check boxes in the Footer Event of the Table in Main Window.
1. At page Break
2. At end of table.
But it is comming only on the first and last page.
If I check only 1, it is printing on the first page only.
If I check only 2. it is printing on the last page only.
I want it to be printed on all the pages.
Help needed.
Thanks in advance.
Ishaq.Hi
Instead of using the Main window for footer
Why can't you declare a separate constant window separately apart from MAIN window and use for the footer to print in all pages.
create another window and write all your data in that and see
Since MAIN window overflows as the data grows constantly it is coming only on the first and last pages.
So to appear that on each page a fresh window is useful
Reward points for useful Answers
Regards
Anji -
Problem with Main window in smartforms
Hi All,
I am creating a smartform, in that i need to restrict the no. of line item is to 15 and i need to draw a box for it. My problem is if i am displaying 15 line items the box will be drawn correctly and if i use only 3 line item then the box is drawing only for 3 line item. But i need to draw a box for 15 line items constantly at any given point of time irrespective of no. of line items. I am displaying this info using mail window, plz do help me.
Thanks & Regards,
pavan.MHi,
First describe your internal table and based on that you deifne another internal table in which you will have some 2 dummy fileds
suppose if you internal table has 10 lines then you need to have 5 more lined to print right?
say describe lines is v_lines
v_rem = v_lines mod 15. (you will get remainder here)
then v_count = 15 - v_rem.
before main window do code as following .
do v_count times.
v_dummy1 = text (maintgain soem text in this field)
v_dummy2 will not have any value.
append these values to it_dummy table.
enddo.
And when you loop main table count one more variable say v_cnt.
Now you can loop your dummy internal table based on condition.
the condition would be v_cnt eq v_lines .
and print empty text . dont print the field that have some text.
loop dummy table only after printing main table data in the main window.
Hope you got the logic
Dont forget to reward points
Regards,
Nageswar -
EMPTY LINE IN MAIN WINDOW OF SMARTFORM
Hi All!
I am designing a smartform in which i had included several windows.I have a query on the main window.
My main window is displaying several line items through table one by one.Now my requirement is to put one blank line in between every line item i.e. for every line item printed in the main window through a table I want a blank line in between.
Please suggest me how to achieve this..
Regards
PraneethHi Praneeth,
I will tell you one simple technique to display. You dont have to do anything in the smartform at all while displaying.
The value in the internal table will be obtained by some method in your <b>code</b>. So while adding a record or appending a record to your internal table just append an empty line to your internal table. So while displaying the smartform will display all the records in your internal table including the blank lines. Hope this solves your issue.
LOOP AT i_vbak.
MOVE i_vbak-vbeln TO i_output-vbeln.
APPEND i_output.
<b>APPEND INITIAL LINE TO i_output.</b>
CLEAR i_eanl.
ENDLOOP.
Reward if helpful.
Regards,
Tushar
Message was edited by: Tushar Marshall Dass -
Page Protection in Main window of smartform using Folder issue
Hi Experts,
We can fix the page protection issue of records in main window by checking the No Page Break check box at the line type level in a smartform.
I tried to solve this issue by using the folder option. I created a folder inside the table of a main window and checked the page protection check box. Save and activated the layout. When i tried to add the table to the folder, the check box for page protection was reset to blank.
Why does this happen? Cant we use page protection inside main window using folder ??
ThanksHi friend,
We can do page protection functionality inside table of main window using Folders option. Follow the below steps,
1. Assume rows are created inside table in a main window, with corresponding line types.
2. Create a folder named PROTECT inside table, for example in Main area of table.
3. Just drag and drop your Row(s) into folder PROTECT and simply click page protection check box of the folder PROTECT.
4. This will help you to add the required functionality using Folders option in smartform.
Try this and update me in case of any concerns. Hope this will solve your problem.
Check the attachment also for your reference.
Cheers... -
Problem in main window of smartform
Hi experts,
I have a secondary window in my page of smartform. and then a main window in which i have used a table to display line item from internal table.
Now my problem is that when the data exceeds first page the remaining part of dat in mainwindow goes to second page but the secondary window data also repeats in second page.
Can anyone help plz?
Thanks in advance.1.13click on the secondary
window you will find
tabs general attributes,
output options & conditions
in the conditions tab
in add additional events
check the check box
Only on First Page.
Thanks,
Phani. -
Main window of SAPScript versus Main window of smartform
Hi,
In case of Smartform we have one main window per page but in case of SAP Script we can have 0 to 99 Main window on one page.
In case of smartform if the main window on one page gets filled then the remaining long text will jump on main window of second page.
Following are my doubts:
If I define three MAIN windows for three different kind of long texts on page one in SAP Script as follows:
MAIN Window 1 - Long text1
Main Window 2 - Long text2
Main Window 3 - Long text3
1) If the long text 1 on MAIN window 1 of first page gets full does it automatically jump to Main Window 2 of first page ?
2) If I don't want the long text on Main Window 1 to jump on Main window 2 on first page but on Main winodw 1 of next page , is it possible ? How do I do it ?
Answers will be rewarded..
Tushar.In SAPScripts if the long text is filled in the Main Window it will spill over into the same Main Window if it is defined in the next page. Text from one Main Window will nt spill over onto the text to different Main window.
So as far as you questions are concerned:
1. Not it does not automatically jump over into Main Window 2 from Main Window 1 on same page or next page.
2. You just need to define the Same Main Window on the next page so that text gets jumped over to the next page. If it is possible just define the next page as the same page, so that you do not have to create a separate page and attach all the windows.
Hope this helps you...
Shashi Reddy -
Dear experts,
I would like to know what is the maximum height i can give for main window.
How to print data in next line.
How to give reduce space or increase space after text field.Hi Antony,
To be honest with you, I think the problem here is Shilpa and the question itself (no search done).
I recommend being selective about questions answered and doing a quick check on the user's ability to search and doing "lazy closing" before answering.
Cheers,
Julius -
Question about main window in smartform
Hi, i have three different pages, i know that i can have only one main window.
But the data in the main window will be different for each page.
I copy the main window in the three pages.
But when i try to write abap code in the main window copy ( page 3 )
The smartform refresh the abap code in the page 1 and page 2.
So the 3 pages have the same code.
I want to have different abap code in each page ( in the main window copie for each page). Because i have three internal tables one table for each page.
Thanks
Reward Pointshi,
I believe u dont need to copy the main window. just create a next page and provide the 2nd internal table fields in next page. and same as 3rd page.
or
create 2nd page and create other windows not a copy of main window and provide the correspoding fields to those windows..
Regards
Syed A
Maybe you are looking for
-
Don't have anymore to add. Unsure of steps necessary. Computer does, however see and access old drive when set up as a slave, with the newer HD as the master.
-
ITunes won't connect to iPod due to an unknown error (0xE800000A)
Hello all, I have had my iPod touch for more than a year and I really love it, having had no problems whatsoever. However, a few days ago, I realized that it wouldn't mount in iPhoto or QuickCapture. I did several tests and decided to do a restore. B
-
My Active dataguard is not applying archives.
Dears, Following is my setup ===================== Primary: prod on RAC with 2 nodes Database : Oracle 11.2.0.3 OS OEL 5.7 storage : ASM +DATADG +FLASHDG Standby: sync on single node Database : Oracle 11.2.0.3 storage : ASM +DATADG +FLASHDG I've conf
-
Link 1.2.0 says "can't communicate with device"
Hi guys, my z10 running the official version of 10.2.1.537 can't connect to my blackberry link anymore. I update the link and since then, hasn't been working. I uninstalled it and re-installed but still nothing. I get the message on it saying "can
-
I cannot get past the Language selection setup.
I cant scroll up or down through the languages, but apparently i can reset the ipod by holding the middle button and the menu button. So i am confused on why i cant even click the middle button to choose English.