‎2008 Jul 23 7:09 AM
HI GUYS ,
DOES ANYONE HAVE A SAMPLE CODE TO LOAD THE CUSTOER MASTER DATA USING BAPIS.
‎2008 Jul 23 8:40 AM
Hi Nishanth,
TO LOAD THE CUSTOER MASTER DATA USING BAPIS.
In case you wish to read the customer data you can use the following BAPI, it retrieves the Customer Master (Company Code) Data and the General Data in Customer Master.
CUSTOMER_READ
You need to pass the Customer Number and the Company Code. See the example given below.
REPORT ZEX_CUSTOMERREAD .
Parameters: p_bukrs like KNB1-BUKRS,
p_kunnr like KNA1-KUNNR.
Data: ty_kna1 type kna1,
ty_knb1 type knb1.
Data: int_kna1 like ty_kna1,
int_knb1 like ty_knb1.
CALL FUNCTION 'CUSTOMER_READ'
EXPORTING
I_BUKRS = p_bukrs
I_KUNNR = p_kunnr
IMPORTING
E_KNA1 = int_Kna1
E_KNB1 = int_knb1
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
thanks
karthik
‎2008 Jul 23 8:40 AM
Hi Nishanth,
TO LOAD THE CUSTOER MASTER DATA USING BAPIS.
In case you wish to read the customer data you can use the following BAPI, it retrieves the Customer Master (Company Code) Data and the General Data in Customer Master.
CUSTOMER_READ
You need to pass the Customer Number and the Company Code. See the example given below.
REPORT ZEX_CUSTOMERREAD .
Parameters: p_bukrs like KNB1-BUKRS,
p_kunnr like KNA1-KUNNR.
Data: ty_kna1 type kna1,
ty_knb1 type knb1.
Data: int_kna1 like ty_kna1,
int_knb1 like ty_knb1.
CALL FUNCTION 'CUSTOMER_READ'
EXPORTING
I_BUKRS = p_bukrs
I_KUNNR = p_kunnr
IMPORTING
E_KNA1 = int_Kna1
E_KNB1 = int_knb1
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
thanks
karthik
‎2008 Jul 23 8:47 AM
nishant,
just use either:
BAPI_CUSTOMER_CREATE
BAPI_CUSTOMER_CREATEFROMDATA
BAPI_CUSTOMER_CREATEFROMDATA1Amit.
‎2008 Jul 23 8:59 AM
Hi Nishant,
Check the below links.
http://abaplovers.blogspot.com/2008/03/customer-master-bapis-function-modules.html
http://abap.wikiprog.com/wiki/BAPI_CUSTOMER_CREATEFROMDATA1
If Found Help Full Do Reward.
Regards.
Eshwar.
‎2008 Jul 23 9:37 AM
HI GUYS ,
I WANT TO CREATE A CUSTOMER MASTER FROM A FLAT FILE .HOW CAN I DO THIS.
THANKS.
‎2008 Jul 23 1:24 PM
http://www.ashpeople.comashthomas
www.sapfans.com/forums/viewtopic.php?f=13&t=314946&p=953638 - 21k - (check this link)
With thanks & regards,
Sravani yendru.