<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Asset value date in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/asset-value-date/m-p/4351837#M1036324</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hema,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*"Table declarations...................................................
tables :
  p0001.                               " HR Master Record

*"Selection screen elements............................................
selection-screen begin of block blck with frame title text-006.
select-options :
  s_pernr for p0001-pernr no-extension.
" Personnel Number
parameters :
  p_forprd like sy-datum.              " For Period

select-options :
  s_inprd for sy-datum no-extension.   " In Period
selection-screen end of block blck.

data :
  w_date   like sy-datum.      " Date

at selection-screen output.
  perform process_before_output.

form process_before_output .
  loop at screen.
    if screen-name cs 'S_INPRD'.
      screen-input = 0.
      clear s_inprd[].
      modify screen.
    endif.                             " IF SCREEN-NAME CS 'S_INPRD'
  endloop.                             " LOOP AT SCREEN
  if p_forprd is not initial.
    call function '/BEV4/PLPS__ADD_MONTH_TO_DATE'
      exporting
        months  = '3'
        olddate = p_forprd
      importing
        newdate = w_date.
    loop at screen.
      if screen-name eq 'S_INPRD-LOW'.
        s_inprd-low = w_date.
      elseif screen-name eq 'S_INPRD-HIGH'.
        call function 'LAST_DAY_OF_MONTHS'
          exporting
            day_in            = w_date
          importing
            last_day_of_month = w_date
          exceptions
            day_in_no_date    = 1
            others            = 2.
        if sy-subrc ne 0.
          message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        endif.                         " IF SY-SUBRC NE 0
        s_inprd-high = w_date.
        append s_inprd.
      endif.                           " IF SCREEN-NAME EQ 'S_INPRD-LOW'
      modify screen.
    endloop.                           " LOOP AT SCREEN
  endif.                               " IF P_FORPRD IS NOT INITIAL
endform.                               " FORM PROCESS_BEFORE_OUTPUT&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above code explains ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Enter a pernr(say 16) and for period(01.03.2008) and on pressing 'ENTER' the In period is filled with 3 months from the For period(It will be 01.06.2008 to 30.06.2008). I think this will suffice your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Swapna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Sep 2008 13:06:02 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-09-01T13:06:02Z</dc:date>
    <item>
      <title>Asset value date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/asset-value-date/m-p/4351835#M1036322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How to get  the start and end date of asset value in the selection screen based on the posting period.The other i/p field i have is fiscal year and company code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2008 13:00:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/asset-value-date/m-p/4351835#M1036322</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-01T13:00:09Z</dc:date>
    </item>
    <item>
      <title>Re: Asset value date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/asset-value-date/m-p/4351836#M1036323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'HR_E_NUM_OF_DAYS_OF_MONTH'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Maharshi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2008 13:04:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/asset-value-date/m-p/4351836#M1036323</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-01T13:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: Asset value date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/asset-value-date/m-p/4351837#M1036324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hema,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*"Table declarations...................................................
tables :
  p0001.                               " HR Master Record

*"Selection screen elements............................................
selection-screen begin of block blck with frame title text-006.
select-options :
  s_pernr for p0001-pernr no-extension.
" Personnel Number
parameters :
  p_forprd like sy-datum.              " For Period

select-options :
  s_inprd for sy-datum no-extension.   " In Period
selection-screen end of block blck.

data :
  w_date   like sy-datum.      " Date

at selection-screen output.
  perform process_before_output.

form process_before_output .
  loop at screen.
    if screen-name cs 'S_INPRD'.
      screen-input = 0.
      clear s_inprd[].
      modify screen.
    endif.                             " IF SCREEN-NAME CS 'S_INPRD'
  endloop.                             " LOOP AT SCREEN
  if p_forprd is not initial.
    call function '/BEV4/PLPS__ADD_MONTH_TO_DATE'
      exporting
        months  = '3'
        olddate = p_forprd
      importing
        newdate = w_date.
    loop at screen.
      if screen-name eq 'S_INPRD-LOW'.
        s_inprd-low = w_date.
      elseif screen-name eq 'S_INPRD-HIGH'.
        call function 'LAST_DAY_OF_MONTHS'
          exporting
            day_in            = w_date
          importing
            last_day_of_month = w_date
          exceptions
            day_in_no_date    = 1
            others            = 2.
        if sy-subrc ne 0.
          message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        endif.                         " IF SY-SUBRC NE 0
        s_inprd-high = w_date.
        append s_inprd.
      endif.                           " IF SCREEN-NAME EQ 'S_INPRD-LOW'
      modify screen.
    endloop.                           " LOOP AT SCREEN
  endif.                               " IF P_FORPRD IS NOT INITIAL
endform.                               " FORM PROCESS_BEFORE_OUTPUT&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above code explains ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Enter a pernr(say 16) and for period(01.03.2008) and on pressing 'ENTER' the In period is filled with 3 months from the For period(It will be 01.06.2008 to 30.06.2008). I think this will suffice your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Swapna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2008 13:06:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/asset-value-date/m-p/4351837#M1036324</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-01T13:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: Asset value date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/asset-value-date/m-p/4351838#M1036325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try to use Fm:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;ASSET_VALUATION_DATE_GET     
ASSET_VALUATION_DATE_GET_30  
AMSP_ASSET_VALUE_DATE_CHECK&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2008 13:16:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/asset-value-date/m-p/4351838#M1036325</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-01T13:16:33Z</dc:date>
    </item>
  </channel>
</rss>

