Box in a main window with a header text in it
Hi Abapers,
I am new to sapscripts and have got an issue where a box in the main window of the first page is not getting printed in the next page when the data is flowing to the next page .
below is the code in the main window.
BOX FRAME 10 TW HEIGHT 7 MM
BOX YPOS 142 MM FRAME 10 TW HEIGHT 0 MM
*BOX YPOS 26 MM FRAME 10 TW HEIGHT 10 MM
*HEADING_TEXT
Description Value in &bkpf-waers&
i have the same code in the main window of the next page also
what may be the problem here ?
Thanks in advance .
Hi Sai Ram,
There is no condition palced before the box statement.
The next page also has a main window designed similar to the first page and an additional address window and a footer .
This page is printed as the last page and contains the page as required , the problem is that all the other pages which contain the data flowing from the first page donot contain the box header as desired .
Please let me know if the requirement is not clear , i will try and put it in a better way .
Similar Messages
-
How to use Two main windows with in a page in script ?
Hi any body explain me...
How to use Two main windows with in a page in script ?
with header data in one main window,
& Item data in other main window.HI..,
u need to go for <b>SPLITTING THE MAIN WINDOW</b> !!!
Main windows in page windows allow you to format text in multiple columns. Define an area in the page window, in which to position the main windows.
Here is the procedure !!
-->Create a page window and assign it to a page.
Choose <b>Edit --> Main windows</b>.
A dialog box appears.
-->Enter values in the fields <b>Area width</b> and A<b>rea height</b> in accordance with the input guidelines for main windows.
-->Enter values in the fields <b>Spacing</b> and Number in the <b>Horizontal group</b> if you want to use multiple columns. You can ignore the fields in the Vertical group.
Determine how many columns and line areas are required for label printing. Then enter the corresponding values in the fields in the <b>Horizontal and Vertical groups</b>.
-->The value in the field Left margin varies from main window to main window if multiple columns are used. The following applies:
<b>
Left margin of current column + Window width + Horizontal spacing = Left margin of next column</b>
In label printing, the field Upper margin also varies from main window to main window:
<b>
Upper margin of current main window + Window height + Vertical spacing = Upper margin of next main window</b>
-->Enter a value in the field Start position.
This is a counter. Enter a starting value which is equal to or greater than 1.
-->The main windows are added to the list.
-->Save your form.
reward if it helps u...
sai ramesh -
my ipad won"t turn off. there is a small window with an email text in it and it appears frozen on the screen. How can i turn the ipad off?
Try a reset: Simultaneously hold down the Home and On buttons until the device shuts down. Ignore the off slider if it appears. Once shut down is complete, if it doesn't restart on it own, turn the device back on using the On button. In some cases it also helps to double click the Home button and close all apps BEFORE doing the reset.
-
Box in a main window in sapscript
Hello Forum!
In my sapscript there's a window MAIN with BOX FRAME. This window is in a first and next page, but the box only appears in the first page, not in the others.
Anybody knows what I shound be change? I need the box always appears (in all pages).
Thanks in advance!!!
Edited by: Pablo Ariel Vicente on Feb 14, 2008 3:57 PMHi!
Try specifying all the parameters (XPOS, YPOS, HEIGHT, WIDTH) in the BOX command. This may resolve the problem.
Cheers! -
Drawing Boxes in Script - main window
hi,
In script, in main window <u>after table line item datas</u>, i want to draw a box in which i will place some text. On drawing box, it appears on top of that window which i dont want, since it should be placed after item details.
kapil.I do not know this is still relevant for You or not but here is the solution what I did:
First of all I have to mention this requires SAP standard object modification. !!!
1.Start SE80 and get into STXC function group.
2.Select COP_RELATIVE_NUMBER subroutines and double click on that.
3.Click on Edit button and Get SSCR Object number from SAP.
4.Change interface of the COP_RELATIVE_NUMBER subroutines extending it with TYPE parameters
5.Change the first if Statement.
6.Extend the Relative case section with a new WHEN '#'.
7. Cange All COP_RELATIVE_NUMBER calls with new input parameter in CO_BOX, In CO_POSITION, In CO_SIZE.
From now in Your SAP script You can call BOX statement like this:
BOX XPOS #10 TW YPOS #10 TW ..
Will start drowing BOX from cursor current position plus 10 twip.
Numbers after the # sign are optional.
Solution works only with TW.
form co_box.
data: begin of bx,
x type i,
y type i,
w type i,
h type i,
f type i,
i(3) type n,
end of bx,
next(10),
xpos type i,
ypos type i,
is_relative like boolean.
bx-x = ft-wpx.
bx-y = ft-wpy.
bx-w = ft-wpw.
bx-h = ft-wph.
while co-endline = false.
perform cop_next using next 10.
case next.
when 'XPOS'.
*{ REPLACE ED1K902054 1
* perform cop_relative_number using is_relative xpos.
perform cop_relative_number using is_relative xpos 'X'.
*} REPLACE
add xpos to bx-x.
when 'YPOS'.
*{ REPLACE ED1K902054 2
* perform cop_relative_number using is_relative ypos.
perform cop_relative_number using is_relative ypos 'Y'.
*} REPLACE
add ypos to bx-y.
when 'WIDTH'.
perform cop_number_value using bx-w.
when 'HEIGHT'.
perform cop_number_value using bx-h.
when 'FRAME'.
perform cop_number_value using bx-f.
when 'INTENSITY'.
perform cop_next using next 3.
bx-i = next.
when space. exit.
when '.'. exit.
when others.
perform cop_warning using subrc_param_unknown next.
endcase.
endwhile.
perform cop_end.
check co-error = false.
perform pc_box using bx-x bx-y bx-w bx-h bx-f bx-i.
endform.
form co_position.
data: begin of pos,
x type i,
y type i,
end of pos,
next(10),
relative like boolean,
xpos type i,
ypos type i.
pos-x = ft-wpx.
pos-y = ft-wpy.
while co-endline = false.
perform cop_next using next 10.
case next.
when 'XORIGIN'.
*{ REPLACE ED1K902054 1
* perform cop_relative_number using relative xpos.
perform cop_relative_number using relative xpos 'X'.
*} REPLACE
if relative = true.
add xpos to pos-x.
else.
pos-x = xpos.
endif.
when 'YORIGIN'.
*{ REPLACE ED1K902054 2
* perform cop_relative_number using relative ypos.
perform cop_relative_number using relative ypos 'Y'.
*} REPLACE
if relative = true.
add ypos to pos-y.
else.
pos-y = ypos.
endif.
when 'WINDOW'.
pos-x = ft-tdwlefts.
pos-y = ft-tdwtops.
when 'PAGE'.
pos-x = 0.
pos-y = 0.
when space. exit.
when '.'. exit.
when others.
perform cop_warning using subrc_param_unknown next.
endcase.
endwhile.
perform cop_end.
check co-error = false.
ft-wpx = pos-x.
ft-wpy = pos-y.
endform.
form co_size.
data: begin of dim,
w type i,
h type i,
end of dim,
next(10),
relative like boolean,
width type i,
height type i.
dim-w = ft-wpw.
dim-h = ft-wph.
while co-endline = false.
perform cop_next using next 10.
case next.
when 'WIDTH'.
*{ REPLACE ED1K902054 1
* perform cop_relative_number using relative width.
perform cop_relative_number using relative width 'X'.
*} REPLACE
if relative = true.
add width to dim-w.
else.
dim-w = width.
endif.
when 'HEIGHT'.
*{ REPLACE ED1K902054 2
* perform cop_relative_number using relative height.
perform cop_relative_number using relative height 'Y'.
*} REPLACE
if relative = true.
add height to dim-h.
else.
dim-h = height.
endif.
when 'WINDOW'.
dim-w = ft-tdwwidths.
dim-h = ft-tdwheights.
when 'PAGE'.
dim-w = form_header-tdpagwidth.
dim-h = form_header-tdpagheigh.
when space. exit.
when '.'. exit.
when others.
perform cop_warning using subrc_param_unknown next.
endcase.
endwhile.
perform cop_end.
check co-error = false.
ft-wpw = dim-w.
ft-wph = dim-h.
endform.
*{ REPLACE ED1K902054 3
*form cop_relative_number using is_relative like boolean
* val type i.
form cop_relative_number using is_relative like boolean
val type i
type type c.
*} REPLACE
data: num type f,
next(10).
clear is_relative.
perform cop_next using next 10.
*{ REPLACE ED1K902054 1
* if next(1) cn '+-.0123456789 '.
if next(1) cn '#+-.0123456789 '.
*} REPLACE
perform cop_warning using subrc_param_unknown next.
clear: is_relative, val.
exit.
else.
if next+1(9) cn '.0123456789 '.
perform cop_warning using subrc_param_unknown next.
clear: is_relative, val.
exit.
else.
case next(1).
when '+'.
is_relative = true.
num = next+1(9).
when '-'.
is_relative = true.
num = next+1(9).
num = -1 * num.
*{ INSERT ED1K902054 2
when '#'.
is_relative = true.
num = next+1(9).
case type.
when 'X'.
num = ( ft-line_width - ft-rem_width ) + num.
when 'Y'.
num = ( ft-fill_height - ft-rem_height ) + num.
endcase.
*} INSERT
when others.
num = next.
endcase.
endif.
endif.
perform cop_num_val using num.
val = num.
endform. -
Table in main window with page break in smartforms
I want to print data with heading and items in tabuler form (grid form) using table with PAGE PROTECTION in main window in smartform.
if you would say staight way to use Table or Template under FOLDER with page protection, will not work.
So, it is little bit tricky. So,if any body have a proper solution please help.
Thanks and regards,
Vijay Kr. GuptaHello,
Include the Text ELEMENT U have used to draw the table in the loop of the main window.
Vasanth -
How to print text into different boxes in a main window
Hi,
I divided the main window into 5 windows using boxes.
Now how can I print different data into each of these boxes.
The data comes from a print program .
Please suggest.Hi
In smartforms you can create a template object or a table object and set the boxes.
after you'll create the text object into the templeate and set on which box the data will write.
best regards
Marco -
Smartform main window with grid lines...
Hi Gurus,
I am printing the line items in the main window using grid lines of pattern. This main window can print 10 lines only. Here my requirement is i need to get the empty grid lines till the window ends after finishing the printing of all line items.
for example if it has only 2 lines then i need 2 lines of data and remaining 8 lines should print empty grid lines.
this table control have 14 columns. some times 2 lines of data occupies 3 lines. because any column value may be morethan of column width. for this type of example i have to print empty lines 7 only. because any item line occupied 2 lines.
hope it is clear.
Regards,
VijayHello Vijay,
In order to do this you could make a template(the outlines of your layout). This template must be in the main window, so if there are more than 11 lines the complete template will be printed in the second page.
If you require a total box at the end of the template then make a new window fill only the value and the total will always be printed in the box..
Let me know if the solution is not clear. I shall explain in more detail. -
Printing of Boxes dynamically in main window
Is it possible to provide some conditions in SAPScript (form) to add boxes depending on the presence of different number of document numbers?i.e if there are 10 document numbers 10 boxes to be provided.Can this be handled in Main window of the script?
Hi,
You can hnadle this,
You need to write a perform in the Script. and get the No of records which are printed in the main window according to that maintain 2 variables in that whcih we use the window size in the layout.
in the Main windoe element, write as
BOX WIDTH '1.2' CM HEIGHT <b>&HEIGHT&</b> CM FRAME 10 TW
BOX WIDTH '9.5' CM HEIGHT &HEIGHT& CM FRAME 10 TW
BOX WIDTH '11.5' CM HEIGHT &HEIGHT& CM FRAME 10 TW
BOX WIDTH '13.5' CM HEIGHT &HEIGHT& CM FRAME 10 TW
BOX WIDTH '15.9' CM HEIGHT &HEIGHT& CM FRAME 10 TW
BOX WIDTH '19.1' CM HEIGHT &HEIGHT& CM FRAME 10 TW
Height field should be in the TOP of the Driver program , i mean it should be a global field. and maintain this Height according to your requirment. -
2 different tables in the main window with same internal table data
Hi All,
can we have 2 diffterent tables with same internal table data into its work area in the main window.Is it possible or we will get any run time error.?
is it like having 2 nested loop with same internal table ?
ex : loop at itab1 into wa_itab.
loop at itab1 into wa_itab.
endloop.
endloop.
can we use like this?Hi,
there will not be any error ...but what is the use of it...
do you need to have a controlled way of display ...of the data...
If so then you create another workarea in the global definitions of the same type and then use it...
Regards,
Ram -
Problem: Create SO with BAPI_SALESORDER_CREATEFROMDAT2 & Head-Text Elements
Hi all,
I hape that sb can help me with my problem.
I have created a ABAP-Program to create sales-orders with the function module:
BAPI_SALESORDER_CREATEFROMDAT2
Everythiunk works fine but I can not create text-elements (from the head) with this bapi.
I know that I have to use the table "ORDER_TEXT" but I do not know how to fill this table.
Can anybody help me?
Best regards,
pb974Hi,
yes, you have to fill the order_text table. The following fields you have to fill:
DOC_NUMBER
-> not to fill, let it blank
ITM_NUMBER
-> if you want to create a header-text then fill ITM_NUMBER with '000000'
-> if you want to create a position-text then fill the related position-number '000010' or '000020'....
TEXT_ID
-> fill this field with the text-id for which you want to create the text.
-> The text-id must be defined in your customizing
LANGU
-> set the language for the text: 'E' or 'D' or......
LANGU_ISO
-> let it blank
FORMAT_COL
-> set a star (*) if you want to have the standard-format. If you have a special format defined in SapScript or in a Style you can set this one.
TEXT_LINE
-> fill in the text
FUNCTION
-> let it blank
see below:
data: i_text LIKE bapisdtext OCCURS 0 WITH HEADER LINE.
Texte...
CLEAR i_text.
i_text-itm_number = '000010'. "Text for Position 10
i_text-text_id = 'ZA10'. "Defined Text-ID
i_text-langu = 'D'. "Language German
i_text-format_col = '*'. "Standardformat
i_text-text_line = 'This is text for Pos. 10 - line 2'. "the text
APPEND i_text.
...if your text has more then one row... the same one to do...
i_text-itm_number = '000010'. "Text for Position 10
i_text-text_id = 'ZA10'. "Defined Text-ID
i_text-langu = 'D'. "Language German
i_text-format_col = '*'. "Standardformat
i_text-text_line = 'This is text for Pos. 10 - line 2'. "the text
APPEND i_text.
...and so one...
and now text for position 20...
CLEAR i_text.
i_text-itm_number = '000020'. "Text for Position 20
i_text-text_id = 'ZA10'. "Defined Text-ID
i_text-langu = 'D'. "Language German
i_text-format_col = '*'. "Standardformat
i_text-text_line = 'Text für Pos. 20 - Zeile 1'. "the text
APPEND i_text.
...and now the text for position in englisch
i_text-itm_number = '000020'. "Text for Position 20
i_text-text_id = 'ZA10'. "Defined Text-ID
i_text-langu = 'E'. "Language German
i_text-format_col = '*'. "Standardformat
i_text-text_line = 'This is text for Pos. 20 - line 1'. "the text
APPEND i_text.
I hope it's a help for you.
Erhard -
I have a Winform modal form with our home-made ComboBox on it, which functions well usually. My problem is - when this modal form is opened on top of a main form that has an AcroPDF control on it (Adobe's PDF ActiveX), whenever the combo's drop down is displayed, the entire modal form disappears. Clicking the form's area brings the form back to view. Another problem (probably similar) - when hovering a contorl that displays tooltip - whenever the tooltip is displayed, the same thing happens - the modal form disappears
Does anyone have an idea?
ThanksI have a Winform modal form with our home-made ComboBox on it, which functions well usually. My problem is - when this modal form is opened on top of a main form that has an AcroPDF control on it (Adobe's PDF ActiveX), whenever the combo's drop down is displayed, the entire modal form disappears. Clicking the form's area brings the form back to view. Another problem (probably similar) - when hovering a contorl that displays tooltip - whenever the tooltip is displayed, the same thing happens - the modal form disappears
Does anyone have an idea?
Thanks -
Dupin lite no main windows with itunes 11.1.1
Kein Fenster zum Bearbeiten beim öffnen von Dupin Lite nach Runterladen aus dem App Store
So I'm guessing that there is no fix for this error? I see that this patch has caused complete disaster for not only me but for lots of other people as well. Tell us how to fix our issues or release a new patch!
-
Multiple copies in Adobe form with different header text
Hi All,
I have created Adobe form for Invoice and now my requirement is when we create an invoice it should generate 4 copies with different texts like original copy, duplicate copy and triplicate copy.
I know its possible in samrtforms using the copy window and maintaing text there.Is it possible in adobe form , if yes how can we achieve this.
Regards
LalitAre you using a custom driver program?
If yes, then loop the function module with the number of copies you have.
the copy name should be a variable which should be passed to the form in the loop change the value of the copy control accordingly.
Please let me know, if you see any issues.
Thanks,
Rakesh -
Box in MAIN window of sapscript keeps misaligning...
Hello Experts,
I am currently modifying a sapscript and inside the MAIN window, there is a box command that 'boxes' a
static text. But the problem is, the box misaligns since the number of line items is dynamic.
So, how can I make the box command to just 'box' the static text correctly even though the line item is
dynamic?HI,
Declare the Box and Static text in the main window with a new text element after the text element of the line items . so it will print it in the end when all of the Line items are printed..
(or)
Just create another script with the BOX and the text you want inside the BOX. i.e. this becomes another script which is separate from the line items you are printing there.
call this script in your driver program with start_form FM.
REPORT YTEST_SCRIPT.
DATA:
ITAB TYPE TABLE OF SFLIGHT,
FS TYPE SFLIGHT.
SELECT * FROM SFLIGHT INTO TABLE ITAB.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
FORM = 'ZSCRIPT_TEST'.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT ITAB INTO FS.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'TEST'
WINDOW = 'MAIN'.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDLOOP.
CALL FUNCTION 'END_FORM'. "---------->Ends the previous form
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'START_FORM' "------------> Starts your new script with BOX and Static text
EXPORTING
FORM = 'ZSCRIPT_TEST1'.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'TEST'
WINDOW = 'MAIN'.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'CLOSE_FORM'.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
This will print the BOX and the Static text in a new page after the line items got printed..
This will solve your issue...
Thanks&Regards
Sarves
Maybe you are looking for
-
SSO Database Store not authenticating
Hi Everyone, Iam trying to use the Microsoft SSO Database to try authenticating to SAP NetWeaver Portal for content integration. The SAP user id is configured with password , we are able to use these credentials and login to SAP Portal. But when we a
-
Hooking Up LCD TV Using mini DP to HDMI adapter ?
I am wondeirng if the Mini DP to HDMI adapters will work for my application as I have searched a few MFG. websites for the details but it seem all will only work fully (audio + video) with a LCD TV with a HDMI chip V1.3 or above. A LCD TV with a HDMI
-
Hello Pages Users - I finally finished my 90 page plus thesis, written in Pages. With a lot of photos and maps, in PDF it comes to 12.2 MB. I need to send it to the University where I did my research in Costa Rica. But it is too large to go through.
-
why is iphoto faster loading images in full size than aperture? aperture loads a proxy (lower res) image with the "loading" sign ontop of it and it takes several seconds until the full res high quality is loaded. while in iphoto it's loaded instantly
-
I'm trying to set up a mobile accordion menu with sub menus for my site using the widgets in muse. When I click on the top menu button it brings up another accordion menu it looks like. It is on the right side of the button not under the button where