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

Outbound IDOC to same system and same client

Former Member
0 Likes
2,050

Hi,

I have an requriement to send an outbound idoc to same system and to same client. Like say system SAPDEMO and client 100. I have to send an outbound IDOC to SAPDEMO for client 100 itself using same system. Here, sender and reciever will remain same.

Can anybody provide any inputs on this.

Regards,

Raj

Hi Dutta,

In this case, please fill sender and receiver details as same because your

here system acts as sender we will as receiver.

It will work.

Thanks,

Raj

9 REPLIES 9
Read only

jitendra_it
Active Contributor
0 Likes
1,720

Hi Shyam,

Use FM IDOC_INBOUND_SINGLE.

Many Thanks,

Jitendra Soni

Read only

0 Likes
1,720

Hi,

But will it creates outbound IDOC?

It seems the FM works for inbound IDOC.

Regards,

Raj

Read only

vijaymanikandan
Contributor
0 Likes
1,720

Hi

Assume that you want to send a SO output and create a PO based on the detials on the SO in the same client. You can create a dummy WE20 partner and then send the IDOC to this Partner and then post the inbound in the same dummy partner.

BR,

Vijay V

Read only

0 Likes
1,720

@Vijay.

I am able to trigger inbound idoc using IDOC_INBOUND_WRITE_TO_DB but not able to create outbound IDOC.

In my case, I am triggering custom IDOC using MASTER_IDOC_DISTRIBUTE.

Even I tried to create dummy partner profile still I could see same error in IDOC as "Receiver as its own logical system".

Please suggest on this.

Regards,

Raj

Read only

0 Likes
1,720

Hi

I think then you are filling up the EDIDC wrongly.

Check out the below link [Outbound IDOC|http://wiki.sdn.sap.com/wiki/display/ABAP/OutboundIdocsby+ALE]

Br,

Vijay V

Read only

0 Likes
1,720

You need to define an RFC destination which points back to your own client.with a little trick u can do this.

There is a virtual RFC destination called NONE which always refers to the calling client.

Create a new R/3 destination of type "L" (Logical destination) with the name INTERNAL and the destination NONE.

Read only

0 Likes
1,720

Hi Experts,

I am using   MASTER_IDOC_DISTRIBUTE to create a outbound idoc in same client

When I run through we19 by giving the inputs it is creating the IDOC successfully with status 3.

But when i give the same details and pass to the above FM

it is thrwoing error as 29.

RCVPOR                                     ERC200

RCVPRT                                     LS

RCVPRN                                     ERCCLNT200

  MESTYP                                     ZPOS_ADJUST_MSG_TYP

IDOCTP                                     ZPOS_SC_ADJUST_1

SENDER : SAPERC

               LS

               ERCCLNT200

My requirement is to create idoc in same client...which i trigger through a BADI

NOTIF_EVENT_POST.

Regards,

DuttaD.

Read only

0 Likes
1,720

Hi Dutta,

In this case, please fill sender and receiver details as same because your

here system acts as sender we will as receiver.

It will work.

Thanks,

Raj

Read only

0 Likes
1,720

Hi Raj,

Thanks for your reply..:)

Actually I have tried that too  by passing the same sender and reciever parameters.

But the fm gives error as  Receiver of IDoc is its own logical system

part of the code :

    DATA : lv_rcvpor(10)      TYPE c VALUE 'ERC200',"'A000000011',
         lv_rcvprt(2)       TYPE c VALUE 'LS',
         lv_mestyp(19)      TYPE c VALUE 'ZPOS_ADJUST_MSG_TYP',
         lv_idoctp(16)      TYPE c VALUE 'ZPOS_SC_ADJUST_1',
         lv_rcvprn(10)      TYPE c VALUE 'ERCCLNT200',
         lv_segnam_head(14) TYPE c VALUE 'ZPOS_SC_QMFE_1',
         lv_segnam_item(15) TYPE c VALUE 'ZPOS_SC_QMSM_01'.

    lw_idoc_cntrl-rcvpor = lv_rcvpor.

  lw_idoc_cntrl-rcvprt = lv_rcvprt.

   lw_idoc_cntrl-mestyp = lv_mestyp.

   lw_idoc_cntrl-idoctp = lv_idoctp.

   lw_idoc_cntrl-rcvprn = lv_rcvprn.

  lw_idoc_cntrl-SNDPOR = lv_rcvpor.
lw_idoc_cntrl-SNDPRT   = lv_rcvprt.
lw_idoc_cntrl-SNDPRN  lv_rcvprn.

    CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
    EXPORTING
      master_idoc_control            = lw_idoc_cntrl
    TABLES
      communication_idoc_control     = lt_master_cntrl_data
      master_idoc_data               = lt_idoc_edidd
    EXCEPTIONS
      error_in_idoc_control          = 1
      error_writing_idoc_status      = 2
      error_in_idoc_data             = 3
      sending_logical_system_unknown = 4
      OTHERS                         = 5.

Regards,

DUttad