on 01-20-2010 4:24 PM
Dear all,
As far i know there is no standard bapi to create a customer. There i s standard fm used her is SD_CUSTOMER_MAINTAIN_ALL. I tried to create customer master using this and making the function module as remote enabled. i tried to created a zbapi and use this fm inside of this. Please tell me if any idea on this.If any body knows please help me in this.
Regards,
Madhu.
Hi Don't use SD_CUSTOMER_MAINTAIN_ALL or any of the BAPI that have the same look and feel.
You may use class CMD_EI_AIP with one of the maintain methods.
This you may enclose within a Function Module RFC enabled.
Otherwise, look at [note 384462|https://service.sap.com/sap/support/notes/384462]
Hope this helped
BR
Alain
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Alain,
I tried this post a long back . I did not get a good solution from any body . Finally you replied. I found another solution with the help of venkat and keshav . I tried this class but i am not able to finish it . If you have any sample code with this please pass to me . Thank you for reply .
Regards,
Madhu.
Edited by: madhurao123 on Mar 29, 2010 7:48 PM
Hi,
I don't have code that uses it for test purpose.
But you can:
look at its usage: ERP BP synchronisation => ERP Customer master. This calls CMD_EI_API-MAINTAIN
Start a fairly small report with mainly 2 calls:
CMD_EI_API_EXTRACT-GET_DATA ==> To read a customer
update the complex structure with the data you plan to modify
CMD_EI_API-MAINTAIN
COMMIT
Good luck
Alain
Dear Alain
Once again thanks for your reply. I passed customer no to extract data of a customer . But it is not extracting any data .
I am thinking to fill all the fields of the table by seeing hoe it is extracting the data . can you give me some idea on this .
DATA: ls_i_main TYPE cmds_ei_main,
ls_e_main TYPE cmds_ei_main,
lt_custs TYPE cmds_ei_extern_t,
ls_cust TYPE cmds_ei_extern,
ls_head TYPE cmds_ei_header,
ls_instance TYPE cmds_ei_instance.
CONSTANTS: lc_obj_task TYPE cmd_ei_object_task VALUE 'M'.
----
ls_instance-kunnr = '0000100001'.
ls_head-object_instance = ls_instance.
ls_head-object_task = lc_obj_task.
ls_cust-header = ls_head.
APPEND ls_cust TO lt_custs.
ls_e_main-customers = lt_custs.
CALL METHOD cmd_ei_api_extract=>get_data
EXPORTING
is_master_data = ls_e_main
IMPORTING
es_master_data = ls_i_main.
"es_error = pe_error.
Regards,
madhu.
Edited by: madhurao123 on Mar 31, 2010 1:17 PM
Hi madhu,
yes this is exactly what I was suggesting.
Either use the GET_DATA to retrieve the data and just update the structure with the changed fields.
Either use the GET_DATA as a learning tool and then do your own implementation for direct changes.
Briefly reading, the code extract looks fully correct. Does it work or do you still have difficulties to extract data ?
BR
Alain
Dear Alain,
You are correct . I want to create customer from external system . I can not go for any method except bapi . As you suggested i tried with that class . Before creating customer with that class i tried by fetching the data with an existing customer . Here i am not able to get customer details . In the above i posted my code also . Please see that and give me a good idea.
Regards,
madhu.
Hi,
I've tried your code extract, just to make sure I did not mis-read it .
It works really fine.
If the customer provided do exists, it is completely returned in table LS_I_MAIN.
Then you will only have to update table LS_I_MAIN with your own changes.
Don't forget the corresponding DATAX fields then call CMD_EI_API-MAINTAIN.
BR
Alain
Please read the documentation of the program.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
YOu can also check the class-interface VMD_EI_API in se24.
In consists of methods to update customer details
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Madhu,
Try the following programs.
1. RFBIDE00 for customer master
2. BUS4001 for updating the Customer address.
Regards,
Vikram.M
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check program RFBIDE00
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Madhu,
Have you tried BAPI_CUSTOMER_CREATE and BAPI_Customer_CreateFromData
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
8 | |
7 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.