Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP Query issue

Former Member
0 Likes
882

Hi ,

I have created a query using MSEG & AUFK. I can get data only if the query gets AUFNR using which I connected these tables.

But now I want query to show data which doesn't have AUFNR e.g. data with mov type 201 and posting date from MSEG.

How I can achieve this, please suggest.

Regards

plm

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
853

AUFK always has an aufnr.  It doesn't seem logical to include AUFK if you want non-aufnr records.

However, you could always MSEG outer join to AUFK.

Neal

PS:  This would be far better done in an ABAP report!

6 REPLIES 6
Read only

Former Member
0 Likes
854

AUFK always has an aufnr.  It doesn't seem logical to include AUFK if you want non-aufnr records.

However, you could always MSEG outer join to AUFK.

Neal

PS:  This would be far better done in an ABAP report!

Read only

Former Member
0 Likes
853

Hi PLM,

As suggested by Neal, it does not make much sense to include AUFK records if its key fields are to be ignored. Please provide your business need.

As SQVI says (& you also know),

BR.

Read only

Former Member
0 Likes
853

thanks Neal & Ankit ,

Actually I want to make material consumption report in which movement type 261 & 201 is used to issue materials from stores. Using MSEG & AUFK my first requirement is 261 is fulfilled but not able to get the data for 201 in the same report.

please suggest a solution ...

regards

PLM

Read only

0 Likes
853

For sure, you shouldn't be using SAP Query!

Read only

P1389307362
Explorer
0 Likes
853

Hi,

The best way is to create a ABAP program. Because reading from BSEG will cause the program to getting slow because it may have huge amount of records than other talbe.

Regards,

Prasad

Read only

Former Member
0 Likes
853

Tired all trial and error ..but couldn't succeed .

At last made ABAP Report.

Thanks all !