How to convert PO sapscript layout to pdf - need VERY URGENT Help
Dear All,
Requirement: PO sapscript layout after some modifications (say, ZMEDRUCK) has to be converted to pdf. Through me9f user will be able to give ranges of PO numbers and can view the print preview for the po. After that on clicking the print button we get the printout of the pos one after another based on the user input of PO numbers.
Our requirement is that when the user will click on the "Print Preview" of po (rather than pressing the print button) it i.e. PO sapscript layout has to get converted to pdf.
If you have already encountered this scenario, could you please send me the source code regarding this at the earliest. If you want to email it to my personal id, please let me know so that I can give it to you. Thank you.
It will be very beneficial for mine if you can send me some source code in this regard. (FYI. We want only Print output of PO sapscript. So, Print Program /SMB40/FM06P [after copying it to our ZSMB40/FM06P program] need to be modified for downloading the PO into PDF where there is no FMs like OPEN_FORM, WRITE_FORM, CLOSE_FORM. So already available source code in SAP forums can not help me.)). Kindly help me at the earliest. Its VERY URGENT
Thank you.
Thanks & Regards
Sudipta
Hi Chaith,
Could you please provide me the source code regarding this at the earliest.
We want only Print output of PO sapscript. So we need to modify only the Print Program SAPFM06P after copying it to ZSAPFM06P for downloading of modified PO (ZMEDRUCK) sapscript layout into PDF.
I am already having some source code from sdn portral. I am attaching it herewith. But it's not working as some constants and variable values need to be given. We want to take download of PO into PDF from ME9F transaction itself.
Could you please provide necessary values in the missing constants and variables and kindly resend the corrected modified Source code to me so that I can run the same code to download the modified PO ZMEDRUCK into PDF . Need YOUR URGENT HELP...
DATA: l_druvo LIKE t166k-druvo,
l_nast LIKE nast,
aux_nast LIKE nast,
l_from_memory,
l_doc TYPE meein_purchase_doc_print,
ent_screen TYPE c,
ent_retco TYPE i,
toa_dara TYPE toa_dara,
arc_params LIKE arc_params,
aux_form LIKE tnapr-fonam.
DATA: otf LIKE itcoo OCCURS 0 WITH HEADER LINE,
lt_docs TYPE TABLE OF docs,
pdf_bytecount TYPE i,
nom_archivo TYPE string.
aux_form = 'ZMEDRUCK'.
l_from_memory = c_true.
SELECT *
FROM nast
INTO aux_nast
UP TO 1 ROWS
WHERE kappl = c_po " Purchase Order
AND objky = t_datos-ebeln
AND aktiv = space
ORDER BY erdat DESCENDING eruhr DESCENDING.
ENDSELECT.
aux_nast-sort1 = c_swp.
CLEAR ent_screen.
CLEAR ent_retco.
IF aux_nast-aende EQ space.
l_druvo = c_1.
ELSE.
l_druvo = c_2.
ENDIF.
l_druvo = '2'.
CALL FUNCTION 'ME_READ_PO_FOR_PRINTING'
EXPORTING
ix_nast = aux_nast
ix_screen = ent_screen
IMPORTING
ex_retco = ent_retco
ex_nast = l_nast
doc = l_doc
CHANGING
cx_druvo = l_druvo
cx_from_memory = l_from_memory.
CHECK ent_retco EQ 0.
CALL FUNCTION 'ECP_PRINT_PO'
EXPORTING
ix_nast = l_nast
ix_druvo = l_druvo
doc = l_doc
ix_screen = ent_screen
ix_from_memory = l_from_memory
ix_toa_dara = toa_dara
ix_arc_params = arc_params
ix_fonam = aux_form
IMPORTING
ex_retco = ent_retco.
CLEAR otf.
CALL FUNCTION 'READ_OTF_FROM_MEMORY'
EXPORTING
memory_key = l_nast-objky " PO Number
TABLES
otf = otf
EXCEPTIONS
memory_empty = 1
OTHERS = 2.
CALL FUNCTION 'CONVERT_OTF_2_PDF'
IMPORTING
bin_filesize = pdf_bytecount
TABLES
otf = otf
doctab_archive = lt_docs
lines = pdfout
EXCEPTIONS
err_conv_not_possible = 1
err_otf_mc_noendmarker = 2
OTHERS = 3.
CONCATENATE c_dest t_datos-ebeln c_ext INTO nom_archivo.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = pdf_bytecount
filename = nom_archivo
filetype = c_bin
IMPORTING
filelength = pdf_bytecount
TABLES
data_tab = pdfout.
Similar Messages
-
How to convert internal table data to PDF format
HI,
I have an internal table data having one field with 255 chars. length.I want to send that intenal table data as attachemnt with external mail. i am thinking of converting that data into PDF format and use the FM to send the mail. How to convert internal table data to PDF format.
KishoreIn which format is your data in the internal table currently. Is it returned by a smartform/script or its just data fetched from some database table into an internal table. Since its obvious that the data should appear in the PDF with some Layout, you should be using smartform to format the data properly. See the Link
Smartform to PDF to EMAIL
This shows convertion of smartform to pdf and send it through email
Regards,
Abhishek -
How to convert XPS file to a PDF one via Adobe Acrobat XI Pro with command line?
Hello,
How to convert XPS file to a PDF one via Adobe Acrobat XI Pro with command line?It is not good. If I need to export some hundred of separate *.XPS files to hundred separate *.PDF files, I need to do this manually with each file. It is stone age.
-
How to convert a .alsx file into pdf
How to convert a .alsx file into pdf
Iam facing this problem since many days please resolve it
http://www.roothow.com
Thankls in adavance>But, from the windows explorer, if i do a right clic on the word document, with the context menu, i can directly convert to PDF
This is equivalent to using the PDFMaker facility in Word - that is,
the Acrobat button. Which is also the same thing that is done when you
use File > Create PDF > From File in Acrobat.
What it does is print to a PS file *and* do a lot of additional
processing to write stuff about links, tags etc. into the PS file.
>(no tmp PS file is used, cause the links are still working).
This isn't true, but it's certainly the case that you won't get links.
There seems to be no API, via any mechanism, still less the "obsolete"
(Microsoft's view) command line, to use PDFMaker from your program.
Aandi Inston -
I have a MacBook Pro, I want to copy Itunes files to an SD card to play in my car, the SD Card doesn't appear in Itunes when I insert it, and I don't know how to convert the files to the correct format, can anyone help?
Thank youSo it seems from reading the COMMAND manual that my first issue is that I used a 16GB SD card, and the manual says it will only recogize up to a 2GB SD card. I did use my MB Air's SD card slot and crated a folder and dragged the music files to it, then to the card. So I am going to get a 2GB card and try that next. Otherwise just stick with the iPOD connected. At least that is 8GB
-
How to convert a word document to PDF from a criteria workflow
Hi,
How to create a new revision in PDF format from a word document inside a criteria workflow? The inbound refinery converts documents to PDF automatically upon check-in, but I want to make the conversion in a specific step of a workflow.
Thanks,
MiguelYou could write a custom service and execute it within the workflow script using the executeService Idoc function.
-
How to convert message in XI into PDF format
Hi,
I am trying out a scenario where i am getting an idoc from SAP into XI and now in XI i need to convert the data into pdf format and send that pdf in a mail using mail adapter.
Can any body help me out how to convert a message in XI to pdf format.
Thanks in Advance!!
Regards,
SudheerHi Sudheer
follow these links
http://www.erpgenie.com/sap/sapedi/Conversion%20of%20IDOCs%20to%20XML%20format.pdf
Here is the complete code for you;
It Converts spool request into PDF document and emails it.
http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
Smartform as attachment in mail. - 46k
http://sap.ittoolbox.com/groups/technical-functional/sap-dev/convert-smartforms-form-in-pdf-998715 - 87k
SMART form to PDF
https://wiki.sdn.sap.com/wiki/display/Snippets/ConvertSmartformtoPDFformat
smartform to MAIL
https://wiki.sdn.sap.com/wiki/display/Snippets/SmartformtoMailasPDF+attachment
Regards
Sandeep Sharma
PS: if helpful kindly reward points -
How to convert my whole website into PDF
I have my own blog. How can I convert my whole blog into pdf for backup ?
I am also looking for exact answer to backup my content of blog into PDF. So, How should I do for my blog ? Is there any software or tools for it?
-
How to convert Microsoft Publisher publication to PDF?
How to convert Microsoft Publisher 2003 publication to a PDF?
Moved to Creating, Editing & Exporting PDFs.
That depends upon the version of Acrobat you have. With any version you can always print to PDF. Some versions of Acrobat will support special conversion options for Publisher. -
Dear Abapers,
I request the Abapers kindly reply for this blog
I want to retrieve the sapscript layout changes for a particular transport request in development server after that many transport request created and moved to quality ?
I checked in SE03 transaction the transport request was there. But I want to retrieve the existing transport request which is not moved to Quality?
Is it possible to retrieve the existing transport request in development which is not moved to quality ?
Like how we retrieving the programs using versions in development server, In the same way I want to retrieve the sapscript layout in development server ?
Thanks & Regards
Muzeebur Rahiman.SHi,
There is no version management for SapScript or Smartforms .
When you write "transport request in development which is not moved to quality" - was the transport ever released and exported from the development system? If yes, and if the "Transport files" are still available in "Transport directory" (or if the transport files were backed up and could be retrieved), the transport could be imported again. If the TR was not exported, you are out of luck, I believe...
I would not recommend you do it on your own even if you happen to have enough authorizations (consult with Basis and/or Transport Admin, if you have one in your organization). I would not recommend that it's imported on a development system or QA system, even if the transport contains no other objects - only the SapScript form in question. Import it on a "sand-box" that gets overwritten by system copy from time to time... Once the transport is imported, you should have the old version of SapScript in that system and could analyse the changes and perform manual merge.
cheers
Jānis -
How to convert an HTML form to PDF
Is there any way to convert HTML page (with text boxes,radio/submit buttons) into a PDF file so form can be entered in a PDF format??
DanCrintea wrote:
HTML to PDF with Java, using OpenOffice.org - example here: [http://www.dancrintea.ro/html-to-pdf/|http://www.dancrintea.ro/html-to-pdf/]
You can use OpenOffice.org, running as a server and command it remotely for document convertion.
Besides HTML to PDF, there are also possible other convertions:
doc --> pdf, html, txt, rtf
xls --> pdf, html, csv
ppt --> pdf, swf
Code example:
import officetools.OfficeFile; // this is my tools package
FileInputStream fis = new FileInputStream(new File("c:/test.html"));
FileOutputStream fos = new FileOutputStream(new File("c:/test.pdf"));
// suppose OpenOffice.org runs on localhost, port 8100
OfficeFile f = new OfficeFile(fis,"localhost","8100", true);
f.convert(fos,"pdf");
-----------------------------------------------------------------------------------------------------------------------------------------You really think this is a good way to market your crappy product? -
How to convert Apple Mail email to pdf
I'm a relative Acrobat Pro beginner.
Like to convert emails to text recognized pdf files. Is it possible?
I've tried using Print and then Save as a PDF in Apple Mail. However, I can't text recognize the resulting pdf or convert to one. Keeps giving error message that can't convert the images.
Probably pdf 101 that I'm missing. :-(
Thanks for any tips.The only way that I am aware of is to purchase and download either Microsofts version of Office or Outlook Stand alone for Mac. Or if you prefer you can download Open Office that is FREE and is Oen Source and has all the features of Microsoft's
http://www.openoffice.us.com/openoffice/free-open-office-download-yahoo.php?pk=8 45397
To just pay for Outlook is a little steep for most users. I think you will find using a WEB Based e-Mail will work much better for you like GMail or YahooMail rather than having it on your machine use there servers and they have many more features.
Cheers
Don -
How to convert English PSD document to Arabic type engine? help...
Right now we are making some English web files into Arabic.
We are using CS 6, and have enable the type engine and adjsuted all settings.
If I start a NEW document, I can copy and paste Arabic into Photoshop and it reads correctly.
However, if I copy and paste into a file made in English previously - even after setting it it to Middle-Eastern Features under Type menu, and changing type direction in the Paragraph menu...it doesn't paste in correctly (wrong character order)
Even if I make a new text box, with everything set, it still pastes in wrong.
However, if I first copy it into a new PSD document, with options set...it appears correctly, and then if I copy and paste that into the previously made English file, it shows up correctly.
Is there a way to "convert" a PSD document's recognized type engine besides having to use a "middle man" file as described above. I would really prefer to copy-paste from Word into the already exisiting English file without having to first copy-paste into a blank file. (Preferences are also set to Middle Eastern under Edit menu)
Thanks
EDIT: I figured out that if I draw a new box, it will paste in just fine. Would prefer to sue the text boxes that are there. I tried also "Reset Paragraph" and it seemed to sometimes, reorder things...however it also reordered the English that was sometimes mixed in.
Any thoughts?Hi
Refer this thread [Convert MS Word .doc to PDF;
Regards
Raj -
How to send Zip files as attachments !! Very urgent, Please help!
I am sending PDF files as attachments using java mail (it works fine). But now my requirement is to zip the PDFs and send them as attachments instead of actual PDF's. But i don't know how to achieve that. does java mail API support zip attachment facilities? I have looked in activation API also, but i couldn't find anything helpful. even i searched the forums, but no clue. Please, anybody help me about this, it's very urgent.
thanks
sriCheck the first "if". If I specify an attachment, then a myme multipart doby is created: one for text and the other for the attachemnt I use this myme ovbject only for attachemnts, because some ISPs have problems and report error in email format if the attachemnet is missing and it contains only text and no attachment.
static public void send(String to,
String from,
String host,
String smtpPort,
String subject,
String body,
String fileAttachment,
String attachmentMimeType,
String username,
String password,
String debug)
throws Exception
// create some properties and get the default Session
Properties props = new Properties();
props.put("mail.smtp.host", host);
props.put("mail.smtp.port", smtpPort);
props.put("mail.smtp.timeout","5000");
props.put("mail.debug", debug);
Session session = null;
if (username != null && password != null)
props.put("mail.smtp.auth", "true");
MyPasswordAuthenticator auth = new MyPasswordAuthenticator(username, password);
session = Session.getDefaultInstance(props,auth);
else
session = Session.getDefaultInstance(props, null);
//session.setDebug(true);
// create a message
MimeMessage message = new MimeMessage(session);
message.setFrom(new InternetAddress(from));
InternetAddress[] address = InternetAddress.parse(to, false);
message.setRecipients(Message.RecipientType.TO, address);
message.setSubject(subject);
message.setSentDate(new Date());
// create the message part
if ( fileAttachment != null && fileAttachment != "NO" )
MimeBodyPart messageBodyPart = new MimeBodyPart();
//fill message
messageBodyPart.setText(body);
//Multipart multipart = new MimeMultipart();
Multipart multipart = new MimeMultipart("alternative");
multipart.addBodyPart(messageBodyPart);
// Part two is attachment
System.out.println("----->fileAttachment DISTINTO de NULL");
messageBodyPart = new MimeBodyPart();
FileDataSource fds = new FileDataSource(fileAttachment);
messageBodyPart.setDataHandler( new DataHandler(fds));
messageBodyPart.setFileName(fileAttachment); //<-- El archivo atachado.
multipart.addBodyPart(messageBodyPart);
//EN DESARROLLO el envio de attachment!!
// Put parts in message
message.setContent(multipart);
} else { //Envio es solamente TEXTO
message.setText(body);
// send the message
Transport.send(message);
Regards,
Vladimir -
Page layout 360x305 to smartform***very urgent***
Hi,
I want to take print out from dot matrix printer Page size is 360x305.
Can u please help me
how to create and assign page layout to my smart form.
Very urgent.Go to SPAD transaction.
Click on the Full administration button.
Go to tab Device types.
click on page formats and create a new page format.
Close the thread once your question is answered.
Regards,
SaiRam
Maybe you are looking for
-
i do not know how to enter into the ipad the card that the internet provider gives you to make the ipad wifi 3G work.
-
Strange error: COMPUTE_BCD_OVERFLOW
Hi everyone, i have a very very strange error/exception trying to divide 2 Numbers: The source code looks like this: lv_alt_koeff = ABS( lv_alt_wrbtr_delta / ( lv_alt_wrbtr_h - lv_alt_wrbtr_s ) ). Values are: lv_alt_wrbtr_delta = 119201.40 lv_alt_wrb
-
"Ken Burns effect" not working properly
Whenever I try to add a still photo to an iMovie 6 project, i get an error chirp and then nothing ends up in the timeline. Often, if I turn off the ken Burns Effect, it imports fine. Do I need to reinstall? If so, won't that mess up the iLife '09 sof
-
COBRAS Import failing to restore Notification Devices
e are migrating from Unity 5.0.1 to CUC 8.6.2.23900-10 We are using the latest version of COBRAS... When we try to import, everything succeeds except all of the notification devices. We get the following error: [Thread 001], [14/01/02 05:16:03], (err
-
In Bcc CA Task tab, actions are not shown
Hi all, In BCC show this content, Content Administration Project : Master_Style In History (tab) Author: admin Date: Mar 23, 2013 12:14 PM Action: create Author: admin Date: Mar 23, 2013 12:20 PM Action: Ready for Review Assets are ready for approval