IDOC_INBOUND_SYNCHRONOUS

I am creating IDocs (FI, PO, GR) using FM IDOC_INBOUND_ASYNCHRONOUS. How can I find out the application document numbers created by the resulting IDocs so that I can put it the ABAP report. If I use instead FM IDOC_INBOUND_SYNCHRONOUS is there a way to derive the document application number using the generated IDoc number as a starting point?

Hi,
To identify the application document numbers generated by IDoc posting, take a look at table EDIDS, especially columns STAPA1, STAPA2, STAPA3, STAPA4. The status message type is stored in STATYP while the application message itself is stored in STATXT.
As the FM IDOC_INBOUND_ASYNCHRONOUS is processed asynchronously, the time at which to query EDIDS for application document number will be important as the document may not have posted as yet when you are selecting data.
IDOC_INBOUND_SYNCHRONOUS returns an IDoc number based on which you can query EDIDS to fetch your application number. Take a look at its documentation for further details.
Regards
Message was edited by: Shehryar Khan

Similar Messages

  • Idoc file to R/3 interface

    Hi All,
    I have a scenario to send EDI flat file to R/3. I need to write an interface program to read the file and map it to idoc and post it in the backend FI system
    Any sample program code or process would be helpful and appreciated. The reqmt is so urgent
    Thanks
    Ricky

    Read the Idoc file using standard upload methodes OPEN DATASET, TRANSFER or GUI_UPLOAD.
    Once the file is got into the program use IDOC_INBOUND_SYNCHRONOUS to create Idoc from the file data. Its interface is fairly simple, it just has an internal table which  takes the file and creates idoc, if the file data forms syntactically correct idoc.
    You can also use EDI_DATA_INCOMING function which can directly read the file from file port and create idoc.

  • INBOUND_IDOC_PROCESS vs IDOC_INBOUND_WRITE_TO_DB

    Hello together,
    currently I use the function module INBOUND_IDOC_PROCESS in BACKGROUND TASK to create orders. Now some other software has been changed and the length of 10 Bytes for the field SEGNAM is not enough. However the function module INBOUND_IDOC_PROCESS uses the structure edi_dd. An alternative function module is IDOC_INBOUND_WRITE_TO_DB, because it uses the structure edidd, where the SEGNAM ist CHAR 27. But it is not possible to start it in BACKGROUND TASK, because it's not remote-enabled. Do you have any ideas?? Thanks.

    INBOUND_IDOC_PROCESS is the function module to be used before release SAP R/3 4.0; since release 4.0 you should use IDOC_INBOUND_ASYNCHRONOUS instead.
    Similarly as indicated by the previous posting IDOC_INBOUND_SINGLE replaces function module IDOC_INBOUND_SYNCHRONOUS for posting a single IDoc.
    Best wishes, harald

  • How to post an Idoc (INVOICE02) for non-po Invoice (MIRO transaction)

    Hi,
    I want to Post an Idoc for non-po vendor Invoice through MIRO transaction. I want to use INVOICE02 basic type. In the line item we need to enter G/L account , Cost center and line item amount. But I am not able to enter the same in the INVOICE02 Idoc. It will be nice if you please let me know how to post non-po Idoc through MIRO transaction.
    Thanks
    Rama
    Edited by: Rama Sengupta on Nov 25, 2009 3:57 PM

    Hi Raja,
    Check this out.
    Inbound IDocs are triggered by either external systems (edi, wms etc) or can be triggered by inhouse applications in SAP to post a application document.
    1. EDI_DATA_INCOMING can create a IDoc from a file on the OS layer. It just needs a IDoc flat file containing control and data records, it will create an Idoc from it if the control record successfully matches a inbound partner profile parameters.
    2. IDOC_INBOUND_ASYNCHRONOUS can be triggered by external/internal programs to creae IDoc withing SAP, whereas IDOC_INBOUND_SYNCHRONOUS can be used by inhouse SAP programs to create inbound Idoc.
    3. WE19 can create and post an existing inbound Idoc to application
    Hope this resolves your query.
    Reward all the helpful answers.
    Regards

  • Idoc inbound processing? from non-sap system?

    Hi experts,
    I'm confused with some functions below:
    IDOC_INBOUND_SYNCHRONOUS
    INBOUND_IDOC_PROCESS
    IDOC_INBOUND_SINGLE
    IDOC_INBOUND_ASYNCHRONOUS
    can you tell me what are the differences? when to use them?
    for sap outbound processing, we can only call function master_idoc_distribute to generate idoc or use message control to trigger outbound idoc. no other options, correct?
    for sap inbound processing, if we use message control for automatical posting, we have process code which read  the inbound idoc file and do the sap posting. when to use those functions above?
    does the middlewares like seeburger, GIS call those functions to generate idocs at SAP side?
    in what scenarios can we use those functions? read directly non-sap file into sap internal table then call the functions to create inbound idoc? how about the posting? call inbound processe code function after the functions above?
    in case the interface between sap and legacy system is using above functions to build inbound idoc in sap and sap use process code for inbound posing, sap can monitor all inbound process using idoc, but how can the legacy system mornitor the interface?
    Thanks.
    Legend.
    Edited by: legend li on Dec 21, 2010 4:58 PM
    Edited by: legend li on Dec 21, 2010 5:40 PM

    Hi Christophe,
    Awesome!!!!!! it worked, You are the best.
    I could able to create a sales order in CRM,but below are the valid data I passed in the respective segment fields.Except for first 3 values rest all did not get reflected in teh Sales order.I feel i am missing some qualifiers.
    Can you kindly share the  IDoc data to be passed in...along with respective segments and fields:
    Segment                                                 Field
    E101CRMXIF_BUSTRANS     OBJECT_TASK         
    E101CRMXIF_BUSTRANS     PROCESS_TYPE
    E101CRMXIF_BUSTRANS     POSTING_DATE
    E101CRMXIF_PARTNER                          PARTNER_NO
    E101CRMXIF_PARTNER                RELATION_PARTNER_NO
    E101CRMXIF_ORGMAN         SALES_ORG
    E101CRMXIF_ORGMAN          DIS_CHANNEL
    E101CRMXIF_ORGMAN         DIVISION
    E101CRMXIF_SALES             PO_NUMBER_SOLD
    E101CRMXIF_SALES            YOUR_REF_SOLD
    E101CRMXIF_SALES            PO_NUMBER_SHIP
    E101CRMXIF_BUSTRANS_ITEM     ITEM_NUMBER
    E101CRMXIF_BUSTRANS_ITEM     ITEM_TYPE
    E101CRMXIF_BUSTRANS_ITEM     ORDERED_PRODUCT
    E101CRMXIF_PRODUCT_I     PROCESS_QTY_UNIT
    E101CRMXIF_PRODUCT_I     PROCESS_QTY_UNIT_ISO
    E101CRMXIF_PRODUCT_I     BASE_QTY_UNIT
    E101CRMXIF_PRODUCT_I     BASE_QTY_UNIT_ISO
    E101CRMXIF_SCHEDLIN_I     ORDER_QTY
    Thanks a ton in advance .
    Vijay

  • Trigger inbound BAPI IDOC for message type ACC_GL_POSTING

    I configured our SAP system for inbound GL postings -- message Type ACC_GL_POSTING process code BAPI.  I successfully tested all the configuration pieces using WE19. 
    So how do I trigger the inbound process from my external non-SAP system.  I would prefer not create a flat file that is passed by calling EDI_DATA_INCOMING.  I also do not want to use BAPI_ACC_GL_POSTING_POST.  So what RFC enable FM can I call to pass data and trigger the IDOC generation and processing?  Is there anything standard?

    I will use the standard RFC enabled function module IDOC_INBOUND_SYNCHRONOUS.  No custom abap development will be needed.
    Message was edited by:
            David F

  • Post IDOC within same SAP system

    Hi All,
    I used IDOC to send data from SAP to XI in my previous assignments.
    Now i have a requirement wherein i need to use an idoc to post data within SAP i.e in the same system. This is because incase the idoc fails the end user can correct the data and re-process the idoc and post it again. though its not so recommended its agreeded upon in the design phase.
    now my doubt is in MASTER_IDOC_DISTRIBUTE should i set the control record so that it points to the same system which means the port i create which has an RFC which will point to the same system from where the report is run. is this the correct way.
    thank you.
    Regards,
    Jayaram
    Edited by: JAYARAM MAGANTI on Aug 19, 2009 2:55 PM

    Jayaram,
    Steps you mentioned are correct.
    Pls maintain the values as I shown below , you will be able to post the idoc in the same system.
    And one more suggestion , us fm 'IDOC_INBOUND_SYNCHRONOUS'  as this will give you the idoc number in return. So that in the same program you can use it for any reporting purpose or you can show in the output screen the list of idocs generated etc.
      DATA : lv_sysid  LIKE sy-sysid.
      gwa_edi_dc-tabnam = 'EDI_DC'.
      gwa_edi_dc-mandt  = sy-mandt.
      gwa_edi_dc-docrel = sy-saprl.
      gwa_edi_dc-status = '30'.
      gwa_edi_dc-doctyp = 'ORDERS05'.
      gwa_edi_dc-direct = '2'.
      gwa_edi_dc-rcvpor = 'SAPxxx'.
      REPLACE 'xxx' WITH sy-sysid INTO gwa_edi_dc-rcvpor.
      gwa_edi_dc-rcvprt = 'LS'.
      gwa_edi_dc-rcvprn = sy-sysid.
    CONSTATNT :       gc_clnt(4)     TYPE c VALUE 'CLNT',
      MOVE gc_clnt TO gwa_edi_dc-rcvprn+3.
      MOVE sy-mandt(3) TO gwa_edi_dc-rcvprn+7.
      gwa_edi_dc-sndpor = 'SAPxxx'.
      CLEAR lv_sysid.
    *Here you need to populate your sys id lv_sid
    *example lv=sid = 'PDV'. "pdv is our producion system
      REPLACE 'xxx' WITH lv_sysid INTO gwa_edi_dc-sndpor.
      gwa_edi_dc-sndprt = 'LS'.
      gwa_edi_dc-sndpfc = 'LS'.
      gwa_edi_dc-sndprn = gc_sndprn."Comming as from Parameter.
      gwa_edi_dc-credat = sy-datum.
      gwa_edi_dc-cretim = sy-uzeit.
      gwa_edi_dc-mestyp = 'ORDERS'.
      gwa_edi_dc-exprss = 'X'.
    CALL FUNCTION 'IDOC_INBOUND_SYNCHRONOUS'
          EXPORTING
            int_edidc      = "control record ie gwa_edi_dc
            online         = 'O'
          IMPORTING
            docnum         = lv_docnum " it gives idoc number
          TABLES
            int_edidd      = "pass data record
          EXCEPTIONS
            idoc_not_saved = 1
            OTHERS         = 2.
    Now you can use the idoc number anywhere you want .
        wa_idoc-docnum = lv_docnum.
    Best Regards,
    Vvieks
    "Grow and help others to grow"

  • Send idocs to SAP synchronously

    Hello.
    Currently we are sending idocs to SAP using the RFC IDOC_INBOUND_ASYNCHRONOUS. However, this is an asynchronous call - as in we need to create a TID, and use the sdk api RfcIndirectCallEx() to execute this RFC, which will execute it asynchronously. Is there any way to send idocs to SAP synchronously? I looked at IDOC_INBOUND_SYNCHRONOUS, but this RFC takes parameters of type EDI_DD and EDI_DC (i.e., idoc Version 2 parameters), and not EDI_DC40/EDI_DD40. Is there any way to send idocs synchronously in version 3 format?
    Thanks,
    Mustansir

    Hi,
    Partner profile should be defined explicitely in the SAP system.
    Steps to create partner profile.
    Create a Partner profile(TSTCLNT000) in we20 transation with required information :
    Inbound parameters : MATMAS.
    Double click on message type to define other parameters:
    Define Partner type as 'LS'.
    These settings will solve the problem.
    Regards,
    Senthil

  • Access IDOC Number

    Hi,
    I am using the .NET connector's SubmitIdoc method to post an IDOC to SAP server.  I see the following in the RFC_Trace after posting the IDOC.
    FUNCTION IDOC_INBOUND_ASYNCHRONOUS
            handle = 2
            tables[0].name    = IDOC_CONTROL_REC_40
            tables[0].nlen    = 19
            tables[0].leng    = 524
            tables[0].type    = 00000021
            tables[0].newitab = 0
            tables[0].itmode  = RFC_ITMODE_BYREFERENCE
            ItFill(tables[0].ithandle)  = 24
            ItLeng(tables[0].ithandle)  = 524
            tables[1].name    = IDOC_DATA_REC_40
            tables[1].nlen    = 16
            tables[1].leng    = 1063
            tables[1].type    = 00000022
            tables[1].newitab = 0
            tables[1].itmode  = RFC_ITMODE_BYREFERENCE
            ItFill(tables[1].ithandle)  = 48
            ItLeng(tables[1].ithandle)  = 1063
    I would like to access the IDOC number that was assigned to this posting.  How do I get that?  I do not see a method within the .NET connector to get this.
    Thanks and appreciate your help
    Guru

    Hi,
    Take a look at IDOC_INBOUND_SYNCHRONOUS and the replies to Performance BAPI vs. IDoc for further details.
    Hope it helps.
    Regards

  • Master Services upload

    Hi experts,
    I 'm doing  the Master Services data using IDOC message type SRVMAS.
    The ABAP program reads a TXT file and fill in the segments, then generates an IDOC inbound through the
    FM IDOC_INBOUND_SYNCHRONOUS.
    The IDOC is generated with the following message: EDI: Receiver port in control record is invalid.
    I understand the problem is in the port definition, and need help at this point.
    Before the ABAP program, I did the upload through LSMW and everything went fine, using a port type "FILE" (not tRFC). I thought I could use the same port, but its not true.
    Can anyone help me?
    Thanks in advance.
    Sidney

    Hi Éder,
    Welcome to SDN.
    Please try this FM.
    ASMD_SAVE_COLLECTIVE 
    ASMD_UPDATE_COLLECTIVE
    ASMD_UPDATE_SINGLE   
    Regards,
    Ferry Lianto
    Please reward points if helpful.

  • Forward Inbound - IDOC process

    Has anyone used this option WE45- forward Inbound for  inbound IDOC automatic processing?
    <b> The help says
    "Specify a job as a logical address for forwarding the data from an inbound IDoc or from a status confirmation".</b> But need more details if anyone has used. We are looking for internal invoice posting in application V3  .

    INBOUND_IDOC_PROCESS is the function module to be used before release SAP R/3 4.0; since release 4.0 you should use IDOC_INBOUND_ASYNCHRONOUS instead.
    Similarly as indicated by the previous posting IDOC_INBOUND_SINGLE replaces function module IDOC_INBOUND_SYNCHRONOUS for posting a single IDoc.
    Best wishes, harald

  • Optimize inbound idoc process

    Hi everybody.
    Im trying to improve perfomance at inbound idoc process:
    For instance I have scheduled the program RBDAPP01to process inbound ORDERS every 5 minutes. (The number of inbound orders to proces are 300 aprox.).
    I have some question to choose the best variant to this job:
    - What's better in transaction BD51 set the FM as mass process or single process? I think to choose mass process It´d be better because the FM would be call less times.
    - What packing size I have to choose. I hope SAP recommends between 20-100.
    - Should I choose parallelling process? It´d help me to improve the process???
    Thanks a lot.
    Regards

    INBOUND_IDOC_PROCESS is the function module to be used before release SAP R/3 4.0; since release 4.0 you should use IDOC_INBOUND_ASYNCHRONOUS instead.
    Similarly as indicated by the previous posting IDOC_INBOUND_SINGLE replaces function module IDOC_INBOUND_SYNCHRONOUS for posting a single IDoc.
    Best wishes, harald

  • Can MII 12.2 be installed on top of a 7.3 NW configured as an AAEX

    Hello,
    To be able to locally leverage the new Java Idoc adapter released with NW7.3, we would like to know if someone has already tried to install MII 12.2 on top of a NW 7.3  configured with AAEX usage type ( PI advanced adapter engine extended) ?
    it would be nice to know if  this instalaltion option is feasible ?
    Thank You.
    Frédéric Gautier

    Hi Michael,
    We are  currently working on an MII projects where  the target is to have 200 MII sites working independantly from the ECC backend system.  Communications from ECC to MII are using the MII IDOC listener  which is tightly embeded into MII applications and here we don't have any specific requirements ( except maybe the possibility to monitor centrally ).
    Our concern is about  the other direction where we want to move from  synchronous BAPI connections to asynchronous links via IDOC's. As we undesrtood that MII 12.2 was  released for  NW7.3  we were thinking of using the  AAEX installed on the same Java server as MII  to leverage the PI IDOC adapter where the message flows are  much easier to monitor centrally via Solution Manager than the standard MII data buffer. We were also thinking that it would be easier for the developer to post an IDOC  by just  posting the IDOC xml payload to the http or soap adapter ( with standard MII JCO , one would need to handle the call to the the IDOC_INBOUND_SYNCHRONOUS  RFC functions which is a bit more complex than a simple http post).
    After some first divergent statements, SAP's seems now to  say that this config has not  yet been tested at SAP an therefore it would not be released for now. Strange for us because MI12.2 seems to be only dependant on components that are available on both NW7.3 CE and  PI NW7.3 AEX...?
    Regards,
    Frederic Gautier.

  • Post inbound as well as outbound IDOCs through a report

    Hi all,
            I have a specific requirement where i need to post an IDOC through a report which ressemble to WE05. This requirement implies for Inbound as well as Outbound for all message types. Can anyone let me know how can this be achieved. Please let me know if this can be acheived through any FM or method.
    Regards
    Simin.R

    Hi,
    To create a new inbound idoc use the following function module:
    IDOC_INBOUND_SYNCHRONOUS
    To Create a outbound idoc use the function module
    MASTERIDOC_CREATE_* - search and decide based on your requirement.
    Regards,
    Baburaj

  • WE41 Process trigger (inbound) flag

    Hi All,
    Please, someone could tell me what the option "process trigger (inbound)" in WE41 means? 
    Regards,
    Iván.

    I will use the standard RFC enabled function module IDOC_INBOUND_SYNCHRONOUS.  No custom abap development will be needed.
    Message was edited by:
            David F

Maybe you are looking for

  • How to create a database from dfj zip file

    Hi, I have created a database template via DCA from PC-1 which has got oracle 9i and it has produced a file with extention dfj. I am trying to create a new database using this dfj file on a different pc which has oracle 10g. 1- How can i use dfj file

  • Extending events in AS 2.0?

    I'm trying to extend the Tween class so that it will notify a parent when it is finished with a tween, but I'm not sure how to properly register the onMotionFinished event. The code I'm using is: import mx.transitions.Tween; class TweenItem extends T

  • Formatting a combined dual chart - which svg commands necessary?

    Hello all, I have a combined dual chart (two columns and one line) as shown in the picture below. I'd like to format the following things: - color of columns (costs in one color and Incoming Order List in a different) - color of outer ticks of both y

  • CS3 Silent Install

    I am trying to setup network deployment of CS3 in our office. We are about 60 users and the longest part of setting up a new user is CS 3 Install. I want to get this automated so I can run it as a script with my netinstall. I have read through the ad

  • Creating an album on Photos

    I need help to create an album on my iPad 2 without mobileme. i need to create it on Photos.