cancel
Showing results for 
Search instead for 
Did you mean: 

BADI for VBAK-WAERK (Doc. Currency) field

Former Member
0 Kudos

Hi guys, I want to change the doc. WAERK field (Currency) in a sales order created from va01 transaction, the currency is set by default and I think is determined by the sales area or participants in the document.

Ej : I need to change 'USD' default currency to 'MXP' if all the items has 'MXP' .

I already try to change it in USEREXIT_SAVE_DOCUMENT_PREPARE but even in debug mode the vbak-waerk field is reset to his original value 'USD'. I want to try with the user exit USEREXIT_MOVE_FIELD_TO_VBAK but I get the same results. Is there any configuration that maybe is blocking the changes or I´m doing something weird and not using the correct user exits.

Any help will be appreciated.

Accepted Solutions (0)

Answers (2)

Answers (2)

Shiva_Ram
Active Contributor
0 Kudos

I think is determined by the sales area or participants in the document.

In the sales order ->header->sales tab->Doc. currency field, if you click on F1 help, then you can understand the system proposes the document currency from sold-to party customer number.

So to resolve the issue, can you make the field blank in the customer master, then check the result of the user exit.

Regards,

Former Member
0 Kudos

Hi ! thanks for your reply, the "MXP" is the currency (PESOS), I already modify the user exit USEREXIT_SAVE_DOCUMENT_PREPARE and I´m able to change the vbak-waerk .

The conditions are if ALL of the pricing conditions at item level  'PR00' has the same currency ej: 'MXN' then change the header doc currency at vbak-waerk ej : 'USD' to 'MXN'.

I already make this and I see the expected results, but I´m not sure if this change at header currency may affect some net values etc.



Former Member
0 Kudos

Hi Isaac,

I don't understand the requirement.

What do you mean with "if all the items has 'MXP'"?

Which field of the sales order item are you talking about?

Regards,

Ornella