Creation of Inbound Idoc for the Outbound Idoc in same client

Hi,
My requirement:
Whenver an PO is created an Outbound IDOC is generated in system ABC with client 100.I want to pass this IDOC data to create an Inbound Idoc for Sales Order(SO) in the same client.
It would be helpful if anyone can answer on how to Transfer the Outbound Idoc after it crosses the port.
I found there is a field for function module in WE21,can this be used to get the requirement done.
Please suggest.
Regards,
Amar

Example of a program that create and post an inbound idoc....maybe that will help you:
report  zzinbound_idoc.
data: g_idoc_control_record like edi_dc40 occurs 0 with header line.
data: g_edidd like edi_dd40 occurs 0 with header line.
data: g_e1bpache09 like e1bpache09.
parameter: mode type c default 'A'.
refresh: g_idoc_control_record, g_edidd.
clear:   g_idoc_control_record, g_edidd.
*-Build Control Record -*
g_idoc_control_record-mestyp  = 'ACC_DOCUMENT'.   "Message type
g_idoc_control_record-idoctyp = 'ACC_DOCUMENT03'. "IDOC type
g_idoc_control_record-direct  = '2'.              "Direction
* Receiver
case sy-sysid.
  when 'DE2'.
    g_idoc_control_record-rcvpor = 'SAPDE2'.     "Port
    g_idoc_control_record-rcvprn = 'IDOCLEGACY'. "Partner number
endcase.
g_idoc_control_record-rcvprt = 'LS'.             "Partner type
g_idoc_control_record-rcvpfc = ''.               "Partner function
* Sender
g_idoc_control_record-sndpor = 'A000000002'.      "tRFC Port
case sy-sysid.
  when 'DE2'.
    g_idoc_control_record-sndprn = 'IDOCLEGACY'. "Partner number
endcase.
g_idoc_control_record-sndprt = 'LS'.             "Partner type
g_idoc_control_record-sndpfc = ''.               "Partner function
g_idoc_control_record-refmes = 'Customer clearing'.
append g_idoc_control_record.
*-Build Idoc Segments -*
*---E1KOMG
clear g_edidd.
clear g_e1bpache09.
g_edidd-segnam               = 'E1BPACHE09'.
g_edidd-segnum               = 1.
move g_e1bpache09 to g_edidd-sdata.
append g_edidd.
*-Create idoc -*
*-Syncronous
if mode = 'S'.
  call function 'IDOC_INBOUND_SINGLE'
    exporting
      pi_idoc_control_rec_40              = g_idoc_control_record
*     PI_DO_COMMIT                        = 'X'
*   IMPORTING
*     PE_IDOC_NUMBER                      =
*     PE_ERROR_PRIOR_TO_APPLICATION       =
    tables
      pt_idoc_data_records_40             = g_edidd
    exceptions
      idoc_not_saved                      = 1
      others                              = 2.
  if sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
            with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  endif.
*-Asynchronus
else.
  call function 'IDOC_INBOUND_ASYNCHRONOUS'
    in background task as separate unit
    tables
      idoc_control_rec_40 = g_idoc_control_record
      idoc_data_rec_40    = g_edidd.
  commit work.
endif.
write: / 'Well done!'.

