Date to Period

Hi
My requirement is date to period for that i wrritten the customer exit variable. Now my requirment is suppose user input date is belongs to 3rd period (11.06.2010) that  i need to show all the three period in my report.  pls correct my code
WHEN 'ZVAR_FISCPERIOD_01'.
DATA: LV_BDATJ    TYPE       BDATJ,      "Posting date YYYY
       LV_POPER    TYPE       POPER,      "Posting period
       LV_INDATE   TYPE       SYDATUM.    "Current Date
CONSTANTS: C_V3 TYPE   PERIV  VALUE  'V3'.  "Fiscal Year Variant
clear l_s_range.
IF I_STEP = 2.
      READ TABLE I_T_VAR_RANGE INTO LOC_VAR_RANGE  WITH KEY VNAM = '0P_CSDAT'.
      IF SY-SUBRC = 0. 
CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
    EXPORTING
      I_DATE               = LV_INDATE
     I_MONMIT             = 00
      I_PERIV              = C_V3
   IMPORTING
     E_BUPER              = LV_POPER
     E_GJAHR              = LV_BDATJ
   EXCEPTIONS
     INPUT_FALSE          = 1
     T009_NOTFOUND        = 2
     T009B_NOTFOUND       = 3
     OTHERS               = 4
  IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ELSE.
  CONCATENATE LV_BDATJ LV_POPER INTO L_S_RANGE-LOW .
  L_S_RANGE-SIGN = 'I'.
  L_S_RANGE-OPT  = 'EQ'.
  APPEND L_S_RANGE TO E_T_RANGE.
  ENDIF.
  ENDIF.
    ENDIF.
Thanks
Rama

Hi,
U need to write code and determine  all 3 periods and append it in the else part of the following IF block as  shown.
IF SY-SUBRC 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
CONCATENATE LV_BDATJ LV_POPER INTO L_S_RANGE-LOW .
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'EQ'.
APPEND L_S_RANGE TO E_T_RANGE.
< move value of the period 2 to  L_S_RANGE-LOW .>
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'EQ'.
APPEND L_S_RANGE TO E_T_RANGE.
< move value of  the period 3 to  L_S_RANGE-LOW .>
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'EQ'.
APPEND L_S_RANGE TO E_T_RANGE.
ENDIF.
Regards,
Rathy

