IDocs outbound programe

Hi,
      I created custom IDocs for sending data from SAP to non SAP system. I wrote outbound program for creating IDocs.
  but at the same time I want to display  IDocs numbers which are generated after executing outbound program.
please help me in this issue.
Thanks.
Sridevi.

Hi sreedevib,
yes, Idoc number can be found in edidc-docnum
This code comes from  SAP TM extension (where everything is oo):
METHOD send_idoc.
CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
      EXPORTING
        master_idoc_control            = ls_edidc
*       OBJ_TYPE                       = ''
*       CHNUM                          = ''
      TABLES
        communication_idoc_control     = lt_edidc
        master_idoc_data               = lt_edidd
      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 <> 0.
      RAISE EXCEPTION TYPE /luntm/cx_create_tut_idoc.
    ELSE.
      LOOP AT lt_edidc ASSIGNING <edidc>.
        AT FIRST.
          ES_EDIDC = <edidc>.
        ENDAT.
        ASSERT ES_EDIDC = <edidc>.
* IF ALE model creates more than one communcication IDOC, DUMP created, changes have to be applied here
      ENDLOOP.
    ENDIF.
ENDMETHOD.                    "send_idoc
        lo_create_tut_idoc->send_idoc( IMPORTING es_edidc = ls_edidc ).
        IF ls_edidc-status = '03'."03  Data transfer to Port OK
          MESSAGE s101(/luntm/transportpool) WITH <tor_root>-tor_id ls_edidc-docnum INTO lv_dummy.
Check that SY-SUBRC = 0 after 'MASTER_IDOC_DISTRIBUTE'.
You may even post some of your secret code.
Regards,
Clemens

