About FM of ORDERS05

Hi,
I am trying to post the ORDERS05 idoc from my custom program.
I have populated the necessary fields of both the control header and the data section of the idoc.I then called the FM IDOC_OUTPUT_ORDERS and passed the exporting parameters (object and control record) and then the tables parameter(edidd).When executing the program I get a dump stating that  In the function module interface, you can specify onlfields of a specific type and length under "INT_EDIDDAlthough the currently specified field" " is the correct type, its length is incorrect.
For data section I have used internal table of type edidd.
I can't understand why I'm getting this dump.
Please help.
Thanks,
Sandeep.

Hi,
Are you dealing with inbound IDoc (posting IDoc to SAP application)?
If you are then please use FM IDOC_INPUT_ORDERS instead.
FM IDOC_OUTPUT_ORDERS is used to generate outbound IDoc (sending to other SAP/external system).
Regards,
Ferry Lianto

Similar Messages

  • 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

  • About ALE transaction set 860 (purchase orders) and Idoc type ORDERS05.

    Hi all,
    What is the mapping between the two? How can I find more about the two..
    Thanks,
    Charles.
    +++++++++++++++++++++

    Hi,
    Guess it looks like the output is getting proposed but its not getting processed. Check the output type configuration. Check the TIme Settings in the output type configuration.
    It is possible to set the Time when the output must be processed. Is it on SAVE or is it set to other settings. If its set to via background job then the background job must be run to process the output types.
    Check and let me know if all is fine at the output type configuration.
    Cheers
    VJ

  • How to Count schedule lines in IDoc ORDERS05 using XSLT Mapping

    Hi Experts,
    In a Scenario where we are sending Purchase order (ORDERS05) to SAP SNC using XSLT Mapping,
    where in we need to count the no. of schedule lines against the Purchase Order line.
    As in Schedule line segment there is no such provision, so it needs to be handle in XSLT mapping to count the schedule lines.
    Can you all please guide me how to go about the same.
    Regards,
    Nitin P

    Hi Satish,
    Thank you very much for the reply,
    as there is only Quantity and other information is maintained against schedule lines how we can count the schedule line repeatation against PO line ? Is that very simple as you suggested or some other consideration also needs to be taken.
    Please clarify the same and let me also know if there are some standard documents also for the same.
    Regards,
    Nitin P

  • Material batch number in ORDERS05

    Hi Friends,
    I'm receiving a EDI 180(Returns) from the customer and I have to create a Sales order with type credit memo. In this process customer is sending material batch number in EDI NTE segment. I want to map this to field in to ORDERS05. Pls. some body tell me which IDOC segment/field I can map.
    Thanks in advance.
    Arjun

    sorry to say that, but you should learn about the application, you cannot make the field empty, it is SAP design that the valuation type goes to the batch field in case of split valuation active wihtout having batch managment active.
    your wish is not possible with enhancements, and if , you would create inconsistencies and bigger problems in subsecuent processes.

  • IDOC ORDERS05: Segment E1EDPA1Doc.item partner information is not filled

    Hello,
    I'm working on the AFS-Retail Interface for Orders.
    In the first step we create a sales contract in AFS with the combined demand from a retail purchase order and in a second step the sales order call-offs which are the Retail orders for the stores (NB; one PO for one store).
    The problem is in the sales order call-off. In the Retail outbound IDOC the information about the  relevant ship-to stands only the header segment E1EDKA1 (PARVW = WE).
    In the AFS IDOC inbound the ship-to is written in the header partners of the sales order. But because the information is missing on item level the information is copied from the sales contract which leads to the wrong ship-to for the items in the sales order.
    For the communication we are using the basic type orders05. Is there a possibility to fill the item partner segments E1EDPA1 out of the standard or do I need to implement an user exit in the Retail IDOC outbound process so that the partner information is filled also on item level?
    Thanks in advance.
    Regards,
    Christine

    Hi Christine
    I am working on SAP AFS 6.0.. I Had same issue.....When sales order ref to a contract....i resoved it
    u need to write user exit for this....
    Ramesh

  • Difference - ORDERS05 sent from SAP to Supplier and SAP to SNC to supplier

    Hi Friends,
    Want to know the Difference between two scenario - detail level analysis,
    1. ORDERS05 IDoc (Purchase Order) sent directly from SAP to Supplier.
    2. ORDERS05 IDoc (Purchase Order) sent from SAP to SNC and then to Supplier.
    Is there any difference based on technical or functional level, are there fields provided by the Idoc transfer different in both the cases, why exactly SNC is used at 2nd place - only for the central place for Supplier to have access to all the details and as a interface for supplier to deal with the requirement from customer or there are some other benefits of it.
    Mainly need to know Difference between the Purchase order sent by both the scenario to supplier.
    Any details on the same will be highly appreciated.
    Regards,
    Nitin Patil

    Hi Guangwei,
    Unfortunaly I cannot use the wizard because the services that I'm mapping are not available on a SAP server, they are in a complex C# class. The proxies I'm generating make these class methods available for SAP users.
      So I'm making a generator that acts like the wizard, it builds code so that persons can access it.
      About the offset, shouldn't this be offset = offset + length of last parameter?
      The first parameter is a string with a length = 20, so the offset of the next parameter (in this case a float) will be 20, right? The size of the F type if 8, right?
       I used your wizard to create a proxy for a BAPI that has a float parameter in one of the used tables, and I noticed that it had an extra attribute Decimals = 16, I added this attribute but I've got no improvement.
      (I also tried to put a offset = 24 with no good results)

  • ORDERS05 IDOC to flat file - mapping question

    I have a requirement to convert an ORDERS05 IDOC to a "flat" structure for one of our vendors.
    When the IDOC has the following data, the mapping works well
    Input
    =====
    ORDERS05
       - E1EDP01
          POSEX        00010
          - E1EDPT1
              -E1EDPT2
                 TDLINE   line 1 text
      - E1EDP01
          POSEX        00020
          - E1EDPT1
              -E1EDPT2
                 TDLINE   line 2 text
    Output
    ======
    GWC
      - GWC08-RECORD
          GWC08-SEQNO      0010
          GWC08-TXT        line 1 text
      - GWC08-RECORD
          GWC08-SEQNO      0020
          GWC08-TXT        line 2 text
    However when the IDOC has the following data
    ORDERS05
      - E1EDP01
          POSEX        00010
      - E1EDP01
          POSEX        00020
          - E1EDPT1
              -E1EDPT2
                 TDLINE   line 2 text
    the mapping yields wrong results as below
    GWC
      - GWC08-RECORD
          GWC08-SEQNO      0010
          GWC08-TXT        line 2 text
    The vendor has a requirement that the GWC08-RECORD should only be sent if TDLINE exists in the IDOC - so that part works. However, Text on Line 2 is being associated with Line 1.
    If I am not mistaken, this has to do with the Input queues for POSEX and that for TDLINE having differing number of entries. However, I have no idea how to go about fixing this
    Appreciate any help on this
    thanks
    anil

    Hi,
    This is possible without UDF:
    Please see mapping below:
    For the node GWC08-RECORD
    TDLINE --> removeContext --> GWC08-RECORD
    For the node GWC08-SEQNO
    TDLINE (set context to E1EDP01) --> exists --> ifWithoutElse --> removeContext --> SplitByValue:EachValue --> GWC08-SEQNO
    POSEX ------------------------------------------>/
    For the node GWC08-TXT
    TDLINE (set context to E1EDP01) --> exists --> ifWithoutElse --> removeContext --> SplitByValue:EachValue --> GWC08-SEQNO
    TDLINE (set context to E1EDP01)----------------->/
    Hope this helps,
    Regards

  • IDOCs - IDOC type ORDERS05 with message type MSGCHG

    Hi,
    I'm in my first IDOC project and I'm facing a problem. I need to change sales orders with EDI messages, so I've decided to use message type ORDCHG and IDOC type ORDERS05. I'm filling segments E1EDK01, E1EDP01 and E1EDP19. In header the action is '003' to indicate I'm going to change items, and in item the action is '002' - change. I'm not changing all items of the order, so I only fill item segments for the item I want to change.
    The problem is the F.M. IDOC_INPUT_ORDCHG looks to use batch input technique to update the order and the BDCDATA contents does not look good. And I receive a message saying VBAP-PSTYV is not an input field. I'm not entering the contents of PSTYV in segment E1EDP01.
    Does anyone have any idea of what can be the reason for this problem ? For the error, and for the fact of the contents of BDCDATA do not look good.
    And any idea of how to solve it.
    And does anyone knows if the batch input technique is mandatory, or is there any way to avoid it like forcing the standard to use a BAPI ?
    I'll really apreciate any possible help, because i'm without any idea about how to solve problem.
    Thanks in advance,
    Paulo Sousa

    If you go to SE11 and enter VBAP then finf the field PSTYV, double click on the field and see if the !fixed Value. ex" field is ticked, if it is this means that SAP is trying to get a value for this field from a fixed set of values.
    You could try using WE19 to mess around with the IDOC in error and process the document as a standard inbound IDOB.  See here https://websmp105.sap-ag.de/~sapidb/011000358700002529571998E/default4.htm for some field entry examples
    Hope this helps,
    Conor.

  • Differences betweEn ORDERS02 and ORDERS05 of basic type idocs.

    Hi Experts,
    Pls. let me know that, What is the difference betwen ORDERS02 and ORDERS05 of basic type idocs.
    bcoz, in my system(ECC 6.0), in WE05, I am seeing some are posted with ORDERS02 and where as some are posted with ORDERS05............both Message type is same-ORDERS.
    THANQ

    Hi,
    ORDERS05
    has probably more fields then ORDERS02
    the one with higher number is newer
    you can find the difference in WE60 by comparing the
    fields
    and because ORDERS05 is the newer one, you will find it not in all R/3 releases!
    So e.g. R/3 3.0 is not working with it possibly!
    you can find many details about IDOCs in:
    The specified item was not found.
    Regards,
    Satish

  • Has anyone populated the doc_flow details for an ORDERS05 IDOC?

    I am having trouble understanding what needs to be populated in the doc_flow itab of line type CRMXIF_DOC_FLOW_I.
    In my case I am trying to populate the doc flow with CONSIP (customer reference contract) details. I can work out what field 'RELATION_TYPE' is and can see that it needs to have a value of 'VONA'. This one is easy to identify because of the 4 character field definition, but I can't work out what goes in the relobj_roletype, relobj_objkey, relobj_type, or the relobj_object_id fields. Can anyone be of help here. I have been trying a number of different values, for example, I populated the relobj_roletype field with 'BUS2000135' which is the object name for a 'CRM Customer contract', but that was rejected and resulted in a status 51 being set in the IDOC.
    Blue

    Stephen,
    I agree with you, but you try and get a VAN to supply IDOC related details in the complex data structure format. They can do it but they're not at all happy about it and go to great lengths to avoid, whereas the ORDERS05 is a standard that most already output to.
    I can process ORDERS05 type IDOC's okay, although I had to add my own code to process a few segments. Anyway, the orders are being created okay. I did initially have a problem when blocking an item, based on certain checks perfromed in the BADI, but that has now been resolved. My only other problem, which a support message has been raised with SAP about, is to parse back status messages to IDOC. Again, there's a BADI which allows you to add content, but there's a mismatch in parameters between the FM and BADI. I'm sure they'll sort it out.
    The only thing left now is to get the item level doc flow to update when pointing to customer reference contract. Again, it's just a case of reverse engineering the data from the IDOC created by the CRMXIF_ORDER_TEST program.
    Regards
    Dr Sidewalk

  • IDoc - ORDERS05 - Inbound - IHREZ_E

    What segment/field/qualif should I be using to populate the field VBKD-IHREZ_E at the header level?
    When creating a new sales order, I am able to populate VBKD-IHREZ_E at the item level by using E2EDP02/BELNR and qualifyier 044.
    However, i would like to populate the field at the header level but haven't been able to find the right segment/field
    Thank you for your help

    I'm not suer about you scenario, but we create sales orders with IDoc ORDERS05 (since SAP R3 46C).
    We create segment E1EDK02 with QUALF "069" and BELNR "XY". After IDoc processing we have the value "XY" in VBKD-IHREZ_E.

  • Additional E1EDKA1 segment in ORDERS05 Idoc

    Hi,
    In the IDoc type ORDERS05, the segment E1EDKA1 has data about partners.
    Right now, when I genrate an IDOc for the same, it has 4 segments , each for Partner Type AG,RE, RG and WE.
    I want to add a segment for 'Forwarding Agent' (Partner Type is 'SP').
    I also gave the Message type in th Prtner Profile (WE20 ) of the forwarding agent. 
    In which customizing I need to specify that the Forwarding agent should also be selected and a segment be created.
    Please let me know. Thanks.

    Hi Guys ,
          I do have the same kind of requirement where i need to populate two additional segments of E1EDP05 in the INVOIC01 idoc. I have two questions.
    1. should i populate it in the inbound function module rite before posting or
    in the outbound function module before its being created.
    2. Which user exit should i use.
    3.The data i need to add , should it be hard coded, because ive already been given the doc saying that i should populate two segments of E1EDP05 in IDOC with currency types 12 and 31.
    Guys Its a little urgent.
    Thanks,
    Venkat

  • IDOC ORDERS05 to process PO acknowledge sent from vendors.

    I am trying to use IDOC ORDERS05 to process PO acknowledge sent from vendors.
    You, the IDOC experts out there, please give me some direction about
    where I should put the vendor's acknowledge number and
    where I should put our PO number in IDOC ORDERS05,
    so the field LABNR in EKPO will be updated with vendor's PO acknowledge number after the IDOc is posted.
    Thanks in advance!
    Fisher Li

    Sam,
    The following are what I did and it worked for us.
    Hopefully it will help you.
    E1EDK01-ACTION = '000'
    E1EDKA1-PARVW = 'LF'
    E1EDKA1-LIFNR = vendor number
    E1EDK02-QUALF = '001'
    E1EDK02-BELNR = purchase order number
    E1EDP01-ACTION = '004'
    E1EDP01-MENGE = PO line item qty
    E1EDP01-MENEE = PO line item unit of measure
    E1EDP02-QUALF = '001',
    E1EDP02-BELNR = purchase order number
    E1EDP02-ZEILE = PO line item number
    E1EDP02-QUALF = '002',
    E1EDP02-BELNR = PO acknowlegement number
    Regards
    Fisher Li

  • IDoc ORDERS05 structure

    Hi all,
    Anybody can tell me where I could find a full description of the structure/segments/fields of IDoc ORDERS05?
    I cannot find the full documentation anywhere.
    Many thanks,
    Aldo

    Thanks guys,
    I already knew about transaction WE60, but unfortunately I don't have access to an SAP system at this moment in time.
    Could you perhaps generate the documentation and send it to me?
    I need ORDERS05, INVOIC01 and DELVRY01.
    Many thanks,
    Aldo

Maybe you are looking for