How can i get the month and year of the current  open Periode?

At the beginning of each month the booking period for the new month was not open,but i need to book material automatically with the last day of the old month. The booking period will change at the first working day between 13 and 17 a clock. when the booking period was changed i have to book with the current date.
How can i do this ??
Regards
Ralf

Hi Ralf,
here's a complete example:
DATA: last LIKE sy-datum, "ultimo of last month
      gjahr LIKE t001b-frye1,
      buper LIKE t001b-frpe1.
last = sy-datum - sy-datum+6(2) .
PERFORM check_period.
IF sy-subrc <> 0.
  ADD 1 TO last . "-> next month
  PERFORM check_period.
  IF sy-subrc <> 0.
    MESSAGE a001(00) WITH 'no open fi period'.
  ENDIF.
ENDIF.
*formatting for germany
CONCATENATE last+6(2) last+4(2) last(4) INTO bbkpf-budat.
WRITE: / bbkpf-budat.
FORM check_period.
  MOVE last(4) TO gjahr.
  MOVE last+4(2) TO buper.
  CALL FUNCTION 'FI_PERIOD_CHECK'
       EXPORTING
            i_bukrs          = bbkpf-bukrs
            i_gjahr          = gjahr
            i_koart          = '+'
            i_monat          = buper
       EXCEPTIONS
            error_period     = 1
            error_period_acc = 2
            OTHERS           = 3.
ENDFORM.                    " check_period
regards <a href="https://www.sdn.sap.com:443/irj/servlet/prt/porta
l/prtroot/com.sap.sdn.businesscard.SDNBusinessCard?u=i
Wo3ssHlIihvCrADIEGqaw%3D%3D">Andreas</a>
Message was edited by: Andreas Mann

