Application Development 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: 

How to get the Database table behind condition records

Chandra_Hota
Participant
0 Kudos

Hello All

In transaction VK13, after giving condition type, I can select sales document.

For a given Sales Document number, there are several conditions.

How can i extract all the conditions for a given sales document?

I am coding a report for this. In which database table can i get the condition between sales document number & different conditions attached to it?

On the screen, i can see that the fields are from the structure KOMG. What is the corresponding table?

Thanks

Chandra Sekhar

5 REPLIES 5

Former Member
0 Kudos

Hi,

corersponding tables will be konp , a771,a511,a564

here i am providing you sample query related to it

{ -Get the Territory list price YPR0

SELECT vkorgau

zzland1_ag

zzmatgrade

a511~kfrst

datbi

datab

kbetr

INTO TABLE it_list1

FROM a511

JOIN konp

ON a511knumh = konpknumh

WHERE a511~kappl = 'V'

AND a511~kschl = 'YPR0'

AND vkorgau = '5000'

AND zzland1_ag = v_land1

AND loevm_ko <> 'X'.}

Thanks & Regards,

Sateesh.

Edited by: sateesh kumar on Nov 12, 2009 12:59 PM

0 Kudos

Hello Satesh

Surprisingly, I cannot find any of the 'a' tables (a771,a511,a564) in my system.

Thanks

Chandra

0 Kudos

but i am able to see here in my system they are SAP standard tables they should present in your system

check once again or ask your functional consultant

Former Member
0 Kudos

Conditions in SD may be at header or item level....look at table KONP for your document with posnr = 0 for header, <> 0 for conditions for a specific item.

0 Kudos

Thanks for your replies.

I just found that in table A904, we can find relations between conditions and sales document numbers.

Thanks...