11-17-2005 11:11 AM
Hi,
I reallly need to find a way of getting the customer number from the purchase order number.
Does anyone have any ideas of the table paths that I could use?
Lots of juicy points up for grabs if you do : )
11-17-2005 11:13 AM
Hi,
Please chekc in the table EKKO. Field KUNNR refers to customer Number.
Thanks,
Ramakrishna
11-17-2005 11:13 AM
Hi,
Please chekc in the table EKKO. Field KUNNR refers to customer Number.
Thanks,
Ramakrishna
11-17-2005 11:22 AM
Dear All,
Thank you ever so much for your replies.
Unfortuately our system does not update KUNNR in EKKO-KUNNR (the field is left blank) - hence why I'm looking for another way of doing this.
Any other ideas?
11-17-2005 11:29 AM
HI Robert,
Try in the table EKPO-KUNNR then. I still find it inters=resting to see that how could you be able to create a PO without a Customer!!!
Ravi
11-17-2005 11:13 AM
11-17-2005 11:13 AM
Check the table EKKO, field KUNNR.
To EKKO table pass purchase doc no <b>EBELN</b> and <b>KUNNR</b> field gives you the custmer number.
11-17-2005 11:15 AM
Hi In EKKO u have already Kunnr .
or else u are looking for some thing else.
please let me know.
regards
vijay
11-17-2005 11:16 AM
Robert,
<b> tables: kna1.
data: vKunnr type kna1-kunnr.</b>
U can find the Customer for every EBELN in EKKO Table.
<b> SELECT kunnr into vKUnnr from EKKO where ebeln = pEbeln.</b>
If u need more information abt Customer, u can have the following query with selected KUNNR from EKKO.
<b> select single * from kna1 where kunnr = vkunnr. </b>
Thanks
Kam
Message was edited by: Kam
11-17-2005 11:38 AM
Robert,
Check all EK** tables in the SAP!!!
I really agree with RAVI on this!
Thanks
Kam
11-17-2005 11:40 AM
HI Robert,
I have seen the interesting discussion you had in the forum. Now try this:
When we talk of a Customer for a Purchase Document, it makes sense to talk about purchase requsitions. Here is the reason why:
Generally a PO is associated with a vendor, but a sales order is associated with a customer. Take the case of a third party order/sub contract. In this case, a Purchase Requsition is created(with reference to a Sales Order), which in turn is converted to a purchase order.
This is the link of tables you can have:
1. Get the Purchase Requsition Number for the PO number (Field BANFN) of table EBAN.
2. Get the Sales Order(VBELN) for the same Purchase Requsition Number from table VBEP.
3. Once you have the Sales Order Number, you can get the customer from VBPA table.
Hope This answers.
Cheers,
Naveen.
11-17-2005 11:58 AM
HI There,
I believe Robert is looking for a scenario where a Purchase order is created through a Purchase requsition, which is created through a sales order(Third Party Order/Sub Contracting).
Just refer to my earlier post for the same thread and think over it.
Naveen