Purpose:

The purpose of the document is to reduce the effort of new Retarus service users.

Introduction:

This document is a reference work for SAP users wishing to transmit document as fax from SAP systems via the Retarus service. It contains description of each necessary step in SAP.

Prerequisites:

A SAP RFC connection should be in place between the SAP system and Retarus system permanently.

Below screenshots reveals the typical technical structure and settings made by the BASIS team to enable the service.

               Picture1.png

                Picture2.png

Document sending process:

Post all the required settings were made. Process of sending from SAP CRM system goes as below.

From the project I worked in requirement we had like when capturing an order, there are several steps like entering the sold– to-party, selecting products, entering discounts for products, changing the status to release and saving the order. Once the order status is set, an order confirmation should go to sold-to-party automatically as FAX using Retarus system.

Configuration at CRM end:

In CRM system an action definition with processing type as Method call is configured.  Below screenshots gives the details.

                Screenshot1.png

                 Screenshot2.png

                 Screenshot3.png

A SAP SMARTFORM has been designed and developed for this. The following is the sample layout we developed.

                untitled.JPG

As the processing type is chosen as Method Call, an implementation automatically gets created in the BADI EXEC_METHODCALL_PPF with ID Z0EXECUTE. Write the following logic in the method ‘EXECUTE’ to send the document.

Retrieve the function module name of the SMARTFORM by calling the function module SSF_FUNCTION_MODULE_NAME and call the SMARTFORM with all the required importing and exporting parameter.

              

                   Screenshot5.png

                   Screenshot6.png

                    Screenshot7.png

  • Call the function module CONVERT_OTF as below to convert the SMARTFORM output OTF data to PDF format.

Exporting

Value

FORMAT

‘PDF’

Importing

Value

BIN-FILE

L_OUTPUT

TABLES

OTF

ES_JOB_OUTPUT_INFO-OTFDATA[]

LINES

I_PDF_DATA

                    Screenshot8.png

  • Call the method CREATE_DOCUMENT of class CL_DOCUMENT_BCS as below to create document.

     

Exporting

Value

I_TYPE

‘RAW’

I_SUBJECT

FAX SUBJECT

Receiving

Value

RESULT

LR_DOCUMENT

  • Call the method XSTRING_TO_SOLIX of class CL_DOCUMENT_BCS as below to convert SMARTFORM into SOLIX table.

Exporting

Value

IP_XSTRING

L_OUTPUT

Receiving

Value

RT_SOLIX

I_SOLIX

  • Call the method ADD_ATTACHMENT of document LR_DOCUMENT of type CL_DOCUMENT_BCS to add the content to the document.
  Exporting

Value

I_ATTACHMENT_TYPE

‘PDF’

I_ATTACHMENT_SUBJECT

‘Order Confirmation’

I_ATT_CONTENT_HEX

I_SOLIX

  • Call the method CREATE_PERSISTENT of class CL_BCS as below to create a send request.

Receiving

Value

RESULT

LR_BCS

  • Call the method SET_DOCUMENT of above created request LR_BCS as below to set the document LR_DOCUMENT

     

Exporting

Value

I_DOCUMENT

LR_DOCUMENT

  • Call the method CREATE of class CL_SAPUSER_BCS as below

Exporting

Value

I_USER

SY-UNAME

Receiving

Value

RESULT

L_SENDER

  • Set sender to the request LR_BCS by calling the method SET_SENDER as below.

     

Exporting

Value

I_SENDER

L_SENDER

  • Create recipient by call the method CREATE_FAX_ADDRESS of class CL_CAM_ADDRESS_BCS as below.

Exporting

Value

I_COUNTRY

I_FAX-COUNTRY

I_NUMBER

I_FAX-FAXNO

Receiving

Value

RESULT

L_RECIPIENT

  • Set recipient to the request LR_BCS by calling the method ADD_RECIPIENT as below.

     

Exporting

Value

I_RECIPIENT

L_RECIPIENT

  • Send fax request LR_BCS by calling the method SEND.

               Screenshot9.png

               Screenshot10.png

               Screenshot11.png

From the above section of coding, the recipient address or recipient can be identified based on the fax number and country maintained at master data level of business partner. This maintenance is a must to identify the recipient. Sender is someone who is using the system else can be set default by providing the SAP user id.

On successful document sent the request to send the document reaches outbox. Go to transaction code SOST. Below screenshot gives the same.

               what1.JPG

Complete details of the request including the document can be viewed on selecting the relevant options available under ‘Send Request’ in the workplace.

                what2.JPG

The status is indicated by a colored box in the first column and the relevant description is provided in the last column.

         

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply