‎2014 Mar 15 12:16 PM
Hi All,
I there any function module for plant determination which will return exactly the same plant as returned while creation of the sales order?\
Thanks in advance.
‎2014 Mar 17 6:42 AM
Thanks Thanga.
Actually in our system BADI was implemented which was considering Ship-to Party first to get the record from KNMT and if record not found then used Sold-to Party which was missed as a part of Report logic hence there was a issue.
‎2014 Mar 15 4:26 PM
‎2014 Mar 16 6:02 AM
Hello Nilesh,
The plant proposed during the Sales order creation is either determined from Customer master info record or customer master or material master.
If you wan the plant to be fetched
From customer master info record:
SELECT werks FROM knmt INTO c_lv_werks WHERE vkorg = '' AND vtweg = '' AND kunnr = '' AND matnr = ''.
From customer master:
SELECT werks FROM kna1 INTO c_lv_werks WHERE kunnr = ' XXXX'. <---- pass the ship to party of sales order.
From material master:
Use function module "MATERIAL_READ_PLANTS" to read all the plants of the material master.
Regards,
Thanga
‎2014 Mar 17 6:42 AM
Thanks Thanga.
Actually in our system BADI was implemented which was considering Ship-to Party first to get the record from KNMT and if record not found then used Sold-to Party which was missed as a part of Report logic hence there was a issue.