‎2006 Mar 03 10:55 PM
hello gurus,
i have a contact person coming in my flat file. i am creating customer using structure PI_PERSONALDATA. I don't see a field where I can put this 'Contact person'.
This will be a different contact person as opposed to the customer that I am creating.
How can I resolve this issue?
Thanks in advance.
Regards,
Eddie
P.S. Helpful answers will be rewarded.
‎2006 Mar 03 11:13 PM
Hi Eddie,
PL see if you can use the REF_CUSTOMER field in the PI_COPYREFERENCE structure of the same BAPI.
Regards,
Suresh Datti
‎2006 Mar 03 11:31 PM
Hi Suresh,
I am already using the REF_CUSTOMER field. I went into tcode XD01 and created a customer manually at first. Then the customer# that was assigned by SAP, I put it in as REF_CUSTOMER so that the BAPI can refer all details from it. So I don't think it is for 'contact person' field. Problem is that this field is coming from the flat file, so I need to refer it with some field.
But as of right now, I don't what field it is. Nothing seems to correspond to it.
Regards,
Eddie.
‎2006 Mar 04 12:06 AM
Hi Eddie,
PL take alook at BAPI_BPCONTACT_CREATEFROMDATA
Regards,
Suresh Datti
‎2006 Mar 04 12:22 AM
Hi Suresh,
The following is what I got from documentation of BAPI_CUSTOMER_CREATEFROMDATA1.
One person to be created as a customer:
With the entered personal data, addresses of type 1 (company address), type 2 (address for a person/private address of a contact person), and type 3 (contact partner address) are created simultaneously in Central Address Management (CAM).
If the "Allow Consumer Maintenance" indicator is set, then a consumer is created in SAP R/3. (See also: import parameter PI_CONSUMEREN ).
(a) No consumers to be created:
The entered personal data has a direct influence on the master data, company code data and <b>contact person data. One contact partner record is created for the customer in question.</b> All the master data, company code data, sales area data, tax code data, and reminder data that is not entered is adopted from a reference customer and from the sales area data (sales organization, distribution channel and division - import parameter PI_COPYREFERENCE).
I'm not sure what they are implying. But I think there is some way where the contact person is assigned.
What do you think?
Regards,
Eddie.
‎2006 Mar 04 1:00 AM
>>>I'm not sure what they are implying
you are right.. The documentation is very vague.. blame it on translation from German.. I don' see any place where you can enter the Contact person info.. But thye documentation & the source code do imply that the Contact perosn Record can get created with this BAPI.. For some reason I feel, based on the reference Customer Number it picks the Contact Person (PARNR) info from the KNVK table.. May be someone who has already used this BAPI could be of more help..
Regards,
Suresh Datti
‎2006 Mar 08 9:42 PM
‎2006 Mar 09 6:47 AM
Hi,
Try using FM SD_CUSTOMER_MAINTAIN_ALL.
You can fill in the contact persons in table parameter
T_XKNVK and T_YKNVK.
Hope this helps.
Regards,
Shashank
‎2007 Jan 18 4:11 PM
I used BAPI_CUSTOMER_CREATEFROMDATA1 to create the company data first. I followed with BAPI_PARTNEREMPLOYEE_GETINTNUM and used the resulting number in BAPI_ADDRCONTPART_SAVEREPLICA to update the contact info.