Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Pricing period

Hello

I'm using SD pricing condition table A004 and have f.ex. three condition records. Each record consists for a material with a valid from - valid to date.

example:

matnr: 312, datab: 01.01.2008, datbi: 15.01.2008

matnr: 312, datab: 16.01.2008, datbi: 31.01.2008

matnr: 312, datab: 01.02.2008, datbi: 31.12.2008

I would like to create a select statement to get all records within a given period.

In this case I would like to know all existing records within January 2008:

h_datab = 01.01.2008

h_datbi = 31.01.2008

SELECT knumh INTO TABLE t_knumh FROM A004

WHERE kappl = 'V'

AND kschl = kschl

AND matnr = matnr

AND datbi BETWEEN h_datab AND h_datbi

AND datab BETWEEN h_datab AND h_datbi

=> I also tried GT, LE etc.

Any ideas ?

thanks

Tags:
Not what you were looking for? View more on this topic or Ask a question