Change the PO amount to PO value

HI ABAP expert,
Sorry because i'm not expert in ABAP. I got this ABAP program for Open PO in SDN,
can anyone help me to change the
> PO Amount change to PO Value
> GR/SE Amount Change to GR Value
> IR AMount Change to IR Value
> Outstanding change to Value Outstanding
report zaprropo message-id zm no standard page heading line-size 212
                                                       line-count 65.
TABLES------------------------------------------------------------*
tables:
      ekko,                            " Purchasing Document Header
      ekpo,                            " Purchasing Document Item
      ekbe,                            " History of PurchasingDocument
      essr.                            " Service Entry Sheet HeaderData
DATA--------------------------------------------------------------*
data  : begin of it_ekko occurs 0,
         ebeln like ekko-ebeln,
         ernam like ekko-ernam,
         ekgrp like ekko-ekgrp,
         bedat like ekko-bedat,
       end of it_ekko.
data  : begin of it_ekbe_gr occurs 0,
          ebeln like ekbe-ebeln,
          ebelp like ekbe-ebelp,
          bewtp like ekbe-bewtp,
          dmbtr like ekbe-dmbtr,
        end of it_ekbe_gr.
data  : begin of it_ekbe_ir occurs 0,
          ebeln like ekbe-ebeln,
          ebelp like ekbe-ebelp,
         bewtp LIKE ekbe-bewtp,
          dmbtr like ekbe-dmbtr,
        end of it_ekbe_ir.
data  : begin of it_output occurs 0,
          ekgrp like ekko-ekgrp,
          ebeln like ekko-ebeln,
          ebelp like ekpo-ebelp,
          ernam like ekko-ernam,
          afnam like ekpo-afnam,
          bedat like ekko-bedat,
          txz01 like ekpo-txz01,
         bewtp LIKE ekbe-bewtp,
          netwr like ekpo-netwr,
          dmbtr like ekbe-dmbtr,
          iramt like ekbe-dmbtr,
          outst like ekpo-netwr,
          eindt like eket-eindt,
         effwr LIKE ekpo-effwr,
        end of it_output.
data  :  begin of it_title occurs 0,
           h11(5),
           h0(5),
           h1(13),
           h2(7),
           h3(15),
           h4(15),
           h5(10),
           h6(40),
           h7(20),
           h8(20),
           h9(20),
           h10(20),
           h12(10),
         end of it_title.
data : flength.
data : s_no type i value 1.
---- Added by Gopi
Internal table for PO / WO Delivery Date
data : begin of it_eket occurs 0,
         ebeln like eket-ebeln,
         ebelp like eket-ebelp,
         eindt like eket-eindt,
       end of it_eket.
selections
selection-screen : skip.
selection-screen : begin of block block1 with frame title text-001.
parameters : s_bukrs like ekko-bukrs.
select-options :  s_ebeln for ekko-ebeln,
                  s_bedat for ekko-bedat,
                  s_ekgrp for ekko-ekgrp.
                 s_hdg   for ekko-ekgrp.
selection-screen : end of block block1.
selection-screen begin of block btch with frame title text-003.
parameters: excel as checkbox,
            file(128) type c.
selection-screen end of block btch.
selection-screen begin of block block2 with frame title text-002.
parameters: asat as checkbox,
            p_date like sy-datum.
selection-screen end of block block2.
--AT SELECTION-SCREEN--
at selection-screen.
at selection-screen on value-request for file.
  perform get_file_name using file.
main program code**************************************************
start-of-selection.
  it_title-h11 = 'S.No'.
  it_title-h0  = 'Group'.
  it_title-h1  = 'PO Number'.
  it_title-h2  = 'PO Item'.
  it_title-h3  = 'PO Creator'.
  it_title-h4  = 'Requisitor'.
  it_title-h5  = 'PO Date'.
  it_title-h6  = 'PO Short Text'.
  it_title-h7  = 'PO Amount'.
  it_title-h8  = 'GR/SE Amount'.
  it_title-h9  = 'IR Amount'.
  it_title-h10 = 'Outstanding'.
  it_title-h12 = 'Del. Date'.
  append it_title.
  perform extract_po_details_new.                           "20070814
  perform extract_po_history_new.                           "20070814
  perform calculate_outstanding_new.                        "20070814
end-of-selection.
  perform display_report.
  if excel = 'X'.
    perform download.
  endif.
---- Added by Gopi
top-of-page.
  perform page_heading.
display_report ****************************
form display_report.
it_title-h11 = 'S.No'.
it_title-h0  = 'Group'.
it_title-h1  = 'PO Number'.
it_title-h2  = 'PO Item'.
it_title-h3  = 'PO Creator'.
it_title-h4  = 'Requisitor'.
it_title-h5  = 'PO Date'.
it_title-h6  = 'PO Short Text'.
it_title-h7  = 'PO Amount'.
it_title-h8  = 'GR/SE Amount'.
it_title-h9  = 'IR Amount'.
it_title-h10 = 'Outstanding'.
it_title-h12 = 'Del Date'.
APPEND it_title.
WRITE : / 'Outstanding PO Listing Report'.
ULINE.
FORMAT COLOR COL_HEADING.
WRITE : /1   it_title-h11,
          7   it_title-h0,
          14  it_title-h1,
          29  it_title-h2,
          38  it_title-h3,
          53  it_title-h4,
          68  it_title-h5,
          79  it_title-h6,
          122 it_title-h7,
          142 it_title-h8,
          162 it_title-h9,
          182 it_title-h10,
          202 it_title-h12.
