on 02-05-2014 5:58 PM
Hi All,
My requirement is to generate PDF on save of purchase order. I have chosen transmission medium 'special function' for the same.Following is the code snippet
IF NAST-KSCHL = 'ZEU' AND NAST-NACHA = 8.
DATA : LV_ITCPO TYPE ITCPO.
LV_ITCPO-TDNOPRINT = 'X'.
LV_ITCPO-tdgetotf = 'X'.
LV_ITCPO-TDNEWID = 'X'.
LV_ITCPO-tdnoprev = 'X'.
CALL FUNCTION 'OPEN_FORM'
EXPORTING FORM = XFORMULAR
LANGUAGE = EKKO-SPRAS
OPTIONS = LV_ITCPO
* ARCHIVE_INDEX = TOA_DARA
* ARCHIVE_PARAMS = ARC_PARAMS
* ARCHIVE_PARAMS = ALARC_PAR1
DEVICE = 'PRINTER'
DIALOG = ''
EXCEPTIONS CANCELED = 01.
IF SY-SUBRC NE 0.
PERFORM PROTOCOL_UPDATE USING '142' EKKO-EBELN SPACE SPACE SPACE.
RETCO = SY-SUBRC.
EXIT.
ENDIF.
This is followed by WRITE_FORM and CLOSE_FORM and I have used FM CONVERT_TO_OTF ,GUI_DOWNLOAD to get PDF.
So now I am able to get PDF if select dispact time as 'Send with periodically scheduled job' and by running RSNAST00. But I am getting error 'express document update was terminated received from author' if I select dispatch time as 'Send while saving the application. Upon looking below is the message for this.
Should I need to add anything so it works for 'Send while saving the application' too.
Thanks,
Gowrinath.
This can be done by simply directing print output to a special printer that creates PDF instead of a printout. The device type PDF1 (or similar) needs to be configured in SAP and the users will need to have a special printer configured on their PCs.
E.g. we use CutePDF Writer and when I send output to PDF device in SAP, it just opens a printer dialog and then prompts for a pathname for PDF file. There are other similar programs available.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are trying to download a PDF file in the background which I believe is not possible. You can email it but can not download it in background
Nabheet
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nabeet,
Thanks for your quick response.
There is already code in place for email. But my client wants to create PDF on click of save button. Is there any possibility I can do this?Like writing the file to application server or any other way.
I have configured PDF printer too. But its not asking me for the path where to save the PDF file.
Thanks,
Gowrinath.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.