About Orders05 outbound Idoc.

Hi,
I am using an outbound idoc of basic type Orders05 with an extension of the idoc header segment.This outbound idoc will get triggered once a PO is saved and sent through EDI.
I have to do an enhancement wherein I have to populate the mode of transport field(EXPVZ) and place of loading(LADEL) in the fields of the extended segment selecting them from EIKP depending upon the BELNR value in the header of the idoc(E1EDK01-BELNR).
I am unable to understand how do I populate the fields.
Could you please help me.
Thanks,
Sandeep.

HI,
see the below steps you will completely understand the processing outbound..
2.1 Outbound Interface
PROCESS DIAGRAM
Outbound Interface
1. Analyse Hierarchy Levels
2. Create New segment
3. Create New IDoc Type
4. Create New Message Type
5. Link Message with IDoc Type
6.  Create an entry in EDP13 via transactions WE20 and BD64
7. Populate the Custom IDoc via ABAP Program
7b Error Handling
7c. Send Status Email
8. Test the Population of the Custom IDoc
<b>Step 1 – Analyse Hierarchy Levels:</b>
Analyse the data relationships being processed in the interface.  Define the appropriate hierarchical Parent-to-Child relationships. 
Navigate to transaction code WEDI
Transaction WEDI displays the IDOC main menu.  This allows navigation around the various development and control areas to create a customised IDOC.
<b>Step 2 – Create a new segment:</b>
via wedi : Development - IDOC Segments or Transaction code WE31.
•     Enter segment name and click on Create.
&#61662;     The name of the segment type must start with Z1 , and have a maximum of eight characters.
•     Enter description and enter the relevant field names and data elements.
&#61662;     The segment should represent a structure in the program so for each field in the segment a field name and a data element must be defined.
•     Save the segment and enter Person Responsible and Processing Person .
•     Go to Edit and Set Release.
•     Repeat this procedure for each new Segment in the IDOC.
<b>Step 3 – Create a new IDOC Type</b>
via wedi Development - IDOC Types or Transaction WE30.
•     Enter segment name (starting with Z), click on Basic Type and then Create. 
•     Create as new, enter Person Responsible and Processing Person  and enter description.
•     On ‘Create Basic Type’ screen decide where segments should be inserted and go to Edit/Create Segment.
•     Complete relevant fields in the Maintain Attributes screen:
•     From the relevant segments created in Step 2 enter the Segment type and if mandatory segment.
•     The Minimum and Maximum number of segments to be allowed in the sequence. (One minimum and one maximum if segment is mandatory).
•     The Parent Segment and Hierarchy Level will be automatically created depending on where in the IDOC tree you decided to create that particular segment.
•     Repeat this process for each segment needed in the IDOC type, deciding whether to add the next segments at the same level or as a ‘Child’.
•     When IDOC created return to initial screen.  Go to Edit and Set Release.
•     Go to Transaction WE60 to view the IDoc Type you have created.
<b>Step 4 – Create new Message Type</b>
via wedi Development - Message Types or Transaction WE81.
•     Display/Change and click on New Entries
•     Create a new Message Type and Save.
Step <b>5 – Link Message Type to IDOC Type</b>
via wedi Development - IDOC Type/Message or Transaction WE82.
•     Display/Change and then click on New Entries.
•     Enter Message Type, Basic Type (IDOC Type) and Release (46C) and Save.
<b>Step 6 – Create an entry in EDP13 via transactions WE20 and BD64.</b>
The partner profile for the Idoc must be set up and generated in the transaction BD64 and transaction WE20.
•     WE20 – Add Message Type to appropriate Partner Type, Enter Message Type, Receiver Port and Idoc Type and Save.
•     BD64 – Create a Model View, Enter Sender and Receiver Ports, Attach Message Type.  Go to ‘Environment’ on Menu and click on Generate Partner Profiles and generate (not save) profile.
<b>Step 7 – Populate the custom IDOC via ABAP Program</b>
See Test Program ZOUTBD_IDOC_TEMPLATE, Appendix IV.
•     Create an Internal Table for each segment type, this should be exactly the same structure as the segment type.
•     The control record is filled into a structure like EDIDC.  The message type and the Idoc type for the Idoc must be populated into the eddic structure.
- PERFORM populate_Control_structure USING  c_mestyp
                                            c_SEGMENT_type1.
