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 ALE-IDOC

Former Member
0 Likes
1,328

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..

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,110

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.

7 REPLIES 7
Read only

Former Member
0 Likes
1,111

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.

Read only

0 Likes
1,110

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 .

Read only

0 Likes
1,110

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

Read only

Former Member
0 Likes
1,110

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

Read only

0 Likes
1,110

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

Read only

Former Member
0 Likes
1,110

Hi,

Read this document with exp how to use.....

http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc

regards,

paras