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
Sudhakar
Hi,
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.
Similar Messages
-
Problem with SAP Script FAX output
Hi Friends,
I have problem with SAP Script Fax output.
After I issued output using the messge type, the print preview format shows me correct alignments and the right data. But when I go to List display using the menu bar functions from the print preview screen, the list is showing me the right data, but all the alignments at the main window went wrong.
How do I rectify this problem? I need correct alignments in both form display and list display.Hi Sasidhar,
Have you tried with different fax machine.
Regards,
Atish -
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 -
Problem with sap script table in main window
hi all,
i have created a sap script for which output is in 7 pages.
except first page all the remaining pages are giving the correct output.
the problem with the first page is iam not not getting vertical lines in the table which is in the main window of page 1.
iam getting the vertical lines correctly in the mainwindow table of all the remaining pages.Hi,
It's simple,
Pre- U should had declared a second page for the same window with header, main & footer.
now
First when u r looping the internal table provide no of rows eg Row 1 TO 10. in the Loop ( Data Tab)
or
when defing TEXT Go to PC Editor and mention all the fields Under PROTECT - ENDPROTECT.
This would solve the issue.
Thanks
Ravi -
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 -
Problem with SAP Script (Control Commands)
Dear friends,
I am facing one problem withg control commands. When i use <b>PROTECT.....ENDPROTECT</b> with <b>VAR type</b> window then it is not working instead i use with <b>MAIN type</b> window it is working fine. Another problem with <b>BOX command</b> when i use with <b>MAIN type</b> window then it is not working but when i use with VAR type window then it is working fine. SO i am little bit confused that is there any relation between control commands and window type?
THanks & Regards,
BhavinHi,
There is no restriction to use any control commands on any windows.
The SAP doesnt give any error, but the point of using Protect Endprotect in windows other than main window doesnt apply.
Only main window carries from one page to another. So in order to print certain lines in a single page we use this control command.
Regarding BOX command it works fine on any window.
Thanks and Regards.
Lavanya. -
Hi All,
I have a problem with a sap script (PO) everytime when an item is deleted (on me23e) it doesn't display on the on the print preview and the client wants to see on the preview with a sign indicating the deleted item.
SELECT ebeln ebelp pstyp packno txz01 loekz
FROM ekpo
INTO TABLE it_ekpo
WHERE ebeln = po_no
AND loekz NE 'L'
AND loekz NE 'S'.
This is how it has been read from the ekpo.... Is there something that I need to change?
Thanks in advance.
Regards,
Fred.Hi,
In EKPO table the field 'loekz' indicates the Deletion status.
So u can consider the deleted line item also.
u change u r query like this.
SELECT ebeln ebelp pstyp packno txz01 loekz
FROM ekpo
INTO TABLE it_ekpo
WHERE ebeln = po_no.
In it_ekpo table u can get all the line item(including deleted items).
Then u cn print the data.
Hope this will helps u. -
Problem with sap script while transporting from dev to quality server
Hi experts,
In dev server i am getting correct output in sap script.But when it is transporting to quality server alignment is different.Printer name is same both in dev and quality.Please give an answer for this query.
Thanks
sureshHi Suresh,
This could be a problem with the Sapscript buffers. Try running the report RSTXDELL on the system to clear the Sapscript buffers?
To do this you can use RSTXDELL report with default settings except it is better to have * instead of the current client number in the Client field.
After this, create a new spool and see if the problem is resolved?
Regards,
Aidan -
Problem with sap script formatting?
hi,
can anyone please tell me how do we reduce the fony size in sap script, actually i have used it with character format by giving font name as helve and size as 6 pt but its not reflecting , what can be the problem? or my procedure is wrong.please help me outok character format is the wrong thing
just use paragraph formats for that.
if you are insisting to use character formats you need to use the syntax as well.
e.G. if you have defined yourself a characterformat lets say 't' like tiny, thnen the syntax in your form will be:
SL | <t>you text</>.
if you are using paragraph formats it will be
SL | your text
but now you should edit the font properties of that paragraph format -
Invoice List SAP script - Problem with SAP script functionality
Hello Friends,
I am working on SAP script - Invoice List SD_INVOICE_LIST. The invoice list contains the underlying billing documents. As per the standard functionality, in the line items, its printing the underlying billing documents with the net value. My requirement is to dig these line items into another level, meaning, I need to display the line items of billing documents as well(like material, material description, quantity, net price and net value of that item etc).
The billing linte item informatin is stored in VBRP table and the VBRP structure is not at all defined in the print program of SD_INVOICE_LIST (I.E.RVADIL01). Change of standard SAP program is not an option for me here.
In the external subroutine we can fetch these line items for each billing document in the invoice list. However, my question here is how to take these line items back to the sap script and print them in SAP script (We can print one line item but how to loop these fetched lines and print them on SAP script. Any help in this regard would be greatly appreciated.
I think there is no standard smart form exist for the invoice list. Please also let me know if there is any standard smart form available for INVOICE List.
Thanks in advanace for any help in this regard.
Best regards,
SivaHi
As you cannot change the standard, you will have to see if there are any enhancements provided in the print program. if not you have to copy into a custom one and do changes accordingly.
Thanks,
Venkatesh -
Problems with SAP Script print program
Hi,
I have the following scenario:
I have a workflow which prints a sapscript with data stored in the workflow container.
The workflow method 'executeform' populates a selection table and submits it to the print program using:
SUBMIT ZPRINT_FORM WITH SELECTION-TABLE sel_table
This print program then populates the form with data and calls the OPEN_FORM/WRITE_FORM/CLOSE_FORM FM's.
My problem is that some of the variables in the workflow container are CHAR255, when these get moved to the selection table (seltab-low) they get truncated as seltab-low is a CHAR45. Is there a way round this??
This is the first time I have used sapscript, I notice that the variables printed on the form correspond to the parameters defined in the Print Program. I assume therefore that this is why the
SUBMIT ZPRINT_FORM WITH SELECTION-TABLE sel_table
has been used and why the OPEN_FORM/WRITE_FORM/CLOSE_FORM was not coded directly in the workflow executeform method.
Any guidance on how to proceed with this would be appreciated.
Many Thanks,
PaulHi Paul,
In general, in the statement
SUBMIT ZPRINT_FORM WITH SELECTION-TABLE sel_table.
sel_table is an internal table with the structure RSPARAMS.
This variant allows you to set the names and contents of the parameters and selection options dynamically at runtime.
You can use the function module RS_REFRESH_FROM_SELECTOPTIONS to read the contents of the parameters and selection options of the current program into an internal table seltab with the structure RSPARAMS. By using SUBMIT ... WITH SELECTION-TABLE seltab, you can then pass these values on directly.
The work around for the variables that cannot be passed using the submit statement, can be exported to Global memory ids and the same can be retrieved in the print progra.
The syntax for the export and import statements is something like this.
TABLES INDX.
TYPES: BEGIN OF ITAB3_TYPE,
CONT(4),
END OF ITAB3_TYPE.
DATA: INDXKEY LIKE INDX-SRTFD VALUE 'KEYVALUE',
F1(4), F2 TYPE P,
ITAB3 TYPE STANDARD TABLE OF ITAB3_TYPE WITH NON-UNIQUE
DEFAULT KEY INITIAL SIZE 2,
WA_INDX TYPE INDX.
Fill the data fields before CLUSTR
before the actual export
INDX-AEDAT = SY-DATUM.
INDX-USERA = SY-UNAME.
Export der Daten.
EXPORT F1 FROM F1
F2 FROM F2
ITAB3 FROM ITAB3
TO DATABASE INDX(ST) FROM WA_INDX ID INDXKEY.
*********************************************************TYPES: BEGIN OF TAB3_TYPE,
CONT(4),
END OF TAB3_TYPE.
DATA: INDXKEY LIKE INDX-SRTFD,
F1(4), F2 TYPE P,
TAB3 TYPE STANDARD TABLE OF TAB3_TYPE WITH
NON-UNIQUE DEFAULT KEY,
WA_INDX TYPE INDX.
INDXKEY = 'INDXKEY'.
IMPORT F1 = F1
F2 = F2
TAB3 = TAB3 FROM DATABASE INDX(ST) ID INDXKEY
TO WA_INDX.
Regards,
Ravi -
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. -
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 -
Quantity field conversion problem in SAP script
Hi experts,
I have problem with sap script quantity field conversion.
In purchase order the actual value of field( MDPM-ERFMG) is 3,500.
But in Print preview it is showing only 3.5
Any one Please help me in this problem
thanks in advance
muraliHello,
check this:
Number of Decimal Places
A program symbol of one of the data types DEC, QUAN, and FLTP can contain decimal place data. Use the option below to override the Dictionary definition for the number of decimal places for the formatting of this symbol value.
Syntax
&symbol(.N)&
The EKPO-MENGE field contains the value 1234.56. The Dictionary definition specifies 3 decimal places and an output length of 17.
&EKPO-MENGE& -> 1,234.560
&EKPO-MENGE(.1) -> 1,234.6
&EKPO-MENGE&(.4) -> 1,234.5600
&EKPO-MENGE&(.0) -> 1,235
REgards,
Vasanth -
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
Maybe you are looking for
-
How do i sync my iPhone to a new macbook pro and start a new apple ID?
Ok, so I just go a new macbook pro for college, and what I am trying to do is sync my iphone with my new computer and get all my music etc onto the new mac. But i also want to start a new apple ID. I previously have had my iphone synced on the famil
-
Hi experts, I have an application that launches a simple browser. I have this resourcheBundle containing the url string ResourceBundle bundle = ResourceBundle.getBundle("Init"); String LOCAL_URL_STRING = bundle.getString("BrowseItem");The Resourc
-
I noticed something interesting in NetBeans 6.9 Beta. It comes with two platforms. One is Java jdk 1.6.x and the other is javafx1.3. The rt.jar in javafx1.3 appears to be version 1.5 though. In fact it ships as rt15.jar. Hopefully Oracle fixes this f
-
I have been using iTunes on my Macbook for the last 1.5 years. Every time I try to turn on Genius, I get the following error message: "We are currently experiencing technical difficulties. Please try again later." Initially I thought that there could
-
ITunes Opens on Any/All USB Connections
Basically, the title says it all: Lately, iTunes has taken to opening whenever any new USB device (camera, ext. HD, scanner, etc.) is connected up. It simply appears and starts the routine downloading of podcasts, etc. I will usually just close it an