FORMAT COLOR OFF.
ULINE.
If Output table is not empty
  if not it_output[] is initial.
    loop at it_output.
      on change of it_output-ebeln.
        uline.
        write : /1(5)  s_no, 6 sy-vline,
                 7  it_output-ekgrp,
                14  it_output-ebeln,
                29  it_output-ebelp,
                38  it_output-ernam,
                53  it_output-afnam,
                68  it_output-bedat,
                79  it_output-txz01,
                122 it_output-netwr,
                142 it_output-dmbtr,
                162 it_output-iramt,
                182 it_output-outst,
                202 it_output-eindt.
        s_no = s_no + 1.
      else.
        write :/6 sy-vline,
                29  it_output-ebelp,
                38  it_output-ernam,
                53  it_output-afnam,
                68  it_output-bedat,
                79  it_output-txz01,
                122 it_output-netwr,
                142 it_output-dmbtr,
                162 it_output-iramt,
                182 it_output-outst,
                202 it_output-eindt.
      endon.
     WRITE :/6 sy-vline.
      clear : it_output.
    endloop.
  else.
If Output table is empty
    format color 5 intensified on.
   write : / 'No outstanding report generated for the purchasing group'
              ,s_ekgrp-low, 'to', s_ekgrp-high,'for the period'
              ,s_bedat-low, 'to', s_bedat-high.
    format color off.
  endif.
endform.
download*********************************
form download.
  data: begin of it_download_header occurs 1,
           h0(5),
           h1(13),
           h2(7),
           h3(15),
           h4(15),
           h5(10),
           h6(40),
           h7(20),
           h8(20),
           h9(20),
           h10(20),
           h12(10).
  data: end of it_download_header.
  it_download_header-h0  = 'Group'.
  it_download_header-h1  = 'PO Number'.
  it_download_header-h2  = 'PO Item'.
  it_download_header-h3  = 'PO Creator'.
  it_download_header-h4  = 'Requisitor'.
  it_download_header-h5  = 'PO Date'.
  it_download_header-h6  = 'PO Short Text'.
  it_download_header-h7  = 'PO Amount'.
  it_download_header-h8  = 'GR/SE Amount'.
  it_download_header-h9  = 'IR Amount'.
  it_download_header-h10 = 'Outstanding'.
  it_download_header-h12 = 'Del. Date'.
  append it_download_header.
  call function 'WS_DOWNLOAD'
       exporting
            codepage            = 'IBM'
            filename            = file
            filetype            = 'DAT'
       importing
            filelength          = flength
       tables
            data_tab            = it_download_header
       exceptions
            file_open_error     = 1
            file_write_error    = 2
            invalid_filesize    = 3
            invalid_table_width = 4
            invalid_type        = 5.
  call function 'WS_DOWNLOAD'
       exporting
            codepage            = 'IBM'
            filename            = file
            filetype            = 'DAT'
            mode                = 'A'
       importing
            filelength          = flength
       tables
            data_tab            = it_output
       exceptions
            file_open_error     = 1
            file_write_error    = 2
            invalid_filesize    = 3
            invalid_table_width = 4
            invalid_type        = 5.
  if sy-subrc ne 0.
    message e999 with 'error downloading file :' file.
  endif.
endform.
*&      Form  get_file_name
      text
     -->P_P_FNAME  text
form get_file_name using    p_fname.
  call function 'WS_FILENAME_GET'
       exporting
            def_filename     = p_fname
            mask             = ',.,..'
            mode             = 'S'
       importing
            filename         = p_fname
       exceptions
            inv_winsys       = 1
            no_batch         = 2
            selection_cancel = 3
            selection_error  = 4
            others           = 5.
endform.                    " get_file_name
*&      Form  page_heading
      text
-->  p1        text
<--  p2        text
form page_heading.
it_title-h11 = 'S.No'.
it_title-h0  = 'Group'.
it_title-h1  = 'PO Number'.
it_title-h2  = 'PO Item'.
it_title-h3  = 'PO Creator'.
it_title-h4  = 'Requisitor'.
it_title-h5  = 'PO Date'.
it_title-h6  = 'PO Short Text'.
it_title-h7  = 'PO Amount'.
it_title-h8  = 'GR/SE Amount'.
it_title-h9  = 'IR Amount'.
it_title-h10 = 'Outstanding'.
it_title-h12 = 'Del. Date'.
APPEND it_title.
  write : / 'Outstanding PO Listing Report'.
  uline.
  format color col_heading.
  write : /1   it_title-h11,
       7   it_title-h0,
       14  it_title-h1,
       29  it_title-h2,
       38  it_title-h3,
       53  it_title-h4,
       68  it_title-h5,
       79  it_title-h6,
       122 it_title-h7,
       142 it_title-h8,
       162 it_title-h9,
       182 it_title-h10,
       202 it_title-h12.
  format color off.
  uline.
endform.                    " page_heading
*&      Form  EXTRACT_PO_DETAILS_NEW
      text
-->  p1        text
<--  p2        text
form extract_po_details_new.
  data: begin of it_po occurs 0,
    ebeln like ekko-ebeln,
    ebelp like ekpo-ebelp,
    ernam like ekko-ernam,
    ekgrp like ekko-ekgrp,
    bedat like ekko-bedat,
    txz01 like ekpo-txz01,
    netwr like ekpo-netwr,
    afnam like ekpo-afnam,
    effwr like ekpo-effwr.
  data: end of it_po.
  refresh it_output.
  if not p_date is initial.
    select aebeln bebelp aernam aekgrp abedat btxz01 b~netwr
       bafnam beffwr
    into corresponding fields of table it_po
    from ekpo as b inner join ekko as a
    on bebeln = aebeln
    where a~bukrs = s_bukrs  and
        a~aedat le p_date  and
        a~ebeln in s_ebeln and
        a~bedat in s_bedat and
        a~ekgrp in s_ekgrp and
        a~frgke ne 'E'     and
        b~loekz not in ('L', 'S', 'X').
  else.
    select aebeln bebelp aernam aekgrp abedat btxz01 b~netwr
       bafnam beffwr
    into corresponding fields of table it_po
    from ekpo as b inner join ekko as a
    on bebeln = aebeln
    where a~bukrs = s_bukrs  and
        a~ebeln in s_ebeln and
        a~bedat in s_bedat and
        a~ekgrp in s_ekgrp and
        a~frgke ne 'E'     and
        b~loekz not in ('L', 'S', 'X').
  endif.
  sort it_po by ebeln ebelp.
  delete adjacent duplicates from it_po.
  delete it_po where ekgrp eq 'HDB' and ebelp eq 10.    "20070814
  delete it_po where ebeln+0(1) eq '6'.
  loop at it_po.
    move-corresponding it_po to it_output.
    append it_output.
    clear it_output.
  endloop.
  refresh it_po.
  free it_po.
