cancel
Showing results for 
Search instead for 
Did you mean: 

Changing the Smartform in SRM Offline approval

Former Member
0 Kudos

Dear SRM Gurus,

We are using SRM5.0 (exteded classic scenario). We are using offline approval process. The approval process is working fine, user is receiving a mail and layout of the business object as an attachment. User is receiving standard smartform layout with SAP logo, but we have to change the standard smartform with customised one.

But in the standard class <b>CL_BBP_MESSAGE_CREATE_OFFAPP</b> in the method <b>DETERMINE_FORM_AND_PARAMS</b> the layout names are hardcoded. Is there any BAdI or any other process to change the layout name.

We have also implemented BAdI <b>BBP_OFFLINE_APP_BADI</b> for the method <b>DETERMINE_CLASS_NAME</b> to pass our own class (copy of class <b>CL_BBP_MESSAGE_CREATE_OFFAPP</b>), then there is an ABAP dump saying <b>'Type conflict when assigning object references'</b>.

So Please suggest the appropriate solution.

Thanks in Advance,

Chandra Sekhar.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

<u>The Standard smartform used in this case is <b>BBP_OUT_OFFAPP</b>.

You need to create a copy of this Smartform and then call it instead of using standard smartform using the BADI.</u>

http://help.sap.com/saphelp_srm50/helpdata/en/31/ec423b4ac8d506e10000000a11402f/frameset.htm

<u>Related SAP OSS Note -></u>

Note 941636 - Smart Form BBP_OUT_OFFAPP is not translated from EN

What dump are you getting ? Please paste the detailed code / details etc.. in your next reply.

<b>Here are some related helpful links -></b>

Note 934749 - E-mail for offline approval using BADI - no recipient

<u>Enhancement of the Functionality for Offline Approval

(Changed)</u>


Use
As of SAP SRM 5.0, the functionality for offline approval by e-mail has been revised and enhanced.

Changes and Functional Enhancements:

The Business Communication Service (BCS) is used for sending e-mails.
(For more information about this, see SAP Help Portal at help.sap.com -> Documentation -> SAP R/3 and R/3 Enterprise Release 4.70 -> SAP NetWeaver Components -> SAP Web Application Server -> Basis Services / Communication Interfaces -> Business Workplace and Services -> Generic Business Tools for Application Developers -> Business Communication Services - Sending from SAP Applications as of Release 6.10.)
New transmission report RBBP_NOTIFICATION_OFFAPP with enhanced selection parameters:
You can now restrict your selection of work items for sending on the basis of business objects, as well as on the basis of workflow tasks (TS*) as before. This means that you can restrict transmission to specific document types (for example,. BUS2205 - Invoice).
You can now use new checkboxes to select e-mail options (which replace the old radiobuttons). Remember that the indicator you set will override the default value.
E-mail text:
Can be made up of the work item text (short text) or the task description of the work flow task (full text).
Creating attachments:
You can attach a PDF (print version) of the document you want to have approved to the mail, and/or any attachments that exist for the document.
The input fields for standard notification texts and logon URLs that belonged to the old transmission report (RSWUWFMLEC) are no longer available because the notification contents can be specified more flexibly with the help of BAdI BBP_OFFLINE_APP_BADI.
Similarly, you no longer have to specify the return address because this can be replaced by the recipient's address in the transaction for SAPconnect inbound processing (transaction SO50). (If SAPconnect inbound processing has not been activated, the response mail [decision mail] is sent by default to the WF-BATCH user, as was also the case prior to SRM 5.0. The return address in method SMTP_INBOUND_ADDR_GET of BAdI BBP_OFFLINE_APP_BADI can also be overwritten.)

Processing logic in transmission report RBBP_NOTIFICATION_OFFAPP in conjunction with BAdI BBP_OFFLINE_APP_BADI:
a) Selection of work items
On basis of selection parameters or BAdI method WORKITEMS_SELECT.
b) Determination of recipient
Work item processor (attribute "Forward work item" from the organizational model and e-mail address is checked) or on basis of BAdI method RECIPIENTS_GET.
c) Collection of e-mail data
E-mail data from work item or from BAdI method MAIL_DATA_GET.
d) Generation of e-mail
By BAdI method MAIL_CREATE (flexible generation of subject, mail text, URLs, and attachments) or by default by class CL_BBP_MESSAGE_CREATE_OFFAPP (this class can be inherited and its methods changed - with BAdI method DETERMINE_CLASS_NAME this class can override the default class).
Standard Smart Form BBP_OUT_OFFAPP, which determines the e-mail layout, can be replaced in class method DETERMINE_FORM_AND_PARAMS (previously copied and varied).
e) Sending of e-mail
Class CL_BBP_DOC_SEND_BCS sends the e-mail by BCS.

Add approval notes to response mail:
After rejecting or approving, it is possible to enter notes in the response mail (only possible for e-mails in HTML format). These notes will be saved as document notes in SRM.

Inbound processing:
As of SRM 5.0, response mails can be processed in SAPconnect inbound processing. They are processed synchronously by classCL_BBP_SMTP_INBOUND_OFFAPP.
(Inbound processing in SAPconnect is activated if a suitable entry with the recipient's address and the processing class [ exit name] exists in transaction SO50. If a mail is received at this address, the specified class is used for processing. The work item ID and the decision of the approver are evaluated.)
If the document is locked at this point in time or if immediate processing fails for any other reason, the response mail is forwarded to the SAP inbox of the user who is assigned to the specified address. In this case, further processing is delayed until report RBBP_OFFLINE_EVAL is run (this report was the only report used prior to SRM 5.0, and it has to be scheduled periodically).
The e-mail addresses of the sender of the response mail and the determined recipient are compared by default; this ensures that third parties cannot respond. If a discrepancy is detected, the response mail is not processed. However, the processing parameters in inbound processing can be overridden by BAdI method CHK_SENDER_IND_SET




Effects on Customizing
You will find BAdI Customer Enhancement of Offline Approval (BBP_OFFLINE_APP_BADI) in the IMG for SRM by choosing
SRM Server -> Business Add-Ins (BAdIs)-> SAP Business Workflow

Hope this will help.

Do let me know.

Regards

- Atul

Former Member
0 Kudos

Hi Atul,

Thanks for the reply..

I got the BAdI name..

We should use <b>BBP_OUTPUT_CHANGE_SF</b> BAdI to change the smartform.

Thanks and Regards,

Chandra Sekhar.

Answers (0)