Similar Messages

  • Track inbound ALEAUDs for the outbound DESADVs

    hi all,
    I am send an outbound DESADV by triggereing an output type on the delivery.
    I can track the outbound idoc for the delivery uisng NAST entries.
    Now i get the inbound ALEAUD( an acknowledgemnet for the outbound DESADV). The inbound idoc contains the delivery no that was sent.
    Programatically searching an inbound idoc with the delivery no takes more time as delivery no is not any key field in the idoc, it is avialble as sdata.
    My question is , programatically is there any way of tracking the ALEAUD and DESADV for a particluar delivery?
    Regards,
    Chandan

    Hello Chandan
    If I remember correctly then the ALEAUD IDoc sets a specific status record in the DESADV IDoc (cannot remember which one).
    Thus, if you want to select for outbound deliveries that have not yet been confirmed search for DESADV IDocs where this status is missing (or the other way around for confirmed DESADV where this status record is there).
    Regards
      Uwe

  • How to find the Program that triggered the outbound idoc

    Hi,
    I need to find the program that triggers a particular Outbound IDoc.
    I have the IDoc number/segment/message type.
    We need to Debug the Outbound IDoc but we do not know from where the IDoc got triggered.
    Is there a way we can find which program triggered it?
    Thanks!

    Hi Suresh,
    Go to tcode WE20, select ur partner profile type, which configured in output type for EDI documents.
    On right side, double click on the Message type in outbound parameters.
    go to message control Tab, double click on process code variable to see FM triggers for the IDOC.
    same as for Inbound also.
    Regards
    Syed A

  • How to Debug the Outbound IDOC

    Dear SDN Members,
    How to debug the outbound idoc please.
    Thanks in advance
    Yerukala Setty

    Hi,
       IDocs are processed by a function module, which are mapped against in table EDIFCT. When you process an IDoc in transaction BD87 you can put a breakpoint in the function module and it will stop there.For outbound processing it depends on which program is sending the IDoc. For transactional data like purchase orders, the IDoc is created via RSNAST00 which in turn calls a function module assigned to the processing code (BD41).
    Thanks,
    Asit Purbey.

  • How to debugg the outbound idoc

    Hi all,
           I am adding one segment standard Invoic02 outbound idoc.
      Executing invoice number ,idoc automaticall y trigger and populate the data.
    1)problem is my new adding segment is not populated idoc level.
    2)I am testind idoc (WE19) showing a 02 error.
    3) How to debugg the outbound idoc.
    Thanks
    Sreddy

    Take a look at your outbound processing code (transaction WE41). When you double click on the entry you are using you can find the function module which is used to process the IDOC. Just set a breakpoint at the beginning of that function module and you can debug the creation of your outbound IDOC.
    Hope that helps,
    Michael

  • Standard program for creating outbound IDoc holding wbs+cost plan

    Hello,
    a)
    Before we start developing our own ABAP, I would like to ask the forum if somebody knows if there is already a standard ABAP program for generating outbound IDocs including wbs-element data (CJ20N; wbs ID, description) plus annual data from the cost planning (CJ41; such as fiscal year and costing items from unit costing; quantity, unit, price per unit, total price, description of item) ?
    b) we are planning to use the logical message /ISDFPS/PS, basic type /ISDFPS/PS01 and enhance this IDoc with segments for the costing items from the cost planning.
    Question: Do you know if there is a standard IDoc which has segments for both wbs-element data and costing items?
    Kind regards
    Viveka Schwartz

    Hi Frank,
    Did u check this Link on the PP confirmaitos[LINK|http://help.sap.com/saphelp_47x200/helpdata/en/12/3bbc1c504811d182c20000e829fbfe/frameset.htm]
    Reg
    Dsk
    Edited by: DSk on Sep 14, 2010 3:44 PM

  • Standard program for creating outbound IDoc including wbs + cost planning

    Hello,
    a)
    Before we start developing our own ABAP, I would like to ask the forum if somebody knows if there is already a standard ABAP program for generating outbound IDocs including wbs-element data (CJ20N; wbs ID, description) plus annual data from the cost planning (CJ41; such as fiscal year and costing items from unit costing; quantity, unit, price per unit, total price, description of item) ?
    b) we are planning to use the logical message /ISDFPS/PS, basic type /ISDFPS/PS01 and enhance this IDoc with segments for the costing items from the cost planning.
    Question: Do you know if there is a standard IDoc which has segments for both wbs-element data and costing items?
    Kind regards
    Viveka Schwartz

    Hi Frank,
    Did u check this Link on the PP confirmaitos[LINK|http://help.sap.com/saphelp_47x200/helpdata/en/12/3bbc1c504811d182c20000e829fbfe/frameset.htm]
    Reg
    Dsk
    Edited by: DSk on Sep 14, 2010 3:44 PM

  • Missing items in the IDoc for the delivery

    Hi to all,
    Sorry if not posting in the right forum.
    In my customer's scenario, an IDoc is created against a delivery (via the delivery output), and sent via ALE to a distant warehouse system, for picking and GI posting (basic type SHPMNT03).
    For some times, the IDoc created against deliveries including BOMs is missing the main item of the BOM (though the BOM main item is in the delivery).
    Consequently, the integration in the distant system is failing, because the higher-level item referenced in the BOM sub-items is missing.
    Surprisingly, re-triggering the delivery output does re-generate a complete IDoc, where the segment for the main item is back.
    I looked almost everywhere, did many searches in OSS (on SHPMNT03, on HIPOS, on E1ELD24 - segment name in the IDoc -, on "Missing items in the IDoc for the delivery", etc...), I even simply googled the web, but I can't even figure out what is the cause for this (I imagined it could be caused by a missing commit in the program generating the IDoc, but don't know whether this make sense).
    Any help would be highly appreciated.
    Thanks in advance and best regards
    Yan
    Edited by: Yan Loiseau on Jul 8, 2010 12:52 PM
    Edited by: Yan Loiseau on Jul 8, 2010 12:56 PM

    Hello Yan
    Jelena is right, you are better off taking it up with SAP. I also did not find any relevant OSS notes.
    However the issue, according to my reading, is in the following areas:
    1) LV56KF05: INCLUDE LV56KF62 .  " FILL_E1EDL24"
    This fills the EIEDL24 segment, may be the main item is filled  initially and overwritten later.
    2) Function Module: IDOC_OUTPUT_DELVRY
    You can look at the following OSS notes (though not fully relevant)  for some clues:
    810981 - Reference data missing in DESADV IDoc from decentralized WMS
    537470 - BOM + batch split in decentralized WMS, confirmation fails
    752921 - VL563: Higher-level item does not exist
    705086 - Higher-level item does not refer to existing item
    Hope this helps. Good luck.

  • How configure a Logical System (XI) as receiver for an Outbound Idoc?

    Hi all,
    How can I configure a Logical System (XI) as receiver for an Outbound Idoc?
    Points will be given,
    Regards,
    Daniela

    hi,
    it all depends on what kind of document you need to send to XI
    if you want to send some logistic documents (like orders, deliveries etc)
    have a look at my book - where you will find step by step guides
    <a href="/people/michal.krawczyk2/blog/2006/10/11/xi-new-book-mastering-idoc-business-scenarios-with-sap-xi"><b>Mastering IDoc Business Scenarios with SAP XI</b></a>
    then you will undestand where to change to get it send via LS
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • Standard Idocs for the EDI's

    Hi,
      Where can i find the IDOCs' for the EDI's
    812, 816, 822, 846, 860, 867, 870 and EDIFACT INVRPT
    Is there any specific tcode to find the IDOC's for the particular EDI's ?

    Hi,
    Please check my previous reply in this thread.
    Re: IDOC Types and their equivalent messages in EDIFACT and ANSI X12
    Regards,
    Ferry Lianto

  • How do i generate the idoc for the custom infotype?

    Hi Experts,
        I have a requirement to create the custom infotype and generate the idoc for the custom infotype
        whenever the user change or crate the data by PA30, PA40 transaction .
    so please give some help to write a logic for generate the idoc?
    Thanks in advance.
    Venkat

    I have just found out from the Archives, it is not possible to generate a formula line (trend line) in Numbers_08.
    I am currently upgrading to Numbers_09.

  • Picking list output in VL70 for the outbound deliveries picked via WM

    Hi Experts ,
              How to take Picking list output in VL70 for the outbound deliveries picked through transfer Orde(WM).
    Generally, we ll genreate picking list in VL70 directly giving from the outbound delivery. Then , system wll confirm the Picked quantities along with the Print out in deliveries as per the configuration done in OVLT..
              In this case , how to take the Picking list in VL70 ? Pls give your advice on this..
    With Regards
    S.Siva

    hi,
    this is to inform you that,
    use - LX21 for this purpose.
    hope this clears your issue
    balajia

  • Creating inbound delivery for the purchase order line items

    Hi Experts,
    Please let me know how can I create inbound delivery for the purchase order line items?  Say, I have a purchase order with 5 line items in it.  I wanted to create an inbound delivery for only 2 line items at this point of time.  Which SAP Standard transaction I have to use and what all  data I need to populate?  I would appreciate any help on this and will reward the right answer.  Please let me know.
    Thank you in advance.
    with regards,
    Muthu Ganapathy.

    Hi,
    While creating the inbound delivery (VL31N), intially all the items will be shown, see the advance shipping notfication - from the vendor for which he has send confirmation & rest items you can delete simply & save. & next time when the vendor sends rest advance shipping notifcation (confirmation), you can receive them.
    Hope this answers your query.
    Regards
    Irfan.

  • Idoc DELINS Forecast Schedule Agreement in same client

    Hi Experts, I need your help.
    I have the message LPH1 to start the IDOC DELINS on transaction ME38 ( Schedule Agreement MM ) and send to updated the delivery schedule VA32 in same client, but doesn't work. I made all the configurations that I know and I couldn't understand why doesn't work, every one could help me?
    The Outbound Idoc generate correctly, but the Inbound idoc isn't generate.
    On BD64 I couldn't generate the distribution, because the sender can't be same of the receiver.
    Thanks,
    Ander.

    No, there is not such functionality in the way you want, but
    the cumulated quantity becomes zero only when changing the fiscal year of the customer and in Idoc the cumulated received quanity is decreased.
    have a look to:
    http://help.sap.com/saphelp_erp2004/helpdata/en/93/743b11546011d1a7020000e829fd11/content.htm
    pls.reward points if helpful
    regards
    Roberto

  • Create a defaut view for the MS Project Server 2010 client

    Dear Forum,
    how can I create a defaut view for the MS Project Server 2010 client?
    I saved a template and set a default view under File -> Options ->Project View. I also did the same in the checked-out enterprise global. If I then close the client and re-open it my default view changes back again to the previous one (not the view
    I set as a default view).
    What explains this behaviour and what can I do? Any hints?
    Thank you very much for your help!

    Scheduler007 --
    The view you selected by clicking File > Options > Project View is the default view for every new project you create from a blank project template.  This is a global option, so setting it from the checked out Enterprise Global file serves no purpose. 
    When you select a view as your default view, you will see that view applied to the blank project that is opened when you launch Microsoft Project 2010, and you will see it applied if you create new blank projects.  If you create enterprise templates for
    people to use in your organization, you should simply apply the view to the template that you want as the default so that users will see this view immediately when they create a new project from the template.  In addition, if you apply a view to an open
    project, close and check in the project, and then reopen the project, you will see the last view applied in that project (as Guillaume correctly points out).
    Beyond this, there is no method possible for the Project Server administrator to specify a default view for the Microsoft Project application used by the project managers in your organization.  This is an option each PM must set.  Hope this helps.
    Dale A. Howard [MVP]

