cancel
Showing results for 
Search instead for 
Did you mean: 

i want it to enter base price to sales order as soon as i enter item code

Former Member
0 Kudos

SELECT T1."Price" FROM OITM T0 INNER JOIN ITM1 T1 ON T0."ItemCode" = T1."ItemCode" INNER JOIN OPLN T2 ON T1."PriceList" = T2."ListNum" WHERE T2."ListNum" = 1 AND T0."ItemCode" = ??

I am trying to get base price automatically by help of query in sales order. i want it to enter base price to sales order as soon as i enter item code. when to place of question mark i put item code it gives result. but i want it to be dynamical. Could you help me plz?

Accepted Solutions (0)

Answers (8)

Answers (8)

kothandaraman_nagarajan
Active Contributor

Hi,

Try this,

SELECT T1."Price" FROM OITM T0 INNER JOIN ITM1 T1 ON T0."ItemCode" = T1."ItemCode" INNER JOIN OPLN T2 ON T1."PriceList" = T2."ListNum" WHERE T2."ListNum" = 1 AND T0."ItemCode" =$[$38.1.0]

Former Member
0 Kudos

but when i am writing this code in my query,it would be error.My database is Hana.Is this depend on Hana?

kothandaraman_nagarajan
Active Contributor
0 Kudos

Yes, please change it as per HANA

Former Member
0 Kudos

i cant do it.Please,can you tell me how i write in Hana?

kothandaraman_nagarajan
Active Contributor
0 Kudos

Run query and save it in query generator. And then open sales order and run saved query.

Former Member
0 Kudos

But this query is not working.When i execute this query,this error will show me - 1). [SAP AG][LIBODBCHDB32 DLL][HDBODBC32] Syntax error or access violation;257 sql syntax error: incorrect syntax near "$": line 1 col 182 '' (SWEI) (at pos 182)

And i cant change this code as HANA .Please,any suggestion

Former Member
0 Kudos

i find it.Thank you very much

former_member230931
Participant

This is standard functionality ...Just setup prices according to business requirements using

1.Price list

2.Perido and volume discounts

3.Discount groups

4.Special prices for BP

kothandaraman_nagarajan
Active Contributor

Hi,

Are you looking for formatted search?

Regards,

Nagarajan

Former Member
0 Kudos

yes,i am looking for FMS

kothandaraman_nagarajan
Active Contributor
0 Kudos

Yes sure, but please create new discussion for this new requirement. Also try to explain with original document screen.

kothandaraman_nagarajan
Active Contributor
0 Kudos

OK. Please close this thread by assigning correct answer. Thanks

Former Member
0 Kudos

I am new in this program.Maybe i cant explain correctly.

Can i ask anything? I use Price Report and i have 2 column in Sales Order(Discount 1 and Discount2).But i want that when i use price report,for example 28%+1%,Discount 1 will get 28,and Discount 2 will get 1.Can you tell me how i write this query? I must use substring method?

kothandaraman_nagarajan
Active Contributor
0 Kudos

What was the reason?

Former Member
0 Kudos

When i execute this query,this code will be error again.But i saved this query,and then i saved it to UDF.Then this code is working.But when i execute this code,it will show error again

kothandaraman_nagarajan
Active Contributor
0 Kudos

Did you run query and save it under query manager? Same query is working in SQL and there is no difference for HANA expect table name with quotation marks; i don't have HANA DB to check and advise.

former_member185682
Active Contributor
0 Kudos

Hi Emin,

Why do you not set the price list 1 as a default list for your Business Partner? With this, SAP will automatically fill the prices in the marketing documents.

You can define a default list for your BP in the Business Partners Master Data screen, on the payment terms tab.

Hope it helps.

Kind Regards,

Diego Lother