•     The data segments are filled into a structure like edidd-sdata; sdata and the segment name are populated into the edidd structure.
- PERFORM transfer_Parent_data_to_seg.
•     The standard SAP function module MASTER_IDOC_DISTRIBUTE is called to pass the populated IDOC to the ALE Layer.
- PERFORM master_idoc_distribute.
•     NOTE:  This function module is only called for stand alone programs and Shared Master Data programs (SMD).   It is not called when using extensions or output determination.
•     The ALE Layer handles the sending of the IDOC to the receiving system.
•     Error Handling (see  Step 7b).
•     Commit work.
Project Specific
<b>Step 7b – Error Handling</b>•     Analyse which fields in the interface are mandatory for the receiving system and who needs to receive error notification.
•     Declare a structure of type ‘MCMAILOBJ’ for sending instructions.
•     Enter values for the internal table based on structure ‘MCMAILOBJ’
•     For selection processes, on SY-SUBRC checks and where fields are mandatory for the receiving system; insert Function Module  ‘MC_SEND_MAIL’.
•     Enter values in the following parameters: -
MS_MAIL_SENDMODE         =  ‘B’ (Batch Mode)
MS_MAIL_TITLE                    =  'Mail Title'
MS_MAIL_DESCRIPTION     =  ‘Error description’ (e.g. MATNR not given)
MS_MAIL_RECEIVER           =  ‘Name of Receiver’ (To be determined)
MS_MAIL_EXPRESS             =  ‘E’ (Express Delivery)
MS_MAIL_DLINAME            = Leave Blank
MS_MAIL_LANGU                =  'E'  (Language)
MS_MAIL_FUNKOBJ_NAME  = Leave Blank
TABLES
           MS_MAIL_CONT           =  I_MCMAILOBJ
Note:
It has to be determined separately for each interface how these errors and mail notifications are to be grouped – dependant upon the number of errors that are potentially likely. One possible approach is to send an email for each reason for rejection and include all the records that failed for that reason in the mail notification. Another possible approach is to send an email for every failure.
When error checking for mandatory fields it is common SAP practice to reject a record on its first failure (irrespective of subsequent errors in that record)
<b>Step 7c – Send status mail</b>
•     Append to table I_MCMAILOBJ details of the time the interface was processed, how many Idocs were created and how many of these produced a status of 03.
•     Select the user to receive the mail from ZINT_RECEIVER, using the name of the program as a key (SY-CPROG).
•     Use function Module ‘MC_SEND_MAIL’ to send a mail to the user containing the contents of I_MCMAILOBJ at the end of the interface processing.
<b>Step 8 – Test the population of the custom IDOC</b>
via wedi IDoc - Display IDoc or Transaction WE02.
•     Enter your message type and execute.
•     Status should be green, double click on one of the Idocs you have created to view its contents.
•     If a problem has occurred click on Status which will give you a description of the error.
•     Drop down Data Records arrow and this should list the data in the IDoc in the correct hierarchical structure.
•     Click on each individual segment and view the content to check that the correct data has been read.
•     If you have UNIX access by using AL11 you can view the file that you have created.
Note:
For some interfaces it may be valid to send an empty file to SAP.  This empty file is converted to the custom IDOC format expected by SAP.  This custom IDOC will contain dummy information.  In the inbound processing code, if the dummy information is identified then the processing of the IDOC is considered to be complete and the IDOC should then be assigned a successfully processed status of 53, even though it has not been processed at all.
rewards if useful
regards,
nazeer

