[S/4HANA] Installation und Einrichtung von S/4HANA

Your S/4HANA environment – Part 1 – Maintenance Planner, System Installation and Update
Your S/4HANA environment – Part 2 – SAP NW Gateway and Fiori Launchpad
Your S/4HANA environment – Part 3 – Best Practices Content Activation
Your S/4HANA environment – Part 4 – Fact Sheet apps, Fiori Search and Web Dispatcher
Your S/4HANA environment – Part 5 – Upgrade to 1610
Your S/4HANA environment – Part 6 – Fully Activated Appliance on Microsoft Azure
Your S/4HANA environment – Part 7 – Fiori Launchpad SAML Single Sign-On with Azure AD

[ABAP] Data Aging: DB-Zugriffssteuerung für S/4HANA Data Aging

Variante 1 (cl_abap_stack_temperature)

* https://blogs.sap.com/2016/10/03/how-to-perform-data-aging-in-s4hana/
* Transaktion: DAGOBJ
*              DAGPTC

* Flag für Historische Daten
DATA(lv_cold_access) = abap_true.

* Datum für Aging
DATA: lv_data_temperature TYPE data_temperature.
lv_data_temperature = sy-datum - 30.

TRY.
* data aging möglich (von db unterstützt und aktivgeschaltet)?
    IF abap_true = cl_data_aging_state=>is_enabled(  ).
      IF abap_true = lv_cold_access.
* datenfilter setzen: alle daten sichtbar
        cl_abap_stack_temperature=>set_cold( ).
      ELSE.
        IF lv_data_temperature IS INITIAL.
* datenfilter setzen: nur hot-daten sichtbar
          cl_abap_stack_temperature=>set_hot( ).
        ELSE.
          cl_abap_stack_temperature=>set_temperature( lv_data_temperature ).
        ENDIF.
      ENDIF.
    ENDIF.
  CATCH cx_root INTO DATA(e_txt).
    WRITE: e_txt->get_text( ).
ENDTRY.

Variante 2 (cl_abap_session_temperature)

* https://blogs.sap.com/2016/10/03/how-to-perform-data-aging-in-s4hana/
* Transaktion: DAGOBJ
*              DAGPTC

* Flag für Historische Daten
DATA(lv_cold_access) = abap_true.

* Datum für Aging
DATA: lv_data_temperature TYPE data_temperature.
lv_data_temperature = sy-datum - 30.

TRY.
    DATA(o_ses) = cl_abap_session_temperature=>get_session_control( ).
* Data Aging möglich (von DB unterstützt und aktivgeschaltet)?
    IF abap_true = cl_data_aging_state=>is_enabled(  ).
      IF abap_true = lv_cold_access.
* Datenfilter setzen: Alle Daten sichtbar
        o_ses->set_cold( ).
      ELSE.
        IF lv_data_temperature IS INITIAL.
* Datenfilter setzen: Nur HOT-Daten sichtbar
          o_ses->set_hot( ).
        ELSE.
          o_ses->set_temperature( lv_data_temperature ).
        ENDIF.
      ENDIF.
    ENDIF.
  CATCH cx_root INTO DATA(e_txt).
    WRITE: e_txt->get_text( ).
ENDTRY.