🧼[SAP BW] How to Remove Special Characters in Transformation


🇧🇷 Ver este post na versão em Português
Welcome!
By Felipe Lamounier, state of Minas Gerais, Brazil – powered by 🙂My Easy B.I.


In this article we will learn how to handle special characters in SAP BW with a simple Abap routine, using the function RSKC_ALLOWED_CHAR_GET.

Let’s also know the transaction RSKC (Maintaining the Permittd Extra Chars), used to check which special characters are enabled in the SAP BW system.



📑 Table of Contents:

  1. 🏁 Introduction to Permittd Extra Chars (RSKC)
  2. Transformation
    1. Start Routine
      1. Global Declaration
      2. Begin of Start Routine
    2. Field Routine
      1. Rule Details
      2. ABAP Routine
  3. ✅ Conclusion

🔭 See also Pages:
🏠Home Page
💡Blog


🏁 Introduction to Permittd Extra Chars (RSKC)

Not all character types are supported in SAP BW data loads. You can check which special characters are allowed using the transaction RSKC (Maintaining the Permittd Extra Chars).

tcode RSKC in SAP BW- Maintaining the Permittd Extra Chars
RSKC – Maintaining the Permittd Extra Chars

When a character is not allowed in BW, data load dump will occurs. To avoid the Data Load Dump, you can apply a simple ABAP Routine in the Start Routine and into Field Routine as shown below


Anúncios


Transformation

Start Routine

In Transformation, Create a Start Routine:

SAP BW Transformation: Start Routine
BW Transformation: Start Routine

In the initial routine, you first need to put a global declaration and then implement the code in the routine.

Global Declaration

Insert the code below in the global declaration:

DATA: v_allowed_char(200)     TYPE c,
      v_allowed_char_aux(200) TYPE c.
SAP BW Start Routine, Global Declaration with ABAP code declaring variable to allowed char
Start Routine, Global Declaration

Anúncios

Begin of Start Routine

Insert the code below in the routine, below of the block “begin of routine“:

    CLEAR: v_allowed_char, v_allowed_char_aux.

    CALL FUNCTION 'RSKC_ALLOWED_CHAR_GET'
      IMPORTING
        e_allowed_char = v_allowed_char.
*       E_DEFAULT_CHAR =
*       E_USERDEF_CHAR =

    v_allowed_char_aux = 'abcdefghijklmnopqrstuvwxyzáàâãäéèëêíìîïóòôõöúùüûçñ'.

    CONCATENATE v_allowed_char v_allowed_char_aux
    INTO v_allowed_char.
SAP BW Start Routine, Begin of Routine showing the ABAP code to do the routine
Start Routine, Begin of Routine

Anúncios

Field Routine

Rule Details

Enter into Rule Details and create an ABAP Routine

SAP BW Transformation, Rule Details, Abap Routine
Transformation, Rule Details, Abap Routine

ABAP Routine

Insert the code below in the routine, below of the block “begin of routine“:

⚠️ Insert the correct technical name in SOURCE_FIELDS-xxx

    RESULT = SOURCE_FIELDS-FieldName.

    WHILE RESULT CN v_allowed_char.
      result+sy-fdpos(1) = ' '.
      CONDENSE RESULT.
    ENDWHILE.

    IF result(1) = '#'.
      result(1) = ' '.
      CONDENSE RESULT.
    ENDIF.
SAP BW, Transformation, Rule Details, Abap Routine, Begin of Routine, showing the ABAP code in End Routine
Transformation, Rule Details, Abap Routine, Begin of Routine

Anúncios

✅ Conclusion

We learned an easy and simple way to clear special characters that are not allowed in the BW system and that cause data load dump, using an ABAP routine.

Keywords: SAP BW; RSKC_ALLOWED_CHAR_GET; replace special characters in bw with sap abap;

Did you like the content? Want to get more tips? Subscribe for free!



Follow on social media:


  • How to Find Deleted VTTK Transport in SAP ECC
    Bem Vindo! | Welcome! By Felipe Lamounier, Minas Gerais, Brasil🇧🇷 – powered by 🙂My Easy B.I. 📑 Table of Contents: Introduction In this post, we will learn how to identify which transports were deleted in SAP ECC. We will also see how this data is removed from the VTTK table over a specific period. InContinuar lendo “How to Find Deleted VTTK Transport in SAP ECC”
  • How to identify SAP BW Process Chains with Recurring Errors
    This post by Felipe Lamounier focuses on identifying recurring errors in Process Chains (RSPC) within SAP BW over a 65-day period. It provides a structured approach to filter and analyze execution logs, aimed at improving resource management and system efficiency by addressing improperly executed chains. The analysis concludes with recommendations for maintaining or removing chains based on error frequency.
  • How to Retrieve SAP Table Metadata Efficiently
    This post by Felipe Lamounier provides a guide on efficiently retrieving metadata from SAP table fields using transaction SE16 and the DD03M view. Key elements include data element, data type, field length, and descriptions. Additionally, the post lists important SAP system tables, enhancing understanding of SAP metadata extraction.

Um comentário em “🧼[SAP BW] How to Remove Special Characters in Transformation

Deixe um comentário