04-04-2006 2:41 PM
Hello,
This is the first timeI post message in this forum. And I don't speak very well english. So please can you be lenient.
I would like send Quality notification to supplier with some GOS linked file.
Could you help me please ?
Best regards,
04-15-2006 9:09 AM
Hi Marielle,
Please see the code below and let me know if it gives you any idea . As soon as I will get some free time, I would be writing a weblog to explain it.
<< And don't you worry about your English, we all speak ABAP here in ABAP Forum >>
At the moment, it is just a sample code for the basics - on how to read & then send an email for GOS attachments [ for a business object instance ].
REPORT Z_RMTIWARI_SEND_GOS_ATT_MAIL .
parameters:
p_botype like borident-objtype default 'BUS2012',
p_bo_id like borident-objkey default '3500000503'," Key e.g. PO No.
p_reltyp like breltyp-reltype default 'ATTA'.
data: lo_is_object_a type SIBFLPORB,
lt_links type OBL_T_LINK,
wa_links like line of lt_links.
data : lt_rel type OBL_T_RELT,
wa_rel like line of lt_rel.
lo_is_object_a-INSTID = p_bo_id.
lo_is_object_a-typeid = p_botype.
lo_is_object_a-CATID = 'BO'.
wa_rel-sign = 'I'.
wa_rel-option = 'EQ'.
wa_rel-LOW = p_reltyp.
append wa_rel to lt_rel.
*TRY.
CALL METHOD CL_BINARY_RELATION=>READ_LINKS
EXPORTING
IS_OBJECT = lo_is_object_a
* IP_LOGSYS =
* IT_ROLE_OPTIONS =
IT_RELATION_OPTIONS = lt_rel
* IP_NO_BUFFER = SPACE
IMPORTING
ET_LINKS = lt_links
* ET_ROLES =
.
*CATCH CX_OBL_PARAMETER_ERROR .
*CATCH CX_OBL_INTERNAL_ERROR .
*CATCH CX_OBL_MODEL_ERROR .
*ENDTRY.
*call function 'SREL_GET_NEXT_RELATIONS'
* exporting
* object = lo_is_object_a
** ROLETYPE =
* relationtype = p_reltyp
** MAX_HOPS = 1
** INCL_APPLRELS = ' '
** EXCL_ROLES =
** EXCL_RELATIONS =
* tables
* links = lt_links
** ROLES =
** APPLLINKS =
* exceptions
* internal_error = 1
* no_logsys = 2
* others = 3
* .
*if sy-subrc <> 0.
*
*endif.
data : lv_document_id type sofolenti1-doc_id.
data : lt_receivers type standard table of somlreci1 with header line.
lt_receivers-receiver = 'ram@rmtiwari.com'.
lt_receivers-rec_type = 'U'.
append lt_receivers.
loop at lt_links into wa_links where typeid_b = 'MESSAGE'.
move wa_links-INSTID_B to lv_document_id.
call function 'SO_OLD_DOCUMENT_SEND_API1'
exporting
document_id = lv_document_id
tables
receivers = lt_receivers
exceptions
too_many_receiver = 1
document_not_sent = 2
document_not_exist = 14
operation_no_authorization = 13
parameter_error = 23
x_error = 6
enqueue_error = 7
others = 1000.
if sy-subrc ne 0.
endif.
endloop.
Thanks,
Ram
02-04-2014 9:43 AM
thanks Ram, it is helpful for statrters like me. thanks for sharing:)
Regards
Ajit
04-15-2006 9:38 AM
05-03-2006 12:29 PM
Hi,
thanks a lot for the post, quite interesting. My understanding is, that the function module: SO_OLD_DOCUMENT_SEND_API1, will always only allow on attachment only in an eMail. Is there a way to attach all documents attached to a Business Object through GOS to an eMail. (one eMail with multiple attachments?
Thanks and best regards
Martin
05-03-2006 1:33 PM
Hello,
I have the same question. And is it possible to display email windows with attach file to add note and maybe remove attach file and send mail manually ?
I hope I'am clear (I'm not sure !).
02-04-2014 9:58 AM
Hi Marielle,
you have to create the whole screen / logic yourself.
and don't use function to send mail, use the Oo. Function will not be supported anymore.
the simple solution, is to send the mail to the user that ask this. And the user could follow the mail to the customer/supplier
regards
Fred