SAP Script - resize window / paragraph
Hello Gurus,
I have two problems related to sap script. ( ver 4.6c)
I have copied the original order confirmation form from 000 client in diff.languages like FR/DE/EN ( these forms are used by diff. offices in diff. location ) now we have to create a form for our china office location so I copied an existing form ( FR language) to language ZH.
a. I cannot resize or move the window of the form ZH, to do this I have to convert the original laguage to ZH ( original language of the form is FR) , to change the original language I have to edit the FR language form and use the utilities->convert org.lang option , my question is if I do this process what will happen to our FR language settings users? or is there anyother way to do this ( move or resize window ) without disturbing other forms.
b. I am using two paragraph settings for printing the item line in the order form, ex. ZZ and IS , if I use IS the item line appears but for ZZ there is no item lines printed on the form. ( blank ) What could be the problem for using ZZ Par.format.
Any help is appreciated.
Thanks and best regards,
A drop in an Ocean
Try to identify the original language of the SAPscript.
EX: GOTO SE71, give your form name and language ZH. select radio button Header and click change.
under adminstrative data, identify the original language. EX: if original language is DE
GO back to SE71, now give your form name and key in language as DE. Modify all windows here.. i.e. re-size etc., it will automatically gets changed in your ZH language. Also you can create new paragraph formats or change existing paragraph formats here using original language. you can see all changes in form ZH.
If you want to re-size in "ZH" itself .. try to change original language to ZH.
I guess, this info will help you to close the thread.
Regards,
SaiRam
Similar Messages
-
Problem with sap script main window
Hi,
I am modifying the existed sap script. I added a box and some line items to the sap script main window.
Now i want to increase the size of the mainwindow.
Please guide me how to increase the lines of main window . I am unable to edit the standard attributes of the main window ,because all are in disable mode.
Please guide me how to increase the size of the main window.
Thanks in advance
Regards
SudhakarHi,
You might be trying to edit the script in non original language. You can change the layout only in the original language.
Check the attributes of the script to see the original language.
Thanks,
Vinod. -
Sap script main window related question
hi
i have a requirement to add a new column to sap script main window picking information from some table
this new column is C2 and it takes reference from C1
i ahve below queries
1) is is better to add a new column to main window and increase and decrease alsl columns width of all columns
or create a new window below the main window in which this new field will apear
ie C1 and C2 to appear in this new window
c1 is already coming in main window it needs to reaper with the new C2 in new window
my concern is that since main window is only one and it it being called again and again to polultate the data
how this new window will work will it be able to display the corect data
whcih is better approach
2) ASLO the requriement is that the new field should appear only when Reprint is done for the transfer order
can anyone tell how to catch the reprint option or code from teh program what is defined for reprint option in program and how to catch it and put condtion?
regards
AroraIf you would like to have vertical lines as well inside the frame....
/: BOX FRAME 10 TW
/: BOX XPOS '1.2' CM WIDTH 0 TW HEIGHT '12.7' CM FRAME 10 TW
/: BOX XPOS '11.00' CM WIDTH 0 TW HEIGHT '12.7' CM FRAME 10 TW
/: BOX XPOS '15.5' CM WIDTH 0 TW HEIGHT '12.7' CM FRAME 10 TW
/: BOX XPOS '18.4' CM WIDTH 0 TW HEIGHT '12.7' CM FRAME 10 TW
Regards,
Rich Heilman -
Vertical line issue in SAP Script main window
Hi All,
I want to draw a vertical line in my main window in SAP Script output.
But problem is in main window i am printing some texts at the beggining then i am printing line items.
So this is not fixed line (box). It may increase/decrease based on text available before line items.
How can i manage this prining vertival line as i don't know height, top of this line!
Thanks in advance.
Thanks,
Deep.Hai Deep,
Use Elements as suggested by Kodarapu.
Now goto Paragraph Formats create a format for Item lines.
ex.
Name Paragraph Format as 'IL' Now click on the Push Button "Tabs" on bottom Right.
now in "Tab Position" enter the spacing that you need for your item dispaly
ex.
Number Tab position Alignment
1 6.00 CH LEFT
2 25.00 CH LEFT
3 54.00 CH LEFT
The above example is for 3 items
Now in your Script Windows-> Main
do the following.
/E ITEM_LINE_A
IL &EKPO-EBELP&,,&EKPO-EMATN&,,,,&EKPO-TXZ01&
Hope it SOlves your Issue.
Cheers,
Suvendu -
Hi,
I am working on SAP SCRIPTS and the Editor Window has a maximum of 72 characters per line.
I want to use BOX command 'BOX YPOS '1.75' CM HEIGHT '0.30' IN WIDTH '8.26' IN FRAME 10 TW INTENSITY 15' and I am unable to write this in 1 command line.
How do I manage this?
Thanks.Hi,
Use edit->page left/right and then write your code,it will come in one line.
Luck,
Bhumika -
Long text problem in sap script
Hi Experts,
I have craeted sap script for payment print progrem.. in my sap script one window is text window... client want more then 300 char for that window. for that i use read_text function module... its working fine... but problem is it retrive only one line from long text editor. only 70 char i got.
below is my coding......
CALL FUNCTION 'READ_TEXT'
EXPORTING
ID = '0001'
LANGUAGE = sy-langu
NAME = NAME
OBJECT = 'DOC_ITEM'
TABLES
LINES = LINES .
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 LINES.
n = 0.
l = 132.
text+n(l) = lines-tdline.
n = n + 132.
l = l + 132.
ENDLOOP.
in sap script i have direct pass lines-tdline
*&lines-tdline&
Please suggest me which point i missing?
Thanks
JigarHi All,
The standard text will be stored in Name = ORDCONF_TEXT_(sales org)_(distributionchannel)_(division)
Text ID = ZSD
Examples: ORDCONF_TEXT_4000_01_01 , ORDCONF_TEXT_4000_01_80 , ORDCONF_TEXT_1000_01_01.
Requirement :
The print program /form will need to pick up the appropriate standard text based on the Sales Area (combination of Sales Org / Distribution Center / Division) of the sales order [VBAK-VKORG / VTWEG / SPART], provided a standard text has been created for that Sales Area. Itu2019s not required that every sales area have a standard text, so if one is not found, this step should be skipped and the rest of the print program executed.
The new text should print after 2 blank lines after the Printable Notes text (which is after the line items and the Total Net Price prints).
The font should be the same size as the Printable Notes, but bolded rather than italicized.
The text should print in the same columns as the Printable Notes currently print in (Material Description / Scheduled Ship Date / Quantity) .
So the logic i have used is this below code:
I used a subroutine in the layout of the main window becoz i need to print it in the main window below after 2 blank lines of line items.
This is logic in the layout:
/:PERFORM GET_OBJECT IN PROGRAM ZSDRP001_ORD_CONF_IRE
/:USING &VBDKA-VBELN&
/:CHANGING &ORDCONF_TEXT&
/:ENDFORM
/:INCLUDE &ORDCONF_TEXT& OBJECT TEXT ID ZSD PARAGRAPH A1
I called this subroutine in the print program:
Logic in the print program:
FORM GET_OBJECT TABLES INPUT_TAB STRUCTURE ITCSY
OUTPUT_TAB STRUCTURE ITCSY.
DATA : TMP_VBELN LIKE vbdka-VBELN,
TMP_VKORG LIKE VBAK-VKORG,
TMP_VTWEG LIKE VBAK-VTWEG,
TMP_SPART LIKE VBAK-SPART,
TMP_TXNAM1(40) TYPE C VALUE 'ORDCONF_TEXT',
TMP_TXNAM2(100) TYPE C.
DATA: v_text LIKE tline-tdline.
DATA : P_V_TEXT LIKE tline-tdline.
CLEAR : TMP_TXNAM1, TMP_TXNAM2, TMP_VBELN, TMP_VKORG, TMP_VTWEG, TMP_SPART.
READ TABLE INPUT_TAB WITH KEY NAME = 'vbdka-VBELN'.
IF SY-SUBRC = 0.
tmp_vbeln = input_tab-value.
ENDIF.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING INPUT = TMP_VBELN
I
MPORTING OUTPUT = TMP_VBELN .
CLEAR VBAK.
SELECT SINGLE VKORG VTWEG SPART INTO (TMP_VKORG, TMP_VTWEG, TMP_SPART)
FROM VBAK WHERE VBELN EQ TMP_VBELN.
IF NOT TMP_VKORG IS INITIAL
AND NOT TMP_VTWEG IS INITIAL
AND NOT TMP_SPART IS INITIAL.
CONCATENATE TMP_TXNAM1 TMP_VKORG tmp_vtweg tmp_spart into TMP_TXNAM2 SEPARATED BY '_'.
endif.
CONDENSE TMP_TXNAM2 NO-GAPS.
PERFORM read_order_text USING TMP_TXNAM2 CHANGING v_text.
READ TABLE output_tab WITH KEY NAME = 'ORDCONF_TEXT'.
IF SY-SUBRC = 0.
output_tab-value = P_V_TEXT.
MODIFY output_tab index sy-tabix.
endif.
endform.
FORM READ_ORDER_TEXT USING P_TMP_TXNAM2 CHANGING P_V_TEXT LIKE tline-tdline.
DATA: ztdid LIKE thead-tdid,
zlang LIKE thead-tdspras,
zobj LIKE thead-tdobject,
zname LIKE thead-tdname.
DATA: tlines TYPE STANDARD TABLE OF tline WITH HEADER LINE
thead LIKE thead.
CLEAR P_V_TEXT.
ztdid = 'ZSD'.
zlang = 'E'.
zobj = 'TEXT'.
zname = P_TMP_TXNAM2.
CLEAR tlines.
REFRESH tlines.
CALL FUNCTION 'READ_TEXT'
EXPORTING
object = zobj
name = zname
id = ztdid
language = zlang
IMPORTING
header = thead
TABLES
lines = tlines
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
LOOP AT tlines WHERE NOT tdline IS INITIAL.
MOVE tlines-tdline TO P_V_TEXT.
ENDLOOP.
ENDFORM.
But still its not getting printed .Plz tell me where i am going wrong.
Thanks,
Suman -
Hi Experts,
In a classical ABAP report we make use of
write:/20 'Text'.
to print text from the 20th column. Can we do something similar in a SAP Script Page Window. I have a box and lines drawn. Now I want the text to start exactly after the vertical line(column). Is there a way to do in SAP Script.
Regards
Abdullah.You can use Paragraph format in SE71 Transaction,
here you can able to see Tab position ,give first tab would be 20 char alignment would be Left or right.
If you need design the box ,then i am giving simple example below :
POSITION WINDOW
BOX WIDTH '74' CH HEIGHT '36.5' LN FRAME 10 TW
POSITION WINDOW
BOX WIDTH '74' CH HEIGHT '3.1' LN FRAME 10 TW INTENSITY 10
POSITION XORIGIN '0.9' CM
BOX WIDTH 0 CM HEIGHT '36.5' LN FRAME 10 TW
POSITION XORIGIN '3.0' CM
BOX WIDTH 0 CM HEIGHT '36.5' LN FRAME 10 TW
POSITION XORIGIN '5.0' CM
BOX WIDTH 0 CM HEIGHT '36.5' LN FRAME 10 TW
POSITION XORIGIN '7.2' CM
BOX WIDTH 0 CM HEIGHT '36.5' LN FRAME 10 TW
POSITION XORIGIN '8.3' CM
BOX WIDTH 0 CM HEIGHT '36.5' LN FRAME 10 TW
POSITION XORIGIN '9.5' CM
BOX WIDTH 0 CM HEIGHT '36.5' LN FRAME 10 TW
POSITION XORIGIN '12.0' CM
BOX WIDTH 0 CM HEIGHT '36.5' LN FRAME 10 TW
POSITION XORIGIN '14.5' CM
BOX WIDTH 0 CM HEIGHT '36.5' LN FRAME 10 TW
POSITION XORIGIN '17.0' CM
BOX WIDTH 0 CM HEIGHT '36.5' LN FRAME 10 TW
POSITION XORIGIN '19.7' CM
BOX WIDTH 0 CM HEIGHT '36.5' LN FRAME 10 TW
Thanks
Seshu -
Issue related to ADDRESS ... ENDADDRESS in SAP Script
Hi All,
I have a issue using ADDRESS .... ENDADDRESS in SAP Script.
ADDRESS PARAGRAPH AS
TITLE &WA_LFA1-ANRED&
NAME &WA_LFA1-NAME1&, &WA_LFA1-NAME2&
STREET &WA_LFA1-STRAS& HOUSE &WA_ADRC2-STR_SUPPL3&
POBOX &WA_LFA1-PFACH& CODE &WA_LFA1-PSTL2&
CITY &WA_LFA1-ORT01&, &WA_LFA1-ORT02&
POSTCODE &WA_LFA1-PSTLZ&
COUNTRY &WA_LFA1-LAND1&
REGION &WA_LFA1-REGIO&
FROMCOUNTRY &WA_T001-LAND1&
ENDADDRESS
I am using above code for printing vendor address.
Though Name3 & Name4 are not declared but their values are getting displayed if value is available.
Though Street2, Street3 are not declared but their values are getting displayed if value is available.
Even title should not be displayed if available also.
I want only below fields to be displayed:
Name 1
Name 2
Street/House Number
Street 4
Postal Code/City
Country Name (This one declared below ADDRESS ... ENDADDRESS)
I don't want to dislay other fields if they have value also.
How it is possible!
Thanks in advance.
Thanks,
Deep.Hi Deep,
Basically the variables that u havent mentioned in the sap script will never be printed.
In the code u have not mentioned the variables Name3, Name4, Street2, Street3...so they will never be displayed.
Please check your code again...i think somewhere u must have written
&WA_LFA1-NAME3&
&WA_LFA1-NAME3&
etc
if so please remove them. Otherwise the code u have written is perfectly fine.
or else in ur driver program, dont move all the values to workarea...move only the values that u need to display and use them in ur script.
Regards,
Radhika -
PROTECT-ENDPROTECT problem in SAP Script
In SAP Script MAIN Window I have 10 different elements to print differet stuff related with each delivery line item.
Like Material Number
Material Description
Long text [Has formatted text and I am reading that text and printed in some format some lines under material number and some under materail desc.]
and other information required by client.
Loop at Delivery item table.
CALL FUNCTION 'CONTROL_FORM'
EXPORTING
command = 'PROTECT'.
Print differnt elements.
Loop at lond text internal table.
print in proper format as I mentioned.
endloop.
CALL FUNCTION 'CONTROL_FORM'
EXPORTING
command = 'ENDPROTECT'.
ENDLOOP.
My problem is PROTECT ENDPROTECT is not working properly.
It is printing only 1 item with other info on first page as there are enough space left to print minimum three items with details.
on next page it is priting only 3-4 items as there are enough sapce to ptint at lease 10 items with details.
The only good thing is it is not spliting the Item details and other text.[Main window on next page has bigger size]
Any idea why PROTECT - ENDPOTECT not behaving properly.
Thanks
Aman
Message was edited by: Amandeep SinghHello,
Try to do like, Put PROTECT and ENDPROTECT in the SAPScript itself.
Like
Element 1
Protect
..matnr....
element 2
...desc....
element 3 (long text)
...text
....text
element 4
endprotect
call the element 4 in the loop statment, whenever required.
Hope it will work.
Regards,
Naimesh. -
Item level display in SAP script
Hi All,
I am trying to show the line items of sales invoie in the invoice layout using SAP script. But it displays just one line item. It overwrites the same line on every call. How can I instruct it to print it on the next line. I've even tried printing the line using '/' (line feed) but to no effect.
Please help,
Regards,
MadhurHi Vinod,
I am doing the same thing as you suggested. Here's the code I am using. This is for the disclaimer text that is being picked up and consists of multiple lines.
SAP Script for window DISCLAIM->
/E DISCLAIMER
C1 Disclaimer
P1 &W_DISLINES&
Program Code ->
Print Disclaimer
LOOP AT I_T_LINES.
W_DISLINES = I_T_LINES.
PERFORM WRITEFORM USING 'DISCLAIMER' 'DISCLAIM'.
ENDLOOP.
FORM WRITEFORM USING VALUE(P_ELEM)
VALUE(P_WIND).
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = P_ELEM
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = P_WIND
IMPORTING
PENDING_LINES =
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.
ENDFORM. "WRITEFORM -
Read header text from vf01 and print in script main window
Hi Gurus,
I need to read text from vf01 header note 1, there user type max 10 lines i want to read that 10 lines and print in sap script main window after line item printed. i used read text but one line only fetched. i declare variable like data : NEXRSP LIKE TLINE-TDLINE and read_text function module. pls provide solution for this.
Regards
G.VendhanHI GURUS,
Thank u for reply i declare like
ID = '0002'.
PERFORM READTEXT USING EN NAME OBJECT ID TEXT_OUTPUT.
NEXRSP = TEXT_OUTPUT . CLEAR TEXT_OUTPUT.
FORM READTEXT USING P_EN
P_NAME
P_OBJECT
P_ID
P_TEXT_OUTPUT.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = P_ID
LANGUAGE = P_EN
NAME = P_NAME
OBJECT = P_OBJECT
TABLES
LINES = LINES
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8.
LOOP AT LINES.
P_TEXT_OUTPUT = LINES-TDLINE.
EXIT.
ENDLOOP.
FREE LINES. CLEAR LINES.
ENDFORM. " READTEXT -
Hi,
how can we able to add Check box in SAP script main window. My requirement is to display two check boxs with YES and No names. Based on condition, I want to mark any one check box.
Thanks in Advance.
Thanks,
RamanHi,
Please refer the below link
http://abapeasy.blogspot.com/2008/03/3-easy-way-to-add-checkbox-in-your.html
Regards
Ramakrishna Pathi -
Sap script text printing issue..
Hi,
I have a SAP script with a text symbol say &abc& defined in the SAP script main window.
From the print program I want to pass some text to this text symbol.
In the print program I have an internal table with lines of text, sometime it can have just one line of
text CHAR512 length or it can have multiple lines of char512 length text.
Now how do I pass these lines to the text symbol &abc& ?
I tried to do the following, but it does not help...
DATA l_data TYPE STRING.
loop thru the internal table
concatenate l_data with text got from internal table
endloop
CALL FUNCTION 'TEXT_SYMBOL_SETVALUE'
EXPORTING
name = '&abc&'
value = l_data
EXCEPTIONS
OTHERS = 0.
I debugged and saw that l_data has most of the text (not all) but the sap script's printed output
has only few text.
what should I do to get all the text displayed on the printed output ?
thnksHi Vivek,
Including two work area next to each other should not be a problem because i am doing the same thing. Check whether the length of field of work area one is over lapping the field of other work area.
Note: Reward points if helpful.
Cheers,
Shafiq -
Hi Experts,
In a classical ABAP report we make use of
write:/20 'Text'.
to print text from the 20th column. Can we do something similar in a SAP Script Page Window. I have a box and lines drawn. Now I want the text to start exactly after the vertical line(column). Is there a way to do in SAP Script.
Regards
Abdullah.Hi
You can do one thing. you can straight away write the field
&BSEG-SGTXT&
in two lines straight with offset.
in the first line T1 &BSEG-SGTXT+0(25)&
In second line T1 &BSEG-SGTXT+25(25)&
first write like this and see, is it printing or not.
Reward all helpfull answers
Regards
Pavan -
Hello Friends,
I have a problem in SAP scripts while printing an internal table data in to a variable window. It is overwriting the contents.
Ex:
In my internal table (itab) with only one filed (text) have the below data.
Firt line
second line
third line
fourth line
I am looping the internal table and within the loop I am calling the write form.
In script I am writing like below
&itab-text&
In the output I am getting only last line.
Output:
fourth line.
But I need to print all lines one by one.
Please help me.
Regards.
Krishna.You can't print internal table data in Variable window, you have to print them in Main window
The function module WRITE_FORM_LINES allows multiple lines to be APPENDED to a non-main window. You should note that the text lines must have the SAPscript ITF format. In the absence of other information, the system uses identically named formatting attributes (character and paragraph formats) of the form to format the content of the text lines.
Here is an approach which allows multiple records / lines to be output in a variable window.
If you transfer your information from the internal table into the text lines, complete with appropriate formatting symbols, you will find that the text lines are output nicely formatted in your non-Main window.
loop at internal table into WCSCATALOG.
clear tline.
tline-tdformat = 'S1'.
concatenate '<B>' WCSCATALOG-CODEX '</> ,, ' WCSCATALOG-STXT into ltline-tdline.
append tline to tlines.
endloop.
call function 'WRITE_FORM_LINES'
Maybe you are looking for
-
Hi, I ahve deleted 2 videos by mistake and was wondering if they would be on my iCloud?
-
Hi all I want to pass a value from program A to program B. However it not working, please help if u see any mistake in the code below. Many thanks!!! do this and see. create 2 programs like this REPORT ztest_gopi. " ZTEST_GOPI PARAMETERS : p_c(3) TYP
-
Preview Edge Animate folders on iPad?
Any help appreciated with ths basic question! I have a test file (very basic) that works fine on Chrome etc but ultimately the finished file needs to work on ipads. Should the folder just be able to be dumped into and run via dropbox? (as it isnt wor
-
Photoshop (cc) crop tool overly sharpens image after crop??
I have just noticed something really interesting and quite annoying about the photoshop cc crop tool. It seems to slightly over sharpen an image after cropping. Does anyone know if there is a way to disable this? I did the same crop with the same ima
-
iPhoto cannot import your photos because there is not enough free space on the volume containing your iPhoto library. I have .999.35 T left. 3.18 gigs used in photo storage. How do I fix this?