Validation for GL account

Hi all,
i am doing valodations for GL accouont. my requirement is to if the user enters the any GL account other then the range  0000100000 to  0000299999, it should through a Error message saying that Enter GL account in the range range  0000100000 to  0000299999.
i tried with the below code, but still not able to get the requirement.
SELECT-OPTIONS:  s_saknr   FOR skat-saknr .
AT SELECTION-SCREEN.
if not o_saknr-low is NOT INITIAL.
SELECT SINGLE * FROM skat WHERE saknr = o_saknr-low and
        saknr in between '0000100000' and  '0000299999'.
    IF sy-subrc NE 0.
      MESSAGE e001(00) WITH 'GL account in the range range  0000100000 to  0000299999'.
    ENDIF.
ENDIF.
thanks
Nirmala
if not o_saknr-high is NOT INITIAL.
SELECT SINGLE * FROM skat WHERE saknr = o_saknr-low and
        saknr in between '0000100000' and  '0000299999'.
    IF sy-subrc NE 0.
      MESSAGE e001(00) WITH 'GL account in the range range  0000100000 to  0000299999'.
    ENDIF.
ENDIF.

Hi,
Try this:
1) First loop at the select option and fill the data into a range.
2) Validate the values in range:
if r_range NOT between (0000100000' , '0000299999').
error message----
endif.
OR
if not o_saknr-low LT 0000100000'  OR o_saknr-high GT '0000299999'.
error message---
endif.
Regards
Shiva

Similar Messages

  • Validation for GL Account Long Text

    Dear All,
    Is it possible to maintain validation for GL Account long text.
    Basically my requirement is to avoid duplication of GL accounts with same long text.
    Best regards,
    Inoka.

    Hi,
    I think you are talking about GL account name long text should not be reapeted when  you are creating one more GL account.
    If it is the case, It can be possible through programming. please explain the requirement to your Abaper.
    Before writing program, try to create & test the validation with any expert from your side, it may be possible with some conditions (< >, =) in Validation.
    Regards
    Kanna

  • Validation for Expense Accounting Entry

    I need an up-front validation to allow only certain internal orders to be valid for the expense entries.
    However I do not see anyplace in the configuration for defining such a validation.
    Any direction regarding this is greatly appreciated

    Hi
    use transaction GBB0
    and
    select the Financial Accounting tab
    select the line item
    click on the Create Validation button
    then create the steps
    in the prerequisite enter the required fi transactions
    check for that internal order field value
    create  a set with the allowed internal orders
    through error message if the value is not matching with the internal order in the set.

  • Validation for GL Account & Cost Center combination

    hi. i want to prevent gl postings to combination of gl account 123 and cost center abc.  the validation created via ggb0 under financial accounting, line items looks like this:
    PreReq:    BSEG-KOSTL = 'abc'
    Check:      BSEG-HKONT = '123'
    Message:  "Invalid Acct/Cost Ctr combo"
    but when i do f-02 for gl 123 cost center abc, the warning message doesnt appear.
    any insight is much appreciated!

    Hello,
      I did the same in our org. change the condition of check into prerequiste and prerequisite into check then it will work and in OB28 activate the same for your company code.
    Regards,
    sankar

  • Validation for f-43. urgent please

    Hi All,
    I wrote a validation for finance accounting using GGB0 tcode as follows.
    Prerequisite:
    BKPF-BUKRS = '1000' AND ( BSEG-KOART = 'K' OR
    BSEG-KOART = 'D' )
    Check:
    BSEG-SECCO <> '' AND BSEG-BUPLA <> ''
    Message:
    Enter values in Business place and Section Code.
    activated using T.code OB28.
    It is working very well in f-43 till posting the Document but when try to make a payment through f-53 or f-58 it is giving a problem. That is, The value of secco is not passing and the validation message is popping up even though the values of secco(section code)and bupla( business place) are passed and posted in the f-43.
    It is not getting traced why the value of secco is not populated and if i remove the validation it is working fine.
    regards
    PSNG.

    Hi,
      I may not solve your problem, but i can give you small hint.
    before
    Check:
    BSEG-SECCO '' AND BSEG-BUPLA ''
    Message:
    Enter values in Business place and Section Code.
    you put an if condition for the transaction code f-43 and try.
    My cying is if the t.code is f-43, then only that piece of code will work, else it wont.  so, f-58 may not disturbed.  Just try.

  • When trying to update my Apps I am being advised my account is not valid for the UK, I must switch to the Ireland store. How do I do this?

    When trying to update or purchase Apps I am being advised my account is not valid for the UK Store and I must switch to the IReland store. How do I do this?

    Change App Store
    1. Tap "Settings"
    2. Tap "iTunes & App Stores"
    3.Tap "View Apple ID"
    4. Enter your user name and password.
    5. Tap "Country/Region."
    6. Tap "Change Country/Region"
    7. Select the region where you will be located.
    8. Tap "Done".

  • Whenever I updated or downloaded a new app from the App Store, a message appears saying:   "Account Not In This Store Your account is not valid for use in the U.S. store. You must switch to the Swedish. store before purchasing."   I made some research onl

    Whenever I updated or downloaded a new app from the App Store, a message appears saying:
    "Account Not In This Store
    Your account is not valid for use in the U.S. store. You must switch to the Swedish. store before purchasing."
    I made some research online and asked a few of my friends with the same problem. All they did was sign out of iTunes from settings>iTunes & App Stores or from the App Store itself and signed back in. It worked for many of them but not with my iPhone 4s. It really does get on my nerves to always sign out and back in to the App Store as it sometimes works and allows me to update and download or most of the time it doesnt.
    When viewing my Apple ID account on my iPhone (after entering the password) it either views my account or says:
    "This Apple ID is only valid for purchases in the U.S. iTunes Store. You will be switched to that Store. Try your purchase again."
    So I press on OK then either switches me to the App Store app of its choice, or says "Cannot connect to iTunes Store".
    I tried restoring iOS6 hoping it was a bad installation, but i still have the same problem.
    Can anyone help me please?
    Arian

    Are you sure your AppleID is NOT tied to the US store? If you are trying to buy an app from the Swedish store you will be unable to do that. Some apps are only available on certain stores. That is why you get the "Cannot connect to the iTunes store" message when trying to buy that app. Your updates are being done from the US store ; thats why you can update sometimes and sometimes not.
    If you keep encountering problems contact iTunes support. They will help you sort it out.

  • Why do I get the message when I try to purchase an app or song on itunes using my iPhone5? "Account Not In This Store. Your account is not valid for use in the U.S. store. You must switch to the New Zealand store before purchasing."

    When I try to buy either an app or a song via iTunes, I have just started getting the following message and I am unable to change the store location. "Account Not In This Store. Your account is not valid for use in the U.S. store. You must switch to the New Zealand store before purchasing."
    This problem has only just started happening. I am on an iPhone5 iOS 7.0.4.
    Very frustrating. Can someone please tell me why & where the change has occured and how to fix it? In the past I have purchased many apps and songs on itunes and never had this problem.
    Thanks a mill :-)

    Click here and follow the instructions to change the iTunes Store country.
    (97125)

  • I can't get FaceTime or iMessage to connect, I enter valid password (tested and works for Apple account) and it won't connect. I have checked all settings, upgrades iOS to 8.3 rebooted, changed Apple acount PW still wont connect. My internet connecti

    I can't get FaceTime or iMessage to connect, I enter valid password (tested and works for Apple account) and it won't connect. I have checked all settings, upgrades iOS to 8.3 rebooted, changed Apple acount PW still wont connect. My internet connection is fine Safari works and I can access all sites. I have an iPad 2. Any help on this will be greatly appreciate.  iPad 2, iOS 8.3

    This is an ongoing problem as you will see by searching the forum. 
    Out of curiosity, do you have 2 step verification enabled?  It was recently extended to include iMessage & FaceTime & I'm wondering if it might be causing some of the issues that some users are experiencing.

  • ITunes / AppStore problem: I live in Colombia, my apple ID and iTunes account are set in Colombia, but each time I try to register my Colombian credit card it tells me my credit card is not valid for the store. How can I fix this?

    I live in Colombia, my apple ID and iTunes account are set in Colombia, but each time I try to register my Colombian credit card it tells me my credit card is not valid for the store. How can I fix this?

    credit card it tells me my credit card is not valid for the store.
    Hi Don ...
    "Although you can browse the iTunes Store in any country without being signed in, you can only purchase content from the iTunes Store for your own country. This is enforced via the billing address associated with your credit card or other payment method that you use with the iTunes Store, rather than your actual geographic location."
    From here >  The Complete Guide to Using the iTunes Store | iLounge Article
    The iTunes and Mac App Store are one in the same.
    And check out this support article here   >  iTunes Store: My credit card's security code or zip code does not match my bank's records

  • How to switch to a different app store? I am trying to update my apps but am getting a popup that says your account is not valid for use in the uS store. you must switch to the Canadian Store before purchasing. How do I do this?  I can't find the place

    I am trying to update my apps but keep getting a popup that says "Your Account is not valid for use in the US store. you must switch to the Canadian Store before purchasing." I can not find where to do this! Please help! Thank you!

    [Apologies to pdesteele for this slight OT bit, but it's all relevant to your question, I think ]
    We do have a place in the UK which we could use as an address, but for various reasons it gets a bit complex even though we still have a UK bank account. We moved to France when there were no iDevices and apps around, just bought the occasional music, so it wasn't a problem. Funny thing is I can't even download the free UK bank app because it's not available in the French store .
    I'll live with the problem for now as we plan to move back to the UK in a year or so - we miss the weather .

  • I tried to update the App that I purchased but the message told me that my Apple account is not valid for use outside of US and I must switch back to US store to able to do it. How can I switch the account from foreign countries back to US?

    I tried to update the App that I purchased but the message told me that my Apple account is not valid for use outside of US and I must switch back to US store to able to do it. How can I switch the account from foreign countries back to US?

    On your phone (from http://support.apple.com/kb/ht1311):
    Change your iTunes Store country
    Sign in to the account for the iTunes Store region you'd like to use. Tap Settings > iTunes & App Stores > Apple ID: > View Apple ID > Country/Region.
    Follow the onscreen process to change your region, agree to the terms and conditions for the region if necessary, and then change your billing information.

  • I can't set up my email account on my ipod touch.  It keeps saying that I have to use a valid email address for this account

    I can't set up my email on my ipod touch.  It keeps saying I have to use a valid email address for this account.  Help!

    Hi Annie,
    Make sure when you are setting up your e-mail account that you enter in your entire e-mail address.  If you have a Yahoo (includes any e-mail account associated with Yahoo), G-mail, or Aol after entering in your password it should automatically set up.  Any other e-mail address you will have to manually set the account up.

  • I am traveling out side of the U.S. and I am trying to up-date some apps on my iPod touch and now I'm getting this message... "Account Not In This Store Your account is NOT valid for use in the Ecuadorian store. You must switch to the U.S. store... help!

    I am traveling out side of the U.S. and I am trying to up-date some apps on my iPod touch. Now I'm getting this message... "Account Not In This Store. Your account is NOT valid for use in the Ecuadorian store. You must switch to the U.S. store"
    Please, is there anyone one out who can help me solve this problem? I just can seem to figure out how to get to the U.S. store... thanks!

    I just read this solution, tried it & now it's working...
    I think I found a fix...I went to Settings, iTunes & App Stores, then click on your Apple ID...view Apple ID...change country region to USA (even though it was already USA...just do it again...go through the steps making sure the United States store is selected...agree to the Terms of Service, THEN I think what the key is is to RE-auhorize your credit card...in my case all I had to do was enter the security code...and it worked...I am now able to download the YouTube app for example...couldn't do it before.

  • When I try and download app updates via wi-fi to my Ipad I get an error message "Your account is not valid for use in the Australian Store. You must switch to the US store before purchasing."  I am in the US how do I switch?

    When I try and download app updates via wi-fi to my Ipad I get an error message "Your account is not valid for use in the Australian store. Your must switch t the US store before purchasing. I am currently in the US on wi-fi. How do I switch

    Change App Store
    1. Tap "Settings"
    2. Tap "iTunes & App Stores"
    3. Tap on your Apple ID
    4.Tap "View Apple ID"
    5. Enter your user name and password.
    6. Tap "Country/Region."
    7. Tap "Change Country/Region"
    8. Select the country/region where you are located.
    9. Tap "Done".
    Note: If the change doesn't take effect, sign out of account and sign in again.

Maybe you are looking for