Skip to Content
0

Manipulate the exchange rate in Purchase Order (background)

Jan 03, 2017 at 02:51 PM

129

avatar image

Dear SAP Community,

I've been searching a lot about the topic exchange rate in purchase order but can't find the information matched my requirement. I would be very grateful, if you could give me an advise (Point awarded).

The requirement is: "in the purchase order, the user should have the possibility to choose the exchange rate type they want. The system will take the exchange rate according to this type (not type M)."

When I debug the standard process in ME21N, I find the following point, where the exchange rate is determined with Function "READ_EXCHANGE_RATE".

Before I have to modify or create implicite enhancement point, I would like to ask you:

1) I see the line bapi_exit_when_filled whurs gs_headerx --> what is this line? can we use it?

2) The Function "Read_exchange_rate" is called here, but the exchange rate type is not exported. Therefore the defaul value M is taken. Is there a possibility, that we can enter the exchange rate type somewhere?

3) Is there any other possible solution for this requirement?

Thank you very much for your support.

Best regards,

Thanh

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Raymond Giuseppi
Jan 04, 2017 at 06:42 AM
0

You could also consider using BAdI ME_PROCESS_PO_CUST method PROCESS_HEADER to force rate (Also don't change the rate at every call of the method, e.g. compare get_data and get_previous_data and only calculate when no previous data or in case of change of date or currency code for example)

Regards,
Raymond

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Raymond,

Many thanks for your comment.

However, there are 2 problems when manipulating exchange rate using process_header:

1) When I enter the new rate in process_header, this new value is not shown(refreshed) in the dynpro / screen of ME21N. On the dynpro, the old value still shows. It will cause confusion: difference between the value the user is seeing and the value in the background.

And when the user enters his rate on the screen, my rate in the background has no effect anymore...

2) changing the exchange rate in process_header, all the line item values are not automatically translated to my manipulated rate.

It's strange, that until now, I can find any thread with a concret solution, how the exchange rate in ME21N is manipulated...

Best regards,

Thanh

0
Raymond Giuseppi
Jan 18, 2017 at 02:54 PM
0

Before I forget (again) the 'bapi_exit_when_filled wkurs gs_headerx' is related to BAPI (rate parameter comes from BAPI,POHEADERX-EXCH_RATE set to 'X') so no use in transaction.

Share
10 |10000 characters needed characters left characters exceeded