Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Function Module for plant determination

Former Member
0 Likes
2,289

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.

1 ACCEPTED SOLUTION
Read only

Former Member
1,366

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.

3 REPLIES 3
Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
1,366

This message was moderated.

Read only

ThangaPrakash
Active Contributor
0 Likes
1,366

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

Read only

Former Member
1,367

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.