Similar Messages

  • FM for ORDERS05 Outbound Idoc.

    Hi,
    I have to post an idoc of basic type ORDERS05 from a custom program.
    I have populated the fields for control header and the data section of the idoc.I tried using the FM IDOC_OUTPUT_ORDERS to post the idoc,but when I went and checked in WE05,there were no idoc created.I don't understand why the idoc's are not been created.Could you help me in knowing how to use the FM IDOC_OUTPUT_ORDERS or if there are any other FM's to post an outbound idoc.
    Please reply asap.
    Thanks,
    Sandeep.

    Hi,
    There is a exit in the FM IDOC_OUTPUT_ORDERS line no 50... double click on the '001' it will take u to the Function Module EXIT_SAPLEINM_001... there click on the Zprogram ...
    The FM has EKKO table fields has a Impirting parameter .
    u write a code in that Z include program
    u have to call the FM MASTER_IDOC_DISTRIBUTE in the program
    which creates the IDOC
    Thanks,
    Manjunath MS

  • Outbound Idoc: ORDERS05 from VA02

    Hi Friends,
    Can you please tell me which user exit will trigger if I execute VA02 so that the outbound Idoc will generate ?
    Regards,
    Hari

    Hi all,
    The mapping function includes an exists and a mapwithdefault.
    Now the creation of the segment is handled ok, but not as well its fields. Its unable to determine the write of the second E1EDP19 segment and it does:
    1- OK
    2- OK
    3- Writes E1EDP20 but not the 19
    4- OK
    Thanks for your interesting

  • Outbound Idoc issue

    Hi,
    We have migrated from 4.6B to ECC 5.0. While posting an outbound idoc to a middleware, its failing in the middleware. This is because few segements of the basic type has been modified by SAP ( fields have been added ).
    This was running properly in 4.6B. So basically this error is due to the additional fields which cannot be recognised by the middleware.
    Now, if i need to send the version similar to that of 4.6B, without those additional fields, how do i go about it?
    Thanks,
    Raj.

    Hi Rajgopal,
    use the latest version idoc type(basic type)for example for orders we have orders01,orders02,orders03,orders04,orders05,it's better to use the latest version.
    else
    u have to extend the stanard idoc with those additonal fields and write the code in user exit to populate them.
    Regards,
    nagaraj

  • Message type for Scheduling Agreement - Outbound IDoc

    Hi All,
    I have to create an Idoc for Scheduling Agreement through a Z program based on some conditions. I have bit confusion, whether i can use Idoc type for Orders(e.g ORDERS01..05) & Message type ORDERS / ORDCHG to generate Outbound Idoc.
    Already there is process code for for ORDCHG mappig IDOC_OUTPUT_ORDCHG & ORDERS mappig IDOC_OUTPUT_ORDERS.  Whether there will be any impact on this.
    Appreciate your help.
    Regards,
    Anbalagan.

    Hi Anji,
    Thanks for the Reply. But i think ORDRSP is for Order Confirmations.
    But I have to send Outbound Idoc for a Schedule Agreement.
    Whether the same  Idoc type & Messge type used for SO/PO(e.g ORDERS05, ORDERS/ORDCHG) can be used for Scheduling Agreement.
    Please Advice.
    Regards,
    Anbalagan

  • Purchase Order Outbound Idoc issue. Message Type ORDER

    Hi Experts,
    I am having issue with outbound IDoc generated from Purchase Order.(Message Type ORDER and Basic Type ORDERS05)
    Issue is when i create PO idoc Segment  E1EDP01 and field ACTION populates as 001 this works fine.
    Now when made any changes to the purchase order.* PO trigers one more EDI - Idoc. but the ACTION field is stil as 002.*
    Could any tell me how to fix this.
    Cheers...Gopinath.

    Hi,
    Thank you.
    I have found the issue and fixed.
    Below three setting was missing same has been done in Partner Profile now ok.
    Message type u2013 ORDCHG, Processing Code u2013 ME11 and Change flag On.
    Cheers..Gopinath
    Edited by: Gopinath A.R on Oct 8, 2009 3:14 PM

  • Procedure to Error Out Outbound IDocs

    Hello,
             I have a Requirement in which I am using ORDERS05 IDoc Type and extended it to ZORDER05 to populate Custom Fields and sending the Purchase Order Outbound IDoc to the Vendor from SAP System. Now, my requirement is that if any of the Custom Fields are not maintained in SAP and not populated in the IDoc, I need to Error Out the IDoc with Error Status 26. I am currently working on the SAP ECC 5.0. I have implemented similar Error Handling Mechanism earlier by using Enhancement Framework as I was working in ECC 6.0 environment where I've added the Code by Creating an Enhancement Implementation in the Function Module IDOC_CREATE_ON_DATABASE. But since ECC 5.0 does not have the Enhancement Framework feature,  please let me know how to achieve this.
    Thank You,
    Venkata Phani Prasad K

    Hi
    why don't you try using the standard method for validation of data?
    By implementing the customer-function EXIT_SAPLEINM_002 or BAdI MM_EDI_ORDERS_OUT  you can make checks of completeness of the idoc segments (in your case, additional custom data) and, if they were not complete, report an error message raising the exception DATA_NOT_RELEVANT_FOR_SENDING
    ie
    if <Idoc Custom Field> is initial.
    MESSAGE ID 'S1'
                   TYPE 'E'
                   NUMBER '333'
                   WITH Additional data are incomplete' 
                   RAISING data_not_relevant_for_sending.
    endif.
    Thus you have the evidence of the error in the processing log of the output message while the IDOC is not created.
    The solution works very well and is not invasive.
    Regards.
    Andrea

  • EDI Outbound IDOC Remove unused fields from segment

    Hi All,
    I am configuring a outbound idoc scenario for Message type ORDERS. The basic type for this message type is ORDERS05.
    The segment E1EDKA1 has 44 fields, I need only the first field and the last field of this segment.
    How do I remove the unused fields in this segment ?  I Tried BD56 and BD32 But they are for removing the complete segment and so does not serve my purpose.
    Any pointers to this issue is appreciable .
    Regards,

    Hi,
    Segmetns of standard message types can be deleted from BD53. But I don't think deleting fields would be possible from segments of standard idoc type. What you can do is you can create your own custom idoc type with the fields you want and allign it with the standard message type ORDERS. This should solve your purpose.
    BR,
    Atanu Mukherjee

  • Outbound idoc control recorderror - REFINT field

    I am trying to send orders.orders05 idoc from ecc to xi
    the message that I get in we02 in ECC is
    EDI: Field REFINT in control record with value 'T080902134731A ' is invalid
    Does somebody knows where this field is configured ?
    when I edited this idoc in we02 and erased this value the process was sucessfuly
    but when I try using we19 it assigns this value automatically
    thx
    Shai

    I dont think it is populated in SAP, rather it comes afetr outbound IDOC is sent and tstaus record is updated afterwards.
    I would say debug IDOC in WE19, create a watchpoint for the field to see where it is changing values

  • Function Module to create Outbound IDoc

    I have created a segment (ZSEGPRO), basic type (ZIDOCPRO) and message type (ZMSGPRO) to create a custom IDoc. Now I have to write a Function Module to create Outbound IDoc.
    I want to know what will be in Import, Export, Changing, Tables, Exceptions and Source code of that function module. The fields used in the segment ZSEGPRO is given below:
    Fld NameSource Data Elmn     Description
    PRODUCT MARA MATNR     Material number
    TEXT     MAKT     MAKTX     Material description
    PRN     MARA     YYBCEZNDR     Print Field
    Additional information: Export parameter will be BAPIRETURN for holding error message(if any).
    These Function Module need not require to be RFC enabled.

    Hi ,
    Refer these:
    There are two main reasons
    1) Make sure you call COMMIT WORK after the MASTER_IDOC_DISTRIBUTE
    http://help.sap.com/saphelp_nw04/helpdata/en/78/21783151ce11d189570000e829fbbd/content.htm
    2) The rest of the setting of the ALE IDoc might not have been done
    http://help.sap.com/saphelp_46c/helpdata/en/78/2177c951ce11d189570000e829fbbd/frameset.htm
    You can use the Area Menu WEDI and do the rest of the settings.
    ALE Quick Start guide and ALE Programming Guides for your reference
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFAALEQS/CABFAALEQS.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEPRO/BCMIDALEPRO.pdf
    Recent discussion which could be helpful,
    About WE21, BD64, sm59
    Regards
    Shiva Kumar

  • Outbound Idoc HRMD_A07

    Hi Friends,
    Kindly help me any one know about how to work  outbound interface using  Idoc type HRMD_07  message type HRMD_A in PA& any one have details design process document please help me.
    Thanks and Regards,
    Sai .

    You can trigger the IDOC for the PA* infotypes using the change pointer. This will trigger the OUTBOUND idoc for master data changes in teh PA30/40 tracnasactions.
    Activities to be done:
    1. Enable change pointers globally
    2. Activate the change pointer for the message type HRMD_A
    3. Run RBDMIDOC program to generate the IDOCs. This would create IDOCS for the changed/Created HR master data
    Thanks,
    Saibaba
    Edited by: Saibaba Kondani on Aug 5, 2009 1:50 PM

  • Outbound Idoc through Workflow in CRM

    Hello,
    Consider this scenario, I need to create an opportunity document through Idoc inbound in CRM 4.0. There are certain validations done at the XIF layers as well as the application layer.
    In case if there are any errors in the Idoc or  errors the opportunity document created(application level errors), I need to send an outbound Idoc containing complete inbound Idoc data with certain rejection codes.
    Can some body let me know the best way to achieve this. I
    If this can be achieved through workflow, please provide the complete details on how to go about this.
    Thanks  In Advance,
    Kiran

    Hello,
    Consider this scenario, I need to create an opportunity document through Idoc inbound in CRM 4.0. There are certain validations done at the XIF layers as well as the application layer.
    In case if there are any errors in the Idoc or  errors the opportunity document created(application level errors), I need to send an outbound Idoc containing complete inbound Idoc data with certain rejection codes.
    Can some body let me know the best way to achieve this. I
    If this can be achieved through workflow, please provide the complete details on how to go about this.
    Thanks  In Advance,
    Kiran

  • SENDING WBS ELEMENT IN OUTBOUND IDOC  ORDRSP

    Hi Experts,
    i need to update idoc ORDRSP (to distribute Sales order) with field WBS ELEMENT  , you can find this under item tab "Account assignment" field COBL-PS_POSID
    I generated outbound idoc on several sales orders but none of them has this information.
    do you know how to have this information populated in this idoc ?
    Thanks and regards

    Hi,
    You need to do the following steps to create a custom segment and populate values into that:-
    1. Create a custom segment using the T Code WE31
    2. Add the created custom segment to the orders05 basic type by creating a new extension using WE30 transaction
    3. Maintain a new entry in WE82 transaction for the message type, basic type and extension
    4. Update the extension in all the necessary partner profiles WE20
    5. You have lot of function exits in the function module IDOC_OUTPUT_ORDRSP, you can see them as customer function in that function module. You need to write the code in that include
    6. Create a project for the function exit and activate the project.
    Once you do all the above 6 steps then you can see values populated into the custom segment.
    Thansk,
    Mahesh.

  • Trigger outbound idoc whenever PO is CHANGED and then saved

    hi guru's
    i am trying to trigger outbound idoc whenever PO is CHANGED and then saved .
    i have created partner profile
    PARTNER TYPE : LI
    MESSAGE TYPE : ORDERS
    BASIC TYPE : ORDERS05
    APPLICATION  : EF
    PROCESS CODE : ME11
    BUT, NOT ABLE TO CREATE CONDITION RECORD .
    please guide me for the same considering i am new to ale-idoc

    Hi,
    Try to use the Message type as ORDCHG and processing code ME11.
    In NACE transaction-->application EF --> copy the std output type 0003 to Z output type.
    In this type in the default value tab enter the VN or LS.
    In we20 :
    Create the partner profile in the LI or LS .
    message type as ORDCHG
    process code : ME11
    message type : output type which you created
    Application :EF

  • Issue in Partner Profile config for Outbound IDOC

    Hi Experts,
    I have requirement like, When ever there will be any change in a Sales Order an Outbound IDOC will get triggered though a output type. This IDOC will save a file in the Application Server.
    The Message Type i am using is ORDERS and the Basic Type is ORDERS05.
    I have created a Partner Profile also a Receiver Port of type FILE.
    I have Assigned Message type in Outbound Parameters.
    I have assigned Receiver Port and Basic type under "Outbound Option".
    I have Assigned Applications as 'V', Message type as 'Output Type' and Process Code under "Message Control".
    When i am changing any Sales Order no IDOC is getting Triggered. I checked the Sales Order>Extras> Output> Header> Edit, the Output type is in Status RED with Message " No Partner Profiles (Message Control) Maintained".
    Please guide me if i have missed any configs.
    Help me solving this issue.
    Thanks in Advance!
    Priyabrata

    Hi Priyabrata,
    please try changing in your partner profile the application from V to V1. Another problem that's often causing the partner profile not to be found are the partner functions that are added automatically by SAP, but sometimes forgotten in the partner profile.
    I don't have a SAP system at the moment, but as far as I remember the long text of the message indicates the partner profile parameters that SAP uses for the lookup.
    If all of this doesn't help, I'd quickly debug this and see why SAP's not picking up the correct partner profile.
    Cheers, harald

Maybe you are looking for