on 08-31-2007 11:12 AM
Dear All,
IN HR I am able to get the payslip into PDF file, I am able to create PDF file but Unable to know where it is stored , it is displaying the messgae that PDF of 4320 bytes are created. in 4.7 version.
Now my concern is how to find that PDF file and how to send it as mail
if SO_NEW_DOCUMENT_ATT_SEND_ALI1 fM is to be used for mailing then can anyone please explain me about the parameters to be passed.
Thanks in Advance,
Regards,
Satya.
check in SCOT for Email Settings ,
click on SMTP Node -
> here u will get options like
ABAP List = PDF.
Regards
Peram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yeah Definitely
EPORT ZHR_PAYSLIP_PDF .
TABLES: PERNR,
PCL1,
PCL2,
PA0105.
INFOTYPES : 0105.
*INTERNATIONAL INCLUDE
INCLUDE RPC2CD09. "Cluster CD data definition
INCLUDE RPC2CA00. "Cluster CA Data-Definition
INCLUDE RPPPXD00. "Data Definition buffer PCL1/PCL2 Buffer
INCLUDE RPPPXD10. "Common part buffer PCL1/PCL2
INCLUDE RPPPXM00. "Buffer Handling routine
*COUNTRY SPECIFIC INCLUDE
INCLUDE PC2RXIN0. "Cluster IN data definition
INCLUDE RPC2RX09.
*INCLUDE RPC2R1X9.
DATA: SEQNR LIKE PC261-SEQNR,
it_rgdir LIKE pc261 OCCURS 0 WITH HEADER LINE,
PAYSLIP LIKE BAPI7004_PAYSLIP OCCURS 0 WITH HEADER
LINE,
RETURN LIKE BAPIRETURN1.
Data: docdata like sodocchgi1,
objpack like sopcklsti1 occurs 1 with header line,
objhead like solisti1 occurs 1 with header line,
objtxt like solisti1 occurs 10 with header line,
objbin like solisti1 occurs 10 with header line,
objhex like solix occurs 10 with header line,
reclist like somlreci1 occurs 1 with header line,
listobject like abaplist occurs 1 with header line,
tab_lines type i,
doc_size type i,
att_type like SOODK-OBJTP.
START-OF-SELECTION .
GET PERNR.
PERFORM GET_IT0105_DATA.
PERFORM GET_PAYROLL_DATA.
PERFORM PAYSLIP_DATA.
form GET_PAYROLL_DATA .
CALL FUNCTION 'CU_READ_RGDIR'
EXPORTING
persnr = pernr-pernr
TABLES
in_rgdir = it_rgdir
EXCEPTIONS
no_record_found = 1
OTHERS = 2.
IF sy-subrc = 0 .
SORT IT_RGDIR BY SEQNR.
LOOP AT it_rgdir WHERE fpbeg BETWEEN pnpbegda AND pnpendda .
IF ( it_rgdir-fpper = it_rgdir-inper
AND IT_RGDIR-SRTZA = 'A' ).
SEQNR = IT_RGDIR-SEQNR.
ENDIF . " end of Strza
ENDLOOP.
ENDIF.
endform. " GET_PAYROLL_DATA
orm PAYSLIP_DATA .
DATA:
FUNAME TYPE SYREPID,
LINES TYPE I,
P_FORM LIKE PC408 OCCURS 0 WITH HEADER LINE,
P_INFO LIKE PC407.
DATA : PACKING_LIST LIKE SOPCKLSTI1.
init
CLEAR: P_FORM, P_INFO, PAYSLIP, FUNAME.
REFRESH: P_FORM, PAYSLIP.
determine name of function module
depending on CE or non CE
CALL FUNCTION 'HRO1_GET_FUNAME'
EXPORTING
pernr = PERNR-PERNR
IMPORTING
FUNAME = funame.
get raw version of payslip
CALL FUNCTION funame
EXPORTING
EMPLOYEE_NUMBER = PERNR-PERNR
SEQUENCE_NUMBER = SEQNR
PAYSLIP_VARIANT = 'AMP3'
IMPORTING
P_INFO = P_INFO
RETURN = RETURN
TABLES
P_FORM = P_FORM.
any errors occured
CHECK RETURN IS INITIAL.
DESCRIBE TABLE P_FORM LINES LINES.
IF LINES LE 0.
PERFORM FILL_RETURN USING 'I' '3G' 824 RETURN.
ERROR MESSAGE.
EXIT.
ENDIF.
Get print parameters from user defaults and form definition
CONSTANTS:
dataset TYPE pri_params-prdsn VALUE 'ESSEDT'.
DATA:
edtname TYPE syrepid,
listname TYPE pri_params-plist,
pri_params TYPE pri_params,
rc TYPE sysubrc,
valid TYPE xfeld.
Data : PDF_CONTENT TYPE XSTRING,
PDF_FSIZE TYPE I,
pdf_xstring type xstring.
CONCATENATE dataset sy-uzeit INTO listname.
PERFORM xedt_get_repna IN PROGRAM rpcljnx0
USING p_info-molga edtname rc.
IF rc <> 0.
edtname = 'RPCEDTX0'.
ENDIF.
CALL FUNCTION 'HR_PL_DETERMINE_PRI_PARAMS'
EXPORTING
imp_linesize = p_info-pcols
imp_linecount = p_info-psize
imp_repid = edtname
IMPORTING
exp_new_params = pri_params.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
data_set = dataset " dataset name
expiration = '1' " one day in spool
immediately = space " no immediate print
in_parameters = pri_params " defaults
list_name = listname " listname
new_list_id = 'X' " new spool id
no_dialog = 'X' " no print popup
IMPORTING
out_parameters = pri_params
valid = valid
EXCEPTIONS
OTHERS = 4.
CHECK sy-subrc EQ 0
AND valid NE space.
Submit EDT to spool
EXPORT p_p_form FROM p_form TO MEMORY ID '%%_P_FORM_%%'.
EXPORT p_info FROM p_info TO MEMORY ID '%%_P_INFO_%%'.
SUBMIT rpcedt_list_to_memory
TO SAP-SPOOL
SPOOL PARAMETERS pri_params
WITHOUT SPOOL DYNPRO
AND RETURN.
Get Spool ID
DATA:
spool_ids TYPE STANDARD TABLE OF rsporq,
spoolname TYPE rspotype-rq0name,
spooldsn TYPE rspotype-rq2name,
spoolid TYPE tsp01-rqident.
FIELD-SYMBOLS: <spool> LIKE LINE OF spool_ids.
spooldsn = listname.
spoolname = dataset.
CALL FUNCTION 'RSPO_FIND_SPOOL_REQUESTS'
EXPORTING
rq0name = spoolname
rq2name = spooldsn
TABLES
spoolrequests = spool_ids
EXCEPTIONS
OTHERS = 0.
READ TABLE spool_ids ASSIGNING <spool> INDEX 1.
CHECK sy-subrc EQ 0.
spoolid = <spool>-rqident.
Convert to PDF
DATA:
pdf_table TYPE rcl_bag_tline.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = spoolid
no_dialog = 'X'
IMPORTING
pdf_bytecount = pdf_fsize
TABLES
pdf = pdf_table
EXCEPTIONS
OTHERS = 0.
Map PDF table into 'flat' table acording to Unicode flag
Data:
wa_pdfline like line of pdf_table.
Field-symbols:
<l_xline> type x.
loop at pdf_table into wa_pdfline.
assign wa_pdfline to <l_xline> casting.
concatenate pdf_xstring <l_xline> into pdf_xstring in byte mode.
endloop.
Don't know how to proceed now .
Now I have to save the file on my desktop and has to send as mail to individual Mail-id's as PDF attachment.
Required your help
Satya.
Message was edited by:
Satya Garikapati
Hi ,
so, now ur program do 2 things ,
one is getting the spool data and downloading to Desktop.
2.here u have to one more step
So here u will get List out put , after that u can send email at the same time i.e in Background
SUBMIT rpcedt_list_to_memory
EXPORTING LIST TO MEMORY
AND RETURN.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
LISTOBJECT = DOCLIST.
IF SY-SUBRC <> 0.
ENDIF.
CALL FUNCTION 'TABLE_COMPRESS'
IMPORTING
COMPRESSED_SIZE =
TABLES
IN = DOCLIST
OUT = OBJBIN
EXCEPTIONS
COMPRESS_ERROR = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
PERFORM FM_SEND_EMAIL.
Regards
Prabhu
Thanks Prabhu and Sreenivas , You really helped me alot.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is the code to send the Smartform to mail as PDF attachment.
&----
*& Report ZTEST_PDF_MAIL
*&
&----
REPORT ZTEST_PDF_MAIL.
Internal Table declarations
DATA: I_OTF TYPE ITCOO OCCURS 0 WITH HEADER LINE,
I_TLINE TYPE TABLE OF TLINE WITH HEADER LINE,
I_RECEIVERS TYPE TABLE OF SOMLRECI1 WITH HEADER LINE,
I_RECORD LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
Objects to send mail.
I_OBJPACK LIKE SOPCKLSTI1 OCCURS 0 WITH HEADER LINE,
I_OBJTXT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
I_OBJBIN LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
I_RECLIST LIKE SOMLRECI1 OCCURS 0 WITH HEADER LINE,
Work Area declarations
WA_OBJHEAD TYPE SOLI_TAB,
W_CTRLOP TYPE SSFCTRLOP,
W_COMPOP TYPE SSFCOMPOP,
W_RETURN TYPE SSFCRESCL,
WA_DOC_CHNG TYPE SODOCCHGI1,
W_DATA TYPE SODOCCHGI1,
WA_BUFFER TYPE STRING, "To convert from 132 to 255
Variables declarations
V_FORM_NAME TYPE RS38L_FNAM,
V_LEN_IN LIKE SOOD-OBJLEN,
V_LEN_OUT LIKE SOOD-OBJLEN,
V_LEN_OUTN TYPE I,
V_LINES_TXT TYPE I,
V_LINES_BIN TYPE I.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZTEST'
IMPORTING
FM_NAME = V_FORM_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.
W_CTRLOP-GETOTF = 'X'.
W_CTRLOP-NO_DIALOG = 'X'.
W_COMPOP-TDNOPREV = 'X'.
CALL FUNCTION V_FORM_NAME
EXPORTING
CONTROL_PARAMETERS = W_CTRLOP
OUTPUT_OPTIONS = W_COMPOP
USER_SETTINGS = 'X'
IMPORTING
JOB_OUTPUT_INFO = W_RETURN
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
I_OTF[] = W_RETURN-OTFDATA[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
MAX_LINEWIDTH = 132
IMPORTING
BIN_FILESIZE = V_LEN_IN
TABLES
OTF = I_OTF
LINES = I_TLINE
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
OTHERS = 4.
IF SY-SUBRC <> 0.
ENDIF.
LOOP AT I_TLINE.
TRANSLATE I_TLINE USING '~'.
CONCATENATE WA_BUFFER I_TLINE INTO WA_BUFFER.
ENDLOOP.
TRANSLATE WA_BUFFER USING '~'.
DO.
I_RECORD = WA_BUFFER.
APPEND I_RECORD.
SHIFT WA_BUFFER LEFT BY 255 PLACES.
IF WA_BUFFER IS INITIAL.
EXIT.
ENDIF.
ENDDO.
Attachment
REFRESH: I_RECLIST,
I_OBJTXT,
I_OBJBIN,
I_OBJPACK.
CLEAR WA_OBJHEAD.
I_OBJBIN[] = I_RECORD[].
Create Message Body Title and Description
I_OBJTXT = 'test with pdf-Attachment!'.
APPEND I_OBJTXT.
DESCRIBE TABLE I_OBJTXT LINES V_LINES_TXT.
READ TABLE I_OBJTXT INDEX V_LINES_TXT.
WA_DOC_CHNG-OBJ_NAME = 'smartform'.
WA_DOC_CHNG-EXPIRY_DAT = SY-DATUM + 10.
WA_DOC_CHNG-OBJ_DESCR = 'smartform'.
WA_DOC_CHNG-SENSITIVTY = 'F'.
WA_DOC_CHNG-DOC_SIZE = V_LINES_TXT * 255.
Main Text
CLEAR I_OBJPACK-TRANSF_BIN.
I_OBJPACK-HEAD_START = 1.
I_OBJPACK-HEAD_NUM = 0.
I_OBJPACK-BODY_START = 1.
I_OBJPACK-BODY_NUM = V_LINES_TXT.
I_OBJPACK-DOC_TYPE = 'RAW'.
APPEND I_OBJPACK.
Attachment (pdf-Attachment)
I_OBJPACK-TRANSF_BIN = 'X'.
I_OBJPACK-HEAD_START = 1.
I_OBJPACK-HEAD_NUM = 0.
I_OBJPACK-BODY_START = 1.
DESCRIBE TABLE I_OBJBIN LINES V_LINES_BIN.
READ TABLE I_OBJBIN INDEX V_LINES_BIN.
I_OBJPACK-DOC_SIZE = V_LINES_BIN * 255 .
I_OBJPACK-BODY_NUM = V_LINES_BIN.
I_OBJPACK-DOC_TYPE = 'PDF'.
I_OBJPACK-OBJ_NAME = 'smart'.
I_OBJPACK-OBJ_DESCR = 'test'.
APPEND I_OBJPACK.
CLEAR I_RECLIST.
I_RECLIST-RECEIVER = 'nareshreddy.k@gmail.com'.
I_RECLIST-REC_TYPE = 'U'.
APPEND I_RECLIST.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = WA_DOC_CHNG
PUT_IN_OUTBOX = 'X'
COMMIT_WORK = 'X'
TABLES
PACKING_LIST = I_OBJPACK
OBJECT_HEADER = WA_OBJHEAD
CONTENTS_BIN = I_OBJBIN
CONTENTS_TXT = I_OBJTXT
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.
IF SY-SUBRC <> 0.
WRITE:/ 'Error When Sending the File', SY-SUBRC.
ELSE.
WRITE:/ 'Mail sent'.
ENDIF.
If you want to send some text as Body of the Mail then follow this once
when u r callin the FM'SO_NEW_DOCUMENT_ATT_SEND_API1'.. points to remember
1.u have to pass the body of content in table CONTENTS_TXT(ia m using I_OBJBIN) (each line a record) then. suppose i have appended 11 records to the table CONTENTS_TXT .
2.PACKING_LIST(iam usign I_OBJPACK) table u ahve to append a redord as follows
I_OBJPACK-TRANSF_BIN = ' '.
I_OBJPACK-HEAD_START = 000000000000001.
I_OBJPACK-HEAD_NUM = 000000000000001.
I_OBJPACK-BODY_START = 000000000000002
I_OBJPACK-BODY_NUM = 000000000000010.
I_OBJPACK-DOC_TYPE = 'RAW'.
append I_OBJPACK-.
by the above code system treat the first line in table I_OBJBIN as header and the 2nd line to 10 lines tread as body.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = WA_DOC_CHNG
PUT_IN_OUTBOX = 'X'
TABLES
PACKING_LIST = I_OBJPACK
OBJECT_HEADER = WA_OBJHEAD
CONTENTS_BIN = I_OBJBIN
CONTENTS_TXT = I_OBJTXT
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.
regards,
srinivas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your Swift Response ...
C I am pasting the other kind of code which I have developed
But it is saying File cannot be sent.
Mr.Sreenivas thank you very much for the code you have given but the thing is I need to work on Payslip which is not Smartform.
So I request you to please let me know where to specify PDF and mail details.
I am pasting that code please check it.
REPORT ZHR_PAYSLIP_PDF .
TABLES: PERNR,
PCL1,
PCL2,
PA0105.
INFOTYPES : 0105.
*INTERNATIONAL INCLUDE
INCLUDE RPC2CD09. "Cluster CD data definition
INCLUDE RPC2CA00. "Cluster CA Data-Definition
INCLUDE RPPPXD00. "Data Definition buffer PCL1/PCL2 Buffer
INCLUDE RPPPXD10. "Common part buffer PCL1/PCL2
INCLUDE RPPPXM00. "Buffer Handling routine
*COUNTRY SPECIFIC INCLUDE
INCLUDE PC2RXIN0. "Cluster IN data definition
INCLUDE RPC2RX09.
*INCLUDE RPC2R1X9.
DATA: SEQNR LIKE PC261-SEQNR,
it_rgdir LIKE pc261 OCCURS 0 WITH HEADER LINE,
PAYSLIP LIKE BAPI7004_PAYSLIP OCCURS 0 WITH HEADER
LINE,
RETURN LIKE BAPIRETURN1.
Data: docdata like sodocchgi1,
objpack like sopcklsti1 occurs 1 with header line,
objhead like solisti1 occurs 1 with header line,
objtxt like solisti1 occurs 10 with header line,
objbin like solisti1 occurs 10 with header line,
objhex like solix occurs 10 with header line,
reclist like somlreci1 occurs 1 with header line,
listobject like abaplist occurs 1 with header line,
tab_lines type i,
doc_size type i,
att_type like SOODK-OBJTP.
START-OF-SELECTION .
GET PERNR.
PERFORM GET_IT0105_DATA.
PERFORM GET_PAYROLL_DATA.
PERFORM PAYSLIP_DATA.
form GET_PAYROLL_DATA .
CALL FUNCTION 'CU_READ_RGDIR'
EXPORTING
persnr = pernr-pernr
TABLES
in_rgdir = it_rgdir
EXCEPTIONS
no_record_found = 1
OTHERS = 2.
IF sy-subrc = 0 .
SORT IT_RGDIR BY SEQNR.
LOOP AT it_rgdir WHERE fpbeg BETWEEN pnpbegda AND pnpendda .
IF ( it_rgdir-fpper = it_rgdir-inper
AND IT_RGDIR-SRTZA = 'A' ).
SEQNR = IT_RGDIR-SEQNR.
ENDIF . " end of Strza
ENDLOOP.
ENDIF.
endform.
form PAYSLIP_DATA .
DATA:
FUNAME TYPE SYREPID,
LINES TYPE I,
P_FORM LIKE PC408 OCCURS 0 WITH HEADER LINE,
P_INFO LIKE PC407.
DATA : PACKING_LIST LIKE SOPCKLSTI1.
init
CLEAR: P_FORM, P_INFO, PAYSLIP, FUNAME.
REFRESH: P_FORM, PAYSLIP.
determine name of function module
depending on CE or non CE
CALL FUNCTION 'HRO1_GET_FUNAME'
EXPORTING
pernr = PERNR-PERNR
IMPORTING
FUNAME = funame.
get raw version of payslip
CALL FUNCTION funame
EXPORTING
EMPLOYEE_NUMBER = PERNR-PERNR
SEQUENCE_NUMBER = SEQNR
PAYSLIP_VARIANT = 'AMP3'
IMPORTING
P_INFO = P_INFO
RETURN = RETURN
TABLES
P_FORM = P_FORM.
any errors occured
CHECK RETURN IS INITIAL.
DESCRIBE TABLE P_FORM LINES LINES.
IF LINES LE 0.
PERFORM FILL_RETURN USING 'I' '3G' 824 RETURN.
ERROR MESSAGE.
EXIT.
ENDIF.
CALL FUNCTION 'CONVERT_PAYSLIP_TO_SAPSCRIPT'
EXPORTING
P_INFO = p_info
TABLES
payslip = payslip
p_form = p_form
EXCEPTIONS
EMPTY_FORM = 1
OTHERS = 2
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Way for Mailing ***************************
OBJPACK-HEAD_START = 1.
OBJBIN = ' | '. APPEND OBJBIN.
OBJPACK-HEAD_START = 1.
submit SHOWCOLO exporting list to memory and return.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = listobject
EXCEPTIONS
OTHERS = 1
.
IF sy-subrc <> 0.
message ID '61' TYPE 'E' NUMBER '731'
with 'LIST_FROM_MEMORY'.
ENDIF.
PACKING_LIST = OBJPACK.
docdata-obj_name = 'TEST_ALI'.
docdata-obj_descr = 'Test including ALI/HTML Attachment'.
CALL FUNCTION 'TABLE_COMPRESS'
IMPORTING
COMPRESSED_SIZE =
TABLES
IN = listobject
OUT = objbin
EXCEPTIONS
OTHERS = 1
.
if sy-subrc <> 0.
message ID '61' TYPE 'E' NUMBER '731'
with 'TABLE_COMPRESS'.
endif.
describe table objtxt lines tab_lines.
read table objtxt index tab_lines.
docdata-doc_size = ( tab_lines - 1 ) * 255 + strlen( objtxt ).
clear objpack-transf_bin.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'OTF'.
append objpack.
att_type = 'OTF'.
describe table objbin lines tab_lines.
read table objbin index tab_lines.
objpack-doc_size = ( tab_lines - 1 ) * 255 + strlen( objbin ).
objpack-transf_bin = 'X'.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = att_type.
objpack-obj_name = 'ATTACHMENT'.
objpack-obj_descr = 'Attached Document'.
append objpack.
reclist-receiver = 'SATYANARAYANA.G@OBTGLOBAL.COM'.
reclist-rec_type = 'U'.
reclist-com_type = 'INT'.
append reclist.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = docdata
PUT_IN_OUTBOX = 'X'
IMPORTING
SENT_TO_ALL =
NEW_OBJECT_ID =
tables
packing_list = objpack
OBJECT_HEADER = objhead
CONTENTS_BIN = objbin
CONTENTS_TXT = objtxt
receivers = 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
.
IF sy-subrc <> 0.
message ID 'SO' TYPE 'S' NUMBER '023'
with docdata-obj_name.
ENDIF.
I am getting the message that mail cannot be sent don't know why???
Regards,
Satya.
Dear Sreenivas /Prabhu
You really helped me.
I think I am about to reach the goal but was stuck up with one problem
It is Throwing Exception 2 (DOCUMENT_NOT_SENT ) Error in Sending
the file from that standard FM
SO_NEW_DOCCUMENT_ATT_SEND_API1.
Requesting you to please suggest me with your kind solutions.
Regards,
Satya.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.