Date to period converter

hi all,
how to convert date to previous month period i.e if we give this month date it has to give previous month period as out put.

This question has been asked and answered many times before. Please search the forum.
Rob

Similar Messages

  • Internal table data 1E2 automatically convert to scientific format

    Dear all,
    I have been searched for solution moths from the forums and tried all possible methods, but still no way to solve my above problem.  I found a way to solve it partially for us, but may be very helpful for others who meet similly case like mine, so I posted here.
    my problem is when I export my internal table data to Excel, the Cell data with 1E2 auto becomes 1.00E02, and 1E8 becomes 1.00E08, we need it to be 1E2 and 1E8 in excel.
    you can recreate my problem by
    1,  input 1E2 into your Microsoft Excel, then Enter, it will auto change into scientific format. which is we do not want.
    2, use any of your SAP system open any table as long as there is a Char (>3) field in that table. add some
    data entry in that field in the form "any amount (<15) of numeric 1 to 9"E"any one or two numeric 1 to 9". such as, 123E2, 1234E12 etc. then save this table's data to local file spread sheet, or use any FM to download it to a Excel file, when you open this
    file by Excel, the cell with above form will display as scientific. but
    if you put three or more numeric after the "E", such as 123E123 it will
    display correctly.
    what I have done:
    I searched in SCN for similar thread:
        Export to Excel 2007 - item number problem
        Exceding the limit of numbers in Excel at target side
        Excel download cell format problem
        Formating as Text in excel through SAP
        Converting of amount field into excel file through GUI DOWNLOAD
        Data downloaded to excel gets converted to exponential format.
        Problem with Excel download   and scientific number
        Re: Issue in displaying numbers in Excel?
        CSV Flat File Data Problem (Number converting to Scientific Notation)
    Tested accordingly, But none of these works in our case. because our
    ultimate receiver of email attachment will be external third party, we cannot ask
    them to change anything in their Excel.
    Search Microsoft help about Excel, http://support.microsoft.com/kb/214233,
    and it says this "Automatic Number Formatting" is a normal behaviour of excel.
    no way to turn it off, the "work-around" way that Microsoft provides is not suitable for our
    case.
    We test CL_iXML recently arrording to weblog http://wiki.sdn.sap.com/wiki/display/Snippets/FormattedExcelasEmailAttachment
    it successful controled the format. so this could be a solution for others whose internal table size is small. but our 2MB internal table bocome 6MB when converted to xml file attachment, which cannot be received by our end user's mail box. too big.
    So please advise your ideas.
    Many thanks in advance!
    Peter Ding
    Thank you very much for your time!

    Hi,
    You can achieve this by describing the spreadsheet in XML with the help of the DOM classes.
    The later releases of Excel can read and save spreadsheets as XML, providing your release supports this you can achieve it.
    Check out the following Wiki
    [Excel - XML|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/exporting%2bdata%2bto%2bexcel%2b-%2bxml%2bto%2bthe%2brescue]
    Regards,
    Darren

  • 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

  • Error occurred while data was being converted.

    hi all,
    i am gettting a run-time error (dump) in this line of code,
                netval = wa_tb_str_ekpo-ktmng  *  wa_tb_str_ekpo-netpr.
    ktmng is data type QUAN and has reference field MEINS of EKPO table
    while netpr is data type CURR and has reference field WAERS of EKKO table.
    ABAP ERROR ANALYSIS SAYS :
    Error occurred while data was being converted.
    Please help me.
    Thanks.

    hi prasad,
                 you  can pass this value to the char field. then pass it to the field. and let me know the result.
    regards,
    venkat.

  • 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.

  • 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

  • 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

Maybe you are looking for

  • Compiling inner classes

    Hi, I have an applet with inner classes (the applet is contained in a single .java file). When I compile the applet, a number of *$*.class files are created for the inner classes. However, a friend of mine compiles the same .java file and he gets a s

  • Could not find the Adobe Content Viewer.

    I have CS6 on my machine and when I try to preview a Folio on my desktop I get the prompt: An error occurred while generating folio preview. Could not find the Adobe Content Viewer. I have Adobe Air installed. Does anyone have any recommendations for

  • Import settings to new account

    Hi guys, my main Win 7 user account has become corrupted, giving me the loop of "Windows Explorer has stopped working and is restarting". I've created a new user account and am now beginning the process of reinstalling all my software and profiles. I

  • HT4623 Why does my IPad not have a Software Updates button in my General tab?

    Why does my IPad not have a Software Updates button in my General tab?

  • Mac OS Panther 10.3

    Currently my MAC running updated OS X 10.2.8 version. Can I install Panther 10.3 _*Upgrade Disc*_ to my computer? Will it crash my current setting? Please assist.


HashFlare