‎2008 Jul 18 10:48 AM
hi.
i am developin a smartform for credit note. in maiin window i suppossed to populate the price (MRP) based on the condition type VKPO. i need to retrieve the price for vbrk-vbeln.
can anyone help me , how to do that
‎2008 Jul 18 10:53 AM
jyothsna,
use KNUMV and KPOSN field .KNUMV is available in VBRK and KONV both and comapre KPOSN with VBRP-POSNR.
Amit.
‎2008 Jul 18 10:56 AM
hi,
get the KNUMV (Number of the document condition) from vbak for the credit note number .......then next go to KONP table
match the record with KNUMV and kschl = 'VKPO' and get the value
‎2008 Jul 18 11:08 AM
thanks for ur reply sailaja.
from which field i should get the price. is there anu necessary to use the table A073. in which cases we use this table?
being an abap fresher i wold like to know the details clearly. can u explain
‎2008 Jul 18 12:12 PM
Hi J ,
tables started with A* is for 'Z' condition tables , while creating the access sequence u will need to create a table, In case of Z conditions u need to get the data from these A* tables.
regards
Prabhu
‎2008 Jul 18 11:03 AM
Hi Jyothsna,
You need to consider line item also while retrieving the conditionproce, coz for every line item conditional value differs.
Please find the below sample code for your reference
Select vbeln posnr knumv from vbrk inner join vbrp
on condition vbrkvbeln = vbrpvbeln
into table ivbrp where <condtion>
if ivbrp[] is not initial.
loop at ivbrp.
select knumv kposn kawrt kbetr from konv into w_konv
where knumv = ivbrp-knumv and
kposn = ivbrp-posnr and
kschl = 'VKPO'.
endloop.
endif.
Hope the above will help you.
Regards,
Sujatha
Edited by: Sujatha Reddy on Jul 18, 2008 12:49 PM