วันศุกร์ที่ 3 กันยายน พ.ศ. 2553

Program ABAP : zbot_exchangerate : get_mapping

<< transform_excel

*&---------------------------------------------------------------------*
*&      Form  GET_MAPPING
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form get_mapping .


  select
    a~mandt
    a~waers
    a~kurst
    a~datetype
    a~currtype
    b~ffact
    b~tfact
  from zcm001_exchange as a
  inner join tcurf as b
    on a~kurst = b~kurst
   and a~waers = b~fcurr
  into table gi_map
  where b~tcurr = 'THB'.
  if sy-subrc eq 0.

    sort gi_map by waers.
    loop at gi_map.
      r_waers-sign = 'I'.
      r_waers-option = 'EQ'.
      r_waers-low = gi_map-waers.
      read table r_waers with key low = gi_map-waers.
      if sy-subrc ne 0.
        append r_waers.
      endif.
    endloop.
  endif.
endform.                    " GET_MAPPING

<< transform_excel 

ไม่มีความคิดเห็น:

แสดงความคิดเห็น