11-12-2009 11:33 AM
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
11-12-2009 11:58 AM
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
11-12-2009 12:06 PM
Hello Satesh
Surprisingly, I cannot find any of the 'a' tables (a771,a511,a564) in my system.
Thanks
Chandra
11-12-2009 1:04 PM
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
11-12-2009 12:47 PM
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.
11-12-2009 12:48 PM
Thanks for your replies.
I just found that in table A904, we can find relations between conditions and sales document numbers.
Thanks...