dear Freinds,
I have requirement where i have to send the Payslip through mail,
i have used the function module 'BAPI_GET_PAYSLIP_PDF' and later i have used the fm 'SO_NEW_DOCUMENT_ATT_SEND_API1' for sending as mail.
Iam getting the payslip as mail in PDF format only however my problem iam running the payslip for the month of january , but iam getting the data of other months also .
I have checked inthe the pc_payresult for the seqnr(where srtza = A) which iam passing into the functional i have found that the data as
fpper = 01.2009 and inper =12 2009 . Will this has any thing for me getting in the mail PDF attachment all months data (payslips) from january 2009 to december 2009 ? please let me know,.
Iam giving the code which i have used .
LOOP AT i_pernr.
CALL FUNCTION 'BAPI_GET_PAYSLIP_PDF'
EXPORTING
employeenumber = l_wa_final-pernr "'99001413'
sequencenumber = l_wa_final-seqnr "'00053'
payslipvariant = 'ZP1Y'
IMPORTING
RETURN =
payslip = payslip
pdf_fsize = pdf_fsize.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = doc_chng
put_in_outbox = 'X'
commit_work = 'X'
TABLES
packing_list = objpack
OBJECT_HEADER =
CONTENTS_BIN = objbin
contents_txt = objtxt
contents_hex = objhex
receivers = i_reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
endloop.
Please could any one let me know what could be the reason.
regards
vamsi