Skip to Content
-1

Assign SD Contract when Saving Sales Order

Hi All!

I would like to assign a Contract to a Sales Order Item automatically when saving the document, when the material of the line item has a valid contract for its material or its Pricing Reference Material. Does anyone know how to do it via ABAP Coding?

Thanks in advance!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Jul 24, 2017 at 12:42 PM

    Hi,

    you can use the following BADI

    BADI_SD_REF_DOC_CUST enhancement spot BADI_SD_SALES_ITEM

    you can code your own validations as per the "pricing reference"

    Add comment
    10|10000 characters needed characters exceeded

  • May 24, 2017 at 04:02 PM

    What is the Business requirement? Why you want the reverse option? Normally, we create Release Order with reference to a Contract.

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Lakshmipathi,

      I want actually to consider both ways, as I'm dealing with a somewhat "dynamic" scenario. I want to take advantage of how natural the pricing reference material is processed to allow users to enter different, but "linked" materials than the one set on the contract, and consume quantity anyway - but to do it manually, they have to afterwards select the item and go through the "Assign > Contract" Option. I'm looking for a way to do it automatically when the pricing reference material is present on a valid Contract...

  • Jul 03, 2017 at 02:04 PM

    Ok, let me try to explain again... Basically, the business area wants the ability of adding a Contract only with a "pricing reference" item. At the time when they are going to place the orders, they actually use different items, that have the pricing reference material referenced in material master. So if they are to assign the contract manually item by item, whenever there are breaks (one item may actually mean several different items), they're gonna have to do a lot of manual work.

    I´m looking for a way of making it automatic, without having to go to Process > Assign Contract > Item, item by item.

    Still looking for some light on this, so if someone knows, it will be helpful!

    Thanks!

    Add comment
    10|10000 characters needed characters exceeded