SOLMAN – Mail Forms Custom Enhancement Guide

SOLMAN – Mail Forms Custom Enhancement Guide
How to add new fields in Mail Forms?

Let’s dive deep into the SOLMAN – Mail Forms Custom Enhancement Guide. SOLMAN is an extremely strong framework. Many group use it for documentation and task arranging. Numerous client use it for transport and change the board framework as well. In one of our past articles, we told the best way to make a custom Fiori Application for change the executives in SOLMAN.

Today, we will investigate the SOLMAN – Mail Forms Custom Enhancement Guide or Mail Structures which is utilized in the episode the executives region. In this instructional exercise, we will figure out how to add anAother specially documented in MailForm Characteristic classification for Trait setting.

What are Mail Forms?

Allow me to attempt to make sense of it in as basic sentences as could really be expected. In SOLMAN framework we make Episode or Ticket for the client demands. Whenever episode is made or changed in the framework there is a programmed mail that will be set off. This warning is finished with the assistance of mail structures.

Who gets the mail from SOLMAN?

Every one of the partners of the specific occurrence/ticket should get the mail. In short the beneath clients get the mail:

  1. Message processor
  2. Contact person
  3. Reported by

What is the t-code to create Incident in SOLMAN?

SM_CRM is the exchange utilized for making Occurrences.

Contingent upon the SOLMAN settings, SM_CRM Arrangement Supervisor IT Administration The board will open in SAP GUI meeting or it will open in discrete site page connect in web adventurer (chrome or other default internet browsers).

When the occurrence is made, it would look like beneath.

Mail will be conveyed to concern individual or group.

Example of a real mail for the generated incident.

Mail will be set off in above design.

However, clients are an alternate variety of human. They would normally be not happy with what the standard SAP give. For our situation, the business prerequisite was to have arrangement to send Long Message Log with the verifiable refreshed toward the finish of the mail.

Advisors all through the world flourish in view of improvement and customization demands like this. We want to thank our clients for such learning and working open doors. . I’m not kidding.

An example log of the occurrence.

In any case, arrangement isn’t straight forward.

For ABAP engineers, the sky is the limit. You put a prerequisite, you would get an answer. Some of the time the plan is enhanced and smooth while on occasion the designers take a filthy course to meet the business need.

For our situation, we can accomplished this by utilizing Mail Structures with some ABAP upgrades.

Expecting, we have finished our improvement. The episode alarms after complete of the change would like underneath with expansion of Text log (Long depiction).

How did we achieve it?

Have persistence. I will show you bit by bit, how to upgrade the Mail Structures in SOLMAN.

Step 1

For our model, the custom field is added for Property Setting “Administration Solicitation Ascribes”.

This Help Solicitation Ascribes utilizes administrations Trait Class “SRQ Standard Credits”.

SRQ Standard Ascribes thusly utilizes the standard design “CRMS_SRQM_GEN_FIELDS”.

In the construction CRMS_SRQM_GEN_FIELDS, attach the necessary fields utilizing annex structure.

We made the add structure ZZCRM_SRQM_TEXT_LOG with area ZSTRING and information type String to acknowledge long text values.

Step 2

When the expected field is added to the construction CRMS_SRQM_GEN_FIELDS, go to the t-code SM_CRM.

In the left board, click on Assistance Tasks (featured previously).

Presently click on Mail Structures and Quest for Mail Structure ID.

For our case, we are accomplishing for Z_MESSAGE_PROCESSOR. Select the Mail Structure ID you need to upgrade.

Presently we want to add the custom field at the expected spot. To add the new spot holder, click on Trait as displayed underneath.

In the following screen look for our field, however here we can’t track down specialized name. We want to look through in light of the depiction we provided for the information component. For us the field name is “Text Log”.

Select the field with Text Log and snap on Supplement button.

Place the new field at the ideal situation as exhibited underneath.

Step 3

The design and position of new field is finished. Presently we want to execute the BADI: “CRM_IM_ADD_DATA_BADI”. This BADI works for Keep up with Extra Ascribes for Mail Structures Quality Settings. It is channel subordinate, so we really want to choose required Trait Setting and Type.

In the Trait Setting select Assistance Solicitation and Type SQM.

Execute the BADI.

In the strategy CRM_IM_BPSELE, We really want to compose our rationale to adjust the qualities to populate long text values for Text Log.

