FM IDOC_CREATE_ON_DATABASE

I am trying to test the FM  IDOC_CREATE_ON_DATABASE but it always throws an IDOC_INPUT_EXCEPTION,  can somebody pls let me know what data fields we need to fill in to test it in SE37

Hi,
If you are trying to create an IDOC, you can use the FM MASTER_IDOC_DISTRIBUTE. There are some FMs which will be called before the FM you mentioned during the IDOC creation.  You can search in SCN for sample codes.
Thanks,
Vinod.

Similar Messages

  • User Exit in FM IDOC_CREATE_ON_DATABASE

    Hi,
      I am very new to ABAP programming and was trying to add an error handling module to the FM IDOC_CREATE_ON_DATABASE.
    Can somebody guide me on how to do an FM enhancement......... also where do I add the user exit in the existing FM.
    Thanks,
    Arpita

    Hi ,
    Did you create z-implementation.?
    Once you create implementation you will be able to add code to it.
    Place cusor on the implicit enhancement and right click , then enhancement implementation -> Create.
    Regards,
    Ashok.
    Edited by: Ashok  Murugaiah on Mar 7, 2010 9:09 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

  • File-IDOC scenario in ALE

    Hi,
        I want to upload vendor master from a FTP file location to SAP using ALE IDOCs. We don't have XI middleware in our system.  Could anybody suggest how to do it in detail?
    I want to upload data from the file in FTP when a master file is placed in FTP location.How can I get that functionality?
    Thanks in advance.
    Edited by: Jaya on Jun 3, 2010 1:48 PM

    Jaya,
    You are using the right approach.
    The idoc message type for vendors in CREMAS. You should use transaction wE19 and try to create a CREMAS idoc from the data in your file, manually.
    Once you are able to create the idoc and process the idoc successfully to create the vendor, you can write a program and read your file from the server, do the conversion and call function "IDOC_CREATE_ON_DATABASE" and create your idocs.
    Salai.

  • How to create a IDOC program

    Hi All
    i have a requirement where i have to design a screen program to provide the user with a input screen. The user will input data on this screen, after the user enters the data and clicks on execute or some button on the module screen the system must generate a IDOC in the system. This IDOC will be picked up from another program within the same system.The reason we are doing this is the other program cannot be changed and it can accept only an IDOC from the external system which we are going to eliminate.
    My Questions:
    1. What are the steps in this requirement
    2. Do we require the partner profile and port and logical system definition as i am going to create a IDOC in the same system.( i am not sending the IDOC out of the system)
    3. Can i use the MASTER_IDOC_DISTRIBUTE FM to create a IDOC in the database?
    4. Can i use IDOC_CREATE_ON_DATABASE FM to do the same job?
    please guide me with deatils on how to go about this. Thanks
    ~Suresh

    Hi Suresh,
    First try to create a Module pool program.
    Assign the tcode to the IDOC.
    or else get the data into IDOC segment and try to transfer it.
    Creation of IDoc
    To Create Idoc we need to follow these steps:
    Create Segment ( WE31)
    Create Idoc Type ( WE30)
    Create Message Type ( WE81)
    Assign Idoc Type to Message Type ( WE82)
    Creating a Segment
    Go to transaction code WE31
    Enter the name for your segment type and click on the Create icon
    Type the short text
    Enter the variable names and data elements
    Save it and go back
    Go to Edit -> Set Release
    Follow steps to create more number of segments
    Create IDOC Type
    Go to transaction code WE30
    Enter the Object Name, select Basic type and click Create icon
    Select the create new option and enter a description for your basic IDOC type and press enter
    Select the IDOC Name and click Create icon
    The system prompts us to enter a segment type and its attributes
    Choose the appropriate values and press Enter
    The system transfers the name of the segment type to the IDOC editor.
    Create IDOC Type
    Follow these steps to add more number of segments to Parent or as Parent-child relation
    Save it and go back
    Go to Edit -> Set release
    Create Message Type
    Go to transaction code WE81
    Change the details from Display mode to Change mode
    After selection, the system will give this message “The table is cross-client (see Help for further info)”. Press Enter
    Click New Entries to create new Message Type
    Fill details
    Save it and go back
    Assign Message Type to IDoc Type
    Go to transaction code WE82
    Change the details from Display mode to Change mode
    After selection, the system will give this message “The table is cross-client (see Help for further info)”. Press Enter.
    Click New Entries to create new Message Type.
    Fill details
    Save it and go back
    u can also check all these links related to idocs
    http://www.allsaplinks.com/idoc_sample.html
    http://www.allsaplinks.com/
    http://www.sap-img.com/
    http://www.sappoint.com/abap.html
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEIO/BCMIDALEIO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEPRO/BCMIDALEPRO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFAALEQS/CABFAALEQS.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVEDISC/CAEDISCAP_STC.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVEDI/CAEDI.pdf
    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://expertanswercenter.techtarget.com/eac/knowledgebaseCategory/0,295197,sid63_tax296858_idx0_off50,00.html
    http://sap.ittoolbox.com/documents/popular-q-and-a/extending-a-basic-idoc-type-2358
    http://help.sap.com/saphelp_47x200/helpdata/en/dc/6b7eee43d711d1893e0000e8323c4f/frameset.htm
    /thread/199996 [original link is broken]
    Regards,
    Priyanka.

  • How to maintain an errors in Outbound Interface

    Hi,
    I m Doing One Interface (Outbound From SAP) to Application Server?
    whenever the File(TXT) in Created in Legacy Application Server with Succeesfull Record i have to Send an Email Notification to my Payroll 
    Adminisatrtor Of the legacy System.
    Can any one Pls tell me the steps Howto DO this?
    An also
    If there is any error records found which tranferring Data to ths Legacy System.An Output shoul be display with error records.
    How to maintain this in Interface Program.
    Regards
    Uday Kiran

    Hello,
             You can follow the below procedure as one of the Error Notification mechanism.
    1. If you are using a Standard Selection Program, then you can find the relevant exit to populate all the Errors in an Internal Table with
      Error Field Name
      Error Segment Name
      Error Message.
    2. Then, you can append all the errors (data mismatch , inconsistency) to that Internal Table, I_ERR_TAB per say.
    3. After that, Export the same to Memory ID.
    4. In an Outbound Interface, after the Selection Program is processed, a Standard Function Module is Called, that is IDOC_CREATE_ON_DATABASE.
    5. Go to that Function Module, and Create an Enhancement Implementation (In case of ECC 6.0) where you'll IMPORT the I_ERR_TAB from Memory ID.
    6. Check if the I_ERR_TAB is initial. If it is not, then you can probably use the FM SO_OBJECT_SEND or SO_DOCUMENT_SEND_API1 or any other FM available for Sending Mails to the respective Persons / Users.
    7. Along with sending mail, you can also error out the IDoc by Calling the FM IDOC_STATUS_WRITE_TO_DATABASE where you'll update the IDOC_STATUS table with the errors that you have in your I_ERR_TAB table and set the Status as 26.
    Hope it was helpful.
    Thanks and Regards,
    Venkat Phani Prasad Konduri

  • Userexit: Outbound matmas idoc

    Hi Guys,
    I am looking for a suitable userexit for Outbound matmas idoc.
    The requirement is once the idoc number has been generated with idoc status AFTER that only i need a userexit for my own .
    I am using BD10 transaction code to create the MATMAS idoc.
    Will appriciate your help..!
    Thanks,
    Biswajit.

    Hi,
    The flow is like this in BD10....
    CALL FUNCTION 'MASTERIDOC_CREATE_REQ_MATMAS'
       CALL FUNCTION 'MASTERIDOC_CREATE_MATMAS'
          CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'        " it return the control record with idoc no after execution
              CALL FUNCTION 'IDOC_CREATE_ON_DATABASE'    " it return the control record with idoc no after execution
                  CALL FUNCTION 'EDI_DOCUMENT_CLOSE_CREATE_TAB'     " it return the control record with idoc no after execution
                          PERFORM F09_IDOC_INSERT_WITH_NUMBER USING IDENTIFIER    " idoc no generates here in control record
                                                DOCNUM
                                                IDOC_CONTROL
                                                SYNTAX_RETURN
                                                FREE_RETURN
                                                SYN_ACTIVE.
    So i need a userexit / enhancement point after that with control record data.......

  • Trigger condition for IDOC

    Hi,
    I have trigger condition for IDOC
    All materials where:
    "Finished Goods"  Technical Names MARA-MTART = "Z001", and the Plants are "Granollers" MARC-WERKS="ES11", MARC-WERKS="ES12", goods that are "ready" or "ready for manufacturing", MARC-MMSTA = "02" or "03".
    All the materials which satisfy this criteria will need to be triggered whenever a new material is created in SAP which meets the above criteria, or if any materials are modified which meet the above criteria in SAP.
    How do I trigger my IDOC based on these conditions.
    Regards,
    Subhashini

    Hi,
    Please create the Idoc type / segments , create message type and link Idoc and message.
    Steps to customize a new IDoc >>>
    1. Define IDoc Segment (WE31)
    2. Convert Segments into an IDoc type (WE30)
    3. Create a Message Type (WE81)
    4. Create valid Combination of Message & IDoc type(WE82)
    5. Define Processing Code(WE41 for OUT / WE42 for IN)
    6. Define Partner Profile(WE20)
    2. Yes, you need LS & Partner profile
    3. Yes use MASTER_IDOC_DISTRIBUTE
    4. Can use IDOC_CREATE_ON_DATABASE instead of MASTER_IDOC_DISTRIBUTE and then process the Idoc.
    Message Type :: The message type defines the semantic context of an IDoc. The message type tells the processing routines, how the message has to be interpreted. The same IDoc data can be sent with different message types.
    IDoc Type :: An IDoc type defines the syntax of the IDoc data. It tells which segments are found in an Idoc and what fields the segments are made of.
    Processing Code :: The processing code is a logical name that determines the processing routine. This points usually to a function module, but the processing routine can also be a workflow or an event.
    The use of a logical processing code makes it easy to modify the processing routine for a series of partner profiles at once.
    Partner profile :: Every sender-receiver relationship needs a profile defined. This one determines
    The processing code
    The processing times and conditions
    In the case of outbound IDoc 1. The media port used to send the IDoc and 2. Triggers used to send the IDoc
    Partner Type :: The IDoc partners are classified in logical groups. Such as : LS, KU, LI.
    LS - Logical Systems : It is meant to be a different computer and was primarily introduced for use with the ALE functionality.
    KU - Customer : The partner type customer is used in classical EDI transmission to designate a partner, that requires a service from your company or is in the role of a debtor with respect to your company, e.g. the payer, sold-to-party, ship-to-party.
    LI - Supplier : The partner type supplier is used in classical EDI transmission to designate a partner, that delivers a service to your company.
    thanks & Regards,
    ShreeMohan

  • Posting IDocs into the same system

    Hello Experts,
    We are having a requirement where-in we have to created a IDoc for the failed message in our RFC and hence it should be created in our own system and should be having status Error (Red).
    Is there any function module by which we can create the IDocs without specifying the receiver port. We tried debugging MASTER_IDOC_DISTRIBUTE FM at IDOC_CREATE_ON_DATABASE but it also expects the receiver information.
    Thanks in advance.
    regards
    rajeev

    No we haven't specified dummy partner. so we have to create a partner profile with the dummy receiver? And what port we should specify? Should it point to the same RFC destination?
    regards
    rajeev

  • USEREXIT for Outbound MATMAS

    Hi Guys,
    I am looking for  a  suitable userexit for Outbound matmas idoc.
    The requirement is once the idoc number has been generated with idoc status AFTER that only i need a userexit for my own .
    I am using BD10 transaction code to create the MATMAS idoc.
    Will appriciate your help..!
    Thanks,
    Biswajit.

    Hi,
    The flow is like this in BD10....
    CALL FUNCTION 'MASTERIDOC_CREATE_REQ_MATMAS'
       CALL FUNCTION 'MASTERIDOC_CREATE_MATMAS'
          CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'        " it return the control record with idoc no after execution
              CALL FUNCTION 'IDOC_CREATE_ON_DATABASE'    " it return the control record with idoc no after execution
                  CALL FUNCTION 'EDI_DOCUMENT_CLOSE_CREATE_TAB'     " it return the control record with idoc no after execution
                          PERFORM F09_IDOC_INSERT_WITH_NUMBER USING IDENTIFIER    " idoc no generates here in control record
                                                DOCNUM
                                                IDOC_CONTROL
                                                SYNTAX_RETURN
                                                FREE_RETURN
                                                SYN_ACTIVE.
    So i need a userexit / enhancement point after that with control record data.......

  • Table update using FM

    Hi ,
    IDOC_CREATE_ON_DATABASE   which DB table is going to update by using this FM for ARTMAS.
    Thanks,
    jo
    Moderator message: please do some research before asking.
    Edited by: Thomas Zloch on Mar 15, 2011 11:55 AM

    Hi ,
    We do not want to use the direct update, insert statements to update the table. So we are looking for an alternative FM or BAPI to update the same. The records we are trying to update are for outbound delivery details.
    Regards,
    Raksha

  • BAPI for transaction J3AH (AFS Master Grid creation)

    Hi All,
    I have to create a AFS master grid from an external file.
    any one has any idea about BAPI/FM to create the AFS master grid for transaction J3AH?
    or any other way to create the master grid. Please let  me know.
    Regards,
    Phani.

    Hi Jose,
    This development was done almost 4 years back and can give you the general overview of the solution.
    The program is done in 3 steps
    1. Characteristics creation
    2. Update Characteristic values
    3. Create master grid number using IDOC.
      1. Create characteristic.
                  BAPI_CHARACT_CREATE - BAPI to create the characteristics
                  BAPI_TRANSACTION_COMMIT - BAPI commit to characteristic
      2. Update Characteristic values
    BAPI_CHARACT_CHANGE -> BAPI to update the value of the characteristics.
                  BAPI_TRANSACTION_COMMIT - BAPI commit to characteristic
      3. Create Master Grid
                 Use FM IDOC_CREATE_ON_DATABASE to create the idoc and FM 
                  APPLICATION_IDOC_POST to post the idoc
    The Basic type & Message Types are J3AGRI02 & J3AGRI
    Please check and let me know in case of any questions.
    will try to answer your questions
    Regards,
    Phani

  • Copy an IDoc

    I made a class that when created, it loads up a current IDoc's control, data, and status records.  It does some other things, but what I want to do is to be about to make a copy of the IDoc under a different IDoc number.  I also want to make it status 70 so that it don't process.  I want to do this because I'm making changes to these IDocs and saving them, so I want the copy so that I have a copy of the original.  Does anyone know of a BAPI or FM that can do this?  An example would be great as well.
    Any direction is greatly appreciated.
    Thanks,
    Curtis

    Hi Curtis,
    Check out IDOC_INBOUND_WRITE_TO_DB or the more generic IDOC_CREATE_ON_DATABASE. There's also function modules for writing the individual pieces, i.e. control, data and status records. Don't have the names right now, because I don't have access to a SAP system. However, they're fairly easy to find...
    Cheers, harald

