cancel
Showing results for 
Search instead for 
Did you mean: 

SAP B1 DI-API Set Price list Programmatically for Purchase Request

sawsine
Participant
0 Kudos

Hello,

How can i set the default price list for Purchase Request Documents, either through the DI-API or through settings?

 

This price list is always selected as default and i wish to change that:

pRequest.PNG

 

Thank you

 

Accepted Solutions (1)

Accepted Solutions (1)

Johan_H
Active Contributor
0 Kudos

Hi,

The DI API does not mimic the behaviour of the client. Even if you would set the price list, it would not affect the prices of the Purchase Request.

You will have to determine and set the desired price for each row, in your code.

Regards,

Johan

sawsine
Participant
0 Kudos
Hi, What setting determine which Price List is selected as default for the Purchase Request?
Johan_H
Active Contributor

The price is determined by the pricelist that was set for the vendor determined in the Vendor column. By default this vendor is the Preferred Vendor as set in the Item Master Data.

The default Price list that you see in the B1 client, is not a field. It is a tool to set all prices to conform to the given price list. This functionality is part of the client, not of the database.

sawsine
Participant
0 Kudos
The Vendor Column is blank and it will still pull a price from the zPrices price list, is this one the default because it is our first price list ? i need it to be a different price list by default when opening the form, or not auto fill at all.
Johan_H
Active Contributor

Probably, although I am not sure. One workaround for this would be to setup a dummy vendor. You set the desired price list for this vendor, and then assign the vendor to all items.

Another workaround would be to:

  1. Create a new price list
  2. Copy all prices from zPrices to the new price list
  3. Set the new price list for any customers or vendors that used to have zPrices set.
  4. Set the desired price list as the base price list for zPrices.
sawsine
Participant
0 Kudos
Thanks for all your help Johan_H, I will try the Vendor Price List workaround. Have a Great Day 🙂

Answers (1)

Answers (1)

LoHa
Active Contributor

Hi,

since V10 you can see the "used Pricelist" in the lines. Perhaps you can set it via DIAPI as well.

regards Lothar