Drawing boxes dynamically
Hi,
Can we dynamically position boxes in Sapscripts by giving a varible after the xpos and ypos positions.
The command which I gave is
BOX XPOS '0' CM YPOS &W_CTR& CM WIDTH '0' CM HEIGHT '11' CM FRAME 5 TW
I wanted to draw some horizontal lines and the variable w_ctr is getting populated with different values.But control is not going to this command.
Can anyone help me out ?
Try this out for size in the Text Elements for the window
<b>/: DEFINE &WIDTH& = '17.5'
/: BOX WIDTH &WIDTH& CM HEIGHT 1 CM FRAME 10 TW INTENSITY 15
/: DEFINE &WIDTH& = '3'
/: DEFINE &HIEGHT& = '3'
/: BOX WIDTH &WIDTH& CM HEIGHT &HIEGHT& CM FRAME 10 TW INTENSITY 15</b>
Cheers!
Rishi
Similar Messages
-
Drawing boxes dynamically in the script
Hi All,
I have requirement in SAP script. iam getting the data from different elements and it has to displayed in the table format.after column header i need to draw the box and i have to print the data as in the format of boxes. iam placing box command in the first element but iam not getting the boxes for all data it is printing only on the top of the page. so please suggest the solution for drawing boxes dynamically .
Thanks and Regards
D.RameshI have handle a similar situation with box.That is drawing dynamically based on no of items.
If there are 2 items,the box height for 2 items will be displayed and if there are 10 itmes then box height for 10 items will be displayed.
Only thing is u have to calculate the no of records and multiply with some sutable constant.Pass this content into varible declared in character format and use it in in box command as height.
BOX XPOS '0' CM WIDTH '18.5' CM HEIGHT &G_F_COUNT20& CM FRAME 2 TW
Here G_F_COUNT20 is varible.
Try this way and let me know if u face any problem.
Regards -
Drawing box in main window of sapscript form
Hi all,
I am developing a script for vendor balance confirmation report, in which I have to provide check boxes to allow the user to select an option.
My problem is if I use the BOX statement to draw the box the alignment keeps changing when the size of vendor address changes.
i.e the boxes moves up and down
I have another reference script in which they used the following statement to draw the box <527>.
Please suggest a way to use statement like this <527>
Thanks,
RajanTry it as shown below for drawing dynamic boxes.
Here the code works this way the YORIGIN is incremented by 0.6CM each time it is in the loop thus drawing tables dynamically.
/E TAB
/: POSITION XORIGIN '0.9' CM YORIGIN '+0.6' CM
/: SIZE WIDTH '3.0' CM HEIGHT '0.6' CM
/: BOX FRAME 10 TW.
/: POSITION XORIGIN '3.9' CM
/: SIZE WIDTH '7.3' CM HEIGHT '0.6' CM
/: BOX FRAME 10 TW.
/: POSITION XORIGIN '11.2' CM
/: SIZE WIDTH '2.8' CM HEIGHT '0.6' CM
/: BOX FRAME 10 TW.
/: POSITION XORIGIN '14' CM
/: SIZE WIDTH '2.6' CM HEIGHT '0.6' CM
/: BOX FRAME 10 TW.
/: POSITION XORIGIN '16.6' CM
/: SIZE WIDTH '3.2' CM HEIGHT '0.6' CM
/: BOX FRAME 10 TW
P4 &X_VBAP-KWMENG(C)&,,&X_VBAP- ARKTX&,,&V_TOTALa&,,&V_TOTALb&,,&V_TOTALc&
the driver program's piece of code.
LOOP AT it_vbap INTO x_vbap.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TAB'
window = 'MAIN'
EXCEPTIONS
element = 1
function = 2
type = 3
unopened = 4
unstarted = 5
window = 6
bad_pageformat_for_print = 7
spool_error = 8
codepage = 9
OTHERS = 10.
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.
Regards,
SaiRam -
How to populate data in drop down box dynamically in adobe form?
Dear Experts.
I am new to adobe interactive form can anybody please tell me how to fill data in a drop down box dynamically? I am using webservices method.
Thanks in advance.
Chitta Ranjan Mahato
Edited by: mahato123 on Aug 5, 2011 12:16 PMyou can create a method to populate the context attribute that you are using to map to your dropdown box.
DATA: node_info TYPE REF TO if_wd_context_node_info.
DATA: it_table TYPE wdr_context_attr_value_list.
** select your dropdown data into it_table and pass it to your context attribute.
** here, mine is call PROJ_TYPE - the values should appear in your dropdown.
node_info->set_attribute_value_set(
name = 'PROJ_TYPE'
value_set = it_table ). -
Linking text boxes dynamically
I'm working on the layout of a large (more than 2,000 page) document. Each page has two text boxes that together fill the entire page. The top text box contains the document text and the bottom text box contains footnote material. I'd like to be able to link the two text boxes together so that whenever I re-size one of the text boxes, the other box dynamically re-sizes to fit the remaining space on the page. Does that make sense? Is that something I can do in InDesign CS3 on my Mac?
Thanks in advance for any help,
MarkYou don't necessarily need to link them.
Make the top text frame the full page height.
Make the bottom one the average text height, and apply a text wrap it it.
When you resize the bottom one, the text in the top one will reflow due
to the text wrap.
Harbs -
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. -
How to connect any scanner and cash draw box in retail outlets
we have JHS 10g oem copy.how can connect with barcode scanner and cash draw box, print invoice over the JHS? is it any pre defined ADF application available in Oracle for retails?
we have been developing ADF application,we pause development? due to the connection with cashdraw devices( Point of Sale Devices) over the JSF pages! this is our core issue! how can achieve this goal?
we have 40+ outlets with CashDrawer with bar-code scanner! those devices should communicate with our ADF application!
either any such type of devices are compatible with ADF application.please suggest,we can buy. -
Hi Friends,
Is it possible to create BOX dynamically( i.e
changing the positions each time .) in SAP sciprt .
I had defined the parameter X_START Y_START for XPOS and YPOS and passing the values to those parameters .
But it is not printing the BOX .
Thanks ,
SivaHi
Write like this
BOX XPOS 1 CM YPOS 1 CM WIDTH 18 CM HEIGHT 1 CM FRAME 10 TW INTENSITY 10
refer this link
http://hemanth.info/sap/sapscripts/sap%20script%20controls.pdf
Regards
Shiva -
Drawing a Dynamic Graph Using Java/J2EE Technology
Dear Friends,
I have a immediate requirement.
I have to draw a dynamic graph based on changing statistical data(Stock market appliaction).
Have a look at finance.yahoo.com.There we can a find a dynamic graph.The x and y axis in the graph will change according to the data it recieves without using refresh option and all ... In a periodic interval of time ,say for every 10 minutes the application have to check whether it has any changes in the statistical data it recieves (the data maybe from database or form anyother application). If it finds any changes ,automatically it should reflect those changes in the graph.
Please help me out friends . I have been struggling with this over a period of time but am not able to resolve.
Please provide me with any sample application and code.
Keeping my fingers crossed.
Thanks in Advance.I don't have example code, but I am sure JFree.org has lots. It's a free chart API for Java, that also works with Servlets etc.
-
How to draw a dynamic box in sapscript?
Hello experts,
I am currently facing a problem wherein in the main window I have multiple line items. What I want to do is that for every new line item, I would draw a box and so on...for example:
BOX 1
BOX 2
BOX 3
Here is the attributes of the main window where I would like the boxes to be drawn:
MAIN 00 Main window 2,00 CH 15,00 LN 78,00 CH 30,00 LNhi vijay please try out this code,
u have to keep all the code as single text element,
POSITION XORIGIN 2 CM YORIGIN +9 MM
" the next two ines will dra a box
SIZE WIDTH 180 MM HEIGHT 40 MM
BOX FRAME 30 TW
OSITION XORIGIN 2 CM YORIGIN +9 MM
SIZE WIDTH 180 MM HEIGHT 0 MM
BOX FRAME 30 TW
POSITION XORIGIN 2 CM YORIGIN +12 MM
SIZE WIDTH 180 MM HEIGHT 0 MM
BOX FRAME 30 TW
POSITION XORIGIN 8 CM YORIGIN -21 MM
SIZE WIDTH 0 MM HEIGHT 40 MM
BOX FRAME 30 TW
POSITION XORIGIN 2 CM YORIGIN +43 MM -
Hi,
Is it possible to draw a box, using lines and NOT BOX?
I have one MAIN window, and in element END_OF_DOCUMENT I want to draw a box. But if I use BOX, then I have to define POSITION.
The problem is that element END_OF_DOCUMENT has not the same position every time FORM is been printed.
So I would like to draw a BOX using lines or something?
Adnan.
Adibo AHello,
I have handle a similar situation with box.That is drawing dynamically based on no of items.
If there are 2 items,the box height for 2 items will be displayed and if there are 10 itmes then box height for 10 items will be displayed.
Only thing is u have to calculate the no of records and multiply with some sutable constant.Pass this content into varible declared in character format and use it in in box command as height.
BOX XPOS '0' CM WIDTH '18.5' CM HEIGHT &G_F_COUNT20& CM FRAME 2 TW
Here G_F_COUNT20 is varible.
Try this way and let me know if u face any problem.
If useful reward.
Regards
Vasanth -
Open a new window, draw boxes in the window, and communicate between the two windows
I'm going to research this, but figured I'd jump start here in case someone can give me a quick link or point me in the right direction on how to do this while I'm looking. This is an area of Flex I haven't hit on yet.
Basically I need to have my flex app (AIR Application) open a new window, allow the user to draw a box on that new window, and then pass the info of the box (X and Y, Width and Height) back to the main window.
I've never done any of that and am going to try to find out how, but if someone could point me here before I find it online, that would help a great deal, kind of in a time crunch.... thanks.You can open the new window as a TitleWindow popup. You can pass info back to the main app using mx.core.Application.application.
In main app:
public var windowInfo:Object;
In popup:
import mx.core.Application.application;
private var app:Object = mx.core.Application.application;
app.windowInfo.x = this.x;
app.windowInfo.y = this.y;
app.windowInfo.otherOne = this.otherProp;
Looking ahead, it is best to pass information between the main app and components using custom components. Below systemManager, popups and the main app are in different display lists, so add event listeners for custom events to systemManager. My Flex Cookbook post on custom events shows this:
http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&productId=2&postI d=11246
http://livedocs.adobe.com/flex/3/html/help.html?content=layouts_12.html
If this post answers your question or helps, please mark it as such. -
How to create check boxes dynamically in selection screen
Hi Experts,
I have a requirement of creating dynamic check boxes based on the number of records that are retrieved from a database table.
Can you please suggest me how to achieve it.
Regards
RP.Hey RP,
Try this way.
REPORT ztest_program .
DATA: it_data TYPE TABLE OF t001.
DATA:check TYPE char3.
DATA:sy_index TYPE char2.
DEFINE checkbox.
parameters:&1 as checkbox.
END-OF-DEFINITION.
CHECKbox:c01,c02,c03,c04,c05,c06,c07,c08,c09,c10,
c11,c12,c13,c14,c15,c16,c17,c18,c19,c20,
c21,c22,c23,c24,c25,c26,c27,c28,c29,c30,
c31,c32,c33,c34,c35,c36,c37,c38,c39,c40.
AT SELECTION-SCREEN OUTPUT.
DESCRIBE TABLE it_data LINES sy-tfill.
sy-tfill = 39. "This will be changed based on the itab records. I just hardcoded the value
sy_index = 1.
LOOP AT SCREEN.
CONCATENATE 'C' sy_index INTO check.
IF screen-name = check.
IF sy_index GT sy-tfill.
screen-active = '0'.
MODIFY SCREEN.
sy_index = sy_index + 1.
CONTINUE.
ENDIF.
sy_index = sy_index + 1.
ENDIF.
ENDLOOP.
Thanks
Venkat.O -
Need to add text with box dynamically
Hello,
I need to add a standard text created in so10 with a box at the end of the purchase order.
This should trigger dynamically if the condition is correct.
For ex : PO created in plant = 100 then this text should be displayed at the end of the PO page with a box.
DO I have to create a Window and then include this text created in so10 and then give the conditions?
PLease suggest...
Have a great evening!
Regards,
KittuHi,
Simplest would be define a new element in the main window like:
E OTHER_TERMS
/: NEW-PAGE
/: INCLUDE ZPO_TERMS_AND_CONDITIONS OBJECT TEXT ID ST LANGUAGE EN
In the pgm check your condition if satisfied then use
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'OTHER_TERMS'
function = 'APPEND'
window = 'MAIN'
EXCEPTIONS
element = 1
function = 2
type = 3
window = 6
OTHERS = 8.
I hope this helps,
Regards
Raju Chitale -
Cursor keeps drawing boxes, can't click on desktop icons
I can't move the cursor without it drawing a box and I'm unable to open desktop icons. I've employed force quit to close out all running applications however, this leaves me with the force quit application dialogue box stuck open and unable to click on anything else. Shutting down or restarting has had no effect. I did manage to confirm that the battery status is now at change soon. Is this the source of the problem ?
I had a similar problem where it seemed that the right click was engaged and it kept highlighting everything. The battery casing was bowed and loose but I never thought that was a problem until I asked someone at the Apple Store. She recommended taking the battery out completly and running on AC power until I could afford to get a new battery. (I am using mine as a desktop cause the screen went out 3 years ago and I can't afford to get a new one.) Solved the problem immediately and I have not had an issue since. I hope this helps, it is worth a try. It got to the point with mine that I was forced to turn off the computer at the power button without properly shutting it down. It was basically unusable and I need my computer for school. This definately solved the problem. Good Luck.
Maybe you are looking for
-
Hi, I would like to know what suffix I need to put on my movie file so that I can use it in iMovie or iDVD. The movie file has .avi on it and can be read on Windows Media Player but I cannot get it into a file on the MacBook Pro such as iPhoto or iM
-
How do i attach a photo to an email without it appearing as a whole photo on the page
When I try to attach a photo from iPhoto to an email, the whole photo shows on the page and I cant seem to be able to attach it as an attachment.
-
List of reports in the reporting repository
Hello ! Some time after upgrading to SP15 I have found that there is no more list of reports in the configuration of reporting repository. Is it really so or it is my local problem, connected maybe with errors during installation of SP15 ?
-
Hello All, we are making one report for that we need to capture the Bill of Material number of the component attached to the activity. There is BOM with x,y,z components assembly name is "ABC", the "ABC" is transfered to project using CN33, all the c
-
Housekeeping OEM 12c Repository
Hello Are there any housekeeping scripts for the Oracle Enterprise Manager 12c repository (with Bundle Patch 1) available? I didn't find anything in the documentation. There are only hints what can be done and what metrics do indicate that the OEM do