Similar Messages

  • IDOC OUTBOUND PROGRAM

    Hello ABAPers,
    Can any one tell me how to write Outbound programs using CHANGE POINTERS for the
    MATMAS05
    Iam new to idoc programming. Please help me
    thanks in advance.

    hi Mohan,
      Hi have a look at these links
    ALE/ IDOC
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
    http://www.allsaplinks.com/idoc_sample.html
    http://www.sappoint.com/abap.html
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.allsaplinks.com/idoc_sample.html
    Regards,
    santosh

  • Outbound program s for idoc in ale

    hi to all abap gurus
    I have doubt regarding idocs
    we know that outbound programs are message specific  ie for each message type there is one outbound program .
    we know that orders 05  idoc transfers both purchse and sales orders data by using two
    message types .
    now my question is orders 05 is having two outbound program s ?
    pls clarify it ? thanks in advance

    hi
    we can write no. of programs for each message type that is depending on using the message type.
    we can change in the version of the programs ... which the requirements we can fullfill
    for each message type contain minimum 1 outbound program to work.....
    which is latest version that we will follows .............................................

  • Message should get generated in outbound program  when idoc is posted in ot

    Dear All,
    Can anyone please tell me,how i can send response back to the idoc program.
    Requirement: Outbound program will generate an idoc and when it gets posted in the other server a message should appear that idoc was posted in other server...
    Now can anyone tell me how i can do this,i mean message should get generated in outbound program when idoc is posted in other server..
    warm regards
    Sajid

    hi,
    Go through the following thread
    iDoc - XI - iDoc with Acknowledgement
    Regards
    Mudit

  • Hi guru's  what is outbound program to run in idocs

    hi guru's  what is outbound program to run in idocs  , plz help me

    Hi Sri,
    If u want to run outbound program for 'Z' segment and Idoc type use this type of  program
    DATA: Begin of imara occurs 0,
    matnr like mara-matnr,
    mtart like mara-mtart,
    mbrsh like mara-mbrsh,
    meins(3) type c,
    end of imara.
    data: begin of imakt occurs 0,
    maktx like makt-maktx,
    end of imakt.
    DATA: wamas_con LIKE edidc,
    imas_data LIKE edidd OCCURS 0 WITH HEADER LINE,
    icom_con LIKE edidc OCCURS 0 WITH HEADER LINE.
    PARAMETERS: e_matnr LIKE mara-matnr,
    e_msgtyp LIKE edidc-mestyp,
    e_rcvprn LIKE edidc-rcvprn.
    retrive app. data from DB
    SELECT matnr mtart mbrsh meins FROM mara INTO TABLE imara WHERE
    matnr = e_matnr.
    SELECT maktx FROM makt INTO TABLE imakt WHERE
    matnr = e_matnr and SPRAS = 'E'.
    *Master idoc control record
    wamas_con-rcvprt = 'LS'.
    wamas_con-rcvprn = e_rcvprn.
    wamas_con-idoctp = 'YMATMAS1'.
    wamas_con-mestyp = e_msgtyp.
    master idoc data records
    LOOP AT imakt.
    imas_data-segnam = 'YMAKT1'.
    move imakt to imas_data-sdata .
    APPEND imas_data.
    ENDLOOP.
    LOOP AT imara.
    imas_data-segnam = 'YMARA1'.
    move imara to imas_data-sdata .
    APPEND imas_data.
    ENDLOOP.
    CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
    EXPORTING
    master_idoc_control = wamas_con
    OBJ_TYPE = ''
    CHNUM = ''
    TABLES
    communication_idoc_control = icom_con
    master_idoc_data = imas_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 <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    COMMIT WORK.
    otherwise <b>material master transfer using BD10
                               customer master using BD12
                               vendor master using BD14</b>
    Regards,
    Vijay

  • How to find the outbound program for standard IDoc

    Hi Folks,
    Can anyone tell me how to find the outbound program/tcode for a standard IDoc? For e.g. IDoc - MATMAS05 can be generated & distributed using tcode BD10. Similarly how do I find the outbound program/tcode for any standard IDoc? Is there any procedure to find the same.
    I have tried to search based on the package name, but unfortunately I didn't find the information for IDoc: COND_A04.
    Thanks in advance.
    Somu

    You can do following steps if the idoc is generated based on change pointer concept (for masters)
    - Identify the message type associated with idoc type (table EDIMSG).
    - Function module for generating the IDOC will be available in table TBDME (pass message type as input).
    Refer to the standard Outbound IDOC generation program RBDMIDOC for more details.
    If the idoc is generated based on the process code concept (transaction data), get the process code information from table TMSG1 (pass message type as input), get the function module associated process code from table TEDE1 (pass process code as input).
    Regards, Vinod
    P.S: There is no standard way to find out the associated program / Tcode for generating idoc. The above process will be helpful to find out the underlying function modules to generate the idoc.  For generating idocs based on change pointers the generic program RBDMIDOC can be used.
    Edited by: Vinod Kumar on Jul 13, 2011 2:15 PM

  • How to resolve ERROR-29 in outbound program of ABAP?

    Hi All,
        I am trying to send idocs from SAP to NON SAP ,In WE02 i am getting error
    Receiver of IDoc is its own logical system
      its error number is 29.i.e.Error in ALE service.If any body knows how to resolve this issue post your valuable message.
    Regards,
    K.S.L.Neelima

    Hi Neelima,
    Check out the Outbound Program logic which actually triggers the Idoc. The below message means that you were trying to send the Idoc from same System to the same system(If its a different client then it is OK)Sender and receiver Systems are the same.Check whether you have populated the control Record Information correctly or not.
    Best Regards

  • IDOC OutBound Error 29: Entry in outbound table not found?

    Dear All,
            I configed the customized IDOC,and used BD64,WE20 Generate Partner Profile.the partner type is u2018LSu2019,In We20,I clicked the check button .There is no error in check.Other config also correct.
    My outbound program main code is :
      WA_IDOC_CONTROL_RECORD-MESTYP = 'ZMSGTYPE_WE81'.              
      WA_IDOC_CONTROL_RECORD-IDOCTP = 'ZIDOCTYPE_WE30'.
    Receiver
      WA_IDOC_CONTROL_RECORD-RCVPOR = 'A000000003'.           "Port
      WA_IDOC_CONTROL_RECORD-RCVPRN = 'target100'.        "Partner number
      WA_IDOC_CONTROL_RECORD-RCVPRT = 'LS'."Partner type
      WA_IDOC_CONTROL_RECORD-RCVPFC = 'LS'."Partner function
    Sender
      wa_idoc_control_record-sndpor = 'A000000001'.           "Port
      wa_idoc_control_record-sndprn = 'source500'.           "Partner number
      wa_idoc_control_record-sndprt = 'LS'.             "Partner type
      WA_IDOC_CONTROL_RECORD-SNDPFC = 'LS'."Partner function
      DATA L_ITEM TYPE I.
      LOOP AT GT_IDOC.
        L_ITEM = L_ITEM + 1.
        WA_EDIDD-SEGNAM = 'ZSEG_WE31'.
        WA_EDIDD-SEGNUM = L_ITEM.
        WA_EDIDD-SDATA = GT_IDOC.
        APPEND WA_EDIDD TO IT_EDIDD.
      ENDLOOP.
      CLEAR L_ITEM.
      SORT IT_EDIDD BY SEGNUM.
      CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
           EXPORTING
                MASTER_IDOC_CONTROL            = WA_IDOC_CONTROL_RECORD
              OBJ_TYPE                       = ''
              CHNUM                          = ''
           TABLES
              COMMUNICATION_IDOC_CONTROL     = IT_COMMUNICATION_IDOC_CONTROL
                MASTER_IDOC_DATA               = IT_EDIDD
           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 <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ELSE.

    hi Sun,
    The value 'X' means ABAP_TRUE, which means the outbound ALE settings for your message type are OK.
    Did you check the sy-subrc value after the FM 'MASTER_IDOC_DISTRIBUTE' is called ? and if yes what is the value ?
    Also did u check the IT_EDIDD table, whether is contains any values ?
    If all of the above is fine then call the FM 'EDI_DOCUMENT_DEQUEUE_LATER' by passing the document number of the outbound IDoc created, this number you will from the 'communication_idoc_control' table which you need to pass to your FM MASTER_IDOC_DISTRIBUTE.
    for your reference attached is code for it
        CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
          EXPORTING
            master_idoc_control            = wf_edidc
          TABLES
            communication_idoc_control     = int_comm_cntl
            master_idoc_data               = int_edidd
          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 = 0.
      APPEND LINES OF lt_idoc_comm_control TO g_idoc_comm_control.
    endif.
      LOOP AT g_idoc_comm_control.
        CALL FUNCTION 'EDI_DOCUMENT_DEQUEUE_LATER'
          EXPORTING
            docnum = g_idoc_comm_control-docnum.
      ENDLOOP.
    {/code}
    hope this will solve your problem
    Edited by: Ashwinee on Dec 26, 2008 12:09 PM

  • ALE Inbound and Outbound programs

    Hi,
    Can someone tell me as to how we create the inbound and outbound programs for ALEs??And the cenerio where we use the std FMs and where we use the customs programs for the corresponding action?
    Thanks,
    Supriya Manik.

    Hi,
    Go thru this Book : Aravind Nagpal
    go thru this links,
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm#_Toc8400365
    Idoc's
    http://www.thespot4sap.com/Articles/SAP_ALE_IDOCS.asp
    http://help.sap.com/saphelp_nw04/helpdata/en/12/83e03c19758e71e10000000a114084/content.htm  (change pointer)
    http://www.erphome.net/pdf/tech/J07.pdf#search=%22ALE%20Change%20pointers%22
    http://www.****************/articles/ALE/IDOCExtension/IDOCExtension.htm
    Thanks
    Sunil

  • IDOC Posting Program for Vendor Master

    Hi Guys,
    Please give me the Sample Posting Program Vendor master Idoc.
    Thanks a lot in advance.
    Prabhu.r

    search with BD* in SE93
    BD14 - Outbound program for vendor master
    BD10 - Outbound Material master
    BD12 - Outbound customer master

  • AES filing error - Idoc Outbound Processing: EDI number cannot be compiled

    Hi Gurus,
    We are configuring the AES filing.
    we've done the EDI  configI and initally we got the error that EDI partner is not maintained. As per the suggestions from this Forum we've added the cusoms office details in geography tab.
    Now when we are trying to process the same, we are getting the error "Idoc Outbound Processing: EDI number cannot be compiled"
    All suggestions are welcome.........
    Thanks in Advance.

    Hi Shiva,
    Here goes the solution: you need to maintain the Number of the Number Ranges starting with "10" and this applies only to GTS system as this is HARD-CODED in the Program, apart from 10 any number of the number range will result in an "EDI Number Range compilation" error.
    Cheers
    Harsha

  • IDoc outbound errors - mail send step in WF to send info-mail to enduser

    Hello specialists
    I searched quite a lot in the forums now. I found lot of info but nothing regarding my issue.
    I need to send an info-mail to the end user creating purchase orders. But only if the idoc (outbound ORDERS) could not be sent (failing for some reason, i.e. if rfc connection fails). This is what I've done to achieve this:
    - in WE40 I linked my WF to process code EDIO
    - the WF-BATCH user has an email address assigned to it (in SU01)
    - the mail sending step in my WF is configured like this:
    recipient type = G (organizational object)
    Expression = &_WORKITEM.CREATEDBYUSER.ID& (this contains the enduser id)
    subject = Test for &WORKITEM.CREATEDBYUSER.ID&
    When testing the mail can not be delivered (error SO23).
    When setting recipient type to U (E-Mail address) and giving a valid e-mail address, then it works fine (SCOT, etc. is configured and mailing to external systems works). But setting the e-mail address hard coded style in the mail send step is not an option here!
    It seems that the send mail step (SELFITEM.SENDTASKDESCRIPTION) always requires a valid e-mail address. Is it not able to handle SAP user id's ?
    Thanks in advance for some guideance on this one.
    Renaud
    Edited by: Renaud Desarzens on Feb 11, 2010 3:00 PM

    Hello and thanks for your help.
    I was able to solve it like this:
    - don't use mail send step
    - instead, add new activity with a new task (SELFITEM.SENDTASKDESCRIPTION)
    - in the bindings (workflow -> step) set:
         B --> &TYPEID&
         &_WORKITEM.CREATEDBYUSER.ID& --> &ADDRESSSTRINGS&
    Seems that the mail send step doesn't allow TYPEID to be "B" because each time I tried to tweak the generated bindings that way it messed up the recipient type and expression I set before.
    Regards
    Renaud

  • RFC For IDoc outbound processing

    I am creating an RFC for BDC for call transaction we19
    input as : idoc number
    and output:-.. iDoc Outbound processing done
    so:-
    I go to we19> give iDoc Number (say, some number for ALEREQ01), and execute> click on Outbound processing-->click enter -->enter
    in this way, I can process any iDoc from SAP system to outbound.
    I want  to create RFC for the same.
    Problem:-
    when i am executing that RFC, and when I check the iDoc status in we05, that iDoc shows status as Idoc ready to dispatch( its in yellow color).. Its not showing green color and not saying that IDoc passed OK
    when I try manually ,I see the status green..OK..successfully
    Any idea why I am getting this problem??
    Is there any problem in my BDC recording?..but when I run that recording for Process, i dont see any problem,it executes successfully.. but when I copy the Code from BDC and make a RFC using that code, its giving problem as mentioned.

    Hi Ankit,
    Theorotically it should work.... but I'll suggest not to use BDC here. What you can do is,
    1. You have Idoc number..Right?
    2. Read control record from EDIDC and data record from EDID4.
    3. Then call Master_idoc_distribute.
    4. This will again distribute the same IDoc with same control and data record as a new one. It will be same as WE19 , but without WE19.
    Please check and confirm.
    Regards,
    Audy.

  • IDOC Outbound processing using SAP BC

    Hello Experts,
    I am trying to develop a simple IDOC outbound processing scenario using SAP BC. In this an IDOC from SAP ECC server will be sent to an external webserver via SAP BC, for this i have done all the setup i.e Establishing connection between SAP BC & SAP ECC,  ALE settings, creating a new Routing rule, but when i try to run this scenario, i am getting the following error 'IDocMetaDataUnavailableException: (3) IDOC_ERROR_METADATA_UNAVAILABLE' , is there any way to import the IDOC metadata, just like how we do in SAP XI using IDX2. Please Help...
    Thanks & Regards,
    Amit Naik

    Hi Michal,
    Following is the error which i am getting :-
    2009-03-12 21:56:59 IST com.sap.conn.idoc.IDocMetaDataUnavailableException: (3) IDOC_ERROR_METADATA_UNAVAILABLE: The meta data for the IDoc type "" is unavailable.
         at com.sap.conn.idoc.rt.DefaultIDocDocument.<init>(DefaultIDocDocument.java:132)
         at com.sap.conn.idoc.jco.JCoIDocDocument.<init>(JCoIDocDocument.java:74)
         at com.sap.conn.idoc.jco.JCoIDocDocument.createIDocDocument(JCoIDocDocument.java:117)
         at com.sap.conn.idoc.jco.JCoIDocRuntime.createIDocDocumentList(JCoIDocRuntime.java:83)
         at com.sap.conn.idoc.jco.DefaultJCoIDocServerWorker$IDocDispatcher.handleRequest(DefaultJCoIDocServerWorker.java:88)
         at com.sap.conn.jco.rt.DefaultServerWorker.dispatchRequest(DefaultServerWorker.java:141)
         at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcServer.dispatchRequest(MiddlewareJavaRfc.java:2621)
         at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcServer.executePlayback(MiddlewareJavaRfc.java:2298)
         at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcServer.playbackTRfc(MiddlewareJavaRfc.java:2130)
         at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcServer.handletRfcRequest(MiddlewareJavaRfc.java:2012)
         at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcServer.listen(MiddlewareJavaRfc.java:1903)
         at com.sap.conn.jco.rt.DefaultServerWorker.dispatch(DefaultServerWorker.java:258)
         at com.sap.conn.jco.rt.DefaultServerWorker.loop(DefaultServerWorker.java:320)
         at com.sap.conn.jco.rt.DefaultServerWorker.run(DefaultServerWorker.java:219)
         at com.wm.util.TimeWrappingProvider$TimeMesuredTask.run(TimeWrappingProvider.java:40)
         at com.wm.pkg.sap.rfc.ListenerThread.run(ListenerThread.java:70)
    Thanks & Regards,
    Amit

  • 26 Error during syntax check of IDoc (outbound)

    Hi Experts
    I am using TPSDLS - Idoc(outbound).
    When we view in WE02 : for few of the deliveries it is working fine , but for some it is giving the following error
    26     Error during syntax check of IDoc (outbound)
    Please any one help me out for the same
    Thanks & Regards
    Shaveta

    Please check the segments for the idocs in error status in WE02. The segments in the idoc should be in the same sequence as defined while creating idoc in WE30.
    For eg. taking the case of invoic02 idoc.
    Segment E1EDP01 cannot come prior to segment E1EDK01.
    As in WE30 it is defined to come after E1EDK01\
    Please reward the points if this information is useful.

Maybe you are looking for

  • Aspect ratio control for VOD

    I love that the IMG provides an aspect-ratio control (as previous Motorola boxes on Comcast didn't seem to do). But, on mine at least, I can't use it when watching VOD.  Is this by design, or is it a bug? Because HBO is so overprotective about their

  • There was a problem updating Illustrator CC (2014).

    Update failed.  Unable to extract the download files.  Press Retry to download again.  (U44M1I210).  This same problem has been repeating for months.  Any solution?

  • Application Finder can't be opened

    'Application Finder can't be opened' I need help, how to solve it. 

  • Sub-sub query referencing outside column

    The following SQL statement executes: select ci.name, ci.customer_id KeyMed_Ship_to, select cnp from select co.customer_no_pay cnp, count(co.customer_no_pay) ccnp from ifsapp.customer_order co where co.contract like 'OIA%' and co.customer_no='???????

  • Canon IPF8000 not working with Snow Leopard

    My Canon IPF8000 is on a Windows network. I was able to print to it in OSX 10.5 and use all the extra handy features like Easy Layout, etc. Since upgrading to Snow Leopard it's not possible to print to it at all. Is there anyone that is able to do so