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

Duplicate Outbound Message Generated with status 3

Former Member
0 Likes
453

Hi,

I have checked the existing posts for similar problem (i.e. to avoid posting duplicate) but could not find the solution.

I am triggering outbound IDOC but it is generating 2 idocs with same values and status message - 03 (success) but when I use same idoc and re-execute it from WE19 only one idoc is generated.

Other info. - This outbound is generated in inbound FM (i.e. generating inbound message) after succesful creation of maintenance plan (it is a 'Z' transaction called using BDC) so this FM should create one inbound message with status 53 and outbound message with status '3'. It is functioning correctly when exucuted only in SAP using WE19 but when it is triggered via XI , it is generating one inbound with status 53 and two outbounds with 3.

Please check the code :

CALL FUNCTION u2018MASTER_IDOC_DISTRIBUTEu2019

EXPORTING

master_idoc_control = gw_idoc_control

TABLES

communication_idoc_control = gt_idoc_control

master_idoc_data = gt_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.

IF sy-subrc EQ 0.

CALL FUNCTION u2018DEQUEUE_ALLu2019

EXPORTING

synchron = gcx.

IF sy-subrc EQ 0.

SUBMIT rseout00

WITH p_idoctp = gc_idoctp

WITH p_rcvpor = gc_rcvpor

WITH p_rcvprt = gc_sndprt

WITH mestyp = gc_msgtyp

WITH upddat = sy-datum

AND RETURN.

*No need to check

ENDIF.

endif.

commit work.

Thanks,

Hi,

I have checked the existing posts for similar problem (i.e. to avoid posting duplicate) but could not find the solution.

I am triggering outbound IDOC but it is generating 2 idocs with same values and status message - 03 (success) but when I use same idoc and re-execute it from WE19 only one idoc is generated.

Other info. - This outbound is generated in inbound FM (i.e. generating inbound message) after succesful creation of maintenance plan (it is a 'Z' transaction called using BDC) so this FM should create one inbound message with status 53 and outbound message with status '3'. It is functioning correctly when exucuted only in SAP using WE19 but when it is triggered via XI , it is generating one inbound with status 53 and two outbounds with 3.

Please check the code :

CALL FUNCTION u2018MASTER_IDOC_DISTRIBUTEu2019

EXPORTING

master_idoc_control = gw_idoc_control

TABLES

communication_idoc_control = gt_idoc_control

master_idoc_data = gt_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.

IF sy-subrc EQ 0.

CALL FUNCTION u2018DEQUEUE_ALLu2019

EXPORTING

synchron = gcx.

IF sy-subrc EQ 0.

SUBMIT rseout00

WITH p_idoctp = gc_idoctp

WITH p_rcvpor = gc_rcvpor

WITH p_rcvprt = gc_sndprt

WITH mestyp = gc_msgtyp

WITH upddat = sy-datum

AND RETURN.

*No need to check

ENDIF.

endif.

commit work.

Thanks,

1 REPLY 1
Read only

Former Member
0 Likes
376

Hi ,

I have not worked on XI , so cannot comment on how things work in XI .

But the below info might be helpful .

We only generate outbound IDOCS .Inbound IDOCS are recieved from other system and are not generated , but posted .

Also When you send an outbound IDOC , a master IDOC is first created , then based on the partner profile a number of communication IDOCS could be created , one for each system .MAster IDOC is a temporary IDOC and never stored .When you use we02 to view IDOCS u view commmunication IDOCS only .

We19 is a test tool , where partner profile is not read .Hence you get only 1 IDOC when u use we19 .