Skip to Content
author's profile photo Former Member
Former Member

Validation on company Code

Hi Experts,

I have a requirement in which I am giving a select option for the company code field,which is from t001-bukrs.Based on the validation result , i have to proceed in the program flow.

Now I have to write a code to validate the entered company code.If say user enter company code from 1 to 50 and out of this,say only 1,2,3 and 49 are valid,so i have to process only these and rest all(3-48 and 50) should be shown as invaild company code with the no.

Please give me the logic as soon as possible.

Thanks a lot.


Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Jun 18, 2008 at 01:10 PM

    You can fire a select query on the table T001 with the select option and get the data in an internal table. This table will only have the valid "Company Codes"...

    select bukrs

    into table t_bukrs

    from T001

    where bukrs in s_bukrs

    where s_bukrs is a select option for company code.

    Now the table t_bukrs will have the Valid Company Codes and this table can be used for Further Processing.



    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Abhishek Jolly

      Hi Abhishek,

      Thanks a lot for your helpful suggestion.

      But my requiement is like that only. Company code can have a range of values.

      condtion expected result

      1 Input improper company Error to be prompted as

      code Invalid Company code

      2 Input one improper company Error to be prompted for one

      code in the range company code only.The rest

      to be processed successfully.

      Please help me in this scenario.



Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.