{"id":1295,"date":"2023-05-14T11:49:35","date_gmt":"2023-05-14T08:49:35","guid":{"rendered":"https:\/\/moito.com\/blog\/?p=1295"},"modified":"2023-05-16T00:22:00","modified_gmt":"2023-05-15T21:22:00","slug":"abap-useful-info-pages-videos","status":"publish","type":"post","link":"https:\/\/moito.com\/blog\/abap-useful-info-pages-videos\/","title":{"rendered":"ABAP useful info, pages, videos"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p>Creating <strong>QR code in ABAP <\/strong><br><a href=\"https:\/\/www.youtube.com\/watch?v=DQdKnmon8II\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.youtube.com\/watch?v=DQdKnmon8II <\/a><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>System Conversion to SAP S\/4HANA (Part 1)<\/strong>, <strong>#SAP TechEd Lecture<\/strong> &#8211; <a rel=\"noreferrer noopener\" href=\"https:\/\/www.youtube.com\/watch?v=X78G2n5ttR0\" target=\"_blank\">https:\/\/www.youtube.com\/watch?v=X78G2n5ttR0  <\/a><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>SAP SD &#8211; EDI\/ALE<\/strong> &#8211; <a href=\"https:\/\/www.youtube.com\/watch?v=Y0QoXFa_Yo4&amp;list=PLJumA3phskPHjbd-dsViJ1Kg8L7AKZdDT&amp;index=33\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.youtube.com\/watch?v=Y0QoXFa_Yo4&amp;list=PLJumA3phskPHjbd-dsViJ1Kg8L7AKZdDT&amp;index=33<\/a><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Output Configuration<\/strong> and Determination in <strong>SAP SD<\/strong><br><a rel=\"noreferrer noopener\" href=\"https:\/\/www.erpdb.info\/output-configuration-determination-sap-sd\/\" target=\"_blank\">https:\/\/www.erpdb.info\/output-configuration-determination-sap-sd\/<\/a><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Convert SAP C4C timestamp \/ date field to ABAP timestamp, date and time<\/strong> <\/p>\n\n\n\n<p>In SAP C4C the date\/time fields are usually coming in the following format<br>\/Date(1681862400000)\/<\/p>\n\n\n\n<p>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).<br>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.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">  lv_c4c_time = '\/Date(1681862400000)\/'.\n  lv_len = strlen( lv_c4c_time ).\n  IF lv_len &lt; 8.\n    write: \/ 'error_converting'.\n    exit.\n  ENDIF.\n\n  IF substring( val = lv_c4c_time off = 0 len = 6 ) EQ '\/Date('.\n    DATA(lv_last2) = lv_len - 2.\n    IF substring( val = lv_c4c_time off = lv_last2 len = 2 ) EQ ')\/'.\n      lv_last2 = lv_last2 - 6.\n      lv_c4c_time = substring( val = iv_c4c_time off = 6 len = lv_last2 ).\n    ELSE.\n      write: \/ 'error_converting'.\n      exit.\n    ENDIF.\n  ENDIF.\n\n  CALL METHOD cl_pco_utility=>convert_java_timestamp_to_abap\n    EXPORTING\n      iv_timestamp = lv_c4c_time\n    IMPORTING\n      ev_date      = <strong>lv_date<\/strong>\n      ev_time      = <strong>lv_time<\/strong>\n      ev_msec      = <strong>lv_msec<\/strong>.\n\n  CONVERT DATE lv_date TIME lv_time \n    INTO TIME STAMP <strong>lv_abap_ts<\/strong> \n    TIME ZONE 'UTC'.<\/pre>\n\n\n\n<p>If you are wondering what&#8217;s inside &#8220;convert_java_timetamp_to_abap&#8221; method:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">METHOD convert_java_timestamp_to_abap.\n  DATA:\n    lv_date        TYPE sy-datum,\n    lv_days_i      TYPE i,\n    lv_sec_i       TYPE i,\n    lv_timestamp   TYPE timestampl,\n    lv_timsmsec    TYPE timestampl.\n  CONSTANTS:\n    lc_day_in_sec TYPE i VALUE 86400.\n\n* IV_TIMESTAMP stores milliseconds since January 1, 1970, 00:00:00 GMT\n  lv_timestamp = iv_timestamp \/ 1000.   \"timestamp in seconds\n* One day has 86400 seconds: Timestamp in days\n  lv_days_i    = lv_timestamp DIV lc_day_in_sec.\n  lv_date      = '19700101'.\n  ev_date     = lv_date + lv_days_i.\n* Rest seconds (timestamp - days)\n  lv_sec_i    = lv_timestamp MOD lc_day_in_sec.\n  ev_time     = lv_sec_i.\n* Rest sec and milli seconds\n  lv_timsmsec  = lv_timestamp MOD lc_day_in_sec.\n  lv_timsmsec  = lv_timsmsec - lv_sec_i.\n  ev_msec      = lv_timsmsec * 1000.\n\nENDMETHOD.\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Creating QR code in ABAP https:\/\/www.youtube.com\/watch?v=DQdKnmon8II System Conversion to SAP S\/4HANA (Part 1), #SAP TechEd Lecture &#8211; https:\/\/www.youtube.com\/watch?v=X78G2n5ttR0 SAP SD &#8211; EDI\/ALE &#8211; https:\/\/www.youtube.com\/watch?v=Y0QoXFa_Yo4&amp;list=PLJumA3phskPHjbd-dsViJ1Kg8L7AKZdDT&amp;index=33 Output Configuration and Determination in SAP SDhttps:\/\/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 &hellip; <a href=\"https:\/\/moito.com\/blog\/abap-useful-info-pages-videos\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">ABAP useful info, pages, videos<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,10],"tags":[625,579,622,590,624,582,619,589,621,580,620,623,546,618],"class_list":["post-1295","post","type-post","status-publish","format-standard","hentry","category-1","category-10","tag-date","tag-abap","tag-c4c","tag-conversion","tag-convert","tag-output-determination","tag-qrcode","tag-s-4-hana","tag-sap-sd","tag-sd","tag-system-conversion","tag-timestamp","tag-tips","tag-useful"],"_links":{"self":[{"href":"https:\/\/moito.com\/blog\/wp-json\/wp\/v2\/posts\/1295","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/moito.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/moito.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/moito.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/moito.com\/blog\/wp-json\/wp\/v2\/comments?post=1295"}],"version-history":[{"count":9,"href":"https:\/\/moito.com\/blog\/wp-json\/wp\/v2\/posts\/1295\/revisions"}],"predecessor-version":[{"id":1341,"href":"https:\/\/moito.com\/blog\/wp-json\/wp\/v2\/posts\/1295\/revisions\/1341"}],"wp:attachment":[{"href":"https:\/\/moito.com\/blog\/wp-json\/wp\/v2\/media?parent=1295"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/moito.com\/blog\/wp-json\/wp\/v2\/categories?post=1295"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/moito.com\/blog\/wp-json\/wp\/v2\/tags?post=1295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}