endform.                    " EXTRACT_PO_DETAILS_NEW
*&      Form  EXTRACT_PO_HISTORY_NEW
      text
-->  p1        text
<--  p2        text
form extract_po_history_new.
  data: begin of it_ekbe occurs 2000,
          ebeln like ekbe-ebeln,
          ebelp like ekbe-ebelp,
          bewtp like ekbe-bewtp,
          shkzg like ekbe-shkzg,
          dmbtr like ekbe-dmbtr.
  data: end of it_ekbe.
  check not it_output[] is initial.
  select * into corresponding fields of table it_ekbe
    from ekbe for all entries in it_output
    where ebeln = it_output-ebeln and
          ebelp = it_output-ebelp and
          bewtp in ('E', 'N', 'Q', 'R', 'X').
  loop at it_ekbe.
    if it_ekbe-bewtp = 'E'.          "GET GR AMT
      move it_ekbe-ebeln to it_ekbe_gr-ebeln.
      move it_ekbe-ebelp to it_ekbe_gr-ebelp.
      move it_ekbe-bewtp to it_ekbe_gr-bewtp.
      if it_ekbe-shkzg = 'H'.
        it_ekbe_gr-dmbtr = it_ekbe-dmbtr * ( -1 ).
      else.
        it_ekbe_gr-dmbtr = it_ekbe-dmbtr.
      endif.
      collect it_ekbe_gr.
    else.                              "GET IR AMT
   ELSEIF IT_EKBE-BEWTP = 'N' OR     "GET IR AMT
          IT_EKBE-BEWTP = 'Q' OR
          IT_EKBE-BEWTP = 'R' OR
          IT_EKBE-BEWTP = 'X'.
      move it_ekbe-ebeln to it_ekbe_ir-ebeln.
      move it_ekbe-ebelp to it_ekbe_ir-ebelp.
      if it_ekbe-shkzg = 'H'.
        it_ekbe_ir-dmbtr = it_ekbe-dmbtr * ( -1 ).
      else.
        it_ekbe_ir-dmbtr = it_ekbe-dmbtr.
      endif.
      collect it_ekbe_ir.
    endif.
  endloop.
  refresh it_ekbe.
  free it_ekbe.
endform.                    " EXTRACT_PO_HISTORY_NEW
*&      Form  CALCULATE_OUTSTANDING_NEW
      text
-->  p1        text
<--  p2        text
form calculate_outstanding_new.
DATA: BEGIN OF IT_EKET OCCURS 10000,
         EBELN LIKE EKET-EBELN,
         EBELP LIKE EKET-EBELP,
         EINDT LIKE EKET-EINDT.
DATA: END OF IT_EKET.
  sort: it_ekbe_gr, it_ekbe_ir.
  sort it_output by ebeln ebelp.
  loop at it_output.
    read table it_ekbe_gr with key ebeln = it_output-ebeln
                                   ebelp = it_output-ebelp.
    if sy-subrc = 0.
      move it_ekbe_gr-dmbtr to it_output-dmbtr.
    endif.
    read table it_ekbe_ir with key ebeln = it_output-ebeln
                                   ebelp = it_output-ebelp.
    if sy-subrc = 0.
      move it_ekbe_ir-dmbtr to it_output-iramt.
    endif.
    if it_output-iramt gt it_output-netwr.
      delete it_output. " where iramt gt it_output-netwr.
      clear : it_output.
      continue.
    endif.
    if it_output-ekgrp eq 'HDB'.
      if it_output-netwr = it_output-iramt.
        delete it_output.
        clear it_output.
      else.
        it_output-outst = it_output-netwr - it_output-iramt.
        modify it_output.
      endif.
    else.
      if it_output-netwr = it_output-dmbtr.
        if it_output-dmbtr = it_output-iramt.
          delete it_output.
          clear it_output.
        else.
          it_output-outst = it_output-netwr - it_output-iramt.
          modify it_output.
        endif.
      else.
        if it_output-netwr = it_output-iramt.
          delete it_output.
          clear it_output.
        else.
          it_output-outst = it_output-netwr - it_output-iramt.
          modify it_output.
        endif.
      endif.
    endif.
  endloop.
  sort it_output by ebeln ebelp.
  check not it_output[] is initial.
  select * into corresponding fields of table it_eket
    from eket for all entries in it_output
    where ebeln = it_output-ebeln and
          ebelp = it_output-ebelp.
  sort it_eket by ebeln ebelp.
  loop at it_output.
    read table it_eket with key ebeln = it_output-ebeln
                                ebelp = it_output-ebelp.
    if sy-subrc = 0.
      it_output-eindt = it_eket-eindt.
    else.
      clear it_output-eindt.
    endif.
    modify it_output.
  endloop.
  sort it_output by ekgrp ebeln ebelp.
endform.                    " CALCULATE_OUTSTANDING_NEW

