cancel
Showing results for 
Search instead for 
Did you mean: 

Query with information from SD tables

Former Member
0 Kudos

Dears,

I have two questions concerning the creation of a Query which reports information of sales orders and information related to these (tables VBAK, VBAP, KNA1, VBKD).

1. I want to include for example the ship-to-party, but I only find the field in structures, so it would not be able to include... or is there another way to acces this field?

2. I want to include the field KONWA (rate unit). It should appear showing the rate unit depending on the condition type PR00 on item level... Is this possible?

If anybody could help me out on this topics, I would appreciate it a lot!

Thanks in advance,

Dominik Ley

Chile

Accepted Solutions (1)

Accepted Solutions (1)

Shiva_Ram
Active Contributor
0 Kudos

Hi,

1. I want to include for example the ship-to-party, but I only find the field in structures, so it would not be able to include... or is there another way to acces this field?

To get the value, include table VBPA in your query.

2. I want to include the field KONWA (rate unit). It should appear showing the rate unit depending on the condition type PR00 on item level... Is this possible?

To get the rate unit value, you need to include tables A600 (or A601- Check your system), KONH and KONP tables in the query.

Regards,

Answers (3)

Answers (3)

Former Member
0 Kudos

Another question:

If I want to have KUNNR with "PARVW=WE", how can I define that the Query always enters into table with PARVW=WE? Thank you....

Dominik

Former Member
0 Kudos

Ok,

the first problem is solved. The table VBPA contains the requiered data.

The second problem is not solved yet. I do not have table A600 either table A601...

Any idea?

Thanks,

Dominik,

Chile

Former Member
0 Kudos

Hi,

The answer for the first question is If you want to include ship to party at

a)Header level:Simply pass the order number in to VBPA table and fetch for PARVW="WE" having POSNR=000000.By default header details will appear in this table.Take "ADRNR" field contents and pass to ADRC table to fetch the address.

b)Item level:If you want ship to party address at the item level Simply pass the order number in to VBPA table and fetch for PARVW="WE" having POSNR=000010 or 000020 like that what ever is your line item number.If it recognises any change in change at the line item then only the entry will appear in the table.otherwise you cannot find any entry in the table.Take "ADRNR" field contents for the corresponding line item and pass to ADRC table to fetch the address.

Regards,

Mohan.