PLZ HELP SAP SCRIPT ISSUE (DYNAMIC BOX)
Hi all
I want to include a dynamic text (means number of lines can vary) inside a box .
please guide me how i can create this box whose size would be dynamic according to this text.
plz help i am not able to find ne solution
Thanx in advance
Edited by: SARABPREET CHADHA on Mar 14, 2008 11:33 AM
Following things to be done in Driver program.
CALL FUNCTION 'READ_TEXT'
EXPORTING
ID = TEXT_ID
LANGUAGE = PRINT_LANGUAGE
NAME = TEXT_NAME
OBJECT = TEXT_OBJECT
IMPORTING
HEADER = TABLE_HEADER
TABLES
LINES = TABLE_LINES
EXCEPTIONS
ID = 01
LANGUAGE = 02
NAME = 03
NOT_FOUND = 04
OBJECT = 05
REFERENCE_CHECK = 06.
then
CALL FUNCTION 'WRITE_FORM_LINES'
EXPORTING
HEADER = TABLE_HEADER
WINDOW = WINDOW
IMPORTING
FROMPAGE = FROMPAGE " not interested ?
TABLES
LINES = TABLE_LINES
EXCEPTIONS
FUNCTION = 01
TYPE = 02
UNOPENED = 03
UNSTARTED = 04
WINDOW = 05.
and then in sap script.
/: INCLUDE &THEAD-TDNAME& OBJECT &THEAD-TDOBJECT& ID &THEAD-TDID&
/: PARAGRAPH T6 LANGUAGE
Your text will apper in sapscript.
Award points if useful...
Similar Messages
-
Sap script creating dynamic box problem
Hi all,
I am unable to create dynamic box in sap script.
Because the printing lines in the main window changing from one customer to another customer.
So could you please guide me how to create a dynamic box in sap script and also how to know the printing line nunber in main window.
Advance thanks for your suggestion
Regards,
Sudhakar.In script form u can write following code
/: DEFINE &MY_XPOS& = ' '
/: DEFINE &MY_YPOS& = ' '
/: DEFINE &MY_HEIGHT& = ' '
/: DEFINE &MY_WIDTH& = ' '
/: PERFORM GET_BOX_SIZE IN PROGRAM Z_MY_PROG
/: CHANGING &MY_XPOS&
/: CHANGING &MY_YPOS&
/: CHANGING &MY_HEIGHT&
/: CHANGING &MY_WIDTH&
/: BOX XPOS '&MY_XPOS' MM YPOS '&MY_YPOS' MM HEIGHT '&MY_HEIGHT' MM WIDTH '&MY_WIDTH' MM INTENSITY 10 FRAME 0 TW
In report u can write following code
Form Get_Box_Size TABLES IN_PAR STRUCTURE ITCSY
OUT_PAR STRUCTURE ITCSY.
Loop at Out_Par.
Case Out_Par-Name.
When 'MY_XPOS'.
Out_Par-Value = 100.
When 'MY_YPOS'.
Out_Par-Value = 57.
When 'MY_HEIGHT'.
Out_Par-Value = 300.
When 'MY_WIDTH'.
Out_Par-Value = 'Does it matter?'.
EndCase.
Modify Out_Par.
EndLoop.
EndForm. -
Sap Script - putting dynamic height value in box command
Hello All,
In SAP scirpt I have to display a table which might have variable number of line items. So in box command I cannot mention the height statically.
Is it possible to specify that dynamically like by using a variable and incrementing it every time the element is called from the loop?
Thanks
Indrajitno in SAP-SCRIPT this aint possible. But you could do this in an external perform, and have your incremented value back, tho since a external perform is beeing called from the form, the box statement might already have been interpreted.
this again would mean that this way wouldnt work as well then. -
SAP-Script - Draw Table (Boxes) with variable number of lines
Hello,
I want to create a Table with Frames in a SAP-Script Form. First of all I don´t know the position of the table in the window main. It can be page 2 or 3 on top or in the middle. But i have to describe a position like
POSITION YORIGIN '12.95' CM. How can i position the table in a variable way?
And i don´t know the number of lines of the table. How can I manage to draw the correct numbers of boxes as numbers of lines exist?
Kind Regards
Carsten FuchsHi carsten,
1. Drawing GRID (just like excel, matrix)
is very cumbersome in sapscript layout.
(either dynamically, or hardcoded)
2. Moreover, the final look,
may or maynot appear as requried,.
ie. exactly with proper alignment and grid lines.
3. If the font size is required to change,
then the dynamic position also changes.
4. If the grid is supposed to go to the next page,
again the calculation and logic becomes tougher.
5. To use grid, its better to use smartform,
which provided FINE CONTROL of the grid
and its lines and width, height, style etc.
6. In sapsctip, at most we can use
UNDERLINE (_) and PIPE (|)
regards,
amit m. -
Hello All
I have done changes to include few(3) lines in a SAP Script window. Because of those 3 lines, contents that were printed earlier are not getting printed.
The window is getting printed inside a box and it is defined as
BOX FRAME 10 TW.
Window height is 22.50 Ln,width 9.50 CM.
To rectify this should I increase the height of this window or should I define the attributes of the box
Please reply at the possible earliest.
Thanks in advance.Check this
Setting default parameters for a box:
You can use the POSITION and SIZE commands to set default parmeters for a box.
Instead of:
/: BOX XPOS '11.21' MM YPOS '5.31' MM HEIGHT '10' MM WIDTH '20' MM INTENSITY 10 FRAME 0 TW
You can write:
/: POSITION XORIGIN '11.21' YORIGIN '5.31' MM
/: SIZE HEIGHT '2' MM WIDTH '76' MM
/: BOX FRAME 10 TW INTENSITY 10
This can be usefull if you gave several boxes that share the same parameters.
If you want to set the position realtively to the window use POSITION WINDOW
to set the position to the top/left start of the window. Then use POSITION
to set the current position relatively to the start of the Window.
Note that you uses "+" or "-" in the ORIGIN position to the set the position relatively.
/: POSITION WINDOW
/: POSITION XORIGIN '+5' MM YORIGIN '+10' MM
the position is now 5 MM from the left and 10 MM from the top of the window
NOTE: After using the position command you can move the current position
realtively to the last used position
/: POSITION XORIGIN '+10' MM YORIGIN '+20' MM
Now the position will be X = 15 and Y = 30
Drawing a line. You can draw a line by setting the Height or Weidth to 0
and add a frane. E.g. a horizontal line:
/: SIZE HEIGHT '0' MM WIDTH '200' MM
/: BOX FRAME 10 TW XPOS '11.21' MM YPOS '14.81' MM INTENSITY 100 -
Hi,
I am customizing a standard form (f110_prenum_chck) into a custom form where I need to get the vendor information below the check with date of the document,type,reference,original amount,balance due,discount and the final payment amount. There is another window with the same data for a customer retain copy.I can find the fields in regup,reguh,regud tables except the final payment amount field. I think it needs to be calculated. As I cannot do the coding in SAP script, how can I do this? and if a vendor has 2 documents then one line item is been printed in the main window and the second one is falling under the customer copy window, but I need both the line items in both the windows as one is a vendor copy and the other one is a customer copy.
Please help me with this situation
Regards,
Kiran
Moderator message - Please use a meaningful subject line - post locked
Edited by: Rob Burbank on Sep 10, 2009 12:25 PMHi Ian,
theoretically i read that we can create 99 main windows in a page.
Is it feasible ? will it work properly in realtime?
Hope u might have created more than 1 windows in a page.
I am supposed to start code changes from tommorow, hence want to know the feasibility ahead of time.
Regards.
santosh. -
Plz help with scripting in adobe....urgent
Hi,
I have a requirement to display two <b>company codes</b> on two different master pages depending upon the company code .Here company code is the input .Shall i use s<b>cripting</b> here or we can handle in<b> print program</b>.
as i am new to this adobe ,i want to know about ,
1.How to use <b>CONDITIONS</b>.
2.<b>KEYWORDS</b>.
3.GIVE ME A <b>SAMPLE CODE</b> WITH EXPLANATIONS.Hi
look at the Adobe page here in SDN:
https://www.sdn.sap.com/sdn/developerareas/was.sdn?page=AdobeForms.htm
Check these links on Adobe forms
http://help.sap.com/saphelp_nw04/helpdata/en/1e/05853ff8ec2c17e10000000a114084/content.htm
https://www.sdn.sap.com/irj/sdn/interactiveforms
http://www.sap.com/solutions/solutionextensions/pdf/BWP_Interactive_Forms_Adobe.pdf
It contains lots of useful information, documentation, and e-learning materials teaching you the basics.
<b>Reward points for useful Answers</b>
Regards
Anji -
SAP Script - Text in BOX.
Hi all,
This is the following code I have written.
/: POSITION MAIN /* name of the window */
/: BOX XPOS '0' CM YPOS '0' CM FRAME 10 TW
/: BOTTOM
/: BOX XPOS '2' CM YPOS '23.3' CM WIDTH '17' CM HEIGHT '1' CM FRAME 5 TW
p1 Conditions apply /p1 is paragraph format*/
/: ENDBOTTOM
I have a main window and I have a box at the bottom of the main window. Now I want to write the text "Conditions apply" in that box.
Can anyone please help me with this.
Regards,
Varun.Hi Varun,
Please do the following at "p1 Conditions apply /p1 is paragraph format*/":
For Normal text
/* IF Condition
/:If &EKPO-WERKS& EQ '101' '.
/* Write your text
/: &TEXT& "--Write your text
/:ENDIF.
For Include TEXT (Text maintained as Standard text):
/* --IF condition
/:If &Varible& EQ 'X'.
/* Write include text ZTEXT--Replace with ur Standard text
/: INCLUDE ZTEXT OBJECT TEXT ID ST LANGUAGE EN PARAGRAPH ST
/:ENDIF.
Hope this may help you.
Lanka -
Sap script issuing out put.
Hi,
I have a Z form and I want to issue out put for the from,
Iam unable to find out the output type for that form in TNAPR table.
and I don know the transaction to which it runs. I don know the print program also.
please suggest me a way how can i issue output to the form. I don have any information reg the form.Hi,
While designing the form you might have used some tables, depending on them you can find out which application they belong to(Say Invoice, Delivery, etc.) So then you can go for the respective Output type. Then proceed with NACE and follow the procedure as foe the normal form.
Hope this resolves your query.
<b>Reward all the helpful answers.</b>
Regards -
HELP : APPLE SCRIPT ISSUES!
I am trying to make an apple script that will detect when an application (minecraft,cod or other online downloaded software/games) is open and then bring up a dialog that wont go away so that only I.T. can remove it. I also want it to send an email to a certain adress saying that so and so has been playing games
It's a school project that im working on, we have to figure out a way (through applescript) to help students be more productive, everyone else has no experience with apple script but me. I managed to create this in a couple of minutes but there is a couple glitches and problems i cant solve.
the problems include
it doesn't work with non-appstore apps ie. apps downloaded for the internet
i want it to be able to detect numerous programs
it doesn't close the program and/or bring the window/dialog to the top.
I have used safari as an example as to where a list of "illeagle apps" should be.
here's the script:
tell (get system info)
set longName to long user name
set shortName to short user name
end tell
if appIsRunning("Safari") then
tell application "Mail"
set theNewMessage to make new outgoing message with properties {subject:"[" & longName & "] ,Gaming Alert", content:"[" & longName & "] has been gaming, he is to report to I.T. by the end of the day", visible:true}
tell theNewMessage
make new to recipient at end of to recipients with properties {address:"[email protected]"}
send
end tell
end tell
end if
end
repeat
if appIsRunning("safari") then
display dialog "Gaming is not allowed, Your log of your computer programs running has been emailed to the I.T. department. Please visit the I.T. department immedietly to remove this message" buttons {"Report To I.T."} default button 1 cancel button 1 with title "Gaming Alert" with icon stop
end if
end repeat
if appIsRunning("safari") then
tell application finder
quit appIsRunning("safari")
end tell
end if
on appIsRunning(appName)
tell application "System Events" to (name of processes) contains appName
end appIsRunning
end
Any help is greatly appriciated
Thanks!I really do not appreciate your negativity towards this assignment.
firstly i am not trying to "cheat" the system by asking for help, our teacher encourges us to go online , reserch and go onto forums such as these.
Secoundly , I dont need you to criticize my idea's by telling me that i am a "taddle tale" or whatever
Thirdly , it's called updating over wifi. Thats how I intend on updating the blacklist to new games
Finally it will encourage student productivity, as without games there will be no distractions. Internet games and such are blocked and I plan to keep my identity, as the creator of the script , a secret
And also, here's a bit of criticism maybe you would be a better educationalist yourself if you actually encouraged a project.
Ps. Are you familiar with google science fair... if not LOOK IT UP!
im going i have talked viney kumar and are most likley teaming up to put this project in action, we go to the same school. He thinks it is a good idea and if YOU ever had any idea's at all that aren't criticism maybe you would have at least one atom that is up to his standard of innovation.bye the way, i am only 14.What were you trying to do when YOU were 14...
Signed
Steves Assistant -
SAP Script : Date is Boxes ??
Dear All,
I wanted to print date in boxes. i,e MM DD YY in boxes.
I am doing like this.
/: SET DATE MASK = 'MM.DD.YY'
and then playing with Box Command, to draw vertical lines in between DD, MM and YY... with
BOX HEIGHT '0.5' CM FRAME 10 TW
BOX XPOS '.48' CM WIDTH 0 TW HEIGHT '0.5' CM FRAME 10 TW
BOX XPOS '.78' CM WIDTH 0 TW HEIGHT '0.5' CM FRAME 10 TW
Is this a right method ?? or Else
Should there be a Standard method to print Date in Boxes ..
Please let me know ...
Thanks
Regards
venkat.Hi
I think it is correct approach.
here is some more details
To define the formatting of date fields, use the SET DATE MASK control command. Executing this command causes all subsequent date fields to be printed using the specified format.
Syntax:
/: SET DATE MASK = 'date_mask'
In the date mask, you can use the following codes:
· DD: day (two digits)
· DDD: day name - abbreviated
· DDDD: day name - written out in full
· MM: month (two digits)
· MMM: month name - abbreviated
· MMMM: month name - written out in full
· YY: year (two digits)
· YYYY: year (four digits)
· LD: day (formatted as for the L option)
· LM: month (formatted as for the L option)
· LY: year (formatted as for the L option)
All other characters found in a date mask are interpreted as simple text and are copied straight into the output.
Assuming the current system date is March 1st, 1997.
/: SET DATE MASK = 'Foster City, MM/DD/YY'
&DATE& -> Foster City, 03/01/97
/: SET DATE MASK = 'MMMM DD, YYYY'
&DATE& -> March 01, 1997
The date mask may be reset to the default setting by using an empty string:
/: SET DATE MASK = ' '
The abbreviated and full forms of the names of the days and months are stored in the language dependent TTDTG table under the following keys:
· %%SAPSCRIPT_DDD_dd: abbreviated day name
· %%SAPSCRIPT_DDDD_dd: full form of day name
· %%SAPSCRIPT_MMM_mm: abbreviated month name
· %%SAPSCRIPT_MMMM_mm: full form of month name
dd: day number 01 = Monday,..., 07 = Sunday
mm: month number 01 = January,..., 12 = December
regards
vinod -
Plz help interactive list issue-urgent today is the deadline
hi experts ,
i have created an interactive list report .
in which when i click on value of first coloumn it should display another list report .
in my case when i click on the spaces next to the value it should not display the value .
i want when i click on the value like 34 it should display the next list not on the spaces .
to get the value i am using
GET CURSOR FIELD fld VALUE val.
Thanx in advancehi,
check the following code
here i used hide ang get cursor statements
in my prog i will display the next list only on clicking material number
otherwise it will display a message click on material number
modify accordingly
REPORT zp_interactive5 LINE-SIZE 100 LINE-COUNT 10(2).
TABLES: mara, marc, makt.
DATA: wa_mara LIKE mara,
it_mara TYPE TABLE OF mara,
wa_marc LIKE marc,
it_marc TYPE TABLE OF marc,
wa_makt LIKE makt,
it_makt TYPE TABLE OF makt.
DATA: value(20) TYPE c.
SELECT-OPTIONS: s_matnr FOR mara-matnr.
START-OF-SELECTION.
SELECT * FROM mara INTO TABLE it_mara
WHERE matnr IN s_matnr.
LOOP AT it_mara INTO wa_mara.
WRITE: / wa_mara-matnr COLOR COL_KEY INTENSIFIED ON,
wa_mara-ersda COLOR COL_KEY INTENSIFIED ON.
HIDE: wa_mara-matnr.
ENDLOOP.
CLEAR wa_mara-matnr.
AT LINE-SELECTION.
CASE sy-lsind.
WHEN '1'.
GET CURSOR FIELD value.
IF value = 'WA_MARA-MATNR'.
SELECT * FROM marc INTO TABLE it_marc
WHERE matnr = wa_maRA-matnr.
IF it_marc IS INITIAL.
MESSAGE 'NO RECORDS FOUND' TYPE 'I'.
ELSE.
WINDOW STARTING AT 10 l1
ENDING AT 50 l2.
LOOP AT it_marc INTO wa_marc.
WRITE: / wa_marc-matnr COLOR COL_KEY INTENSIFIED ON,
wa_marc-werks COLOR COL_KEY INTENSIFIED ON.
HIDE: wa_marc-matnr.
ENDLOOP.
ENDIF.
ELSE.
MESSAGE 'CLICK ON THE MATERIAL NUMBER' TYPE 'I'.
ENDIF.
WHEN '2'.
GET CURSOR FIELD value.
IF value = 'WA_MARC-MATNR'.
SELECT * FROM makt INTO TABLE it_makt
WHERE matnr = wa_maRC-matnr.
IF it_makt IS INITIAL.
MESSAGE 'NO RECORDS FOUND' TYPE 'I'.
ELSE.
WINDOW STARTING AT 10 l1
ENDING AT 50 l2.
LOOP AT it_makt INTO wa_makt.
WRITE: / wa_makt-matnr COLOR COL_KEY INTENSIFIED ON,
wa_makt-spras COLOR COL_KEY INTENSIFIED ON,
wa_makt-maktx COLOR COL_KEY INTENSIFIED ON.
ENDLOOP.
ENDIF.
CLEAR wa_makt-matnr.
ELSE.
MESSAGE 'CLICK ON THE MATERIAL NUMBER' TYPE 'I'.
ENDIF.
ENDCASE.
TOP-OF-PAGE.
WRITE: 'MATERIAL MASTER DETAILS'.
TOP-OF-PAGE DURING LINE-SELECTION.
CASE sy-lsind.
WHEN '1'.
WRITE: 'PLANT DETIALS'.
WHEN '2'.
WRITE: 'MATERIAL DESCRIPTION'.
ENDCASE.
REWARD IF HELPFUL
PRASANTH -
HOw can i delete the apple ID that came on a iphone 5s that was purchased 3rd hand and given as a gift to me... Thank you very much for your time and assistance in this mAtter..
You can’t, and Apple won’t do it for you; the activation lock is an anti-theft measure. Try getting a refund for it.
(123834) -
Dynamic Box Formatting in Scripts
Hi,
My requirement is ,
This is regarding to SAPScripts.
I should populate some data in a box.
The box should adjust depending upon the data.( Whether the data is 2 lines or 10 lines).
Help me out.
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Jul 8, 2008 11:21 AMHi Manjunath,
Here is the code which can help you get the dynamic box's from the script.
Here the element is TAB.
There is a loop for this element in the driver program.
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&
Hope this Solves your Problem in dynamic Table drawings.
<REMOVED BY MODERATOR>
Thanks,
Tej..
Edited by: Alvaro Tejada Galindo on Jul 8, 2008 11:21 AM -
SAP-Script; Is it possible to handle the BOX -Statement dynamic?
Hi Scripters!
My consultant wants a box around some information in a SAP-Script form.
Normally this is quite easy, BUT in this case i have the information (which needs the box around) printed after the positions.
So problem is: the box can not have a certain position in the Form since i dont know how much positions are to be printed.
any ideas on this subject?Hi Florian,
Yes it is possible to play arount with positions of Box.
You can pass variable name in between & in place of fixed XPOS and YPOS.
and pass value to that dynamic variable.
You have to test a lot with different values in those variables for pefect settings.
Hope it will solve your problem.
Regards
Krishnendu
Maybe you are looking for
-
Is iPod Shuffle corrupting songs or what?
I have this 2th gen iPod Shuffle I've been using for about four+ years. My problem is that some songs now sound corrupted. One, for instance, plays a few seconds then starts to make noises at some points. Others play a few seconds then jump to the mi
-
Freeze during install of update 10.5.1
My macbook will freeze upon the restart of trying to install update 10.5.1 I download the update using system software updater and when it asks for restart... I do it. The machine then starts up and begins the install. The problem is it will freeze a
-
Hi all, I have two Windows 2000 Servers: 1. Compaq Server with one 2.4G CPU, 1G RAM and 30G harddisk 2. Acer Server with one 2.4G CPU, 1G RAM and 30G harddisk The software configuration of two server are identical, they both have: 1 Windows 2000 Serv
-
HELLO EVERY ONE ... I AM GETTING run time error in this code.....can u send me the corrected code.... START-OF-SELECTION. SELECT T1~MATNR T1~MEINS T1~ERSDA T1~ERNAM T1~SPART T2~MAKTX T3~LVORM T3~EKGRP
-
Dear gurus, I'm new to ABAP. I know that somewhere in SE80 it is possible to find some examples of ABAP commands usage. Please, can you advice me, where exactly it can be found in SE80? Thank you a lot, Ondrej