[ Using the Customer Feedback functionality for Service Desk ]

SAP allows for direct call creation from any satellite SAP system into Solution Mananger Service Desk.
This guide will show you not only how to implement this functionality but also how enhance it fo a real world scenario.

In this scenario the SAP Solution Manger Service Desk functionality has already been implemented and it has now been identified that the business would like to allow for end users to log their own SAP calls.

The first step is to implement the standard SAP Customer Feedback functionality.

To do this we run transaction SM30 and enter table name BCOS_CUST. In this table we will be adding the RFC destination that will be used to create the service desk calls in the Solution Manager system.
This is important as it highlights that the RFC destination should have a fixed system user eliminating the need to create every end user in the solution manager system.

As the contents of the BCOS_CUST table is transportable it is recommended to specify an RFC destination with a generic name that does not indicate the type of system (i.e. dev, test, prod)

An example RFC name could be "ServiceDesk" so the next step is to create the RFC destination using transaction SM59.
Take note of the UserID within the RFC destination as it will have to be created as a user and a business partner with the correct identification will have to be created. this will be further explained below.

Now that the standard configration is complete for the Customer Feedback functionality we can do our first test.
To do this simply go to the "Help" menu and select "Create Support Message". Alternatively you can double click on the SAP logo.

It can be seen that the call creation popup dialog box has some functionality that you might not want an end user to have access to.
In our scenario the business did not want the end user to be able to change the component or the call priority. This brings us to the next section which will enhance the standard functionality.

There are a areas that we will need to enhance, the first will be the call creation screen as well as the "send" function module (BCOS function group) and the second will be a BADI that will allow us to default the call priority and/or component if required.

To create an implementation of the BADI call transaction SE19

Select "Classic BAdI" and enter SBCOS001, then select the create implementation button as shown above.

Below is the code that should be placed in the BAdi implementation. The first section shows how the call priority can be set and how a default SAP component can be added if none was found.
*   Method attributes.                                                   *
Instantiation: Public

* Set Prority to 4

CV_PRIO = '4'.

if CV_COMPON is initial.


This secton of ABAP code has been taken from a SAP note and allows the system to run an SU53 (authorisation check) everytime a call is created from a remote SAP system
The results of the authorisation check will be automatically added to the service desk call comments.
  CONSTANTS: c_(2) TYPE c VALUE '-'.
   TYPES: BEGIN OF ty_text_line,
            line(72) TYPE c,
          END OF ty_text_line,
          BEGIN OF ty_int_line,
             field TYPE xufield,
             value TYPE xuval,
          END OF ty_int_line,
          ty_text_tab TYPE TABLE OF ty_text_line,
          ty_int_tab TYPE TABLE OF ty_int_line.
   DATA:  lt_text     TYPE ty_text_tab,
          ls_text     TYPE ty_text_line,
          inttab      TYPE ty_int_tab,
          ls_inttab   TYPE ty_int_line,
          ls_usr07    TYPE usr07,
          ls_tobjt    TYPE tobjt,
          ls_tobct    TYPE tobct,
          ls_tobj     TYPE tobj.
   DATA:   BEGIN OF usr07key,
             objct TYPE xuobject,
             fiel0 TYPE xufield,
             fiel1 TYPE xufield,
             fiel2 TYPE xufield,
             fiel3 TYPE xufield,
             fiel4 TYPE xufield,
             fiel5 TYPE xufield,
             fiel6 TYPE xufield,
             fiel7 TYPE xufield,
             fiel8 TYPE xufield,
             fiel9 TYPE xufield,
           END OF usr07key.

   DATA:   BEGIN OF usr07val1,
             val01 TYPE xuval,
             val02 TYPE xuval,
             val03 TYPE xuval,
             val04 TYPE xuval,
             val05 TYPE xuval,
             val06 TYPE xuval,
           END OF usr07val1.

   DATA:   BEGIN OF usr07val2,
             val07 TYPE xuval,
             val08 TYPE xuval,
             val09 TYPE xuval,
             val10 TYPE xuval,
           END OF usr07val2.

   DATA: field TYPE xufield,
         number TYPE i VALUE 0,
         value TYPE xuval,
         strlng TYPE i,
         lv_str TYPE string,
         rc LIKE sy-subrc.

   DATA:   fattr TYPE dfies.

   DO 72 TIMES.
     CONCATENATE lv_str
            INTO lv_str.
   APPEND lv_str TO lt_text.

   GET PARAMETER ID 'XU2' FIELD usr07val1.
   GET PARAMETER ID 'XU7' FIELD usr07val2.

   IF usr07key-objct = space.
     APPEND 'All security authorisations have been successful'(001)
