Printing problem in script
Hi All,
I am using box command to draw lines in main window in sap script.I am able to see the lines in print preview but not if take the print out.
Please sugest.
Thanks
Mohit
Hi,
I tried to convert it into pdf and in pdf printout i am getting lines.But without pdf conversion i am not getting lines in printout.
Thanks
Mohit
Similar Messages
-
PRINT PROBLEM IN SCRIPT IF FIELD IS CURR TYPE
one of the report print account statement so in this statement print balance and it print depends on credit and debit.
now problem is like
for example my credit value is 50,085.00 and debit value is 19,205.00 so the balance is 32,347.00-
in script not take (-)minus sign but i want this value with this sign in script so how it is possible?
this field is curr type .i take one field pack type with decimal and then move curr type field to pack type and then print pack type field in script so solve this problem
-
Dear Experts,
I am trying to print delivery note using scripts. My client wants to print the delivery note if no printer name is maintained in user settings. If I try to issue output with no printer name in user settings, an info bar is popped up saying "maintain printer". When I try to issue output, it shouldn't ask me name of the printer. Output should be displayed using teh printer name that is specified in communication data in the delivery note.
Please help me out to print the output????
Regards,
John Vikram VHi,
Here is some steps you should follow for scripts printout.
1. Validate the drivers used in SAP (Tcode SPAD)
2. Are you printing through a print server or directly to the printer
3. If it is througha print server like windows, you should validate to have the right driver installed for that printer.
4. Validate on the printer the default setting. If the script doesn't sent the proper font or setup, it will print using the last setup sent to the printer.
So if somebody used work and print a specific document with different setting, some time the setting stays for the SAP report.
To validate the setup of the printer, just turn off and on the printer before sending the SAP form. That should help to see if the setup has been changed by another program.
I hope those simple steps will help to solve your problem.
Reward if helpfull...
Cheers,
Rakesh. -
Printing problem with script barcode
hi ,
i hav inserted a barcode for a particular window field. while giving print preview it is showing barcode.
after taking print, it is not displaying the barcode.
thank u all in advance,
balu.Hello,
In general, if you want to print a barcode, somebody must draw the bars
of the barcode to get a correct print. So there are four possible ways to
print barcodes from SAP:
1. Print e.g. via a Barcode DIMM/SIMM
To use this way, the printer must be able to print barcodes by itself so it
needs e.g. a special barcode SIMM/DIMM module to print the barcodes.
ie: HP printers do not contain barcode fonts by default so a DIMM module
with the fonts must be installed. The print works as follows:
The SAP sends a simple printer escape sequence to the printer, which activates
the barcode printing in the printer. Then the SAP sends the barcode number and
finally it sends a printer escape sequence, which switches the printer back to
normal printing. So in this way the bars of the barcode are created in the printer
(and you only see a dummy barcode in the print preview).
Please see the following Note about the sequences for Jetcaps BarDIMM used
for printing barcodes on HP Laserjet printers:
45643 Barcode control sequences for JetCAPS/Jetmobile BarDIMM
The correct BarDIMM modules for different HP printer models can be seen on
the JetMobile website at the URL below:
http://www.jetmobile.com/products/SJ_BD.htm
2. Print via a barcode.dll
If your printer doesn't have a barcode DIMM, it cannot create the bars of
the barcode itself. So this must be done elsewhere. One possibility is that
you print via a Windows system, SAPSprint or SAPLPD, device type SAPWIN and
a barcode.dll.
ie: Your printer is connected to a Windows system that runs the SAPSprint or SAPLPD program
If you print via device type SAPWIN, the creation of the print data is done in the Windows.
So the Windows may create a graphic, which contains the bars of the barcode, and send this
graphic to the printer.
The job to create the barcode graphic is done by the barcode.dll. So it is only needed, if
you want to print this way please see the following note for more information:
14561 Printing barcodes via SAPLPD / Barcode DLL
3. New barcode technology
If your printer doesn't have a barcode DIMM and if you don't want to use a barcode.dll,
you may use the new barcode technology, which is described in the SAP notes 645158 and 430887.
However this is only possible when printing from Smartforms.
In this way SAP itself creates a picture, which contains the bars of the barcode. This picture
is sent to the printer. One important requirement when you print the barcode via a Smartform
is that you have at least release 46C.
4. Use of a barcode font
There are some font files (e.g. Windows TTF files), which contains bars instead of characters.
So if you use these font files, the bars of the barcode are printed instead of a text.
You may buy such a font file, install it under Windows and use it via device type SAPWIN
according to note 48803. Since release 46C these files can also be uploaded into the SAP and
used via other device types.
Hope this information helps you resolve the issue.
Regards,
David -
Pdf reader X has problems with small pdf and printer with post script driver
Hi friends.
I have installed new Reader X and then i saw that, when i print a very small pdf with about 50 kb and i print it on a Laserjet 4000 printer the printer has problem with the amount of data that reader 10 produces.
When i install a Postscript driver for the printer my computer makes up to 3.5MB printer data from a 50kb pdf.
When i install a PCL driver for the printer my computer makes only 350kb from the same 50kb pdf file!!!!
When i install Reader 9.3 the 50kb file becomes also only 350kb on the printer with post script driver, and i can print without problems also.
my printer has 8 MB Ram and that should be enough for 3.5MB printer data.
But when i print the pdf with 1 side only, the printer created a side who is only filled with 50% of the text, then there comes out a second page with the message.....not enough memory in the printer.
i can not change the postscript driver to a pcl driver cause our ERP System can not handle printer with PCL drivers.
Can someone help me please.........are there settings in Reader X who can solve my problem ???
Thank you very much for help!put ? after rwcgi60.exe
-
Hi Guru's
I have a problem in script printing.
The quantity and netprice are printing incorrectly. i.e., quantity should print as 1.000 where as it is printing as 1,000 and net price is printing as 5,30 instead of 5.30.
I have checked in the owndata settings it is like 1,234,56.00.
I would like to know whether any settings will be there or i need to do any modificatione
Waiting for you reply.Hi!
Here you can find the SAPScript formatting options.
http://help.sap.com/saphelp_47x200/helpdata/en/d1/803411454211d189710000e8322d00/content.htm
If it is not good for you, you might code it in your printer program and put it into a character variable.
Regards
Tamá -
Printing Problem in sap script
Hi all,
There is a printing problem in z report of sapscript.
when I am giving continuous print ...
1st page is right in print format but in 2nd page the text comes 1 row up...and so on...
so the starting point for all page are not same...
Please help me...Hello,
Check SAP note 39259.
Regards,
David -
hi,
i am having problem in script , the problem is
s.no| descriptio | UOM | Qty | Rate | AMT |
01 aaaaaaaaaaaaaaaaaaaaa 11.01 17.28 170000000 2400000
this is fine but when the 1st column is shot other also get affected.
s.no| descriptio | UOM | Qty | Rate | AMT |
01 aa 11.01 17.28 170000000 2400000
and i cannot draw vertical line here .what is the solution for this.
Edited by: jaihind on Mar 6, 2010 12:21 PM
hi,
problem is if the description field is long then other coloum are comming fine but if description caloumn is small then other also get affected and its comes towards left .
Edited by: jaihind on Mar 6, 2010 12:22 PMHi
For this u can resolve by using the Formatting characters ......
This is your layout ..
s.no| descriptio | UOM | Qty | Rate | AMT |
01 aaaaaaaaaaaaaaaaaaaaa 11.01 17.28 170000000 2400000
Assume that your field names like
s.no | description | UOM | Qty | Rate | AMT |
&sno& &desc& &UOM& &Qty& &rate& &AMT&
asseme that length of these fields(in characters) as per your requirement will be ...
s.no | description | UOM | Qty | Rate | AMT |
8 15 5 8 10 15
For these use formatting characters like ...
s.no | description | UOM | Qty | Rate | AMT |
1stLine &sno& ,, &desc+0(15)&,, &UOM& &Qty& &rate& &AMT&
2ndline &desc+15(15)&
&desc+0(15)& - it will print first 15 characters from 0th position
&desc+15(15)&- From 15th position it will print 15 characters ..
Hope you resolve your issue
Let me know if Any concerns,....... -
Set filename of printed PDF via script
Hi folks!
I have a little problem with generating a PDF. First my Workflow:
I have a InDesign document with 6 pages. This document is merged with a databasefile containing 100 records. After merging it, we have to generate a PDF file. This PDF file is opened within acrobat. Within the document, I'm searching for an ID each record has so I can split the document to 100 files (each with 6 pages) and name it by the ID I found.
The script within Acrobat is finished and working. I thought, the InDesign script is finished ,too. But I was wrong -.-
I merged the databasefile with the document and exported it as PDF. But after exporting, we noticed that the script within Acrobat isn't finding the adressheader where the ID is in. The script only noticed the text after that header. The result is, that Acrobat get's always "null" as ID
If we print the PDF with our PDFprinter, the header could be read by our Acrobat script. I don't know why this is... But now I changed the script to print the files via our PDF printer. Unfortunately I can't set a name for my exported file - do you know if there is a possibility to print PDF's without prompting after each one and with a via script given name?
Here you can see the old script for InDesign and right after it, the Acrobat sript. Maybe I made some mistake by generating my PDFexport and don't need to use the printer?
INDESIGN SCRIPT:
* prompts filebrowser and stores name and path of file in variable
var sourceDocument = File.openDialog("Bitte Indesign-Dokument auswählen", "*.indd", false);
* stores only prefix of filename for use as new filename
var newName = sourceDocument.name.substr(0, sourceDocument.name.length-5);
* stores folder where file is stored
var dbSourceFolder = sourceDocument.parent+"/";
* prompts for databasefile where generating should begin
var dbstartfile = File.openDialog("Bitte Start-Datenbankdatei auswählen", "*.txt", false);
* gets basename of databasefile
var dbstartfilename = dbstartfile.name.slice(0, dbstartfile.name.search(/_Teil+/));
* gets number of first databasefile
var i = dbstartfile.name.slice(dbstartfile.name.search(/_Teil+/)+5).slice(0, -4);
* generates path name and name of first databasefile to use
var dbSource = dbstartfile;
*set PDF preset for generating PDF
var PDFPreset= app.pdfExportPresets.item("GAG-PDF");
* stops throwing of alerts
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;
// if databasefile isn't existing message will be thrown
if( dbSource.exists == false ) {
// restart of alert throwing
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.INTERACT_WITH_ALL;
alert("Datei " + dbSourceFolder+dbprefix+"_Teil"+i+".txt konnte nicht gefunden werden! \n\rBitte starten Sie den Vorgang erneut und geben Sie die richtige Datenbankdatei an." );
// else process starts
else {
while( dbSource.exists == true ) {
// opens source indesign document without showing it
mergeDocument = app.open(File(sourceDocument), false);
// sets which databasefile should be used for data merge
mergeDocument.dataMergeProperties.selectDataSource(File(dbSource));
// starts merging of indesign document and database file
mergeDocument.dataMergeProperties.mergeRecords();
// exports generated document as PDF file
app.activeDocument.exportFile(ExportFormat.pdfType, File(sourceDocument.parent+"/"+newName+"_Teil"+i+".pdf"), false, PDFPreset);
// closes opened indesign document
mergeDocument.close(SaveOptions.no);
i++;
// change filename of database file to get next file
dbSource = File(dbSource.parent+"/"+dbstartfilename+"_Teil"+i+".txt");
// restart of alert throwing
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.INTERACT_WITH_ALL;
alert("PDF-Generierung abgeschlossen!");
ACROBAT SCRIPT:
* Path where files should be saved
* Special Characters like spaces should be escaped with \
* If you want to modify the folder, use following form:
* "/Driveletter/Foldername/../LastFolderName/"
* Make sure not to forget the / before and after the location
var filepath = "/c/pdf_split_test/";
* Number of expose pages - feel free to change
var pageType = app.prompt("Bitte geben Sie die gewünschte Seitenzahl der Exposés an.", "");
alert(pageType);
* regular expression for search
var idNumber = /08\d\d\d\d\-\d\d\d\-\d\d\d\d\d-\d\d\d-\d\d/g;
* if possible this function extracts the searched number as string
* @param rematch string which should be searched in document
* @return null if rematch is not found or string if rematch is found
function ExtractFromDocument(reMatch) {
try {
var Out = new Object();
for (var i = 0; i < 1; i++)
numWords = this.getPageNumWords(i);
var PageText = "";
for (var j = 0; j < 30;j++) {
var word = this.getPageNthWord(i,j,false);
PageText += word;
var strMatches = PageText.match(reMatch);
if (strMatches == null) continue;
return strMatches;
} catch(e)
app.alert("Processing error: "+e)
* tries to load given filename (extracted number)
* @param filename string of file which should be checked
* @param n number to iterate while checking for files
* @return true if file exists or false if not
function checkIfFileExists(filename, n) {
var existingDoc = false;
try {
if( n == 0) {
var checkDoc = app.openDoc(filepath+filename+"-000.pdf");
} else {
var checkDoc = app.openDoc(filepath+filename+"-000_"+n+".pdf");
checkDoc.closeDoc();
existingDoc = true;
} catch (e) {
if( existingDoc == true ) {
n = n+1;
n = checkIfFileExists(filename, n);
return n;
var pageAmount = this.numPages;
for( i=0; i<pageAmount; i+pageType ) {
var filename = ExtractFromDocument(idNumber);
fileExistence = checkIfFileExists(filename, 0);
if(fileExistence != 0) {
this.extractPages({nEnd:(pageType-1), cPath : filepath+filename+"-000_"+fileExistence+".pdf"});
} else {
this.extractPages({nEnd:(pageType-1), cPath : filepath+filename+"-000.pdf"});
this.deletePages({nStart:0, nEnd: pageType-1});Hi,
I have a little problem with generating a PDF. First my Workflow:
I have a InDesign document with 6 pages. This document is merged with a databasefile containing 100 records. After merging it, we have to generate a PDF file. This PDF file is opened within acrobat. Within the document, I'm searching for an ID each record has so I can split the document to 100 files (each with 6 pages) and name it by the ID I found.
Why you don't export 6-page PDFs directly from InDesign?
robin
www.adobescripts.co.uk -
Smartform : Printing Problem , Urgent Please
Dear All,
When I tried to print a smartform, I am Getting message 'Spool Request (number xxxxxx ) is created' .
but It is not printing.
I am facing this problem only with this form. I could print other forms / Scripts.
What might be the error ? Please Let me Know ..
Thanks & Regards
Venkat
Message was edited by: venkat Kumbham
Message was edited by: venkat KumbhamVenkat,
You can do that in two ways. Once is to set it in the USER DEFAULTS. Go to SU01 and you can see a tab for DEFAULTS.. There will be a check box for PRINT IMMEDIATELY.
Or you can do that in the SMART Form parameters also. In the OUTPUT_OPTIONS parameters ther is a field TDIMMED. Set that to 'X'. That should print the form immediately.
Regards,
Ravi
Note : Please close the thread, and mark the helpful answers if this solves your problem. -
hi,
i face problem of printing my PO in duplex mode, i have set the print mode in script as duplex, by it still doesnt come out in duplex.
i have tested with SAP standard text :SAPSCRIPT-PRINTMODETEST and it shows correctly that the printer works for simplex and duplex with SAP.
so what is the problem here? please help. i have running out of idea how to do this. thanksHi,
Based on the page number try to print the footer. Try to define the text elements in the same window. In driver program, try to keep if condition based on page number then print the correspoding text elements.
or
In driver program-> calling Text elemnts-> keep this code in Text element in script.
consider the MOD of page No by 2.
If it is Zero
print that 'Conttd on reverse'.
else.
print 'Contd'.
endif.
Thanks & Regards,
Chandralekha. -
Dear Expert,
I'm facing a barcode printing problem where it displayed incorrect barcode formatting in the print preview by displaying strips for bar lines. I'm using Sapscript to do this and I have already specified in Character format for barcode Code 39 and I have created a Z system bar code(se73) specfically for this. Could you pls give me some ideas on how to solve this problem.
Thanks
AdisHi Adis,
There is another way of having the print preview. You directly print the Sap Script, it will go to spool (SP01). Now use the program RSTXPDFT4 in SE38 and enter the spool number. It will convert the spool record with that particular number to the PDF fomat. You can now see the view through the PDF format.
In the direct print preview you may do not get the correct view of the bar code specially for the SAP Script.
Please check....
Warm Regards.
Abhijit. -
Good day to everyone.
The new hp 4500 G510n-z is connected to an hp Pavilion dv7 laptop using windows 7, 64 bit.
I can copy and paste the on line item into microsoft word and print it, but if I attempt to print the same item directly from the on line source I get " error has occurred inscript on this page"
" Line 2107"
" Char 1"
"Error: Unspecified error"
"Code 0"
"URL res:// ieframe.dll/preview.js"
" Do you want to continue running scripts on this page?"
How can I work around this problem?
This hp pavilion dv7 laptop has worked with hp officejet printers such as 5510, 5600, and 7210 for the past two years and I do not recall having this problem.
The problem seems to have arrived with the set up of the new hp 4500 officejet printer to my computer.
Please help solve this problem.printer have a script error
-
Hi friends,
i am facing a problem in script. i have developed the form
and it is working fine .in print preview every thing seems to be ok.
when we try to take a print the right side characters are cutting down by 2
characters every time.
i have moved the content to left but the result is the same.
can any one tell me how to solve the issue.
Regards,
SrinivasHi,
Try to check the lenght of the field/var that you are printing.
change the alignment doesnt solve the problem.
Check in your code what is the lenght and if is the same in your form.
Sample:
&j_1bprnfli-cfop(4C)&
prints only 4 digits of the variable j_1bprnfli-cfop.
Regards.
Rodrigo Paisante -
Problem in script for Serbian language
Hello,
We are trying to change the text script in Serbian language with the character set Baltic, and we are trying to print the billing document.
But the special character are not printing. It show # in the print preview and in the print copy.
Kindly advices.
Br,
VijayHi,
check this blogs this will help to solve the problem in special character or Asian languages printing.
Problem in displaying special chars
Hungarian Character Printing problem
Prabhudas
Maybe you are looking for
-
Create shipment from inbound IDOC SHPMNT05 ?
Hello All, I would like to create an individual shipment when i receive from a partner an inbound IDOC. I'm using Message type SHPMNT, Basic Type SHPMNT05, Process Code: SHPM and testing in WE19 via FM IDOC_INPUT_SHPMNT. How can I start the creation
-
PO wf should not be triggred when POs are created through RFC
Hi My PO wf is working fine for POs created and changed. But it is getting triggered for POs which are created by Ariba system using RFCs.And since there is no Organization structure for the user id which is used in RFC, it is throwing an error. Plea
-
10.5.1 update problem
Hi, Hoping someone can help me. New to Macs- loving it so far, but am having one problem. Just updated the software the other day from 10.5 to 10.5.1. I used the software update button to do this. I am on a dial up connection (live too far out in the
-
OVM 3.0.1 - directory structure & adding resources
Afternoon everyone, I've got OVM 3.0.1 up and running, so far so good. I had a question about the repository directory structure. If this has been addressed already, my apologies. In OVM 2.x, it was possible to copy over a variety of data (.iso's, .i
-
Code CREATE TABLE [dbo].[ind_subject_scores] [pn_id] [char](9) NULL, [name] [char](20) NULL, [skill_id] [char](2) NULL, [test_level] [varchar](2) NULL, [subj score] [char](2) NULL, [class] [char](12) NULL, [lang] [char](2) NULL, [test_dt] datetime IN