Similar Messages

  • Data selection period seems no use in logical DB PCH??

    Hi experts,I have a problem when using LDB PCH.
    There are object selection period fields PCHOBEG and PCHOEND.
    there are also data selection period fields PCHBEGDA and PCHENDDA .
    I set the data selection fields PCHBEGDA & PCHENDDA values at Start-of-selection event.
    But this seems to have no effect on the data selection.
    on GET OBJEC event,all of the infotype data will be got,but not corrosponding to the data selection period.
    Is this normal?or something wrong?Thanks.

    In PCH you have two periods. One for selecting objects and one for selecting data (infotypes).
    LDB PCH works like PNP or PNPCE

  • How to check bank acc state(beg&end balance) in a specific date or period

    Hi all
    My customer is using GL, AP and CM.
    I have set up different bank accounts in AP. After the payment is registered, the user does even the reconciliation with the bank account.
    I am having trouble to find a report or a place in the system where i can inquiry for the state of the bank account(beginning and ending balance) in a specific date or period.
    I have seen these kind of reports in more simpler programs, so it is strange that i can not find these kind of reports in oracle.
    An example:
    If i run one of these reports with beginning and ending date i want to see state of the bank account before beggining date, movements during these period and ending balance after these period.
    Can you please help me because my customer wants this and i have not been able to give an answer until now. He has some local software which has this kind of report and now it is trying to change to oracle financial, but I still could not find this kind of information he wants from oracle.
    Please help
    Thank you and best regards
    Ernest

    There are 2 concepts attached to a bank balance. The balance as per your books of accounts and another is the balance maintained with the bank. I believe i need not explain these 2 concepts. These 2 balances can be obtained from Oracle system provided some of prerequsities are met with.
    Balance as per your books - This is nothing but the GL balance available. In order to obtain balances for each bank accounts, it is advised that each bank account should have a separate account code combination. This is achieved generally by having a separate natural account for each bank. The code combination is attached to the cahs account for each bank. By maintaining separate account code combination, the balance in each code combination can be obtained from GL (provided transactions are accounted and posted in GL). These balances represent the balance for each bank according to your books of accounts. You can create an FSG for this purpose and provide the same to the customer, so that they can run the same whenevr they want.
    Balance as per bank - This balance is maintained by oracle in 2 ways - either the bank balance can be manually entered for each bank account for each date (quite cumbersome). Else, while loading the bank statement, the bank balances are also loaded. There are various types of bank balances stored - value dated balance, available balance, float balance etc. Depending on the balances provided by bank along with the bank statement, the bank balance can be recorded in oracle system. After the bank statement is uploaded and balances stored, standard cash management reports are available to query for the bank account balances. In order to view daily movement, the bank statement should be loaded on daily basis.
    Hope this helps.
    Vinit

  • Deliv. date outside period covered by factory calendar IN

    Hi Experts,
    I am trying to create Purchase Order with 2011 year delivery date system is showing bellow issue in production server.
    Deliv. date outside period covered by factory calendar IN
    Message no. ME078
    Please advice me how can i overwrite this problem immediately.
    Thanks in advance,
    Chandhu

    Dear Experts
    I tried the method which mentioned above, but when I tried to change the Valid Fr. Year 1996 to Year 2011, it probe me the message "Please enter validity area between years 1995 - 2010." and I wasn't allow to save.
    Pls advise how to solve the above problem.
    Thanks.

  • Archiving data retention period (best practice)

    Hi,
    Can anybody provide the standard FI-CO data retention period I mean for how long data from the following table has to be retained: 
    BKPF, BSAD, BSAK, BSAS, BSIS
    Best business practice.
    Thanks in advance
    Joseph

    Hi,
    I would not recommend to change this setting. One major problem you get will be that the archiving function will delete data from database (which has been transferred to the archive). So far so good, that´s one of the archiving features
    But it sometimes happens that you have to open an already closed fiscal year again. And if you open this last closed fiscal year again, the realtime transactions could fail now if data (transactions, etc.) is missing which exists only in the archive at that point of time.
    By the way, you can have a look at SAP note 389920, in there the archiving functionality is documented for FI-AA application.
    Regards,
    Markus

  • Error Msg_ME078 - DELIV. date outside period covered by factory calendar

    Dear experts:
    when i create PO with ME21N,
    if the delivery date is not within the year of 2010,
    there will appear an error msg "ME078 - DELIV. date outside period covered by factory calendar".
    i have checked the factory calendar with SCAL.
    i know how to modify the factory calendar to expand the time period,
    but now i still have a question,
    the system can't change the year period automatically?
    so we have to change the period after we confirm the public holiday calendar?
    thanks ~
    B/Rs
    Jamie

    hello~
    if the system can't update the calendar automatically..
    why the consultant didn't set the valid period to an  exaggeration year at that time?
    did they have any concern?
    thanks a lot~
    B/Rs,
    Jamie

  • Deliv. date outside period covered by factory calendar TR//PO error

    Dear Sap Experts
    I am creating the P.O For Delivery Date 31.03.2010
    System has giving following error,
    Deliv. date outside period covered by factory calendar TR
    How can I overcome this error,
    Please Give me the solutions
    Thanks

    Thank for ur reply,
    Please give me the procedure with that T code
    I didn't got any year with that T code
    Thanks

  • Deliv. date outside period covered by factory calendar TR

    Dear Sap Experts
    I am creating Po with delivery date 31/03/2010
    System is saying lollowing problem,    Deliv. date outside period covered by factory calendar TR
    Please Give me the solution how to overcome this problem
    Thanks

    hello
    Check you SCAL factory calander, whether the day is defined as working day or not??
    If not defined, then you can only use the next working day.

  • PO Error : Deliv. date outside period covered by factory calendar

    Hi,
    We are encountering an error "Deliv. date outside period covered by factory calendar xx" when creating a PO. I checked the delivery date of the item and it is : 11/30/2009. The Factory calendar valid from/to year is 2005-2013. What may have caused the error to appear ?

    Hi ,
    How can i check  whether the validity period of the factory calendar is within the valididty period of public holiday calendar.
    Regards,
    Vinayak

  • Deliv. date outside period covered by factory calendar ZJ

    Dear all
    In one import po,there are 9 items. Document date is 18.06.2008.For the first 6 items i have given various delivery dates this year 2008 and there is no problem.But
    for last 3items, my requrement is delivery schedule is 30.03.2009.But system is showing the error as
    Deliv. date outside period covered by factory calendar ZJ
    Please suggest the solution

    HI
    My Suggestion is to cancel the created PO 3 line items and put Scheduling agreement for 3 items with respect to delivery schedule
    regards,
    senthil.

  • Is there any way to delete or reverse balance carryforward data in period 0

    Dear all,
       Is there any way we can delete or reverse balance carryforward data in period 0?
       We have try to use the delete function in UCWB, but we can't select the period 0 in the selection screen.What's the correct way of deleting the balance carryforward data?
    Thx,
    Jeff

    I concur with Eugene and have a few other ways, albeit not a simple.
    You can use the delete feature in the BCS workbench (UCWB > Consolidation Functions > Other Functions > Delete > Reported data and Documents) to zero out the data for the final period, and reexecute the tasks for the final period. Then execute all task for the final period to zero records. Then execute balance carry forward. This does make all period 000 records zero, but the records will still exist.
    Or, you can use a flexible upload data collection method to cumulative, delete all and execute with no data in the file for the final period. Then execute all task for the final period to zero records. Then execute balance carry forward. This does make all period 000 records zero, but the records will still exist.

  • Data selection period & Person selection period

    What's the difference between them?I'm really puzzled.

    Hi,
    In Data selection Period: record for the Period will only be selected.
    In Person selection period : Record for the those person who are in that period will be selected.
    If Data selection Period is avilable & Person selection period  is NIL:
    Now if you Do not give any period in Person selection period  but there is dates in Data selection Period, then Person is considered as * i.e. all the Perosn will considered. In that case in your system if there is data inconsistency is there their record will also be considered. Hence it is likely that the report will be giving some error. It will be difficult to idenify.
    There is suggested that both Data selection Period and Person selection period should be same to avoid any error in the report.
    Regards,
    Devojit

  • Difference  between data selection period and personal seletion period

    Hi
    Experts ,
    ples Expline ,
    Difference  between data selection period and personal seletion period. to Data screening .

    Data selection period means
    For example if u given any period,
    here we are checking whether data is valid in this period.
    Personal selection period means
    we are checking whether person is valid in a given period.
    Example is:
    For example if the employee resigned in a company on 15th of month.
    He can get the salary only at the end of month it means his data is avilable upto end of month.
    But when you consider his status from 16th to end of month
    the person is not available.
    So when u given date(16th to end of month) in data selection period is showing that person data is avilable.
    But when mention that date in person selection period it is showing no person is avilable.
    if useful
    reward with points............

  • Is there any way to extend the roaming data expiration period?

    The title says it all:)
    Is there any way to extend the 30-days roaming data expiration period?

    No, this is not controllable directly by apps or by users (and 30-days is not contractual).
    If your app needs to store data in the cloud perpetually then you'll need to use your own server.
    If the app is installed then roamed data will still be saved on the client systems until the user removes it.

  • ME078 delivery date outside period covery by factory calender

    Hi All,
    I am trying to upload some PRs and I have maintained delivery date as 05.12.2008 but system is showing the error message ME078 delivery date outside period covery by factory calender.
    Please suggest.
    Thanks in advance
    Pavan

    hi,
    Check whether the delivery date matches with the that defined in the MMR(MM03) ie. GR processing time...
    You can check the factory calender from OB08...check whether the del. is permitted for the given day...
    Regards
    Priyanka.P

Maybe you are looking for