Fundamentally, we want to alter the inward table CT_ATT_VALUES. This inner table have two fields:

Name (which holds the names of the additional field via the Post office Structures id).

Esteem (which holds the upsides of the fields).

We really want to change this table just for the CTT_ATT_VALUES-NAME = “CRMS_SRQM_GEN_FIELDS-ZZTEXT_LOG”.

Then alter the CTT_ATT_VALUES-VALUES = “with regarded required data”.

As may be obvious, field Worth Information Type is STRING, this is the explanation while making custom field for Text Log we have involved String as Information Type. You may be enticed to utilize roast 255 and it could work. However, you actually risk shortening the characters assuming that they surpass.

Since Text Logs are free texts, it is the most secure wagered to utilize STRING.

How to modify internal table CT_ATT_VALUES?

We really want to Circle at CT_ATT_VALUES. As referenced before, we want to adjust just for the TEXT LOG field “CRMS_SRQM_GEN_FIELDS-ZZTEXT_LOG”.

Underneath code bit can be utilized for reference.

All the Long Text (Text Log subtleties) we have perused utilizing FM “CRM_DNO_READ_ORDER_TEXT”.

We really want to pass GUID of the Article id (only Occurrence number).

We can get GUID from table TABLE: CRMD_ORDERADM_H

Then loop at LT_ALLTEXTS (which holds the long text).

Here we have added Text Log just for SU01 (Answer), SU99 (Portrayal), SUSO (Arrangement). You might troubleshoot and check what different codes you might get for the Text Log.

To peruse the text we really want to utilize the widely popular FM”READ_TEXT” and pass Text ID, Language, Name, Article.

These values are readily available in LT_ALLTEXTS.
LT_ALLTEXTS-STXH-TDID
LT_ALLTEXTS-STXH-TDNAME,
Object will be CRM_ORDERH.
Language you know. 

Retrieve the Text Id description from table TTXIT

For Text ID description please check below screen shot.

Loop the LT_LINE retrieved from READ_TEXT FM and modify the CT_ATT_VALUES-VALUE.

At the point when we use string all values will be imprinted in single line like underneath.

In any case, you don’t need a bunched passage. You need space and great organization.

 

How to format the string values?

To stay away from this, we utilize the order Link and Isolated BY CL_ABAP_CHAR_UTILITIES=>CR_LF. Don’t bother referencing, this order makes new line (it is like return, enter key).

After using CL_ABAP_CHAR_UTILITIES=>CR_LF, the paragraph looks better.

Complete Code:

METHOD if_ex_crm_im_add_data_badi~crm_im_bpsele.
   DATA : lt_alltexts TYPE comt_text_textdata_t.
    DATA : lv_id     TYPE thead-tdid,
          lv_lang   TYPE  thead-tdspras VALUE 'EN',
          lv_name   TYPE thead-tdname,
          lv_object TYPE  thead-tdobject VALUE 'CRM_ORDERH',
          lt_line   TYPE TABLE OF tline, 
          lv_string TYPE string,
          lv_string2 TYPE string,
          lv_string3 TYPE string.
 
 *--> loop the ct_att_values will have all the fields whhich described in mailforms
     LOOP AT ct_att_values ASSIGNING FIELD-SYMBOL(<line>).
 **** change the value for the long text(CRMS_SRQM_GEN_FIELDS-ZZTEXT_LOG) field and modify the values with required data ****
       CASE <line>-name.
         WHEN 'CRMS_SRQM_GEN_FIELDS-ZZTEXT_LOG'.
 
 *--> Get the HEADER GUID from table CRMD_ORDERADM_H based on CRMS_SRQM_GEN_FIELDS-CRM_SRQM_NUMBER(OBJECT ID)
      READ TABLE ct_att_values INTO DATA(ls_att_value) WITH KEY name = 'CRMS_SRQM_GEN_FIELDS-CRM_SRQM_NUMBER'.
      IF sy-subrc = 0.
      SELECT SINGLE guid FROM crmd_orderadm_h INTO @DATA(lv_guid)
       WHERE object_id = @ls_att_value-value.
 
 *--> get the order text id from FM
      CALL FUNCTION 'CRM_DNO_READ_ORDER_TEXT'
        EXPORTING
         iv_header_guid          = lv_guid
       IMPORTING
         et_alltexts             = lt_alltexts.
 *--> LT_ALLTEXT will contain all the text ids which maintained in incident
      LOOP AT lt_alltexts ASSIGNING FIELD-SYMBOL(<fs_alltexts>).
 *--> Add text ids values only for the SU01(REPLY) SU99(DESCRIPTION) SUSO(SOLUTION)
       IF <fs_alltexts>-stxh-tdid = 'SU01' OR <fs_alltexts>-stxh-tdid = 'SU99' OR <fs_alltexts>-stxh-tdid = 'SUSO'.
 
        lv_id   = <fs_alltexts>-stxh-tdid.
        lv_name = <fs_alltexts>-stxh-tdname.
        CALL FUNCTION 'READ_TEXT'
          EXPORTING
            client                        = sy-mandt
            id                            = lv_id
            language                      = lv_lang
            name                          = lv_name
            object                        = lv_object
          TABLES
            lines                         = lt_line
         EXCEPTIONS
           id                            = 1
           language                      = 2
           name                          = 3
           not_found                     = 4
           object                        = 5
           reference_check               = 6
           wrong_access_to_archive       = 7
           OTHERS                        = 8.
        IF sy-subrc <> 0.
 * Implement suitable error handling here
        ENDIF.
 *--> Get the Text ID description from TTXIT tables
        SELECT SINGLE tdtext FROM ttxit INTO @DATA(lv_desc)
         WHERE tdspras  = @lv_lang
           AND tdobject = @lv_object
           AND tdid     = @<fs_alltexts>-stxh-tdid.
 
 *--> Date
        CONCATENATE <fs_alltexts>-stxh-tdfdate+6(2) <fs_alltexts>-stxh-tdfdate+4(2) <fs_alltexts>-stxh-tdfdate+0(4)
                    INTO DATA(lv_date) SEPARATED BY '.'.
 *--> Time
        CONCATENATE <fs_alltexts>-stxh-tdftime+0(2) <fs_alltexts>-stxh-tdftime+2(2) <fs_alltexts>-stxh-tdftime+4(2)
                    INTO DATA(lv_time) SEPARATED BY ':'.
 *--> Date Time User
        CONCATENATE lv_date lv_time <fs_alltexts>-stxh-tdfuser
                    INTO DATA(lv_date_user) SEPARATED BY space.
 
        CONCATENATE lv_desc lv_date_user INTO lv_string SEPARATED BY cl_abap_char_utilities=>cr_lf.
        LOOP AT lt_line INTO DATA(ls_line).
          CONCATENATE lv_string2 ls_line-tdline INTO lv_string2 SEPARATED BY cl_abap_char_utilities=>cr_lf.
        ENDLOOP.
        CONCATENATE <line>-value lv_string lv_string2 INTO <line>-value SEPARATED BY cl_abap_char_utilities=>cr_lf.
        lv_string3 = '------------------------------------------------------------------------------------------------------'.
        CONCATENATE <line>-value lv_string3 INTO <line>-value SEPARATED BY cl_abap_char_utilities=>cr_lf.
 
        REFRESH lt_line.
        CLEAR : lv_string, lv_string2, lv_string3, ls_line, lv_desc, lv_id,
                lv_name, lv_date_user, lv_string2, lv_date, lv_time.
        ENDIF.
       ENDLOOP. 
      ENDIF.
        ENDCASE. 
     ENDLOOP. 
   ENDMETHOD.

That is all there is to it. You are finished. Presently request that you entrepreneur make the episode and get the Message Sign in the email. Advise them to send an appreciation mail for you to your detailing administrator. Remember to exhibit this upgrade in your quarterly execution survey meeting with your director. This improvement isn’t no problem. Truly.

On a serious note, I needed to work a few late evenings to make it happen. It could look straightforward now subsequent to going through this article “SOLMAN – Mail Forms Custom Enhancement Guide”. In any case, accept me, it wasn’t so much that that simple when it was doled out to me.

 

YOU MAY LIKE THIS

Top SAP ABAP Interview Questions (2024)
SAP Fiori – Flow Chart to Enhance Standard SAP Fiori App

SAP ABAP Interview Questions Real time Expectations

Mastering the Basics of SAP ABAP: A Comprehensive Guide

 

WhatsApp WhatsApp us