Maybe you are looking for

  • What setting will make sync make my iPhone and MacBook Pro contact cards alike?

    What setting will make sync make my iPhone and MacBook Pro contact cards alike?  I've been having to key in changes to both devices because sync doesn't sync. 

  • ORA-02041

    I am getting this error when using a UNION that also goes through a DATABASE LINK. I am developing an application that will create a Recordset based on the results of this query. Here is the code (VB): Private Sub PopulateCompanyComboBox() 'Create Re

  • BCS - Message from External System : 'Login failed for user 'NT AUTHORITY\IUSR'.'.

    Hello,  I have create a an external content type .  I Choose "Connect with user's Identity".  I create a external list that uses the ExternalContentType.  When I try open the external list from browser by User "TestUser" . I get the following error "

  • Reducing the Column width using SHD0 for FB60

    Hi, How can reduce or delete the Assignment filed in the FB60 transaction using SHD0. i am able to delete the Assignment filed by making as invisible but as it is a mandatory field it is not allowing me to enter into next screen. Please help in this

  • HP8600: pages printing out of order; Win XP; MS Word

    HP OfficeJet 8600; Windows XP; working in MS Word Hi. I just purchased this printer.  Trying to get the duplex printing feature to work properly.  I does print duplex, but the pages are out of order.  Instead of pages being in numerical order as you