Current Position:Home > HR: Need to Send the Paysilp as a PDF file through Mail to Employees

HR: Need to Send the Paysilp as a PDF file through Mail to Employees

Update:10-11Source: network consolidation
Advertisement
Dear All ,
       Need to Send the Paysilp as a PDF file through Mail to Employees.
       can anyone please suggest any Standard Function Modules which takes the Payslip Form as input and convert it into PDF and can send it through mail to the concern employees.
      Can anyone please explain the procedure in detail.
Thanks in Advance,
Regards.

The Best Answer

Advertisement
venu,
below is code which helps to generate pdf ,,,,hope u know how to use the mail sending function
data:
fm_name TYPE RS38L_FNAM, "Smart Forms: FM Name
sf_name TYPE TDSFNAME
value 'YOUR_FORM_NAME', "Smart Forms: Form Name
P_OUTPUT_OPTIONS TYPE SSFCOMPOP,
P_JOB_OUTPUT_INFO TYPE SSFCRESCL,
P_CONTROL_PARAMETERS TYPE SSFCTRLOP,
P_LANGUAGE TYPE SFLANGU value 'E',
P_E_DEVTYPE TYPE RSPOPTYPE.
data:
P_BIN_FILESIZE TYPE I,
P_BIN_FILE TYPE XSTRING,
P_OTF type table of ITCOO,
P_DOCS type table of DOCS,
P_LINES type table of TLINE,
name type string,
path type string,
fullpath type string,
filter type string,
guiobj type ref to cl_gui_frontend_services,
uact type i,
filename(128).
GET SMARTFORM FUNCTION MODULE NAME ---
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = sf_name
IMPORTING
FM_NAME = fm_name
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'SSF_GET_DEVICE_TYPE'
EXPORTING
I_LANGUAGE = P_LANGUAGE
I_APPLICATION = 'SAPDEFAULT'
IMPORTING
E_DEVTYPE = P_E_DEVTYPE.
P_OUTPUT_OPTIONS-XSFCMODE = 'X'.
P_OUTPUT_OPTIONS-XSF = SPACE.
P_OUTPUT_OPTIONS-XDFCMODE = 'X'.
P_OUTPUT_OPTIONS-XDF = SPACE.
P_OUTPUT_OPTIONS-TDPRINTER = P_E_DEVTYPE.
P_CONTROL_PARAMETERS-NO_DIALOG = 'X'.
P_CONTROL_PARAMETERS-GETOTF = 'X'.
****...................................PRINTING.........................
CALL FUNCTION fm_name
EXPORTING
CONTROL_PARAMETERS = P_CONTROL_PARAMETERS
OUTPUT_OPTIONS = P_OUTPUT_OPTIONS
(....) <--- your form import parameters
IMPORTING
JOB_OUTPUT_INFO = P_JOB_OUTPUT_INFO.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
P_OTF[] = P_JOB_OUTPUT_INFO-OTFDATA.
****...................................CONVERT TO PDF...............
CALL FUNCTION 'CONVERT_OTF_2_PDF'
IMPORTING
BIN_FILESIZE = P_BIN_FILESIZE
TABLES
OTF = P_OTF
DOCTAB_ARCHIVE = P_DOCS
LINES = P_LINES
EXCEPTIONS
ERR_CONV_NOT_POSSIBLE = 1
ERR_OTF_MC_NOENDMARKER = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
now you can mail the pdf.
Reward points if helpful
Regards,
jinesh
  • HR: Need to Send the Paysilp as a PDF file through Mail to Employees Update:10-11

    Dear All ,        Need to Send the Paysilp as a PDF file through Mail to Employees.        can anyone please suggest any Standard Function Modules which takes the Payslip Form as input and convert it into PDF and can send it through mail to the conce

  • Why can't I send a fill in application (PDF file)? Update:10-11

    I can't send a fill in application (PDF file) in Adobe Reader from my Mac (version 11.0.04), but it works fine from my PC (version 11.0.05). Why? I get this massage (danish): "Der opstod en fejl under afsendelsen: Indhold af typen text/html; charset=

  • Error to Send PDF file using mail Update:10-11

    Hi all, I create a report that send an mail with 2 different pdf attach. I have a problem because one pdf attach is 663 KB and when I read it in mail it can not open the file and give me this error  : "Error opening PDF file --> There was an error

  • How To send a PDF file to mail Update:10-11

    Hi Friends, I am  having a file (D:\file.pdf) in ' D ' directory . Now I want to send this pdf  to perticular mail id ([email protected]). I tried so many examples but i am not able to solve this problem so please help to solve this one. I tried SO_N

  • Mail only sends the first page of PDF files Update:10-11

    since I upgraded to OS 10.8.3, when I send a PDF attachment using Mail only the first page is sent. If I use Safari, then the entire file is sent Any ideas what is going wrong wiSelect the page and go to Tools>Pages>Extract  to get the page. Then sa

  • Send for shared review multiple pdf files Update:11-30

    Hi I want to know if it's possible to send for shared review more than one file with one action, or you have to send for shared review every single file? I have more than 100 files I would like to send for shared review.I'm having the same problem. I

  • Sending PO via email with pdf file extension Update:11-30

    Good afternoon everyone. We are successfully (in testing) sending out Purchase Orders via External Send to an Outlook email address.  When the user receives the email, it appears that SAPConnect (SCOT) is correctly coverting the file to a pdf (I can

  • Sending INVOICE as attachment in PDF for  external Mail address Update:11-30

    HI!, We have made configuraiton for sendin mail while saving VF01 or VF02 from SAP R/3 to external id. Email is going to the partner Payer but the attachment of the invocie is going as OTF format and not in PDF. Where i am missing. I have gone thro t

  • Send an internal table as a PDF file by mail Update:11-30

    Hello all. I want to send an internal table that was created in the program by mail. i wand that it will be in a PDF format. Can anyone help me? Thanks.hiii you can use following FM DATA: "t_line            LIKE tline OCCURS 0 WITH HEADER LINE,      

  • Sending email to IPad with PDF file attachement Update:11-30

    I am helping a friend set up his Ipad and when we send a PDF document by email to the Ipad the attachment is in the format of winmail.dat not pdf and so we cannot open it on the IPad. What am I not doing correctly?What email program is being used to