Similar Messages

  • How can I get the current user an  resource context  in a portal JSPDynPag

    How can I get the current user (com.sapportals.portal.security.usermanagement.IUser?)an the resource context  in a portal component (JSPDynPage)?
    Thanks.

    Hi Jon,
    Here is the code to get the current user and resource context in your JSPDynPage:
    IPortalComponentRequest  currentRequest  = (IPortalComponentRequest)pageContext.getAttribute(javax.servlet.jsp.PageContext.REQUEST);
    com.sapportals.portal.security.usermanagement.IUser contextUser = (com.sapportals.portal.security.usermanagement.IUser) currentRequest.getUser().getUser();
    ResourceContext resourceContext = new ResourceContext(contextUser);
    Greetings,
    Praveen Gudapati
    p.s. points are always welcome for helpful answers

  • How can i get the current number of word in paragraph?

    I have cursor set on some word in Para. And i'd like to make italic all words before it. How can i get the number of current word in collection Words in mInd.Selection.Item(1)?

    Hi Dmitry1776,
    Try something like this:
    Set myInsertionPoint = myInDesign.Selection.Item(1)
    Set myStory = myInsertionPoint.ParentStory
    Set myStartCharacter = myStory.Characters.Item(myInsertionPoint.Paragraphs.Item(1).Index)
    Set myCharacter = myStory.Characters.Item(myInsertionPoint.Index)
    Set myEndCharacter = myStory.Characters.Item(myCharacter.Words.Item(1).Index - 1)
    Set myText = myInsertionPoint.ParentStory.Texts.ItemByRange(myStartCharacter, myEndCharacter).Item(1)
    ...at this point, myText is a range of text from the start of the paragraph to just before the text containing the insertion point.
    Thanks,
    Ole

  • How can I get the current user and the current page?

    Hi everyone
    Question..
    It is possible to get the current user (from the user's database on apex) and the current page? (I mean, if I'm in page 4 be able to query a variable / function or something which could give me the current displayed page)
    Thank you very much... I'd been researching without success :-S so I'll appreciate your help
    Regards,
    Fury

    Fury,
    If the user has authenticated, :APP_USER is the name that was used. The current page id is in :APP_PAGE_ID.
    Although I showed bind variable notation for those, & substitution format and v() notation are also available for referencing developer-defined items or built-in names. See the User's Guide for more details.
    Scott

  • Sometimes when I send a Pages attachment I can't open it afterwards. I get a message saying I need a newer version of Pages to open it. I find this odd since I created the document.  How can I get the attachment open?

    Sometimes when I send an email with a Pages attachment it is tuned into a zip file and then I am unable to open the atttachment afterwards.  I get a message saying I need a newer version of Pages in order to open the attachment.  How can I get around this?

    Carol,
    The message saying you need a newer version indicates that you saved from a newer version and tried to open with an older version. This has nothing directly to do with whether the file was compressed and packaged in a .zip file.
    If you have two versions of Pages on your computer, you must take care to note which of them you are using. You may want to delete a Dock alias to the older version and you may need to change the Finder preference for which version is set to automatically open .pages files.
    Jerry

  • How can I get the current time in Xcelsius?

    I'm reading in an XML feed containing dates/times, and I'd like to do a calculation to see how old it is -- but I can't seem to access the current time in Xcelsius (=now() doesn't work -- it only calculates once, when the model is loaded).
    I can get around that (a bit awkwardly) with a timer, but I'd also like to know what the user's current time zone is... Any ideas?

    Hi,
    Maybe you could use a web service to return the required information - you can feed the timezone to the web service.
    Have a look at this:
    http://www.earthtools.org/webservices.htm#timezone
    http://markitup.com/WebServices/TimeZones.asmx?op=CurrentDateTime
    Best regards,
    Jacob

  • How can i get the data from the weblink

    Hi All,
    Good Afternoon,
    i create a page with picklist,
    that picklist contains so many currencies like(USD,AED,BSD----------)
    when ever i am selecting the currency from that picklist,
    that time i want to get the current exchage rate from this link
    http://www.oanda.com/convert/classic
    how can i get the current exchage rate from that link.
    pls give me the gudaincee.
    i hope u will help me.

    Hi Gaurav,
    Below given link gives a nice demo of integrating web service with OAF. (For using captcha user verification service).
    [http://oracle.anilpassi.com/integrate-oa-framework-with-web-service-2.html]
    However, using web services will cost little extra effort of learning SOAP and wsdl.
    Please let me know if you find any difficulties related to web services.
    Abdul Wahid

  • How can I get the DPI of the current workstation?

    Hi can anyone help me?
    I want to know the dpi witch is set on a Windows system.
    How can i get it? Because i will reformat and fit the dpi of displaying images to the dpi of a current window system, e.g image= 200x200dpi and monitor=84dpi so the dpi of the images should be set to 84.
    But How can i get the current dpi of the Workstation?
    please help,
    florian

    yes but it sucks because windows-workstations
    manipulates the dpi to a standard value of 96 dpi...
    its equal if there is a 15" or a 17" monitor ...
    thanks floI agree, getScreenResolution() just doesn't work. Try changing your screen resolution setting (say from 1024x768 to 800x600) and this method will continue to return the same value!
    Can one adjust the scale so that you can draw a 1 inch square, for instance? The default affine transform property of the graphics object passed to paint methods is supposed to have 72 units = 1 inch, but that's not true. Again, adjust your screen settings and the same 72x72 square will come out in very different sizes.
    Is there any way to correct this, short of going to native code to get the screen resolution? I know that the screen display may be a bit miscallibrated, but anything would be better that the way it is now!

  • How Can I Get The Cpu State With Java?

    are there any method to use??
    what's more,I also wanna to know how can I get
    the current ram that the System is using
    and the threads the System are running?
    Will you please share your knowledge here or
    write to tell me at [email protected]?
    Thanks!!

    if you know how to do this in c++, you can write native methods and use them in java.
    native methods forum:
    http://forum.java.sun.com/forum.jsp?forum=52
    tobias

  • I downloaded an app off the store which said it was free and part of the 5 year promotion. I've been charged for the app by the store. I don't want the app and there's no one to speak to about it. Who can I call and how can I get the app off my phone?

    I downloaded an app off the store which said it was free and part of the 5 year promotion.
    I've been charged for the app by the store. I don't want the app and there's no one to speak to about it.
    Who can I call?
    How can I get the app off my phone?
    How do I get my money back from something I wouldn't have ordered?

    You cannot call anyone.  You contact them as everyone else does:  http://www.apple.com/support/itunes/contact/
    You delete the app as you do any other app.  Hold an icon until they wiggle.  Tap the "x".  This is covered in the manual.

  • TS3899 I upgraded to iOS 7 and I lost emails that were in my inbox - I used to see all emails that I did not delete, now I only have emails from the past month - how can I get the old, undeleted emails back? Or, at least, show email older than one month o

    I upgraded to iOS 7 and I lost emails that were in my inbox - I used to see all emails that I did not delete, now I only have emails from the past month - how can I get the old, undeleted emails back? Or, at least, show email older than one month old?

    I upgraded to iOS 7 and I lost emails that were in my inbox - I used to see all emails that I did not delete, now I only have emails from the past month - how can I get the old, undeleted emails back? Or, at least, show email older than one month old?

  • I won Lightroom 1.0 a few years ago at an Adobe clinic in Fremont. I have since misplaced the original disk and cannot get the program to open. It wants a serial number and I don't have one. How can I get the serial number so I can use the software?

    I won Lightroom 1.0 as a door prize a few years ago at an Adobe clinic in Fremont. I have since misplaced the original disk and cannot get the program to open. It wants a serial number and I don't have one. How can I get the serial number so I can use the software?

    Thanks for replying, Jim. I wasn't planning to use it for raw images. I shoot film, black and white, and have many negatives I want to print. I am unfamiliar with the upgrades in Lightroom. I wasn't unhappy with the version I have. It was useful for my purposes.
    Because it was a few years ago, I don't remember if I registered the product. I was able to login to my account. But could not find a path to communicate with Adobe. I will keep trying.
    Ken

  • Got a new iPhone that I've been using for about a month now, so the question is how can I get the pictures from my old iPhone and keep the pictures I have on the new iPhone?

    Got a new iPhone that I've been using for about a month now, so the question is how can I get the pictures from my old iPhone and keep the pictures I have on the new iPhone?

    Connect old iPhone to computer and save the pictures on computer.
    Connect new iPhone and sync the pictures to your new iPhone.

  • Please help.........how can i get the last date of the month?????

    Hello....
    I want to get the last date of the month.
    For example, the last date of Jan is 31.
    How can I get the last date of the particular month and year ????
    Thanks for help.
    Gloria

    Hi Gloria
    1. How can I compare the date???date1.compareTo(date2)
    where date1 and date2 is a java.util.Date Object
    will return 0 if it is the same date
    or
    date1.after(date2)
    where date1 and date2 is a java.util.Date Object
    will return true if date1 is after date2
    (the same for date1.before)
    2. How can I change the date format into yyyymmdd format???? I just want the year, month and date.try the java.text.SimpleDateFormat Object
    new SimpleDateFormat("yyyymmdd").format(yourdate)
    Hope this help.
    Please also have a look at a calendar I wrote, (maybe it help)
    demo & source :
    http://www.geocities.com/globe_software/java/components/
    globe_sa

  • Connot get it to accept cookies; privacy settings are re-set each time after I change them. How can I get the privacy setting to stick and accept cookies?

    I need to accept cookies to log into a technical site. I clear all cookies and the history and follow the instructions for setting privacy options to "Use custom settings for history" and to accept all cookies. When I go back to try logging into the site, it still tells me cookies aren't accepted. When I go back to Options-Privacy, the setting has been changed back to "Remember history" from "Use custom settings for history". I have done this about 5 times, trying various options, closing Firefox after making the change and starting it again - nothing works. How can I get the privacy settings to stay as I set them and accept cookies?

    Blocking all cookies in Safari does not work. Deleted cookies will not stay deleted. There are numerous threads on this going back years, both in these forums and elsewhere. Many claim to have submitted the issue to Apple, but I have never seen anyone post a reply.
    I have seen many suggested fixes that involve finding the cookies file, some including Terminal manipulations, and none seems to work universally. I can find noplace where Apple addresses this officially with an actual Apple-approved explanation or how-to.
    Bottom line, your browser's security features should do what they claim: delete cookies. When they come back without ever even visiting another page, this is clearly not working in the way a reasonable user would expect.
    Bottom line, Safari does not protect users' privacy in the way it pretends to and, after so many years of this issue, it appears that Apple wants it this way.
    Having spent way too much time on this, I realize the choice is between Safari which is pretty well optimized; Firefox which is a lot pokier, at least for me; and Chrome, which I assume funnels personal information directly to Google.

  • How can i get the details on system before 2 months

    Hi gurus,
              To find the Total cpu time ,  cummulative users  we go for St03 and extract it. The details are available for only last 2 months.  How can i get the prevous months details. Is there any special job or parameter meant on SAP behalf, so tat it clears the history. If it runs kindly tel me wat job or parameter it is. And also tel how can i get the previous months details.
    Thank you.
       Livi.
    Moderator message: not directly related to ABAP development, please have a look in the Netweaver forums.
    Edited by: Thomas Zloch on Jan 5, 2011 11:43 AM

    Hi
    U should ask that to your basis, I know the system has the statistic data for a certain period only, the older data are deleted: I don't know if before deleting it a backup is done....but I don't believe
    Max

Maybe you are looking for

  • Iphoto won't show pictures of my connected iPhone4 anymore. Why?

    since a few days it isn't possible to see or transfer photos of my iPhone 4 in iPhoto '11. It was possible before with same iPhone and same miniMAC. You can see, that the iPhone is shown in iPhoto and on the right top corner you see, 'Laden...' which

  • ATV Update causing TV to switch to HDMI input when switched on

    I have a Panasonic TX32LXD70 with my ATV connected using HDMI, the TV is set to go to the DVB-T tuner when switched on. Before the "Take 2" update this worked fine but since upgrading when you turn the TV on it switches to ATV after about 10 seconds

  • Advance Receipt from Customers

    Dear All, Advance receipt from customer amount which tebles it will updated? which T.code used Which tables and fields are updated document Type, and posting keys,accounting entry what is the logic, Pl explain me Regards KSP

  • Updating iTunes without Internet Connection

    I just got a new Nano and it didn't come with any disks or anything. When I plug it in it asks if I want to upgrade, then says that the iPod isn't compatible for such an update. If I choose not to upgrade it continues, looks as if the songs are going

  • Mount_smbfs fails for one file server but works on another

    I have a simple terminal .command file that i've written and added to my login items. this script mounts two SMB file shares from different servers (win2003). this script has been working for over a month now it fails for one server and works fine fo