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

'Contact' field in BAPI_CUSTOMER_CREATEFROMDATA1

Former Member
0 Likes
1,117

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.

8 REPLIES 8
Read only

suresh_datti
Active Contributor
0 Likes
1,003

Hi Eddie,

PL see if you can use the REF_CUSTOMER field in the PI_COPYREFERENCE structure of the same BAPI.

Regards,

Suresh Datti

Read only

0 Likes
1,003

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.

Read only

0 Likes
1,003

Hi Eddie,

PL take alook at BAPI_BPCONTACT_CREATEFROMDATA

Regards,

Suresh Datti

Read only

0 Likes
1,003

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.

Read only

0 Likes
1,003

>>>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

Read only

0 Likes
1,003

hi,

any suggestions from anyone??

Regards,

Eddie.

Read only

Former Member
0 Likes
1,003

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

Read only

Former Member
0 Likes
1,003

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.