Segement Creation in O/B IDOC FM

Hi ABAP guru,
  I am trying to create one function module for an outbound IDoc .I need to create the segment as well if the segment does not exist . I am not very sure that how to create a segment through code . can anyone give me an idea about that ? like a sample code on the same ?
Thanks in advance .

Hi Gaurab,
Please call FM - SEGMENT_CREATE for creating new segment in your code.
FM - SEGMENT_CHECK is for checking segment availability.
Please note that there are many FM's for IDoc segment and grouped into Function group EDIJ.
Regards,
Sukhbold

Similar Messages

  • Creation of PO using IDOC's

    Hi,
    I am trying to create a PO, using IDocs, in the SAP system. The IDoc will come from a non-SAP system - hence, this is an inbound interface.
    Can someone please tell me which Message Type / IDoc Type I should use?
    As well, I need to create Characteristics for the Purchase Order. So, I need an IDoc that allows me to create these.
    Two options (using existing IDocs):
    1. ORDERS/ORDERS05
    I have read some of the help documentation and some of the messages posted on this forum and found that the ORDERS/ORDERS05 is used for outbound PO IDocs, and inbound SO IDocs.
    Can someone please confirm or correct me? So, this option is OUT.
    2. PORDCR/PORDCR05
    Apparently, PORDCR/PORDCR05 can be used for inbound PO. However, it does not contain segments for Characteristics. Hence, I will need to extend the IDoc. However, there aren't any useful user-exits to handle the creation of Characteristic values!
    Any ideas or suggestions will be greatly rewarded .
    Thanks
    Bobby

    on your points
    #1is correct.
    #2 yes, if you need any other functionality you need to extend the IDOC. alternately look at BAPI_PO_CREATE* BAPIs to see if they fulfil your requirements

  • Creation of multiple PO IDOCs for multiple vendors in one directory

    Hi ,
    I got a scenario to download all the vendor related PO and RFQ IDOCs to one common directory .i.e EDI Port path: /sap/xxxx.I cannot create partner profile LI for each and every vendor. Would be appreciated if any one can suggest alternative for this.
    P.S : Tried by creating output type with partner function LS and partner profile LS.It was not working.
    Cheers,
    Raj.

    Hi
    For the scenario described by you, you need not have to make any config settings. The G/L account defined in SPRO (Valn and Automatic Acct Determination) is used for Automatic Account determination i.e. when you do not enter a specific G/L account during Goods Issue.
    As can be seen from your query, you want Consumption account to be posted to different G/L accounts but the material is assigned only to 1 Matl type. There are 2 ways to solve this problem:
    1. If you know the G/L accounts that the system should post to before hand i.e at the time of Matl creation itself, then you can configure Split Valuation and then assign more than 1 Valuation class to the Matl. For each of these Valn classes, you can configure Automatic Account assignment. By doing this, at the time of Goods Issue, the system will ask you the Valn type and will accordingly post to a seperate G/L account.
    This is possible only if the no of G/L accounts per Matl is less (preferably 2-3)
    2. If you do not know the G/L accounts before hand or the G/L accounts per Matl consumption is too many, then it is better to go for Manual Automatic Account assignment.
    In this procedure, at the time of Goods issue using Mvt type 201, you can specify the G/L account and Cost Centre in Th Account Assignment Tab.
    Hope this clarifies.
    Thanks

  • Contract creation in Backend with Idoc message type BLAORD

    Hello,
    We are creating Backend contracts from the Bidding engine functionality. We only want to create backend contracts and did the necesary configuration.
    We activated BADI: BBP_DETERMINE_LOGSYS
    Method CONTRACT_LOGSYS_DETERMINE.
    We did not yet implement BADI:
    BBP_CTR_BE_CREATE in SRM 5.0
    In SAP R/3 Backend system (Version 46C) we see SAP is trying to create a contract via Idoc message Type: BLAORD.
    In the trx BD87 in the backend we get status 51 :
    Mesage number: 00 055
    "Make an entry in all required fields"
    In the segments of the Idoc however we do not see which field is missing!
    How can we best analise this problem. Or maybe anyone can give us a a hint what is missing.
    Thanks for any reply.
    Aart

    Hello RRK,
    In ref. to your mentioning to change the backend configuration from WKK to MKK might not be as easy to do for organizations.  As those configurations effect the overall creation of purchasing document types in R/3. 
    The Key issue is why the "Target Value" in the Header of the SRM GOA does not get transferred to the R/3 contract.  That's why the issue is still there. 
    Were you guys able to figure out why that was missing? In the BLAORD IDoc the Target Value seems to not get transferred from SRM - its 0.00 if the IDoc is reviewed in WE19.  This seems to be the problem.
    Just wanted to know if you see the same issue in ur system.
    Thanks.
    Sunny.

  • Vendor Credit Memo creation in SAP via IDOC Interface (Inbound)

    Hello Team,
    I have a client requirement to create Vendor Invoices & Credit memo via Idoc Interface. Iam using INVOIC02 idoc type for posting Invoices and could able to create the invoice successfully. For credit memo , I'm aware that we can use the same idoc type (INVOIC02) and need to pass CRME value for the segment field BSART.
    What i need is a sample Inbound INVOIC02 idoc file for credit memo to identify the required fields for successful credit memo creation.
    Regards,
    Vijay

    Hello Team,
    I have a client requirement to create Vendor Invoices & Credit memo via Idoc Interface. Iam using INVOIC02 idoc type for posting Invoices and could able to create the invoice successfully. For credit memo , I'm aware that we can use the same idoc type (INVOIC02) and need to pass CRME value for the segment field BSART.
    What i need is a sample Inbound INVOIC02 idoc file for credit memo to identify the required fields for successful credit memo creation.
    Regards,
    Vijay

  • Issue in segment creation for File to IDOC mapping

    Hi,
    I have file with many feilds, i need to create a segment in IDOC for unique combination of 2 feilds.
    eg:
    408
    430050
    segment
    208
    430050
    segment
    208
    430050
    208
    460100
    segment
    208
    452010
    segment
    408
    432000
    segment
    208
    432000
    segment
    the value for the combination of first column and 2nd column are equal it should trigger one segment instead of 2segments else(for different combination) trigger the segment
    eg from table:
    in table for 208,430050 is occuring twice but it should trigger only one segment(unique combinations of 2 columns), for all other combinations it should trigger one segment for each.

    Hi Swapna,
    You can use below mapping.
    UDF:
    Execution type : All Values Of Context
    public void removeDuplicates(String[] context, ResultList result, Container container) throws StreamTransformationException{
    HashSet<String> hashSet = new HashSet<String>();      
            for (int i = 0; i < context.length; i++) {
                if (hashSet.add(context[i]))
                   result.addValue(context[i]);             
                else {
                   result.addSuppress();              
    Reards,
    Praveen.

  • Creation of Delivery Using IDOC without reference to order

    Pls suggest is there is any way to create delivery using idoc without reference to order. This is very urgent.

    Hi
    Design the inbound idoc in such a way that it carries all the essential data needed to create a delivery document namely the material number, no of units to be deilvery, delivering plant, storage location, shipping point, warehouse number(if applicable) etc.
    Pass all these details to the function module  RV_DELIVERY_CREATE while creating delivery in VL01N and pass the document type as LO which is delivery document without reference to order.
    But it is advised to have atleast a pseudo order with which we have to create the delivery document.
    Pls reward points.

  • Sales order creation using BAPI using IDoc

    Hi all,
    I am getting an IDoc from PI server. I need to process that IDoc in SAP for which I have created a function module.
    I need to read that IDoc in the FM.
    Please give me sample code / procedure of coding step by step to validate the data from Idoc structure and creating sales order from the IDoc data.
    Also tell me which BAPI / FM should I use to create sales order.
    Thanks,
    ~Sachin

    Hi Sachin
    Extended order type ORDERS05 to ZFRORDERS05 with additional fields is goodu2026
    But you can write user exits to populate the additional field to sale order fieldsu2026.
    And FM IDOC_INPUT_ORDERS will post the data and create the SALES ORDERu2026
    This is standard function every industry will followu2026. And this is recommended.
    If you want to create custom FM then call (BAPI_SALESORDER_CREATEFROMDAT2 Sales order: Create Sales Order) in you custom FM.
    Thanks
    Ramesh

  • Namespace Creation for file to idoc scenario

    Hi ,
    while creating new  namespace in integration repository for file-> XI-> idoc scenario ( that is data is to be pushed from a file to R/3 using idoc ) we have to enter the connection data viz:
                                           system :..............
                                           Client .................
    Pl confirm the above system and client to be mentioned is of XI server or R/3 system.
    Further when we go for
                                   imported objetcs ->
                                                IDOCS -import of sap object-->
                                                Application server Name :....................
                                                System No:..............................
                                                User :.................
                                                Name :................
                                                Pwd:.................
    Pl confirm the above data to be mentioned is of XI server or R/3 system.
    pl help.

    Hi,
    <b>while creating new namespace in integration repository for file-> XI-> idoc scenario ( that is data is to be pushed from a file to R/3 using idoc ) we have to enter the connection data viz:
    system :..............
    Client .................
    Pl confirm the above system and client to be mentioned is of XI server or R/3 system.</b>
    Ans <b>R/3</b>
    <b>Further when we go for
    imported objetcs ->
    IDOCS -import of sap object-->
    Application server Name :....................
    System No:..............................
    User :.................
    Name :................
    Pwd:.................
    Pl confirm the above data to be mentioned is of XI server or R/3 system.</b>
    Ans: <b>R/3</b>
    Regards,

  • How to create a segement in we31 for an Idoc

    Hi,
    How to create a segment in we31 for an IDOC . I tried its showing an error Name range violation: Name not permitted in customer system

    Hello,
    I have created a customised IDOC scemnario and have a document designed by me with all the minute steps and with screen shots.
    Please have a look at http://www.geocities.com/xplosion78/customised_ALE_IDOC_BY_SACHIN_DABHADE.zip
    I am ready to mail it if you can provide email.
    thnx
    ==============================
    Other helpful links
    http://www.sapgenie.com/whitepapers/ale.htm
    http://www.sapgenie.com/ale/index.htm
    http://www.sappoint.com/abap.html
    http://www.sapbrain.com/TUTORIALS/TECHNICAL/ALE_tutorial.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/CABFAALEHR/CABFAALEHR_ALE_QS.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/ECPCA/ECPCA_ALE_154.pdf
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    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

  • Creation of maintainence order idoc

    Hi all
    How to create an outbound idoc for the maintainence order IW31 ? i have learnt we can use IORD tcode to create idoc for the maintainence order but i am not able to create idocs successfully with IORD? if anyone has used this tcode for creating idocs plz help me ? or is there any other way to create idocs for plant maintainence order?
    Points will be awarded to the fullest.
    Regards
    Uday

    Hi udday kirran 
    have you Maintain Output Determination for this  Document
    Sales and Distribution>Basic Functions>Maintain Output Determination for Sales Documents-->Maintain Output Types
    output type EDI then send it
    thanks
    Amit Shivhare

  • Production Order creation in APO /  Setup  IDoc

    All,
    I am creating production orders in APO via the BAPI 'BAPI_MOSRVAPS_SAVEMULTI3'. But I need to change some values in different segment fields in the IDoc before to post it.
    Do you know if there is an user_exit available to do that (or how to find it) or IF I need to use an other method.
    Idoc Type used : MOAPS_SAVEMULTIPLE201
    Regards,
    Fred

    Hi Kemp,
      The usual method to find a user exit is to get the PACKAGE of the bapi by going to
    Goto->Object Directory Entry.
    Use this package name in smod transaction by giving this package in the pop up that comes when you press a F4 on the enhancement field of smod transaction.
    It will give you the list of user exits.
    2) Make a global find on the funcion module for the strings user, exit, user_exit, call customer-function etc
    Regards,
    Ravi

  • Creation of IDoc XML very slow compared to IDoc Flatfile

    Hi everyone,
    I did a test in our ERP6 system and created IDoc files for a few invoices. The result is that the creation of a XML Idoc is 22x slower than the creation of a flatfile Idoc. The creation of one large IDoc file with 1000 invoices took ~15 seconds as flatfile and ~5:30 minutes as XML. So the choice between flatfile or XML is really a performance question for me. Is that normal? I expected a difference but not that much.
    Can I speed up the XML creation anyhow? XML is better to process and I really want to use it, but I can not with this bad performance...
    Thank you!
    Regards
    Andreas

    So the choice between flatfile or XML is really a performance question for me. Is that normal?
    Yes, it is normal. For every byte of data in xml file, it needs to create multiple bytes of structures according to XML format.
    But, i am wondering, why u need to go for xml, when there is no PI installed.
    Because, end output file is always in flatfile format.

  • Creation of wrapper IDOC

    Hi All,
    Could some one please list the steps needed to create a inbound wrapper IDOC.
    I want to use core functionality of IDOC type PORDCH but need to do extra processing before this standard IDOC could be called. I could not find any user exit for PORDCH so the next best thing is to create a wrapper IDOC, do the extra processing and then call PORDCH from within that IDOC but I need help in creation of this custom IDOC.
    Any help would be much appreciated.

    Hi,
    Have you looked these user exits for inbound message type PORDCH?
    EXIT_SAPL2012_001
    EXIT_SAPL2012_002
    EXIT_SAPL2012_003
    EXIT_SAPL2012_004
    Regards,
    Ferry Lianto

  • IDOC setting for tcode PB40 and applicant creation

    In tcode PB40 (a tcode of HR Module), when for example, Applicant Creation is done, an IDOC is triggered.
    We are encountering an error in the IDOC which is trigered when Applicant Creation is done because that IDOC is picking up a partner profile which is not correct.
    Please tell me where is the setting maintained which dictates the triggering of IDOC in tcodes like PB40 (so that i can debug why is it picking up a wrong partner profile)

    Hi,
    This output determination is done using NACE..
    For your scenario in We20 check the message type you are using and associated partner profile...there you need to configure the message control for generation of the idoc check whether this has been configured in different partner profile than required..
    Also check any distribution model associated for this data (Tcode :BD64)
    HTH
    Rajesh

Maybe you are looking for

  • Disable Save to Desktop / Documents Folder

    Hello, we are building some restricted Clients for a special room and we need to disable the save as dialoge When open a PDF-Document in InternetExplorer and then want to save it, the default path is set to My Documents (Instead of the default "Downl

  • How can I delete photos from my iPhone 4S without deleting from Mac iPhoto at the same time?

    My iPhone has more than 12gB of photos & video - some 1200 of them. I have transferred them all to iPhoto on my MacBook Pro. Now I want to delete about 75% of the photos on my phone while I keep the rest safely on my Mac. When I go to delete the phot

  • Sony DCR-PC55 worked w/ iMovie, doesn't with iMovie HD 6.0.2

    I was able to import video from my Sony handycam - iMovie was able to see the camera, control it, and even automatically import video. I "upgraded" to iMovie HD, and now the exact same camera, docking station and firewire cable no longer works. iMovi

  • How do I know what to put in when it says server when setting up?

    I have tried the IPv4 address, and many others but I can't find one that works. I am presuming that the "Name" is your computers Host name and the password is the Host password. Can someone please help? I'm really lost, it would be simple apart from

  • PlugPlugRequestFailed when using retrievePreference()

    Hello, I've recently converted a panel of mine from a Extension Builder project. Since then when I try to retrieve data from Photoshop's storage I get PlugPlugRequestFailed. To see if the way I converted my project may be the cause, I created a fresh