This case scenario cover requirements to add new fields & populate them via SLT to target structure .In this case we will populate the new fields with time-stamp for transfer behavior I (insert) & U (update).

  1. Execute T-Code LTRS:
  2. Select your MT-ID (Mass Transfer ID)
  3. Right click on table setting and click on Add Table to include your table name:
  4. Add your new fields to your table structure:

  • Define your new fields:

  • Save your new fields:

  • Right click on Rule Assignment then add your table name:

  • Click on create icon then select Field-Related Rule:

  • Enter one of your new fields: on target field:

  • Select the line created (double click) then include your table name in import parameter 1, Status = Released & your ABAP include program name (for the transformation):

Open a new session:

Via T-Code SE38 create an include ABAP program then copy and paste the following code:
DATA: lv_name(30) TYPE c.

FIELD-SYMBOLS: <ls_record>    TYPE any,
               <lv_operation> TYPE any,
               <lv_insert>    TYPE any,
               <lv_update>    TYPE any.

* get target structure
CONCATENATE ‘<WA_R_’ i_p1 ‘>’ INTO lv_name.
ASSIGN (lv_name) TO <ls_record>.

ASSIGN COMPONENT ‘IUUC_OPERAT_FLAG’ OF STRUCTURE <ls_record> TO <lv_operation>.

IF sy-subrc = 0.
  CASE <lv_operation>.
    WHEN ‘I’.
*** set additional target fields
* set insert timestamp
      ASSIGN COMPONENT ‘INSERT_TS’ OF STRUCTURE <ls_record> TO <lv_insert>.
      IF sy-subrc = 0.
        GET TIME STAMP FIELD <lv_insert>.
      ENDIF.

    WHEN ‘U’.
* set update time stamp
      ASSIGN COMPONENT ‘UPDATE_TS’ OF STRUCTURE <ls_record> TO <lv_update>.
      IF sy-subrc = 0.
        GET TIME STAMP FIELD <lv_update>.
      ENDIF.
  ENDCASE.
ENDIF.

 

Save your configuration in LTRS then continue with your process to Load / Replicate your table via t-code LTRC or via HANA Studio.

Regards,
Roger Rodriguez
SAP – HANA CoE NA

To report this post you need to login first.

3 Comments

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

  1. Jalina Vincent

    Thank Roger for creating the wonderful document.

    Can you please provide some inputs on how to extract data for the new field in same table. And need to extract history data for the new field.

    Thanks.

     

    (0) 
  2. Roger Rodriguez Post author

    Hi Jalina,

    Usually it will be populated automatically after you save & activate your transformations.

    The most common case is the reload the table.

    Regards,

    Roger

    (0) 

Leave a Reply