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

bapi_customer_create

Former Member
0 Likes
2,356

Hi,

can i get a sample code on bapi_customer_create, mean to say what are the parameters to be passed.waiting for your reply

thanks and regards

Sarala

6 REPLIES 6
Read only

Former Member
0 Likes
1,307

try this BAPI_CUSTOMER_CREATEFROMDATA

input to PI _address:

FORM_OF_AD = M/S

FIRST_NAME = BEA

NAME = SYSTEMS

NAME_3 = TEST

NAME_4 = DATA

DATE_BIRTH

STREET

POSTL_CODE = 400033

CITY = MUMBAI

REGION = MAH

COUNTRY = IN

COUNTRNISO = IN

COUNTRAISO = IN

INTERNET

FAX_NUMBER

TELEPHONE

TELEPHONE2

LANGU = EN

LANGU_ISO = EN

CURRENCY = INR

CURRENCY_ISO = INR

COUNTRYISO = IN

ONLY_CHANGE_COMADDRESS

for PI_COPYREFERENCE

SALESORG = RTL

DISTR_CHAN = DI

DIVISION = TC

REF_CUSTMR = 280367

Edited by: srikanth vipparla on Feb 19, 2009 6:52 AM

Read only

Former Member
0 Likes
1,307

check for the structures which asre not optional and fill in the fields

Read only

Former Member
0 Likes
1,307

Hello,

check this......code may helpful to u...

Data:it_personaldata like standard table of bapikna101_1 with header line,

it_copyreference like standard table of bapikna102 with header line,

return like standard table of bapireturn1 with header line.

data:v_customerno like bapikna103-customer.

it_personaldata-title_p = 'Mr.'.

it_personaldata-firstname = 'Jambavant'.

it_personaldata-lastname = 'jai'.

it_personaldata-middlename = 'john'.

it_personaldata-date_birth = '19780101'.

*IT_PERSONALDATA-REGION = 'CA'.

it_personaldata-city = 'Hyderabad'.

it_personaldata-langu_p = 'EN'.

it_personaldata-district = 'Hyd'.

it_personaldata-postl_cod1 = '56012'.

*IT_PERSONALDATA-PO_BOX = '116'.

it_personaldata-street = 'Street'.

it_personaldata-house_no = '11/230'.

it_personaldata-building = 'Super'.

it_personaldata-room_no = '113'.

it_personaldata-country = 'DE'.

it_personaldata-title_key = '0002'.

it_personaldata-currency = 'DEM'.

append it_personaldata.

it_copyreference-salesorg = '1000'.

it_copyreference-distr_chan = '12'.

it_copyreference-division = '00'.

it_copyreference-ref_custmr = '0000002140'.

append it_copyreference.

call function 'BAPI_CUSTOMER_CREATEFROMDATA1'

exporting

pi_personaldata = it_personaldata

  • PI_OPT_PERSONALDATA = PI_OPT_PERSONALDATA

  • PI_COMPANYDATA = PI_COMPANYDATA

  • PI_OPT_COMPANYDATA = PI_OPT_COMPANYDATA

  • PI_CONSUMEREN = PI_CONSUMEREN

pi_copyreference = it_copyreference

  • PI_CREDIT_CONTROL_FLAG = PI_CREDIT_CONTROL_FLAG

importing

customerno = v_customerno

return = return.

call function 'BAPI_TRANSACTION_COMMIT'

exporting

wait = 'X'.

append return.

loop at return.

write:/ return-type, return-message.

endloop.

Thank u,

santhosh

Read only

Former Member
0 Likes
1,307

Hi Sarala,

CALL FUNCTION 'BAPI_CUSTOMER_CREATE'

  • EXPORTING

  • INIT_KUNNR =

IMPORTING

CUSTOMERNO =

CUSTOMER =

  • RETURN =

Pass the valuesfor customer no and customer.

Regards,

Neelima.

Read only

Former Member
0 Likes
1,307

Hi sarala,

go to transaction se37..enter the name of bapi and then click on the export and import parameters there.you will get to know what needs to be passed.

Regards,

rahul

Read only

Former Member
0 Likes
1,307

You can use this BAPI,

BAPI_CUSTOMER_CREATEFROMDATA1.

Refer this BAPI in se37 tcode.

Regards,

Joan