Maybe you are looking for

  • SALE ORDER COMPLETION DATE

    Hi all,            We are create one sale order in va01N after completion of all process we make a delivery entry in VL01N.We are creat morethan five deliveries.       Any standard report to see the sale orders completed date ie order closed date wis

  • Radio plays not transferring to Classic

    I have just synced all my iTunes playlists to my Classic. No problem with the music, but dramas recorded on my radio then imported to iTunes with a flash drive are proving problematic. Only one of the many plays has copied over, yet they were all rec

  • Unable to see files in Google docs

    Just set up my OJ6500A+ on wireless network to take adv. of apps like Googledocs. I had a prob. getting printer & Googledocs to talk to ea. other. Printer kept acting like pswd was bad. I fixed that, and got GoogleDocs to open. I uploaded docs. to Go

  • Sqlplus SPOOL broken.  Urgent help.

    I have never seen this before. I am running a spool of a small query. It returns 7 rows and they are displayed. I go to look at the .lst file and the first row is gone from the spooled .lst file. I have tried this multiple times, and the results vary

  • パターンIO出力ラインに関して

    みなさんこんにちは.  パターンI/Oの出力ラインについて質問があります. イベントケースを利用して ボタンAを押す→DIO Port0 Line0タスク構成→パターン出力→タスククリア ボタンBを押す→DIO Port0 Line1タスク構成→パターン出力→タスククリア といったことをしようと考えプログラムを組みました. Line0からは問題なく出力されるのですが.Line1から出力が得られません.  特にエラーメッセージも出てきません.  パターンIOの出力先はPort0のLine0のみなの