‎2007 Jun 19 6:15 AM
Hi All,
I have a scenario where i have to replicate user master record from one server to another through BAPI ALE IDoc.i have some standard info available
message type:- USERCLONE
Object type:- USER
Method:- CLONE
IDoc Type:- USERCLONE05
FM for outbound:- ALE_USER_CLONE
FM for Inbound:- IDOC_INPUT_USERCLONE
With this much of information i dn't knw how to proceed further.
i have created Distribution Model, added BAPI, created partner profile.
Now i don't understand how the data will be uploaded into IDOC, how BAPI will read the data.. If some sample Program is available which will help in firing the BAPI, then provide me the link..
It's urgent.. Useful results will be rewarded.
Thanks.
Please help me with the required steps..
‎2007 Jun 19 9:13 AM
Hi ,
Keeping the urgency in mind , I can explain in brief what u are expected to do .
U can write a program similar to the one below . If ur ALE settings are correct this program will send the material master data
Put the control data to the IDoc control record
idoc_control-mestyp = c_message_type. " message type
idoc_control-idoctp = c_base_idoc_type. "basic idoc type
idoc_control-cimtyp = c_extended_type. " extended type
idoc_control-mescod = c_mes_code. "message code
*Partner information
idoc_control-rcvpor = c_port_no. "port number of receiver
idoc_control-rcvprn = c_part_num. "partner number of receiver
idoc_control-rcvprt = c_part_type. "partner type of receiver
Generate data record
CALL FUNCTION 'ALE_USER_CLONE' .
" Pass the user data into the function module , this Function module will generate the Idoc Data record
Send IDOC generated to partner
IF sy-subrc EQ 0.
CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
EXPORTING
master_idoc_control = idoc_control
TABLES
communication_idoc_control = t_comm_control
master_idoc_data = t_idoc_data
EXCEPTIONS
error_in_idoc_control = 1
error_writing_idoc_status = 2
error_in_idoc_data = 3
sending_logical_system_unknown = 4
OTHERS = 5.
‎2007 Jun 19 6:58 AM
hi,
BAPI-step by step
http://www.sapgenie.com/abap/bapi/example.htm
list of all bapis
http://www.planetsap.com/LIST_ALL_BAPIs.htm
for BAPI's
http://www.sappoint.com/abap/bapiintro.pdf
http://www.sappoint.com/abap/bapiprg.pdf
http://www.sappoint.com/abap/bapiactx.pdf
http://www.sappoint.com/abap/bapilst.pdf
http://www.sappoint.com/abap/bapiexer.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf
http://www.planetsap.com/Bapi_main_page.htm
http://www.topxml.com/sap/sap_idoc_xml.asp
‎2007 Jun 19 9:13 AM
Hi ,
Keeping the urgency in mind , I can explain in brief what u are expected to do .
U can write a program similar to the one below . If ur ALE settings are correct this program will send the material master data
Put the control data to the IDoc control record
idoc_control-mestyp = c_message_type. " message type
idoc_control-idoctp = c_base_idoc_type. "basic idoc type
idoc_control-cimtyp = c_extended_type. " extended type
idoc_control-mescod = c_mes_code. "message code
*Partner information
idoc_control-rcvpor = c_port_no. "port number of receiver
idoc_control-rcvprn = c_part_num. "partner number of receiver
idoc_control-rcvprt = c_part_type. "partner type of receiver
Generate data record
CALL FUNCTION 'ALE_USER_CLONE' .
" Pass the user data into the function module , this Function module will generate the Idoc Data record
Send IDOC generated to partner
IF sy-subrc EQ 0.
CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
EXPORTING
master_idoc_control = idoc_control
TABLES
communication_idoc_control = t_comm_control
master_idoc_data = t_idoc_data
EXCEPTIONS
error_in_idoc_control = 1
error_writing_idoc_status = 2
error_in_idoc_data = 3
sending_logical_system_unknown = 4
OTHERS = 5.
‎2007 Jun 19 9:17 AM
HI ,
Pass User name as the user u want to replicate and Method as 'CLONE' in the FM ALE_USER_CLONE
Other Data u need to retrieve from user master table and populate it in the table .
‎2007 Jun 19 10:01 AM
hi Soumyadip...
How can i pass the user data to the FM?
Is there any standard program to call the FM or we have to do of our own?
thanx
‎2007 Nov 02 4:06 AM
hi arati
i have the same problem
i am facing problem with find out the <u><b>object type and method</b></u> for
message type:-SHP_OBDLV_SAVE_REPLICA
idoc type:-SHP_OBDLV_SAVE_REPLICA02
i to extend that idoc
can u help me out of this problem
i will very much thankful to u?
thnx
tapan
‎2007 Dec 11 8:51 AM
Hi Tapan,
Me too got to extend the same BAPI generated IDoc.Could you please provide me with the guidence,how to extend it.
Details are as below:
IDoc "SHP_OBDLV_SAVE_REPLICA02".I got to add few segments to this IDoc..
Reply me ASAP.
Thanks,
Ramana
‎2007 Nov 02 4:15 AM
Hi,
Read this document with exp how to use.....
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
regards,
paras