on 05-10-2012 3:26 PM
SELECT SINGLE knumh FROM a367 INTO condition_no WHERE aland = country AND werks = plant AND regio = region
AND matnr = material AND datab LE validity AND datbi GE validity.
IF sy-subrc EQ 0.
SELECT SINGLE kbetr FROM konp INTO amount WHERE knumh = condition_no.
ENDIF.
Solved
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
All of the items you need to specify (Country/Plant/Region/Material/Release status/Valid On) can be passed into BAPI_SALESORDER_SIMULATE. Sreekanth is correct in that direct access of the condition tables is faster. I know of 2 instances in our ERP where they are accessed. And that is 2 instances which must be adjusted when a new price condition is defined.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check out BAPI_SALESORDER_SIMULATE. It accepts the partner number and conditions table as VK12 does.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks for the post.but based on condition type and key combination of
Country/Plant/Region/Material/Release status/Valid On, I want the amount.
BAPI you suggested is taking the details from sales order like
ORDER_HEADER_IN
ORDER_ITEMS_IN
ORDER_PARTNERS
ORDER_SCHEDULE_IN
ORDER_ITEMS_OUT
ORDER_CFGS_REF
ORDER_CFGS_INST
ORDER_CFGS_PART_OF
ORDER_CFGS_VALUE
ORDER_CFGS_BLOB
ORDER_CCARD
ORDER_CCARD_EX
ORDER_SCHEDULE_EX
ORDER_CONDITION_EX
ORDER_INCOMPLETE
MESSAGETABLE
EXTENSIONIN
PARTNERADDRESSES
These all fields i Dont know...
Can you suggest me other bapis so that i can get the amount.
I was also thinking the same.But still unable to find the right KNUMH (Condition record number) Value from A367 that is used to store the details regarding Country/Plant/Region/Material. Since there may be no of Condition record number for the same material. I am getting no of values for the KNUMH field if I am filtering data based on the Country/Plant/Region/Material form A367 table. if I am filtering data based on the Validity start date (DATAB) in combination with Country/Plant/Region/Material then i am getting the right value for KNUMH Field.But Don't know how to get the Valid From Date from Transaction VK13.
So can you tell me from where I can get the value of Valid From in the VK13/VK12/VK11.
if it is possible then I can do a direct query to the table KONP based on the KNUMH field & will get the amount.
Thanks
Saurabh Shrivastava
User | Count |
---|---|
97 | |
10 | |
9 | |
6 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.