2007 Feb 27 7:56 PM
Hi,
I have a requirement to create customers in SAP from an external system. We need to store the customer numbers of the external system to the 'Previous account number' field(KNB1-ALTKN). (This field is in the Account management tab of Company Code details in XD03 transaction. )
I need to use the SAP provided BAPI -BAPI_CUSTOMER_CREATEFROMDATA1 -to create the customers in SAP. But, I don't see a field in the bapi where I can input the existing customer number.
Please provide your expert and detailed advice.
Thanks,
Ani
2007 Mar 26 7:35 PM
Hi Ani, the BAPI_CUSTOMER_CREATEFROMDATA1 create a customer from an existing customer (reference). I think that the function module SD_CUSTOMER_MAINTAIN_ALL help you. This FM is use into BAPI_CUSTOMER_CREATEFROMDATA1 and it has the parameters that you need to happed.
Example:
CALL FUNCTION 'SD_CUSTOMER_MAINTAIN_ALL'
EXPORTING
i_kna1 = i_kna1 " General part
i_knb1 = i_knb1 " Company code details
i_knvv = i_knvv " Sales area info
i_bapiaddr1 = i_bapiaddr1 " Address
pi_postflag = pi_postflag " X=Post document
IMPORTING
e_kunnr = e_kunnr "Customer
You can create un FM: Z_ and you can do it RFC anable. Then implement SD_CUSTOMER_MAINTAIN_ALL FM.
Regards, Victor
Hi,
I have a requirement to create customers in SAP from an external system. We need to store the customer numbers of the external system to the 'Previous account number' field(KNB1-ALTKN). (This field is in the Account management tab of Company Code details in XD03 transaction. )
I need to use the SAP provided BAPI -BAPI_CUSTOMER_CREATEFROMDATA1 -to create the customers in SAP. But, I don't see a field in the bapi where I can input the existing customer number.
Please provide your expert and detailed advice.
Thanks,
Ani
2007 Mar 26 7:35 PM
Hi Ani, the BAPI_CUSTOMER_CREATEFROMDATA1 create a customer from an existing customer (reference). I think that the function module SD_CUSTOMER_MAINTAIN_ALL help you. This FM is use into BAPI_CUSTOMER_CREATEFROMDATA1 and it has the parameters that you need to happed.
Example:
CALL FUNCTION 'SD_CUSTOMER_MAINTAIN_ALL'
EXPORTING
i_kna1 = i_kna1 " General part
i_knb1 = i_knb1 " Company code details
i_knvv = i_knvv " Sales area info
i_bapiaddr1 = i_bapiaddr1 " Address
pi_postflag = pi_postflag " X=Post document
IMPORTING
e_kunnr = e_kunnr "Customer
You can create un FM: Z_ and you can do it RFC anable. Then implement SD_CUSTOMER_MAINTAIN_ALL FM.
Regards, Victor
2007 Jun 05 6:21 AM
Thanks Victor.
I am using the FM 'SD_CUSTOMER_MAINTAIN_ALL' to create the customer and it is working fine.
Ani
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |