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.