TO lt_text.
     APPEND 'The following authorisation objects have been checked:'(002) TO
     CLEAR ls_text.
     APPEND ls_text TO lt_text.
     SELECT SINGLE * FROM tobjt INTO ls_tobjt
            WHERE langu  = sy-langu
            AND   object = usr07key-objct.
     IF sy-subrc <> 0.
       ls_tobjt-ttext = usr07key-objct.
     MOVE 'Object'(003) TO ls_text.
     MOVE usr07key-objct TO ls_text+13.
     MOVE ls_tobjt-ttext TO ls_text+23.
     APPEND ls_text TO lt_text.
* Objektklasse zu geprüftem Objekt
    SELECT  SINGLE * FROM tobj INTO ls_tobj WHERE objct = usr07key-objct
     DATA: klasse TYPE xuobjclass.
     klasse =  ls_tobj-oclss.
     SELECT SINGLE * FROM tobct INTO ls_tobct
          WHERE  oclss = klasse
            AND  langu = sy-langu.
     MOVE 'Object Class'(004) TO ls_text.
     MOVE klasse TO ls_text+13.
     MOVE ls_tobct-ctext TO ls_text+23.
     APPEND ls_text TO lt_text.
     CLEAR ls_text.
     APPEND ls_text TO lt_text.
    CLEAR: number, inttab.
     DO 10 TIMES VARYING field FROM usr07key-fiel0 NEXT usr07key-fiel1.
       IF field <> space.
         number = number + 1.
         ls_inttab-field = field.
         CASE number.
           WHEN 1.
             ls_inttab-value = usr07val1-val01.
           WHEN 2.
             ls_inttab-value = usr07val1-val02.
           WHEN 3.
             ls_inttab-value = usr07val1-val03.
           WHEN 4.
             ls_inttab-value = usr07val1-val04.
           WHEN 5.
             ls_inttab-value = usr07val1-val05.
           WHEN 6.
             ls_inttab-value = usr07val1-val06.
           WHEN 7.
             ls_inttab-value = usr07val2-val07.
           WHEN 8.
             ls_inttab-value = usr07val2-val08.
           WHEN 9.
             ls_inttab-value = usr07val2-val09.
           WHEN 10.
             ls_inttab-value = usr07val2-val10.
         APPEND ls_inttab TO inttab.
     SORT inttab.
     MOVE 'Feld'(005) TO ls_text+5.
     MOVE 'Value'(006) TO ls_text+40.
     APPEND ls_text TO lt_text.
     clear ls_text.
     append ls_text to lt_text.
     LOOP AT inttab INTO ls_inttab.
           fieldname = ls_inttab-field
           datel     = fattr-rollname
           lng       = fattr-outputlen
           rc        = rc
           text      = fattr-fieldtext
           inttype   = fattr-inttype.
       MOVE fattr-fieldtext TO ls_text+5.
       IF ls_inttab-value <> space.
         WRITE ls_inttab-value TO ls_text+40.
         WRITE '<DUMMY>'(007) TO ls_text+40.
       APPEND ls_text TO lt_text.
*    WRITE: / 'Im Stammsatz vorhandene Berechtigungen zum Objekt:'(008).
*    PERFORM show_user(saplsusr)
*      USING uname usr07key-objct space space space space space space.
   pai_text[] = lt_text[].

Activate the BAdi.

Now it is time to modify the SAP standard create call screen.

Run transaction SE80

Function Group: BCOS
Screen: 0100

When prompted for an access key, go to service market place and registerthe object to obtain a key.

This screenshot shows the call creation screen with the component fieldmodified to display only and also the priority field has been hidden.
This why when an end user attempts to create a call from a remote SAP system they willnot be able to modified either the priority or SAP component.

The next step is to make some changes to the BCOS_SEND_MSG function module within the BCOS function group.
This change depends on how your service desk system is configured and what data you want configured by default.
In this scenario we needed to default the code, codegroup and category as shown below.