Frame in MAIN window
Hi,
in my print program i´ve got something like:
LOOP AT itab.
l_counter = l_counter + 1.
IF l_counter <= 13.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'SMALLFRAME'
WINDOW = 'MAIN'
EXCEPTIONS
OTHERS = 1.
ELSE.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'BIGFRAME'
WINDOW = 'MAIN'
EXCEPTIONS
OTHERS = 1.
ENDIF.
ENDLOOP.
and in my sapscript i´ve got:
/E BIGFRAME
/: POSITION WINDOW
/: POSITION XORIGIN '-0.5' CH YORIGIN '-0.25' LN
/: SIZE WIDTH '+0.4' CH HEIGHT +1 LN
/: BOX WIDTH '71.50' CH
HEIGHT '40.87' LN FRAME 20 TW
/E SMALLFRAME
/: POSITION WINDOW
/: POSITION XORIGIN '-0.5' CH YORIGIN '-0.25' LN
/: SIZE WIDTH '+0.4' CH HEIGHT +1 LN
/: BOX WIDTH '71.50' CH HEIGHT '27.40' LN FRAME 20 TW
why is it not working?
is it not possible within the loop of itab (position´s values) to decide wich frame i want (big or small)?
is it only possible to define the frame dimensions before processing the lines of the main window and not within the loop?
Best regards.
Hi
It doesn't make a sense to put the call of a box into a loop if you have to call the box only one time for each page.
You should create a window (not main) where you insert the text element to create a frame. This window should overlap at the main.
For exampla if the main size is:
- WIDTH = 71.50
- HIGTH = 40.87
The window for fram should be:
- WIDTH = 71.51
- HIGTH = 40.88
So the code in your program should be:
LOOP AT itab.
l_counter = l_counter + 1.
ENDLOOP.
IF l_counter <= 13.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'SMALLFRAME'
WINDOW = 'FRAME'
EXCEPTIONS
OTHERS = 1.
ELSE.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'BIGFRAME'
WINDOW = 'FRAME'
EXCEPTIONS
OTHERS = 1.
ENDIF.
Max
ENDIF.
Similar Messages
-
Frame line not display in next page of main window
hi Xpert,
I am creating layout in SAP SCRIpt,it working fine only the main window of next page frame line is not display.
i m define next page as a FIRST page and writing main window of first page following coding
/: POSITION XORIGIN '0.50' CM YORIGIN '7.75' CM
/: SIZE HEIGHT '17' CM WIDTH '19.25' CM
/: BOX FRAME 10 TW
when i run the program first page are coming properly and only when i go in second page of output then main window lines not displaying.
please guide me how to solve this problem.
Regards,
pravinHi Praveen,
In that case why you have to make the main window in the first page and secondry window.
You can use it as manin window itself. Print the total amount in the main window itself in the first page. and copy that main window to the second page.
In the first page under the main window create a text. and there u print the total value and text.
Now copy the main window to the second page..only COPY DONT CREATE NEW.
In the second page now under the main window create the table to print the line items. What every u add in the second page main window it will come in the first age also in the smartforms. But it will nto get printed in the first page.After the text to print the totals call the COMMAND option and call next page in that.
Hope you got me..
Regards
Ansari -
Hi all,
I am designing a form.I have three main windows in this form. I have the following code in the text editor for thre windows. /: box frame 10 tw
when I check the layout of the form I can see the box only in the main window 00 but not in main window 01 and main window 02. Can anyone please help me with this.
Reagrds,
VarunHi Varun,
Please note that no need to create a window for each column.you can define Your X-coredinate to define Verical line or means to create a box:
Sample Code :
BOX YPOS '1.25' LN WIDTH '120' CH HEIGHT 4 LN FRAME 10 TW
BOX XPOS '18.00' CH YPOS '1.25' LN WIDTH 0 CH HEIGHT '4.00' LN FRAME 10 TW
BOX XPOS '31.00' CH YPOS '1.25' LN WIDTH 0 CH HEIGHT '4.00' LN FRAME 10 TW
BOX XPOS '47.00' CH YPOS '1.25' LN WIDTH 0 CH HEIGHT '4.00' LN FRAME 10 TW
BOX XPOS '68.00' CH YPOS '1.25' LN WIDTH 0 CH HEIGHT '4.00' LN FRAME 10 TW
Lanka
Message was edited by: Lanka Murthy -
How to pass values from main window to pop-up window?
I want to pass a value from the main window (1st form) to pop-up window (2nd form). The first form is of name booking.jsp and 2nd form is of name Fund_booking.jsp. I am using window.showModalDialog to open the window. I think, I have written right code in main window to pass the value but even then I am not able to get it on pop-up window. I am not even able to display an alert on pop-up window saying "hi" by writing a function on save Button in pop-up window. The code is as follows:
On booking.jsp:
<script>
function popup()
var aForm;
aForm = D_requisition_id.options[D_requisition_id.selectedIndex].text;
\\Here I have captured value from a drop down box in my main window form and assigned it to the variable.
alert(aForm);
var myObject =new Object();
myObject.Brandcode = aForm;
alert(myObject.Brandcode);
window.showModalDialog("Fund_booking.jsp",myObject,"dialogHeight:400px;dialogWidth:420px;");
</script>
<button name="B_FundBooking" tabIndex=4 style='POSITION:absolute;LEFT:393;TOP:292;WIDTH:100;height:24;BACKGROUND-COLOR:buttonface' onClick ="popup()">Fund Booking</button>
On Fund_booking.jsp:
<SCRIPT>
var oMyObject = window.dialogArguments;
var sBrandcode = oMyObject.Brandcode;
alert(sBrandcode);
</SCRIPT>
Even the following alert is not getting displayed in pop-up window;
<script>
function ValidateData()
alert("Hi");
</script>
<button name="B_Save" tabIndex=1 style='POSITION:absolute;LEFT:255;TOP:315;WIDTH:75;height:24;BACKGROUND-COLOR:buttonface' onClick ="ValidateData()">Save</button>
I am using DIV instead of frames in my both forms. I just want to get that value in my pop-up window to write a query based on which data will get displayed in my table of pop-up window.
Plz help me to solve this problem.Well, this is actually a JavaScript question, not a Java question but I can give some hints.
When you do pop-up windows you need to put JavaScript in the html of the pop-up itself. Data can be passed by creating new fields in the window object, which the popup can access via the window.openner field.
So, before invoking the popup add any data to be passed to the window object, then the onLoad function in the popup grabs the data. -
How to pass value from main window to pop up window?
I want to pass a value from the main window (1st form) to pop-up window (2nd form). The first form is of name booking.jsp and 2nd form is of name Fund_booking.jsp. I am using window.showModalDialog to open the window. I think, I have written right code in main window to pass the value but even then I am not able to get it on pop-up window. I am not even able to display an alert on pop-up window saying "hi" by writing a function on save Button in pop-up window. The code is as follows:
On booking.jsp:
<script>
function popup()
var aForm;
aForm = D_requisition_id.options[D_requisition_id.selectedIndex].text;
\\Here I have captured value from a drop down box in my main window form and assigned it to the variable.
alert(aForm);
var myObject =new Object();
myObject.Brandcode = aForm;
alert(myObject.Brandcode);
window.showModalDialog("Fund_booking.jsp",myObject,"dialogHeight:400px;dialogWidth:420px;");
</script>
<button name="B_FundBooking" tabIndex=4 style='POSITION:absolute;LEFT:393;TOP:292;WIDTH:100;height:24;BACKGROUND-COLOR:buttonface' onClick ="popup()">Fund Booking</button>
On Fund_booking.jsp:
<SCRIPT>
var oMyObject = window.dialogArguments;
var sBrandcode = oMyObject.Brandcode;
alert(sBrandcode);
</SCRIPT>
Even the following alert is not getting displayed in pop-up window;
<script>
function ValidateData()
alert("Hi");
</script>
<button name="B_Save" tabIndex=1 style='POSITION:absolute;LEFT:255;TOP:315;WIDTH:75;height:24;BACKGROUND-COLOR:buttonface' onClick ="ValidateData()">Save</button>
I am using DIV instead of frames in my both forms. I just want to get that value in my pop-up window to write a query based on which data will get displayed in my table of pop-up window.
Plz help me to solve this problem.just attach the value with its url for example
String names="java";
<a href="# onclick="window.open('file.jsp?name='+names);"></a> -
Firefox main window goes black and all tools disappear.
Occasionally the Firefox main window will go black and all tools disappear.
It ends up with a black window, a blue frame, and the three buttons in the top right corner (minimize, maximize and close). If any audio (or video) is playing, the sound continues. If I click the X at top right to close it, it closes and when I restart it everything is ok. See the screenshot below.
This only happens once a day or so. I have no way of predicting it other than I'm usually scrolling down the page when it happens. It has happened in safe mode.
I'm using the most recent Firefox, 33.0.2, on Win 8.1 on an i5 system with 8G RAM.
<img src="http://i.imgur.com/Awx1fD0.png"/>Try to disable OMTC and leave hardware acceleration in Firefox enabled.
*layers.offmainthreadcomposition.enabled = false
You can open the <b>about:config</b> page via the location/address bar.
You can accept the warning and click "I'll be careful" to continue.
*http://kb.mozillazine.org/about:config
You can try to disable hardware acceleration in Firefox.
*Tools > Options > Advanced > General > Browsing: "Use hardware acceleration when available"
You need to close and restart Firefox after toggling this setting.
*https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
*https://support.mozilla.org/kb/upgrade-graphics-drivers-use-hardware-acceleration -
Stopping the applications main window from activating when a child window is clicked
I am building a javascript based AIR application that implements a bastardized growl notifier. When the the application is minimized or in the background you may be notified of a new message. This part works great.
The UI calls for an "X" button to close the the notification window. When I click the "X" the application's main window is activated and brought to the foreground, but the desired behavior is that the main application window stays minimized or backgrounded. I've tried playing around with preventDefault and stopPropagation on mouse click and mouse down events but this doesn't seem to solve the problem. I've also tried to hook into the display state changing event on the nativeWindow to see if I could cancel activation events in this scenario but I wasn't able to get that to work. My last ditch effort was to try and tap into the AIR platform events for mouse click and mouse down, with the rationale that these things are handled in AIR and by the time it gets to the webkit engine, it's already too late, but that didn't seem to work either.
It's completely possible that I'm "missing some mundane detail" and one of these approaches should be sufficient. I've noticed that TweetDeck has the same problem so I'm wondering, is this just an "AIR thing", possibly a bug, or is this expected?
Any help would be greatly appreciated. I can post more information and screenshots if my explanation wasn't clear enough. Thanks for reading.sloppy code
JMenuitem open;
public actionperformed(event e)
if e.getsource == open
displayframe();
public void displayFrame(){
JFrame = new jframe
frame.pack()
frame.show()
} -
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! -
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 . -
Box in main window of script is not printing
Helllo Friends
Box in main window of script is not printing but the same is available in print preview. I have use the following commands.
Please help me.
/: BOX WIDTH '23.40' CM FRAME 20 TW
/: BOX XPOS '0.00' CM YPOS '1.40' CM WIDTH '23.40' CM FRAME 25 TW
/: BOX XPOS '0.00' CM YPOS '8.10' CM WIDTH '23.40' CM FRAME 25 TW
/: BOX XPOS '0.00' CM YPOS '9.00' CM WIDTH '23.40' CM FRAME 25 TW
/: SIZE WIDTH '0.00' CM HEIGHT '8.10' CM
/: BOX XPOS '0.00' CM FRAME 25 TW
/: BOX XPOS '0.50' CM FRAME 10 TW
Thanks In Advance
Regards
SUNITHATry changing X postion to not equal to zero something else for example.
/: POSITION WINDOW
/: POSITION XORIGIN '-0.1' CH YORIGIN '+0.4' LN
/: SIZE WIDTH +0.7 CH HEIGHT +5.0 LN
/: BOX FRAME 7 TW
/: BOX HEIGHT '1.1' LN INTENSITY 15
Nabheet -
Getting Dynamic XPOS and YPOS for drawing the line in MAIN window in SAP Script using BOX command
Hi Experts,
I am trying to draw a line using the BOX command in the main window.
/: BOX HEIGHT 0 TW FRAME 10 TW INTENSITY 100
I want to draw a line in XPOS and YPOS dynamically..
Is there any way to find such I can draw a line dynamically after triggering a Text element. or determine the XPOS and YPOS dynamically such that I can draw a line in an intended position dynamically.
Thanks in Advance
Regards
Rajesh Chowdary VelagaAny update on this ??
-
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. -
Need to print horizontal line at the end of main window in each page.
Hi,
I am printing a smartform with main window having 10 lines in footer. The problem I am facing is when the content extends upto two or more pages, I am not getting the horizontal line at the base of main window. For last page it is fine as it contains footer.
Please suggest how to proceed.
Thanks,
RKUHi,
If you don't have any frame set on your main window:
Go to output options and mark frames, and then go to details and uncheck checkboxes for above, laft and right, leving only below marked.
This will give you a line in the bottom of you main window.
If you dont' want to do this on the main window, can you create a new window placed at the bottom of the page and use this framing technic on that window. But in that case don't forget to mark the "always draw box and shading" checkbox. as this window contains no values, the will not get printed unless you mark this checkbox.
Regards
Åsa Thenstedt -
Main window box is not extended
Hi Experts ,
I am working scripts. In main window I draw box , using below box command.
BOX XPOS '0.0' CM YPOS '0.0' CM WIDTH '3' CM HEIGHT '1' CM FRAME 10 TW
BOX XPOS '0.0' CM YPOS '0.0' CM WIDTH '6' CM HEIGHT '1' CM FRAME 10 TW
BOX XPOS '0.0' CM YPOS '0.0' CM WIDTH '10' CM HEIGHT '1' CM FRAME 10 TW
BOX XPOS '0.0' CM YPOS '0.0' CM WIDTH '13' CM HEIGHT '1' CM FRAME 10 TW
BOX XPOS '0.0' CM YPOS '0.0' CM WIDTH '16' CM HEIGHT '1' CM FRAME 10 TW
My issues is , when Item line is one, it is working fine.
But if item lines 2 to 10 records, My box was not extended.
So please give me solution.
Thanks,point 1, wrong forum, see the moderator message right on top of this forum.
2. well you are drawing hard coded boxes of height 1 and various width´s.
Sure the will come only for item 1, for item 2 you´d have to draw new own boxes.
Since you cannot be sure about the height of a position, you had to code these dynamically, which is possible but quite a task.
Anyway it is NOT advicable to work with boxes on line-item level. at least not with SAP-Script.
with smartforms you have an easy time doing this, while in SAP-Script you may come quite near to desperation. -
Box inside Main window issue in Scripts
I have issue in placing a box inside the main window. I would like to display text with a box frame at end of the line items.
I tried creating seperate FOOTER window in the Last page, but it dint work as expected, since if the line items ended in the first page then the LAST page did not trigger and one more complication was if there were 4 pages, then there was blank window (FOOTER) in 2 pages and it looks ugly.
I tried putting the box frame by using text element, calling after the end of the line items. The text displayed as needed, but the frame was misaligned.
Kindly help me. Thanks in advance.
Have a great weekend.Raj,
Try to find out which text element is trigerring after the line items text element while debuging the script and then place the box code in that text element.
regards.
Maybe you are looking for
-
Duplex printing doesn't work on HP Laserjet 3055
Hi! I am a new rMBP user and I need your help with setting up a printer. I want to use my old printer HP LaserJet 3055 for both side printing - using Widnows I didn't have any problem with that. The printer supports manual duplex printing - it means
-
Using TOAD or Hyperion to Query SAP BW?
Is it possible to use TOAD or Hyperion Interactive Reporting Studio to query SAP BW tables? I would really like to be able to use the SAP BW infocubes but not be tied to BEx. Is this possible?
-
Database adapter service connecting to SQL server
I need to connect to our SQL server db and create a db adapter service. I am getting an error message that "connection is busy with results from another command". What do I need to do to resolve this? I tested the jdbc-odbc connection and it connecte
-
Not Be able to Close Purchase Orders with different Buyer ID
We have open Purchase Orders in system created by different buyers & now these Buyers are no more exist or there User ID has been disabled, now pls guide us how we can close those Purchase orders by using single User ID. Pls note that we have many op
-
Recievable Invoices are Imported Without Payment Information
The invoices are getting imported as there exist a relationship to another customer. Now the problem is that the invoices can be imported succesfull as there exist this relationship but they can not be paid as the paying customer for the new invoice