cancel
Showing results for 
Search instead for 
Did you mean: 

Changing preferred vendor to fixed vendor in SRM PO- no currency conversion

Former Member
0 Kudos

Hi All,

We are on SRM_SERVER 550, SP11, ECS scenario.

Users create carts where they enter preferred vendor.

After approval we found that the PO's were created only in "Held" Status.

So we did a conversion of the preferred vendor (PF 39) to Fixed vendor (PF 19) during PO creation using BBP_DOC_CHANGE_BADI- BBP_PO_CHANGE.

We also implemented BBP_GROUP_LOC_PO,GROUP_PO so that all items with same preferred vendor are grouped into a single PO.

We observed that PO is now getting created in ordered status, where the preferred vendor is getting converted to fixed vendor as per our code change. But we also found a problem- that the line item price doesnt get converted to Vendor order currency after the Po is created. For ex: If line item price is 10 GBP and Vendor order currency is EUR, the line item price in the PO shows 10 EUR. The currency conversion fro GBP to EUR does not happen.

This does not happen for catalog items/PO's where the cart comes with a fixed vendor (PF 19).

So there surely seems to be something missing in our code for converting Preferred vendor to fixed vendor which is preventing/not converting the currency as well.

Please find below the code we are using in DOC_CHANGE_BADI for PO, is there any step in this which is causing the currency conversion to be skipped?

CONSTANTS:C_FIXED_VENDOR TYPE BBP_PDS_PARTNER-PARTNER_FCT

VALUE '00000019',

C_PREFERRED_VEND TYPE BBP_PDS_PARTNER-PARTNER_FCT

VALUE '00000039'.

READ TABLE ET_PARTNER INTO LS_PARTNER WITH KEY

P_GUID = IS_HEADER-GUID

PARTNER_FCT = C_FIXED_VENDOR.

IF SY-SUBRC NE 0.

READ TABLE ET_PARTNER INTO LS_PARTNER WITH KEY

P_GUID = IS_HEADER-GUID

PARTNER_FCT = C_PREFERRED_VEND.

IF SY-SUBRC EQ 0.

CLEAR IDX.

IDX = SY-TABIX.

MOVE C_FIXED_VENDOR TO LS_PARTNER-PARTNER_FCT.

MODIFY ET_PARTNER INDEX IDX FROM LS_PARTNER TRANSPORTING PARTNER_FCT.

ENDIF.

ENDIF.

Regardas,

Srivatsan

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

I would suggest you to try flipping the partner Type ( 39 to 19) at the time of saving the shopping cart rather than when the PO is created.

Cheers,

Akash

former_member183819
Active Contributor
0 Kudos

Yes. Akash is correct. he noticed correctly. BBP_SC_CHANGE

not BBP_PO_CHANGE .

Regards

Muthu

khan_voyalpadusman
Active Contributor
0 Kudos

there is nothing in your code which prevents the conversion between the two currencies,

it can be the following reason

1) system as standard is not performing the conversion.

2) conversion factors are not maintained (or) conversion factors are maintained and the expiry date for the conversion factors has passed.