cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

change item deatils in offline approval

Former Member
0 Kudos
187

Hi Experts,

I am implementing the BADI BBP_OFFLINE_APP_BADI to customize the offline approval mail. I was checking the import parameters in debug via the program /SAPSRM/OFFLINEAPPROVALSEND for the BADI implementation and found the item and account assignment details which appear in the approval mail are not held in any of the structures. Only the part till click here to approve appears in the mail. Now I need to implement the following

- Change the logic as which line items of the shopping cart are displayed in the approval mail.

- Modify the logo which appears in the approval mail.

Any pointers regarding this is appreciated.

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

You can't find the approval standard email content as any of the import parameters. You have to implment your logic in the method MAIL_DATA_GET.. the import parameter 'is_wi_recipient-wiid_tab' will have the workitem id.. pass the workitem id to FM ''SWW_WI_CONTAINER_READ_OBJECTS' to get the SC..

To remove the SAP logo, the import paramer it_ct_mail_text will have the SAP logo details.. just clear the line and modify the internal table it_ct_mail_text..

Saravanan

Former Member
0 Kudos

Hi Saravanan,

For my requirement as per the existing standard offline approval the mail is going with all line item details. I have implemented cost center based approval and want to display only the line items for which the approver is responsible in the offline mail. Is this requirement feasible through the offline approval BADI?

in FM SWW_WI_CONTAINER_READ_OBJECTS its returning the guid and object id of the shopping cart which means I can get all the line item details but again I need only the line items relevant for the approver.

"To remove the SAP logo, the import paramer it_ct_mail_text will have the SAP logo details.. just clear the line and modify the internal table it_ct_mail_text.."

I could not find any such import parameter, there is one parameter ct_mail_text but its not holding any value.

Please advice. Thanks.

Former Member
0 Kudos

Hi,

you have to bulid the logic such way, first call the method /SAPSRM/CL_WF_PROCESS_MANAGER~GET_WORKITEM_REF_BY_SBWF_ID to get the decision set guid..the attribute GET_MV_LEADING_OBJECT_GUID will have the decision set guid.. once you get the decision guid pass the guid as DECISION_SET_ID to the table /SAPSRM/D/WF_006 to get the item guid.. once you get the item guid you can find accounting details from bbp_pd_sc_item_getdetail.

yes - ct_mail_text internal table must have a SAP logo details.. just clear.. then you won't see the SAP logo in the mail..

Saravanan

Former Member
0 Kudos

Hi Saravanan,

I am using /sapsrm/cl_wf_process_manager=>get_current_workitems_by_doc to get the workitem id. Although its not related to this requirement once a decision set is approved it does not appear in this output. For PROCESS_RESTART BADI I am trying to restart selected decision sets instead of whole Shopping cart. Is it possible to do so?

Former Member
0 Kudos

Hi Saravanan,

I have applied the note 1356804 after which the data is getting populated in the mail_create method, IT_TEXT parameter. The data seems to be completely in HTML. Now after I have selected the required line item details for the specific approver the output will be displayed only if I populate the values in HTML?

Also shouldn't this be available as standard that the approver should not be shown irrelevant SC item details? ( The items for which he is not responsible for approval) I tried searching oss note for this issue but could not find any. The SRM system is 7.0 SP1. The Workflow decision type is Type 4 - Item Based Decision for Partial document.

Former Member
0 Kudos

The irrelevant line item being displayed for the approver is a Product error and the SAP Note 1459054 contains the correction.