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

Logic in ABAP HR

Hi folks,

Actually my requirement is, i have some data in an internal table. I have to check the particular record in in that itab is there in infotype 9003 by checking some condtions. if the record is not found in the 9003 i need to display a error message. I am new to ABAP HR. Please help me regarding the logic of comparing ITAB and an infotype in my requirement here.

Thanks,

Ram.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 19, 2008 at 02:36 AM

    Hi,

    use the PROVIDE and END PROVIDE statement in hr module since we will use logical database to featch the data.

    To provide error message just use if provide statement is initial

    then our error message should appear.

    Regards

    Krishna

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 19, 2008 at 02:20 AM

    Hi Ram,

    U can directly write SELECT Query to the Infotype 9003 by giving the condition in the WHERE clause of ur SELECT statement.

    If the SELECT query dones not executes successfully then given the ERROR message.

    OR

    U can get the data from infotype 9003 in to another internal table and then check the two internal table data and the raise ERROR message u the data does not matches.

    Best regards,

    raam

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Kodandarami Reddy,

      I first looped the ITAB. Then under that loop i am reading the infotype p9003 by giving the conditions. if no record find, displaying message. is this correct way of doing. Because i was told that p9003 itab is created by default after the statement GET PERNR. pls suggest me.

      Thanks,

      Ram.

  • author's profile photo Former Member
    Former Member
    Posted on Jun 19, 2008 at 04:49 AM

    Hi Ram,

    Try this

    SELECT SINGLE * FROM pa9003 INTO itab_9003 WHERE <conditions>.

    IF sy-subrc NE 0.

    <display error message>

    ENDIF.

    regards,

    teja.

    Add a comment
    10|10000 characters needed characters exceeded

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.