Tag Archives: conversion

ABAP useful info, pages, videos

Creating QR code in ABAP
https://www.youtube.com/watch?v=DQdKnmon8II

System Conversion to SAP S/4HANA (Part 1), #SAP TechEd Lecturehttps://www.youtube.com/watch?v=X78G2n5ttR0

SAP SD – EDI/ALEhttps://www.youtube.com/watch?v=Y0QoXFa_Yo4&list=PLJumA3phskPHjbd-dsViJ1Kg8L7AKZdDT&index=33

Output Configuration and Determination in SAP SD
https://www.erpdb.info/output-configuration-determination-sap-sd/

Convert SAP C4C timestamp / date field to ABAP timestamp, date and time

In SAP C4C the date/time fields are usually coming in the following format
/Date(1681862400000)/

This 1681862400000 number is actually a seconds since fixed date. You can use the following code to convert a string from C4C to ABAP timestamp (data type TIMESTAMP = DEC15).
In variable LV_ABAP_TS is the value in TIMESTAMP format, and in LV_DATE and LV_TIME you have the date and time respectively in ABAP format too.

  lv_c4c_time = '/Date(1681862400000)/'.
  lv_len = strlen( lv_c4c_time ).
  IF lv_len < 8.
    write: / 'error_converting'.
    exit.
  ENDIF.

  IF substring( val = lv_c4c_time off = 0 len = 6 ) EQ '/Date('.
    DATA(lv_last2) = lv_len - 2.
    IF substring( val = lv_c4c_time off = lv_last2 len = 2 ) EQ ')/'.
      lv_last2 = lv_last2 - 6.
      lv_c4c_time = substring( val = iv_c4c_time off = 6 len = lv_last2 ).
    ELSE.
      write: / 'error_converting'.
      exit.
    ENDIF.
  ENDIF.

  CALL METHOD cl_pco_utility=>convert_java_timestamp_to_abap
    EXPORTING
      iv_timestamp = lv_c4c_time
    IMPORTING
      ev_date      = lv_date
      ev_time      = lv_time
      ev_msec      = lv_msec.

  CONVERT DATE lv_date TIME lv_time 
    INTO TIME STAMP lv_abap_ts 
    TIME ZONE 'UTC'.

If you are wondering what’s inside “convert_java_timetamp_to_abap” method:

METHOD convert_java_timestamp_to_abap.
  DATA:
    lv_date        TYPE sy-datum,
    lv_days_i      TYPE i,
    lv_sec_i       TYPE i,
    lv_timestamp   TYPE timestampl,
    lv_timsmsec    TYPE timestampl.
  CONSTANTS:
    lc_day_in_sec TYPE i VALUE 86400.

* IV_TIMESTAMP stores milliseconds since January 1, 1970, 00:00:00 GMT
  lv_timestamp = iv_timestamp / 1000.   "timestamp in seconds
* One day has 86400 seconds: Timestamp in days
  lv_days_i    = lv_timestamp DIV lc_day_in_sec.
  lv_date      = '19700101'.
  ev_date     = lv_date + lv_days_i.
* Rest seconds (timestamp - days)
  lv_sec_i    = lv_timestamp MOD lc_day_in_sec.
  ev_time     = lv_sec_i.
* Rest sec and milli seconds
  lv_timsmsec  = lv_timestamp MOD lc_day_in_sec.
  lv_timsmsec  = lv_timsmsec - lv_sec_i.
  ev_msec      = lv_timsmsec * 1000.

ENDMETHOD.

SAP HANA versions and year of release

Some info about the conversion from SAP ERP 6.0 to S/4 HANA 2022 I used recently and find it useful.

There was times and years where you can easily check you SAP ERP version by going in the SAP GUI menu: System -> Status -> SAP System data. And by reading certain component version you have the info. Like below:

2016SAP ERP 6.0 EHP8NetWeaver 7.5 (7.50)6.182027
2016SAP S/4 HANA 1610NetWeaver 7.51 (7.51)S4CORE 1012021
2017SAP S/4 HANA 1709NetWeaver 7.52 (7.52)S4CORE 1022022
2018SAP S/4 HANA 1809NetWeaver 7.53(7.53)S4CORE 1032023
2019SAP S/4 HANA 1909NetWeaver 7.54(7.54)S4CORE 1042024
2020SAP S/4 HANA 2020NetWeaver 7.55(7.55)S4CORE 1052025
2021SAP S/4 HANA 2021NetWeaver 7.56(7.56)S4CORE 1062026
2022SAP S/4 HANA 2022NetWeaver 7.57(7.57)S4CORE 1072027
http://saphanadb.com/?p=2941 – Know your version. It helps

Check this article: https://answers.sap.com/questions/707755/how-can-i-see-if-my-sap-s4-is-a-1709-or-a-1809-rel.html

The problem I faced in recent S/4 version 2022 this does not work anymore. And as in the article someone said “This screen does not appear any more in 1909 release…

More info how to restrict info in the System / Status in OSS Note: 2658772 – System -> Status: Restriction of the available information

The solution is to view the versions of SAP / HANA / ABAP using Function Module: OCS_UI_DISPLAY_PATCH_LEVEL in SE37. Once you know the S4CORE version you can check above what exactly is you HANA release.


A collection of good articles about the ERP to S4 conversion


SAP S/4HANA System Conversion – Custom code adaptation process (by Olga Dolinskaja)

https://blogs.sap.com/2017/02/15/sap-s4hana-system-conversion-custom-code-adaptation-process/


Check your customer specific ABAP code via ABAP Test Cockpit (ATC) for compatibility with SAP S/4HANA as described in SAP note 2190420.

See also OSS Note 2241080 – SAP S/4HANA: Content for checking customer specific code.