on 2014 Jan 07 10:27 AM
Hi Frds,
I have created a functionality where Order Approval notification sent to Res person MS Outlook mail.
Now requirement is that the approver can approve or reject form Out Look mail itself, For this i need to create a link for approve and reject at the end of the mail body which on click in either link update the status of Order.
Please do the needful
I appricete if you provide some sample code.
Thanks
Imran
Hi All,
Thanks for your Help. I dont know how. but the code is working fine.
Thanks Deepika. All credit to gone to you.
Regards
Imran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Deepika,
One last ques. Act there are two object which sent mail, one is report where i have created link and working fine. and other is from Workflow which use Business object zmethod to sent mail. (bus2000115). I stuck to get Workflow ID number.
Could you please let me know how can i get this WF ID. All i have Order ID , GUID and related details.
Thanks
Imran
Hi Imran
You can use program exits in workitem step to send mail
check this link
Program Exits In Workflow - ABAP Development - SCN Wiki
or else u can use below tables.
SELECT wi_id FROM sww_wi2obj INTO TABLE lt_wiid WHERE catid = 'BO' AND typeid = 'BUS2000111' AND instid = 'docguid'.
SELECT wi_id FROM swwwihead INTO TABLE lt_wihead FOR ALL ENTRIES IN lt_wiid WHERE wi_id = lt_wiid-wi_id wi_stat = 'READY'
wi_rh_task = 'ur workitem task id'.
.
Regards,
Deepika.
Hi Deepika,
I need to capture the mail body but its not caputring to get reason for rejection.
Below is the code.
method IF_INBOUND_EXIT_BCS~PROCESS_INBOUND.
data : io_sreg TYPE REF TO CL_SEND_REQUEST_BCS.
document type ref to if_document_bcs,
document = io_sreg->get_document( ).
The variable document give subject text but not body text. Any idea.
Below is the mail Body.
APPROVED.
Testing reason text….. Testing reason text….. Testing reason text….. Testing reason text…..
!!!Please do not change this automatically generated email. Enter Rejection\Return Notes in this Email Body ABOVE THIS MESSAGE!%
Regards
Imran
Hi Imran.
data:
lt_body TYPE soli_tab,
ls_body TYPE soli,
TRY.
lo_document = io_sreq->get_document( ).
l_mail_attr = lo_document->get_body_part_attributes( '1' ).
CATCH cx_document_bcs.
ENDTRY.
TRY.
l_mail_content = lo_document->get_body_part_content( '1' ).
CATCH cx_document_bcs.
ENDTRY.
lt_body = l_mail_content-cont_text.
Loop lt_body and take the content.
Regards,
Deepika.
Hi ,
I am having similar issue the workitem doesnt get updated even after processing the email.
When i debug the standard method IF_INBOUND_EXIT_BCS~PROCESS_INBOUND
lo_document = io_sreq->get_document( ) statement is always failing to get the Email content so nothing is being processed.
Please advice.
Thanks,
Niel
.
User | Count |
---|---|
31 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.