Get Current Period.

Hi All,
I want current period based on system date .Please tell me name of Function module so that i can pass system date n get period for that.
Thanks,
Ulhas

Hi,
HR_PAYROLL_PERIODS_GET
Get the payroll period for a particular date. 
Example:
  call function 'HR_PAYROLL_PERIOD_GET'
   exporting
     payroll_area         = period
     date                 = sy-datum
  importing
    payroll_year         = ac_year
    payroll_period       = a_period
  exceptions
    no_entry_t549a       = 1
    no_entry_t549q       = 2
    others               = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
regards,
keerthi

Similar Messages

  • Current Period in DM package

    Hello Experts,
    How will we get current period in DM package? What would be the best solution to get current period in DM Package?
    We want to load ACTUAL from ECC for current month only. Hence in DM package we want to write this logic to populate current month and use this current month variable to restrict data flowing in the package.
    Thanks,
    Jim

    Hi Jim,
    Could you please clarify whether current time period should be applied to external data acquisition e.g. custom load process or current time period to be passed to BPC system logic?
    In the first scenario you would implement all logic in standard SSIS with raw SQL or other means so that the dataset made available to BPC (import or otherwise) will only supply required records.
    If the current date is needed to determine appropriate time dimension member to run some logic against then there are various options depending on the specific requirement.
    Hope this helps,
    Madis

  • Where is stored Current Period?

    Hi all,
    I have look for this data without success. The periods list is stored in the OFPR, but havent see any field wich defines the current one.
    Thanks in advance,
    Ibai Peñ

    Hi Andrea,
    In the OADM table could be equals, and could not be equals, depending on the period indicator, and some other fields.
    I am not even trying to get current period with the DI. I want it directly from the DataBase, but looks like it is not stored anywhere. I suppose it is saved with some preferences in a encripted field or something like that, and thats why we arent able to find it.
    It is good to ear that will be avaiable in 2005.
    And I can´t read from the main manu, becouse it is for a 3rd party app, and it is not sure that SBO will be open.
    Thanks for your time,
    Ibai Peñ

  • Mdx expression to get previous period month

    My dimension table has a column for current period month, where every row has the same value, updated at the end of the month. I am using the following expression to get current period month.  "Jan - 2009" is randomly chosen, as every
    cell on that column will have the same value.
    [Time].[Time].[Month].[Jan - 2009].Properties( "Current Period" )
    Result of the above expression is "Feb - 2015".
    Current period month will always be previous month of the current year. example: During Jan - 2015, current period month is Dec - 2014.
    I need to use this expression or any function to get the previous month. For example if the  current period month is Feb - 2015, then the previous period month should give me Jan - 2015.
    How can I accomplish that?

    Hi 
    I have a similar situation but not with date dimesion we have sales seasons in retails domain.
    please check how I am handling this
    select (LinkMember ([ProductSeason].[Current Season].firstChild,
    [ProductSeason].[Season Name])).prevmember
    on columns,
    [Measures].[Total pcs]
    on rows
    from [NewCube]
    fsdfasdf
    Here I have column currect season which get update at the start of each season with currect season
    name. then I am receiving the season name member from product season dimension and fetching the previous member for that.
    Hope this will help.
    Regards,
    Rahul
    lntinfotech

  • Get Current financial period

    Hi All,
    I have used following code to get current financial period:
    SAPbouiCOM.Company company = oApplication.Company;
                    int Period = company.CurrentPeriod;
                    SAPbobsCOM.CompanyService oCompanyService = oCompany.GetCompanyService();
                    SAPbobsCOM.FinancePeriodParams diPeriodParams = (SAPbobsCOM.FinancePeriodParams)oCompanyService.GetDataInterface(SAPbobsCOM.CompanyServiceDataInterfaces.csdiFinancePeriodParams);
                    diPeriodParams.AbsoluteEntry = Period;
                    SAPbobsCOM.FinancePeriod finPeriod = oCompanyService.GetFinancePeriod(diPeriodParams);
    But iam gettng error "No Matching records found".

    Hi Pravin,
    2007 onward the company.CurrentPeriod is not available . It always returns -1, so you are getting the above error.
    The other way to get the current period is through query :
    select code, name from ofpr where f_refdate <= getdate() and t_refdate >= getdate()
    Hope it helps.
    Regards

  • DI SDK on version 2005 - getting  No Current Period error

    Trying to connect to the DI SDK, and get an error message of 'No Current Period' when supplying the server, user, password, language and trust. The same code works fine with the 2004 version. Can anyone help?

    The error normally appears if there are no periods contaning todays date... Make sure you have a running posting dates (If you don't have the client will also at stratup warn you about this)... Point is that you can not manke a connection to the DI for some reason in no posting period (Even if you just want to do DI-work that have nothing to do with periods)

  • How to get list of company codes with current period not opened?

    Hi,
    How to get list of company codes with current period not opened?
    Is there any way we can check whether the current period is opened for all company codes.
    If not how, can we generate a report which having information of period and company code. Also please tell me, which table will have info on posting periods and company codes.
    Thanks
    Vineeth Varghese

    Hi,
    The MM periods details can be viewed In Table MARV . On the selection screen you have the option of entering the company codes , current period, year current period etc. so make the required entries and you get the all details relevant to MM periods. Also it can be downloaded as a report.Thanks

  • Get the Current Period

    Hi!
    I need to know from SDK the current period used in the company.
    I know that:
    In all SAP Business One releases up to 2005 A SP1 there is a 'current' period setting that indicates the period enabled for data entry and posting.
    Only one period can be set as the current period. Beginning with Release 2007 A, all periods will be enabled and the 'current' period setting will no longer be used. When the add-on attempts to read a value from the 'Company.CurrentPeriod', instead of the value period value, it will receive the numeric value '-1'.
    What alternative can I use?

    Hi All,
    So, B1 period is determined by automatically, based on posting date. But if you use several numbering series for the same document, you can set up different series for different posting periods using period indicator.
    Ex:
    year - 2009 Period Indicatior - 2009
    year - 2010 Period Indicatior - 2010
    Numbering series:
    for series in 2009 - Indicatior is set to 2009
    for series in 2010 - Indicatior is set to 2010
    If you open the A/R Invoice form, you will see series belongs to Period indicator 2010. if you change the posting date to 2009.12.01, you will see the series on the form belongs to Period indicator 2009.
    If we change the example
    Ex:
    year - 2009 Period Indicatior - 2009
    year - 2010 Period Indicatior - 2009
    Numbering series:
    for series in 2009 - Indicatior is set to 2009
    for series in 2010 - Indicatior is set to 2009
    IN this case on the form you can select each series (belongs to 2009 and 2010).
    This means: series displayed and selected automatically based on posting date and period indicator. (by this you can set up different numbering series by periods - Period indication of posting periods cas be change until the first booking!)
    SAP B1 is automatically set the numbering series of a document by posting date which is simiral to the following query (A/R Invoice object type = 13)
    select T1.* from ofpr T0  inner join NNM1 T1 on T0.Indicator  = T1.Indicator
    where convert(datetime,getdate(),112) between T0.F_RefDate and T0.T_RefDate  and T1.Locked  ='N'  and T1.ObjectCode = '13'
    Regards,
    J.

  • P & L report for current period,YTD and previous YTD

    I am trying to create a P & L report with the columns for current period,YTD and previous YTD,  I have include the measures as the key of columns, which by using period or YTD we can retrieve the current period and YTD column, is there as easy way to get the previous YTD? although I can get it  by using evtim to het every month and calculate the previous YTD.

    resolved, just need to bring both time and measures in the columns

  • If current period is closed, use next period for posting...

    Hello Experts,
    I am currently developing a report that posts via F-02. Now, my functional said
    that if before posting, I need to check if the current period is open.If yes, then
    proceed posting. If not, then get the next period and use it for posting.
    For example, period 12 is closed, then I need to use period 13. Can you guys help
    me in the logic?
    Thanks and take care!

    Hi,
    Check with your FI consultant as which table to use to determine the posting period is closed or not. It is customizing table.
    Regards,
    Atish

  • Logic for carry forward of previous stock to current period stock.

    Hi Experts,
    Client is using already MC.9 for see the stock analysis report, however as per there requirement we are exploring BOM as well as fetching quantity from table level as well. in my report I am experiencing  difficulty to carry forward previous period closing stock quantity to current period stock quantiy, if there is no received for current period, however the same is happens in MC.9
    Could any one tell me what is the logic behind MC.9 which is do carry forward previous period closing  stock to current period stock quantity in report.
    As per the requirement I am using S031, S032,S033, however unable to get logic for carry forward the previous month stock quantity to current month.
    have a requirement of creating a report of showing material stock period wise for each plant in below mention format.
    Header 1
    Header 2
    Header 3
    Header 4
    LFGJA/LFMON
    ROH (MT)
    HALB (MT)
    FERT (MT)
    11.2013
    100.000
    121.000
    121.00
    12.2013
    50.000
    12.000
    123.00
    01.2014
    23.231
    .23.234
    45.342
    02.2014
    23.231
    34.094
    45.098
    03.2014
    34.098
    98.983
    00.000
    04.2014
    00.000
    69.093
    98.098
    05.2014
    00.000
    89.098
    00.000
    For Example Break up of ROH material plant wise in below mention format.
    LFGJA/LFMON
    WERKS
    MENGE (MT)
    11.2013
    P001
    30.000
    11.2013
    P002
    50.000
    11.2013
    P003
    20.00
    Thanks in advance,
    SKN

    Hi,
       The last period closing stock = current period opening stock. You may get the details from MBEWH and S032 tables. Refer the doc: Material Stock and Valuation History tables - how to read them
    Regards,
    AKPT

  • Error: No depreciation  posting required in period 009 (current period)

    Hi,
      I am getting error " No depreciation posting required in period 009"  and  009 is my current period.
       The description of the error says " Do depreciation is posted, since according to the posting cycle no postings are required in this period".   In fact this is the first time i am running depreciation. I want to post the depreciation for 1st period. More over i could not able to see the planned values in asset explorer also.
       Whenever i am entering this asset in the asset explorer it is  giving the above error. But while i run the depreciation its not giving any error. When i check in spool to view the depreciation, its giving msg as "List contains no data" check error log.
      Could anyone help me in resolving this error.  what could be the reason for this error.
    Thanks
    Sabera

    Hi,
      I checked in TABA table, its showing that till 9 the period depreciation has been posted. But i have not posted the depreciation. If it is posted, then it has to show in the planned values as posted, but its showing as "No depreciation"  and its not even showing the depreciation for other periods.  Could you able to clear this query? I wonder why it is giving this kind of error.
    Regards
    Sabera

  • How to create logical columns for current period and prior period

    Hello all.
    Is there any way in obiee to create a new logica column in BMM layer that says "CURRENT PERIOD" AND "PRIOR PERIOD" OR ONE SINGLE COLUMN THAT SAYS "PERIOD".
    In those columns what I need is if it a current period column it shoould have 03/01/2012-03/31/2012 (this month date range)
    and in prior period column I shouldhave 02/01/2012 -02/29/2012(which is previous month date range).These columns I will be using in my reports.
    Please help me if we can create any such columns with these conditions/requirements

    Hi,I have already created he dynamic variables.But I am not getting how to use those variables and create the new logical columns in bmm layer.
    this is what I am trying
    case when VALUEOF("Current Month begin date"."Current Month begin date") ='..' and VALUEOF("Current Month end date"."Current Month end date")
    ='..' then 'current period' end
    I don't really understand what I should write case when VALUEOF("Current Month begin date"."Current Month begin date") ='..'??

  • Fm to get current + next 3 fiscal months name

    hi all,
    In my alv report , i need to populate the stock of current fiscal month plus stock for succeeding 3 months.Using fm 'GET_CURRENT_YEAR' i am getting current month details with input sydatum and company code.
    But how to get next 3 fiscal months?Is there any fm to do the same?

    Hi,
    try this:
    DATA: PERIOD LIKE T009B-POPER,
          YEAR   LIKE T009B-BDATJ,
          DATE   LIKE SY-DATUM.
    DATE = SY-DATUM.
    CALL FUNCTION 'DETERMINE_PERIOD'
      EXPORTING
        DATE                = date
        VERSION             = 'K4'
      IMPORTING
        PERIOD              = PERIOD
        YEAR                = YEAR
      EXCEPTIONS
        PERIOD_IN_NOT_VALID = 1
        PERIOD_NOT_ASSIGNED = 2
        VERSION_UNDEFINED   = 3
        OTHERS              = 4.
    write: / date, period, year.
      CALL FUNCTION 'RE_ADD_MONTH_TO_DATE'
        EXPORTING
          MONTHS  = 1
          OLDDATE = DATe
        IMPORTING
          NEWDATE = date.
    CALL FUNCTION 'DETERMINE_PERIOD'
      EXPORTING
        DATE                = date
        VERSION             = 'K4'
      IMPORTING
        PERIOD              = PERIOD
        YEAR                = YEAR
      EXCEPTIONS
        PERIOD_IN_NOT_VALID = 1
        PERIOD_NOT_ASSIGNED = 2
        VERSION_UNDEFINED   = 3
        OTHERS              = 4.
    write: / date, period, year.
      CALL FUNCTION 'RE_ADD_MONTH_TO_DATE'
        EXPORTING
          MONTHS  = 1
          OLDDATE = DATe
        IMPORTING
          NEWDATE = date.
    CALL FUNCTION 'DETERMINE_PERIOD'
      EXPORTING
        DATE                = date
        VERSION             = 'K4'
      IMPORTING
        PERIOD              = PERIOD
        YEAR                = YEAR
      EXCEPTIONS
        PERIOD_IN_NOT_VALID = 1
        PERIOD_NOT_ASSIGNED = 2
        VERSION_UNDEFINED   = 3
        OTHERS              = 4.
    write: / date, period, year.
      CALL FUNCTION 'RE_ADD_MONTH_TO_DATE'
        EXPORTING
          MONTHS  = 1
          OLDDATE = DATe
        IMPORTING
          NEWDATE = date.
    CALL FUNCTION 'DETERMINE_PERIOD'
      EXPORTING
        DATE                = date
        VERSION             = 'K4'
      IMPORTING
        PERIOD              = PERIOD
        YEAR                = YEAR
      EXCEPTIONS
        PERIOD_IN_NOT_VALID = 1
        PERIOD_NOT_ASSIGNED = 2
        VERSION_UNDEFINED   = 3
        OTHERS              = 4.
    write: / date, period, year.
    Regards, Dieter

  • How to determine current period start and end dates

    Hi All,
    If given previous period start date and end date, how to determine current period start date and end date?
    Suppose if given previous period start and end dates are 12/28/08 - 01/30/09, then current period start date and end date will be 01/30/09 - 02/27/09. (where 12 is the previous period, 28 is the day, 08 is the year......)
    Can you please suggest an FM to determine the current period dates?
    Thanks & Regards
    Gowthami

    >
    gowthami karunya wrote:
    > If given previous period start date and end date, how to determine current period start date and end date?
    > Suppose if given previous period start and end dates are 12/28/08 - 01/30/09, then current period start date and end date will be 01/30/09 - 02/27/09. (where 12 is the previous period, 28 is the day, 08 is the year......)
    Hello,
    I am assuming you have the Company Code with you & proposing this solution.
    TABLES: bkpf.
    PARAMETERS:
    p_bukrs TYPE bukrs.
    SELECT-OPTIONS:
    s_date FOR bkpf-budat.
    DATA :
    l_perio LIKE bkpf-monat,
    l_poper TYPE poper,
    l_year  LIKE bkpf-gjahr,
    l_spmon TYPE spmon,
    l_periv TYPE periv,
    l_date1 TYPE datum,
    l_date2 TYPE datum.
    CALL FUNCTION 'BAPI_COMPANYCODE_GET_PERIOD'
      EXPORTING
        companycodeid = p_bukrs
        posting_date  = s_date-high
      IMPORTING
        fiscal_year   = l_year
        fiscal_period = l_perio.
    CONCATENATE l_year l_perio INTO l_spmon.
    * Get the next period
    IF l_perio < 12.
      l_perio = l_perio + 1.
    ELSE.
      l_perio = '01'.
      l_year = l_year + 1.
    ENDIF.
    MOVE l_perio TO l_poper.
    SELECT SINGLE periv INTO l_periv
    FROM t001
    WHERE bukrs = p_bukrs.
    IF sy-subrc = 0.
      CALL FUNCTION 'FIRST_DAY_IN_PERIOD_GET'
        EXPORTING
          i_gjahr        = l_year
          i_periv        = l_periv
          i_poper        = l_poper
        IMPORTING
          e_date         = l_date1
        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.
      ENDIF.
      CALL FUNCTION 'LAST_DAY_IN_PERIOD_GET'
        EXPORTING
          i_gjahr        = l_year
          i_periv        = l_periv
          i_poper        = l_poper
        IMPORTING
          e_date         = l_date2
        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.
      ENDIF.
      WRITE: / l_date1, l_date2.
    ENDIF.

Maybe you are looking for

  • Cant hear sound on tv shows bought from itunes

    i downloaded tv shows and movies from itunes.  video is fine but no sound

  • While i am starting a Managed server some security Exception is raised

    JAVA Memory arguments: -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=48m -XX:MaxPermSize=128m WLS Start Mode=Development CLASSPATH=:/home/durgasoft/HDFC_bea/patch_wls1030/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/dur

  • Why is my calculated number field turning to a 10-place decimal?

    I have 3 integer fields. 2 are user-entered as numbers with 0 decimal places ("3003" and "3004". The third is a number with 2 decimal places, and runs a Simplified Field Notation calculation "3003 / 3004". When I open the fillable doc in Reader, the

  • ALPHANUM datatype contains non-alphanumeric character like @#$&*

    Hi All, I use ALPHANUM datatype in one table with 127 size. As per definition in Developer guide "ALPHANUM(n) data type specifies a variable-length character string which contains alphanumeric characters" Example : insert into "SOMNATH"."aadata" valu

  • Help with setDate()...

    Hello... This query works just fine in command line: SELECT SUM(RECIBO.PRIMANETA) FROM RECIBO, WHERE MONTHNAME(RECIBO.FECHAPAG)=MONTHNAME('2004-10-10') Then I put a question mark (?) instead of the static date ('2004-10-10') to use the common prepare