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: 

Need standard Function Module for Get price from KONP

Former Member
0 Kudos

Hi All,

I need to code for the following logic

1) Select access sequence code from T685 (field KOZGF)

2) Using this code get an access sequence tables from table T682I(field KOTABNR). There is a number in this field which is a table name if to add letter 'A' before it. This table name is a table where you can find condition records. Every condition table has got field 'KNUMH' which is a reference to condition rate table.

3) Select condition rate from table KONP (field KBETR)

4) Select scale rates if you are using them from table KONM (field KBETR).

Just want to ensure, if there is any standard FM which can help in above logic.I got a FM 'SD_COND_ACCESS'. But not sure, how it can help me?

Thanks in advance.

3 REPLIES 3

Former Member
0 Kudos

Hi

It seems the querry is not clear?

Which price you wants to get? I mean related some Sales order or some Pur order ?

You are saying access sequence ? what are the fields for that access sequence?

it will be defined based on Vendor, Pur orgn and Material or on some other criteria.

So what's that criteria?

Even to take some Access sequence from T685 which record you take?

So be sure about the access sequence fields

and pass them to some A* table, based on the access sequence only this will be known.

and take the KNUMH field from that A* table

and pass that KNUMH to KONP and take the KBETR or LWERT fields based on the KSCHL field.

Regards

Anji

0 Kudos

Thanks Anji for your quick reply.

I do have Access Sequence with me, it is Z011. here i am writing more details, I do have material number.Here article means Materail number.

o Determine the merchandise category for the article in the list from MARA-MATKL

o Determine the department for the article from first 3 characters of MARA-PRDHA

o Determine the vendor for the article from EINA-LIFNR where EINA-MATNR = article in list and EINA-RELIF = ‘X’

o Now use the access sequence Z011 (table T682I) to determine the ‘A’ tables and sequence in which in these table must be read for determining the condition records.

o Use table T682Z to determine which fields must be used to read the ‘A’ tables above (in T682I).

o The ‘A’ tables must be read using condition types Z006 (margin) and Z007 (discount) where the Order Book effective date is between the valid-from and valid-to dates in the A- table, and in the sequence according to table T682I. When a condition record is found, the program must stop reading the subsequent tables, and determine the discount or margin from table KONP-KBETR, where KONP-KNUMH = A table-KNUMH.

 If the condition type is Z006, KONP-KBETR is positive. For condition type Z007, KONP-KBETR is negative.

 Divide KONP-KBETR by 10 to give KBETRX. Retain sign in KBETRX.

 Calculate the discounted / price with margin as follows:

(1 + (KBETRX/100)) * wholesale price.

Is it possible to get above logic by standard FM.

Message was edited by:

Vipin Nagpal

0 Kudos

Hi all,

I got a FM:'CONDITION_RECORD_READ'

Thanks