Posted By

qrist0ph on 07/22/10


Tagged

abap


Versions (?)

Timestamp Manipulations


 / Published in: Other
 

  1. REPORT ZCA_ICM_TIMESTAMP.
  2.  
  3. data lv_dochd TYPE zins_dochd.
  4. data lv_ts type p.
  5. data l_tstamp_out type p.
  6.  
  7. select * from zins_dochd into lv_dochd where doc_id = '0000001000'.
  8.  
  9. TRY.
  10. lv_ts = lv_dochd-UPD_TIMESTAMP.
  11. CALL METHOD cl_abap_tstmp=>add
  12. EXPORTING
  13. tstmp = lv_ts
  14. secs = -21600
  15. RECEIVING
  16. r_tstmp = l_tstamp_out.
  17. CATCH cx_parameter_invalid_range .
  18. WRITE 'invalid range'.
  19. EXIT.
  20. CATCH cx_parameter_invalid_type .
  21. WRITE 'invalid type'.
  22. EXIT.
  23.  
  24. ENDTRY.
  25. lv_dochd-UPD_TIMESTAMP = l_tstamp_out.
  26. UPDATE zins_dochd from lv_dochd.
  27.  
  28. ENDSELECT.

Report this snippet  

You need to login to post a comment.