report zaprropo message-id zm no standard page heading line-size 212
line-count 65.
TABLES------------------------------------------------------------*
tables:
ekko, " Purchasing Document Header
ekpo, " Purchasing Document Item
ekbe, " History of PurchasingDocument
essr. " Service Entry Sheet HeaderData
DATA--------------------------------------------------------------*
data : begin of it_ekko occurs 0,
ebeln like ekko-ebeln,
ernam like ekko-ernam,
ekgrp like ekko-ekgrp,
bedat like ekko-bedat,
end of it_ekko.
data : begin of it_ekbe_gr occurs 0,
ebeln like ekbe-ebeln,
ebelp like ekbe-ebelp,
bewtp like ekbe-bewtp,
dmbtr like ekbe-dmbtr,
end of it_ekbe_gr.
data : begin of it_ekbe_ir occurs 0,
ebeln like ekbe-ebeln,
ebelp like ekbe-ebelp,
bewtp LIKE ekbe-bewtp,
dmbtr like ekbe-dmbtr,
end of it_ekbe_ir.
data : begin of it_output occurs 0,
ekgrp like ekko-ekgrp,
ebeln like ekko-ebeln,
ebelp like ekpo-ebelp,
ernam like ekko-ernam,
afnam like ekpo-afnam,
bedat like ekko-bedat,
txz01 like ekpo-txz01,
bewtp LIKE ekbe-bewtp,
netwr like ekpo-netwr,
dmbtr like ekbe-dmbtr,
iramt like ekbe-dmbtr,
outst like ekpo-netwr,
eindt like eket-eindt,
effwr LIKE ekpo-effwr,
end of it_output.
data : begin of it_title occurs 0,
h11(5),
h0(5),
h1(13),
h2(7),
h3(15),
h4(15),
h5(10),
h6(40),
h7(20),
h8(20),
h9(20),
h10(20),
h12(10),
end of it_title.
data : flength.
data : s_no type i value 1.
---- Added by Gopi
Internal table for PO / WO Delivery Date
data : begin of it_eket occurs 0,
ebeln like eket-ebeln,
ebelp like eket-ebelp,
eindt like eket-eindt,
end of it_eket.
selections
selection-screen : skip.
selection-screen : begin of block block1 with frame title text-001.
parameters : s_bukrs like ekko-bukrs.
select-options : s_ebeln for ekko-ebeln,
s_bedat for ekko-bedat,
s_ekgrp for ekko-ekgrp.
s_hdg for ekko-ekgrp.
selection-screen : end of block block1.
selection-screen begin of block btch with frame title text-003.
parameters: excel as checkbox,
file(128) type c.
selection-screen end of block btch.
selection-screen begin of block block2 with frame title text-002.
parameters: asat as checkbox,
p_date like sy-datum.
selection-screen end of block block2.
--AT SELECTION-SCREEN--
at selection-screen.
at selection-screen on value-request for file.
perform get_file_name using file.
main program code**************************************************
start-of-selection.
it_title-h11 = 'S.No'.
it_title-h0 = 'Group'.
it_title-h1 = 'PO Number'.
it_title-h2 = 'PO Item'.
it_title-h3 = 'PO Creator'.
it_title-h4 = 'Requisitor'.
it_title-h5 = 'PO Date'.
it_title-h6 = 'PO Short Text'.
it_title-h7 = 'PO value'.
it_title-h8 = 'GR/SE Amount'.
it_title-h9 = 'IR value'.
it_title-h10 = 'value Outstanding'.
it_title-h12 = 'Del. Date'.
append it_title.
perform extract_po_details_new. "20070814
perform extract_po_history_new. "20070814
perform calculate_outstanding_new. "20070814
end-of-selection.
perform display_report.
if excel = 'X'.
perform download.
endif.
---- Added by Gopi
top-of-page.
perform page_heading.
display_report ****************************
form display_report.
it_title-h11 = 'S.No'.
it_title-h0 = 'Group'.
it_title-h1 = 'PO Number'.
it_title-h2 = 'PO Item'.
it_title-h3 = 'PO Creator'.
it_title-h4 = 'Requisitor'.
it_title-h5 = 'PO Date'.
it_title-h6 = 'PO Short Text'.
it_title-h7 = 'PO value'.
it_title-h8 = 'GR value'.
it_title-h9 = 'IR Amount'.
it_title-h10 = 'Outstanding'.
it_title-h12 = 'Del Date'.
APPEND it_title.
WRITE : / 'Outstanding PO Listing Report'.
ULINE.
FORMAT COLOR COL_HEADING.
WRITE : /1 it_title-h11,
7 it_title-h0,
14 it_title-h1,
29 it_title-h2,
38 it_title-h3,
53 it_title-h4,
68 it_title-h5,
79 it_title-h6,
122 it_title-h7,
142 it_title-h8,
162 it_title-h9,
182 it_title-h10,
202 it_title-h12.
FORMAT COLOR OFF.
ULINE.
If Output table is not empty
if not it_output[] is initial.
loop at it_output.
on change of it_output-ebeln.
uline.
write : /1(5) s_no, 6 sy-vline,
7 it_output-ekgrp,
14 it_output-ebeln,
29 it_output-ebelp,
38 it_output-ernam,
53 it_output-afnam,
68 it_output-bedat,
79 it_output-txz01,
122 it_output-netwr,
142 it_output-dmbtr,
162 it_output-iramt,
182 it_output-outst,
202 it_output-eindt.
s_no = s_no + 1.
else.
write :/6 sy-vline,
29 it_output-ebelp,
38 it_output-ernam,
53 it_output-afnam,
68 it_output-bedat,
79 it_output-txz01,
122 it_output-netwr,
142 it_output-dmbtr,
162 it_output-iramt,
182 it_output-outst,
202 it_output-eindt.
endon.
WRITE :/6 sy-vline.
clear : it_output.
endloop.
else.
If Output table is empty
format color 5 intensified on.
write : / 'No outstanding report generated for the purchasing group'
,s_ekgrp-low, 'to', s_ekgrp-high,'for the period'
,s_bedat-low, 'to', s_bedat-high.
format color off.
endif.
endform.
download*********************************
form download.
data: begin of it_download_header occurs 1,
h0(5),
h1(13),
h2(7),
h3(15),
h4(15),
h5(10),
h6(40),
h7(20),
h8(20),
h9(20),
h10(20),
h12(10).
data: end of it_download_header.
it_download_header-h0 = 'Group'.
it_download_header-h1 = 'PO Number'.
it_download_header-h2 = 'PO Item'.
it_download_header-h3 = 'PO Creator'.
it_download_header-h4 = 'Requisitor'.
it_download_header-h5 = 'PO Date'.
it_download_header-h6 = 'PO Short Text'.
it_download_header-h7 = 'PO Amount'.
it_download_header-h8 = 'GR value'.
it_download_header-h9 = 'IR value'.
it_download_header-h10 = ' value Outstanding'.
it_download_header-h12 = 'Del. Date'.
append it_download_header.
call function 'WS_DOWNLOAD'
exporting
codepage = 'IBM'
filename = file
filetype = 'DAT'
importing
filelength = flength
tables
data_tab = it_download_header
exceptions
file_open_error = 1
file_write_error = 2
invalid_filesize = 3
invalid_table_width = 4
invalid_type = 5.
call function 'WS_DOWNLOAD'
exporting
codepage = 'IBM'
filename = file
filetype = 'DAT'
mode = 'A'
importing
filelength = flength
tables
data_tab = it_output
exceptions
file_open_error = 1
file_write_error = 2
invalid_filesize = 3
invalid_table_width = 4
invalid_type = 5.
if sy-subrc ne 0.
message e999 with 'error downloading file :' file.
endif.
endform.
*& Form get_file_name
text
-->P_P_FNAME text
form get_file_name using p_fname.
call function 'WS_FILENAME_GET'
exporting
def_filename = p_fname
mask = ',.,..'
mode = 'S'
importing
filename = p_fname
exceptions
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
others = 5.
endform. " get_file_name
*& Form page_heading
text
--> p1 text
<-- p2 text
form page_heading.
it_title-h11 = 'S.No'.
it_title-h0 = 'Group'.
it_title-h1 = 'PO Number'.
it_title-h2 = 'PO Item'.
it_title-h3 = 'PO Creator'.
it_title-h4 = 'Requisitor'.
it_title-h5 = 'PO Date'.
it_title-h6 = 'PO Short Text'.
it_title-h7 = 'PO Amount'.
it_title-h8 = 'GR value '.
it_title-h9 = 'IR value'.
it_title-h10 = 'value Outstanding'.
it_title-h12 = 'Del. Date'.
APPEND it_title.
write : / 'Outstanding PO Listing Report'.
uline.
format color col_heading.
write : /1 it_title-h11,
7 it_title-h0,
14 it_title-h1,
29 it_title-h2,
38 it_title-h3,
53 it_title-h4,
68 it_title-h5,
79 it_title-h6,
122 it_title-h7,
142 it_title-h8,
162 it_title-h9,
182 it_title-h10,
202 it_title-h12.
format color off.
uline.
endform. " page_heading
*& Form EXTRACT_PO_DETAILS_NEW
text
--> p1 text
<-- p2 text
form extract_po_details_new.
data: begin of it_po occurs 0,
ebeln like ekko-ebeln,
ebelp like ekpo-ebelp,
ernam like ekko-ernam,
ekgrp like ekko-ekgrp,
bedat like ekko-bedat,
txz01 like ekpo-txz01,
netwr like ekpo-netwr,
afnam like ekpo-afnam,
effwr like ekpo-effwr.
data: end of it_po.
refresh it_output.
if not p_date is initial.
select aebeln bebelp aernam aekgrp abedat btxz01 b~netwr
bafnam beffwr
into corresponding fields of table it_po
from ekpo as b inner join ekko as a
on bebeln = aebeln
where a~bukrs = s_bukrs and
a~aedat le p_date and
a~ebeln in s_ebeln and
a~bedat in s_bedat and
a~ekgrp in s_ekgrp and
a~frgke ne 'E' and
b~loekz not in ('L', 'S', 'X').
else.
select aebeln bebelp aernam aekgrp abedat btxz01 b~netwr
bafnam beffwr
into corresponding fields of table it_po
from ekpo as b inner join ekko as a
on bebeln = aebeln
where a~bukrs = s_bukrs and
a~ebeln in s_ebeln and
a~bedat in s_bedat and
a~ekgrp in s_ekgrp and
a~frgke ne 'E' and
b~loekz not in ('L', 'S', 'X').
endif.
sort it_po by ebeln ebelp.
delete adjacent duplicates from it_po.
delete it_po where ekgrp eq 'HDB' and ebelp eq 10. "20070814
delete it_po where ebeln+0(1) eq '6'.
loop at it_po.
move-corresponding it_po to it_output.
append it_output.
clear it_output.
endloop.
refresh it_po.
free it_po.
endform. " EXTRACT_PO_DETAILS_NEW
*& Form EXTRACT_PO_HISTORY_NEW
text
--> p1 text
<-- p2 text
form extract_po_history_new.
data: begin of it_ekbe occurs 2000,
ebeln like ekbe-ebeln,
ebelp like ekbe-ebelp,
bewtp like ekbe-bewtp,
shkzg like ekbe-shkzg,
dmbtr like ekbe-dmbtr.
data: end of it_ekbe.
check not it_output[] is initial.
select * into corresponding fields of table it_ekbe
from ekbe for all entries in it_output
where ebeln = it_output-ebeln and
ebelp = it_output-ebelp and
bewtp in ('E', 'N', 'Q', 'R', 'X').
loop at it_ekbe.
if it_ekbe-bewtp = 'E'. "GET GR AMT
move it_ekbe-ebeln to it_ekbe_gr-ebeln.
move it_ekbe-ebelp to it_ekbe_gr-ebelp.
move it_ekbe-bewtp to it_ekbe_gr-bewtp.
if it_ekbe-shkzg = 'H'.
it_ekbe_gr-dmbtr = it_ekbe-dmbtr * ( -1 ).
else.
it_ekbe_gr-dmbtr = it_ekbe-dmbtr.
endif.
collect it_ekbe_gr.
else. "GET IR AMT
ELSEIF IT_EKBE-BEWTP = 'N' OR "GET IR AMT
IT_EKBE-BEWTP = 'Q' OR
IT_EKBE-BEWTP = 'R' OR
IT_EKBE-BEWTP = 'X'.
move it_ekbe-ebeln to it_ekbe_ir-ebeln.
move it_ekbe-ebelp to it_ekbe_ir-ebelp.
if it_ekbe-shkzg = 'H'.
it_ekbe_ir-dmbtr = it_ekbe-dmbtr * ( -1 ).
else.
it_ekbe_ir-dmbtr = it_ekbe-dmbtr.
endif.
collect it_ekbe_ir.
endif.
endloop.
refresh it_ekbe.
free it_ekbe.
endform. " EXTRACT_PO_HISTORY_NEW
*& Form CALCULATE_OUTSTANDING_NEW
text
--> p1 text
<-- p2 text
form calculate_outstanding_new.
DATA: BEGIN OF IT_EKET OCCURS 10000,
EBELN LIKE EKET-EBELN,
EBELP LIKE EKET-EBELP,
EINDT LIKE EKET-EINDT.
DATA: END OF IT_EKET.
sort: it_ekbe_gr, it_ekbe_ir.
sort it_output by ebeln ebelp.
loop at it_output.
read table it_ekbe_gr with key ebeln = it_output-ebeln
ebelp = it_output-ebelp.
if sy-subrc = 0.
move it_ekbe_gr-dmbtr to it_output-dmbtr.
endif.
read table it_ekbe_ir with key ebeln = it_output-ebeln
ebelp = it_output-ebelp.
if sy-subrc = 0.
move it_ekbe_ir-dmbtr to it_output-iramt.
endif.
if it_output-iramt gt it_output-netwr.
delete it_output. " where iramt gt it_output-netwr.
clear : it_output.
continue.
endif.
if it_output-ekgrp eq 'HDB'.
if it_output-netwr = it_output-iramt.
delete it_output.
clear it_output.
else.
it_output-outst = it_output-netwr - it_output-iramt.
modify it_output.
endif.
else.
if it_output-netwr = it_output-dmbtr.
if it_output-dmbtr = it_output-iramt.
delete it_output.
clear it_output.
else.
it_output-outst = it_output-netwr - it_output-iramt.
modify it_output.
endif.
else.
if it_output-netwr = it_output-iramt.
delete it_output.
clear it_output.
else.
it_output-outst = it_output-netwr - it_output-iramt.
modify it_output.
endif.
endif.
endif.
endloop.
sort it_output by ebeln ebelp.
check not it_output[] is initial.
select * into corresponding fields of table it_eket
from eket for all entries in it_output
where ebeln = it_output-ebeln and
ebelp = it_output-ebelp.
sort it_eket by ebeln ebelp.
loop at it_output.
read table it_eket with key ebeln = it_output-ebeln
ebelp = it_output-ebelp.
if sy-subrc = 0.
it_output-eindt = it_eket-eindt.
else.
clear it_output-eindt.
endif.
modify it_output.
endloop.
sort it_output by ekgrp ebeln ebelp.
endform. " CALCULATE_OUTSTANDING_NEW

