cancel
Showing results for 
Search instead for 
Did you mean: 

Scrambling Type

Former Member
0 Kudos

Dear TDMS Experts,

Could you please advice, to which scrambling types can be assing following rules, as sample:

1) Land + 1. Entry -  select the first region, which belongs to selected country

2) KUNNR + "NAME"

is these no mapping type, or?

Thank you in advance!

Accepted Solutions (1)

Accepted Solutions (1)

jerrin_francis
Participant
0 Kudos

Hello,

Could you Please be more specific on the requirement,

What do you mean by LAND + 1 and KUNNR + "Name". ?

Please provide the following details so that we can suggest a solution,

  • The table fields that needs to be scrambled
  • What is the expected output of scrambling

Regards,

Jerrin


Former Member
0 Kudos

Hello Jerrin,

first of all thanks for feedback. I will try to answer.

  • The table fields that needs to be scrambled

For example:

Table          Table Field    

ADRP         PROFESSION

  • What is the expected output of scrambling:

PERSNUMBER + fixed value "PROFESSION"

An example for output:

22989 "PROFESSION"

The problem is that the first value (PERSNUMBER) each time is different.

The TDMS offers us 8 types of scrambling:

1. Define Value

2. Fixed Value

3. Manuall 1:1 Mapping

4. No Mapping

5. Number Conversion

6. Random Selection Table with 1 Column

7. Random Table for Time Periods

8. Value Range Table

Well, which of them can be used?

Thanks in advanced.

BR,

Ilkin

jerrin_francis
Participant
0 Kudos

Hello Ilkin,

For this requirement you have to use 'No Mapping' scrambling type while creating rule,

For creating a rule with 'NO Mapping' , we have to create an INCLUDE program which contains the Custom Scrambling Routines that is to be used for scrambling by the new rule.

For the above example, please refer the below include code,

*&---------------------------------------------------------------------*

*&  Include           ZCUST_INCLUDE

*&---------------------------------------------------------------------*

FORM scramble_adrp_profession USING p_rule_id
                                                      CHANGING p_value
                                                                        p_changed.

DATA : lv_value type char40.

FIELD-SYMBOLS : <lv_varkey> TYPE ANY.


  ASSIGN COMPONENT 'PERSNUMBER' OF STRUCTURE gd_original
    TO <lv_varkey>.

  IF sy-subrc = 0.

    CONCATENATE <lv_varkey> '"Profession"' INTO lv_value.

    IF sy-subrc = 0 .

      p_value = lv_value.
      p_changed = 'X'.

    ENDIF.

ENDIF.

ENDFORM.

Note:

  1. Please maintain the routine parameters (using and changing ) as shown above in the custom routine.
  2. gd_original contain the entire row of the table which the scrambling engine is scrambling, hence make sure to use the routine for only those table's which has the component (here PERSNUMBER )

Above routine gets the PERSNUMBER for gd_orginal  and concatenate "Profession" to it and assign the new value to changing parameter p_value, remaining scrambling is taken care by the engine.

After you create the include please proceed with the creation of rule ( use expert mode for creation),

  • In the table-fields tab, please give the new routine name for the table-fields  i.e. scramble_adrp_profession ( by default it will be SCRAMBLE_DATA ).
  • In the Include's tab, add the newly created include i.e. ZCUST_INCLUDE, and include type as 'P'.

Also refer the below link for information on rule creation or any scrambling objects,

http://scn.sap.com/docs/DOC-52263

Hope this answers your query.

Regards,

Jerrin


Former Member
0 Kudos

Hello Jerrin,

thank you very much.

Answers (0)