Skip to Content
author's profile photo
Former Member

Adding price list while adding item

Hi,

How do you add a price list while adding an Item in Item master data using DIAPI.

I see a PriceList propert, but how do i use it to set a price list for the item.

Sample code will be a great help.

I am using SBO 2004B.

Thanks.

Satish.

Message was edited by: Satish Dwevedi

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    author's profile photo
    Former Member
    Sep 30, 2005 at 10:50 AM

    Hi Alexey,

    What is <price> in your code?

    Is it the price of the item or the price list for the item?

    Thanks,

    Satish.

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 30, 2005 at 10:31 AM

    Hi Satish!

    SAPbobsCOM.Items	itmItem;
    SAPbobsCOM.Items_Prices itmPrices;
    ...
    if (itmItem.GetByKey(<ItemCode>))
    {
    	itmPrices = itmItem.PriceList;
    	for (int k=0; k<itmPrices.Count; k++)
    	{
    		itmPrices.SetCurrentLine(k);
    		itmPrices.Price = <price>
    	}
    
    	itmItem.Update();
    }

    HTH

    Add comment
    10|10000 characters needed characters exceeded