Similar Messages

  • Indirect evaluation, 2 change the default amount against a wagetype in IT8

    Hi Experts,
    After providing the paysccale str in IT0008 the default wagetype for stipend is coming along with its amount (in change mode ) but when i am chnaging the amount and trying to save it the amount regains that default value. My requirement is I should be able to change the default amount comimg and then save it.
    How it is possible.
    Regards,
    Tomesh

    Hi,
    Go to table V_T511 for the wagetype. Tick the Rewritable field. This will allow your INVAL to be chnages in IT0008
    Regards,
    Devojit

  • Change the Purchase Order : Item - Conditions value

    Hi,
    How to change the Purchase Order : Item - Conditions value.
    In my PO, Item conditions shows the SKTO - Cash Discount value is 0. I want to change the Discount value 10.
    How can i change it??

    Hi,
    Goto the Transaction code MN05 and give the CONDITION TYPE SKTO and change the value
    MN05 is the Transaction code for Purchase order  condition types.
    Please check and revert back if you need more details.
    regards,
    santosh

  • Can I change the pressure amount of a brush line –drawn by mouse pen- after I drew it?

    Hey everybody,
    I am using illustrator for doing some calligraphy and I am not really experienced with this program. I am using a mouse pen with pressure to draw/write calligraphies. My question is, can I change the pressure amount after I drew lines using brush tool. Let’s say I drew a line, it is good but still not satisfactory. I just want to do a little change in pressure amount in some segments –not all the line- on line. Does illustrator give me this option?
    Thank you very much!

    Kind of possible with Width tool(shift+w).
    MOEASK wrote:
    Why this is a plugin on illustrator? it should come with the prgram, is not the illustrator master of vector graphic programs!?!
    It happens in every adobe product.

  • Change the invoice amount

    Dear experts
          i have a customer invoice its amount is 18000.and posted also
    *my question
    i want to change the 18000 to 20000 .is it possible.
          i don't want to reverse this truncation
    Thanks in Advance
      Ajeesh.s

    Hello,
    Once the document got posted you can't change the ammount of that document. if you want to re-post the document with different ammount best optioon would be reverse the this document by posting a document with the equal  ammount with nagative value and then post you new document with correct ammount.
    you can post document using either t-code FB01.
    Regards,
    Mangal Modi

  • Need to change the Sort field(kna1-sortl) value

    Hi All,
    We have the requirement to fill the Search Term   (kna1-sortl) based the accounting group and 'kunnr' value.
    I.e as per the legacy system number range in brazil we need fill the sortl field based on accoung goup by concating the kunnr value to it.
    for Ex: 2GXXXXX0 this number need to filled in sortl field.
    where 'X' is repplaced by kunnr value.'2' and '0' are the constant values.Based on accounting group after value '2' we need to add either 'g' or  'S'.
    We find one user exit 'EXIT_SAPMF02D_001' but which does not contain the kna1 as the change perameter.
    kindly help me on it .if there is any other badi

    Hi,
    There is no std user-exit for this (at least we haven't found it as well).
    We have created implicit enhancement point implementation athe the end of form AUFRUF_USER_EXIT in include MF02DFEX.
    The code should be similiar to following:
    ENHANCEMENT 1  YEDSD_EO_ADD_DOC_PREFIX.    "active version
        DATA:
          ltp_doc_prefix TYPE y_dt_docpref.
    *--only in creation and change mode
        IF T020-AKTYP = 'H' OR
           T020-AKTYP = 'V'.
          CONCATENATE kna1-ktgrd kna1-kunnr INTO ltp_doc_prefix.
          kna1-yydocpre = ltp_doc_prefix.
        ENDIF.
    ENDENHANCEMENT.
    Regards,
    Marcin

  • Workflow changing the status based some columns value

    OOB workflow SP  designer 2013
    The workflow purpose is change the status columns from
    COMPLETE to IN PROGRESS or from
    IN PROGRESS to COMPLETE according some columns value.. And if the change is from
    IN PROGRESS to COMPLETE
    there will be change in some columns like
    If alertSOP Date <= today then change the status (Columns value) from Complete to In Progress and send email to the manager (the manager email address is a column (Manager Email)
    Else pause until the alert date=Today()
    If the status (columns) = in progress send Remainder email every 10 days
    If the status change from in progress to
    Complete (BY MANAGER MANUALLY) then
     last renewed Date =TODAY()
    Valid to Review=TODAY() + 4 MONTH
     Alert  Date=today() + 5 month
    and  Due Date=today() + 6 months
    AND START THE WORKFLOW AFTER UPDATING THIS COLUMNS FOR NEXT cycle
    SharePoint List(http://server/site/..) LIST ITEMS
    Department
    Contractor
    Division
    Manager Email
    Contractor last renewed Date
    Contractor Valid to Review
    Alert SOPReview
    DueDate Review
    Status
    Workflow Status
    ABC
    JONAH
    10
    [email protected]
    01/01/2014
    05/06/2014
    5/07/2014
    5/08/2014
    COMPLETE
    paused 
    DEF
    SMITH
    20
    [email protected]
    01/01/2014
    02/03/2014
    2/28/2014
    3/20/2014
    INPROGRESS
    INPROGRESS
    Note:
    The status is changed manually by manager from IN PROGRESS TO COMPLETE
    The status from COMPLETE to IN PROGRESS is changed by event or Triggers  (based the alert date) 

    The First Part are coded as follow
    (The workflow purpose is change the status columns from COMPLETE to IN
    PROGRESS or fromIN PROGRESS to COMPLETE according
    some columns value.. And if the change is from IN
    PROGRESSto COMPLETE there
    will be change in some columns like
    If alertSOP Date <= today then change the status (Columns value) from Complete to In Progress and send email to the manager (the manager email address is a column (Manager Email)
    Else pause until the alert date=Today()
    If the status (columns) = in progress send
    Reminder email every 10 days)
    Note:
    The first if Block work as expected
    the second if block generate error.. Internal States Canceled
    RequestorId: 3b262286-66e8-5f9f-09f8-3b09c5be0ebc. Details: System.ApplicationException: HTTP 400 {"Transfer-Encoding":["chunked"],"X-SharePointHealthScore":["1"],"SPClientServiceRequestDuration":["1997"],"SPRequestGuid":["3b262286-66e8-5f9f-09f8-3b09c5be0ebc"],"request-id":["3b262286-66e8-5f9f-09f8-3b09c5be0ebc"],"X-FRAME-OPTIONS":["SAMEORIGIN"],"X-Content-Type-Options":["nosniff"],"X-MS-InvokeApp":["1;
    RequireReadOnly"],"MicrosoftSharePointTeamServices":["15.0.0.4420"],"Cache-Control":["max-age=0, private"],"Date":["Tue, 25 Mar 2014 21:25:35 GMT"],"X-AspNet-Version":["4.0.30319"],"X-Powered-By":["ASP.NET"]} at Microsoft.Activities.Hosting.Runtime.Subroutine.SubroutineChild.Execute(CodeActivityContext
    context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager
    bookmarkManager, Location resultLocation)

  • How do I change the query based on parameter value

    hi,
    Based on parameter value I want to change my query. If paramter value is 'O' i want the 'order by depno' in query if the value is null i don't want the order by clause.
    How do I achieve this.
    Thanks
    Ram

    U can use lexical parameter
    i.e u create one user parameter and in query
    u use this parameter with &param_name
    ex.
    select val,prize from stock where sr_no > :srno
    orderby &ord_by
    here ord_by is lexical parameter
    and set its intial value to 'sr_no'
    so u can get result order by sr_no
    this parameter is set from form so u will give condition in form and depending
    on condition u will pass this parameter from form.

  • How can I change the numeric and enum default values in a Strict Type Def Cluster?

    I have a Strict Type Def cluster that contains 10 Numerical controls and a number of enums.  I have edited default values of the numerical controls in the Strict Type Def, in customize mode, performed a "Make Current Values Default"  and have done a "Apply Changes"  and saved.
    This cluster is used in various locations throughout the project and have not found a way to make the cluster default values change downstream.  The Strict Type Def (STD) Control appears to have the right values on the front panel.  But if I place an instance of this on a blank front panel, and run a wire from it in the block diagram with a probe and indicator, I still get the old default values being passed from the STD.  
    Solved!
    Go to Solution.

    There Are No Strict Type Definition Constants
    "Even though typedefs only update when types change, instances get cosmetic changes from the definition whenever they update. So one trick to "push" changes to typedef instances is to change the data type, apply changes, and then change the data type back. [edit, March 26 - Note that the typedef instances need to be in memory when you use this trick]."
    From Eyes on VIs, here.
    http://blog.eyesonvis.com/
    I love this article.
    Jim
    You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice

  • Need to change the sortable header's prompt value in the Run Time

    All
    I have an advancedTableBean with 11 columns. Out of these 11 for around 3 columns i have to change the column header's(sortableHeader) Prompt at run time. I would like to know how can i get an handle to the column header. I tried 'getColumnHeaderFormat' and 'getColumnHeaderData' but was not sure how to proceed further.
    Kindly suggest me the solution.
    Thanks,
    Praveen

    Hi,
    There is no std user-exit for this (at least we haven't found it as well).
    We have created implicit enhancement point implementation athe the end of form AUFRUF_USER_EXIT in include MF02DFEX.
    The code should be similiar to following:
    ENHANCEMENT 1  YEDSD_EO_ADD_DOC_PREFIX.    "active version
        DATA:
          ltp_doc_prefix TYPE y_dt_docpref.
    *--only in creation and change mode
        IF T020-AKTYP = 'H' OR
           T020-AKTYP = 'V'.
          CONCATENATE kna1-ktgrd kna1-kunnr INTO ltp_doc_prefix.
          kna1-yydocpre = ltp_doc_prefix.
        ENDIF.
    ENDENHANCEMENT.
    Regards,
    Marcin

  • Is there a possibility to change the Message Text displayed on Value Help

    Hi All,
    When i click value help icon against Transportation Zone, it is displaying first 500 entries. And i am getting a message saying " AVAILABLE ENTRIES : 500". Can i change this text to user specific ones say "First 500 entries shown: more records exist". if there is any procedure, kindly let me know..this will b of gr8 help..
    Bye,
    Eureka

    First you need to know in which component this F4 help is implemented. Then it will be easier to identify where this text is stored, but normally it should come from an OTR text.
    If you post additional details, maybe we can help you.
    Xavier

  • How to change the amount of Vendor Line Item in FB60

    Hi all,
    I want to post the invoice in SAP with FB60. The journal is as follow:
    Dr. Expense    1000 USD
    Dr. VAT-Input    100 USD
          Cr. Account Payable     1100 USD
    But the problem, the amount of Account payable is 1000 USD. Because I want to fill the amount in vendor line item (FB60) with the original expense (1000 USD).
    I want to ask, there is any configuration in SAP to change the amount in vendor line item which it could be the same with amount of the original expense.
    If you ever have same problems, plase share with me
    Thanks,
    John

    Hi,
    Thanks for your reply. The result of posting invoice that I want is as follow:
    Dr. Expense    1000 USD
    Dr. Vat - Input    100 USD
    Cr. Account Payable   1100 USD
    When posting invoices in FB60, there is a filed "amount vendor line item" at the top. Usually the field is filled with amount vendor 1100 USD, but I want to fill it with the expense amount (1000 USD). Which can be show the account payable 1100 USD.
    Is there any configuration to change the field "amount vendor line item" ?
    Thanks,

  • How to change the values in custom profiles based on security group ??

    Hi,
    i am facing problem for my requirement, can anybody help me for below scenario...
    i have custom check in profiles , there are content types and sub types. sub type nothing but a categories on for particular content type. For example i have News content type , same in the below subtypes drop down list are press release, events, articles etc.
    what i want to do is, when i open custom checkin profile, subtype values need to be changed( some values in subtype should hide) based on security group changes .
    In the Sub type listed values, some values need to hide only when i choose different security groups.. sub types values should display based on the particular security group only. when ever i change the security group, drop down Values in subtypes needs to change.
    hope understand my requirement.
    How to achieve this task. Any help would be greatly appreciated.
    Thanks,
    yt

    Hi,
    Thanks alot. its working fine
    Can we configure DCL Relation two times in one information filed ??? i should not create not more than fields to this requirement.
    Type -> subtype = DCL already existed
    Now, i want to Create DCL to
    Subtype ---> Security group
    As per my requirement, if i change the security group in checkin form, values should be change in the SubType drop down list.
    Created checkin profile there was DCL relation to " Type and "Sub Type" . now i want to map Relation ( DCL ) for subtype to security group.
    i was trying do for DCL for subtype and security group. but there was already existing DCL created for subtype information field (Relation configuration done for content type). even though i was trying to do for DCL in Security group information field. but, i could not find security group information field in configuration manager.
    Now what should i do ?? how to create DCL to subtype and security group ??
    Help would be appreciated.
    yt

  • How to change the chart color in report 6i based on its value?

    I built a simple chart using Chart Wizard in Report 6i, with X axis = supplier and Y axis = rating. I want the chart to show different color for certain rating, eg: above 80% => red color.
    Anyone know how to do this?
    Pls help!

    Hi Resham,
    In SP list, you change the background color of field value using Content editor and javascript.
    Add the content editor webpart on the list page with javascript which highlight the particualr value based on the condition.
    You can refer to following link
    http://blog.pathtosharepoint.com/2009/02/26/highlight-rows-in-sharepoint-lists/
    Thanks,
    Vivek
    Please vote or mark your question answered, if my reply helps you

  • To change the approval limit for Extended attribute PO Value limits

    Hi,
    We are on SRM 4.0, in PPOMA_BBP for a local purchasing organisation we want to change the approval limit let us say from 100 to 50 but the system is presenting this field as non editable( In stabdard values sub screen)
    In Extended attribute tab in organisation structure after selecting the PO Value limits in SRM 4.0 we see two sub screens
    a) Standard values
    b) Local values
    We want to change the approval limit in standard values sub screen from 1000 to 500, which system is presenting as noneditable.
    Regrds
    Vivek

    Hi
    Refer these links.
    http://help.sap.com/saphelp_srm50/helpdata/en/5a/af5efc85d011d2b42d006094b92d37/frameset.htm
    http://help.sap.com/saphelp_srm50/helpdata/en/8b/4fa9585db211d2b404006094b92d37/content.htm
    http://help.sap.com/saphelp_srm50/helpdata/en/fa/fa7d3cb7f58910e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_srm50/helpdata/en/7f/0fea380bfe6161e10000000a11402f/frameset.htm
    Incase it does not helps, pls let me know.
    Regards
    - Atul

Maybe you are looking for