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

Fetching data from pa0000 pa0002 pa0006 and pa0041

Hi All,

I have below specilf requriement .

For a list of user ids (around 2000) i need to fectch data from different infotypes like pa0000 pa0002 pa0041 and pa0006

in on shot.

condition is that ,the pernrs should be present in pa0000 ,pa0002 and optinal for pa0006 and pa0041.

and i have prepared an inner join for the same.but it is not giving me records which are present in all 4 tables ,so i am loosing some records where address is not mantained.

i have also tried to use left outer join ,but here system will not allow to put where condition for other tables.ie i can put condition only for left table in my case pa0002 ,but i cant put any condition to pa0006 and pa00041.

so how can i achive the result.

Regards

CB

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Aug 28, 2010 at 06:35 AM

    How do you need to fetch the data, for all EEs at once, or for all infotypes per EE at once? I think combining these two might fail or at least there will be many difficulties to extract data later for one of the EE.

    I think the best approach is to use [PROVIDE|http://help.sap.com/abapdocu_70/en/ABAPPROVIDE_SHORTREF.htm] as it lets you to receive only this part of records which overlaps, exlcuding all the parts where there is missing any of them. i.e

    "the IT entries are as follows:
    IT0000 '------------------' --------------------------'
    IT0002 '-----------'--------------------'-------------'
    IT0006 '--------------------------'-------------------'
    IT0041 '--------'                             '-------'
    

    So using provide for one EE at once, you will get the final result

    result '--------' IT0041 not valid            '-------'
    

    Within provide loop you simply check flags p0000_valid , p0002_valid, ... All of these where are set ( 'X' ) are valid for this period part. So using this technique is like cutting the individual records in smaller parts so that JOIN is created for result . In all the parts you can check which ITs created this result JOIN. Those missing have pXXXX_valid = space flag.

    Regards

    Marcin

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 28, 2010 at 06:36 AM

    Hi,

    pernr is present in all 4, what condition are you puting for inner join?

    Regards,

    Harsh.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 29, 2010 at 05:54 AM

    thanks all for valuable help

    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.