Inbound idoc number

Hi,
Is there any way to get the inbound idoc number which created the sales order in the system.
I have the sales order no. form that i want know the inbound idoc number which created this sales order.
I am looking for any FM or Tables.
Thanks,
Patil

Hi..
Table EDID4 stores the Data records of an IDOC.
You can search for SDATA field to get the Sales doc no.
Try this Sample code
report ztest1.
tablEs edid4.
data : it_data type table of edid4 with header line.
PARAMETERS : P_MATNR TYPE MARA-MATNR DEFAULT '100-100'.
DATA : V_pattern type string.
CONCATENATE '%' P_MATNR '%' INTO V_PATTERN.
SELECT   * FROM EDID4 into  table it_data
  WHERE  
  segnam = 'E1EDK01'  "To check the Segment name
  and  SDATA LIKE V_PATTERN
LOOP AT IT_DATA. 
  WRITE: IT_dATA-DOCNUM.
ENDLOOP.
<b>Reward if Helpful</b>

Similar Messages

  • How to find Outbound Idoc number from inbound Idoc number.

    Hi,
    I have one inbound Idoc in my system, then
    How to find the  idoc number from the system which sends that idoc(Outbound Idoc number).

    Hello
    You can use fm SREL_GET_NEXT_NEIGHBORS for this purpose.
    Scenario: An EDI purchase order is received by SAP-XI and forwarded as Inbound ORDERS IDoc to R/3. SAP-XI generates an (outbound) IDoc number which differs from the (inbound) ORDERS05 IDoc in the R/3 system.
    Calling fm SREL_GET_NEXT_NEIGHBORS with the following parameters:
    OBJECT-OBJKEY = <IDoc number, 16-digits>
    OBJECT-OBJTYPE = 'IDOC'
    MAX_HOPS = '99'            " <<< get all links
    I get the following result:
    0000000000133906                                   IDOC       CUSTOMER   OUTIDOC
    0000000000407402                                   IDOC                  INIDOC
    000000370383                                       BUS2012    CUSTOMER   OUTBELEG
    0010057944                                         BUS2032               INBELEG
    Outbound IDoc number
    Inbound IDoc number (ORDERS05)
    PO number
    Sales order (created from inbound ORDERS IDoc)
    Regards
      Uwe

  • IDOC Number for a Application document

    Hi frinds,
    Using Idocs we create application documents like Sales orders(inbound),invoices, delivery etc (outbound) to create application document in some other system or used in case of B2B scenario.
    my requirement is can we get the Idoc # form the slaesorders number using some function module (to get the idoc #'s of huge number of sales orders). however we can find the sales order number form the Idoc number using WE05 i want the reverse way.
    Thanks,
    vin.

    Hi,
    If your requirement is like Xi generates an outbound idoc to R/3 which is different to inbound idoc number of R/3.
    USe SREL_GET_NEXT_NEIGHBORS  ,
    object-objkey = idoc num  object-objtyp = 'IDOC', max_hops = '99'.
    You can get the list of outbound,inbound idoc numbers and sales order .
    Thanks and Regards,
    P.Bharadwaj
    Edited by: Bharadwaj p on Jun 14, 2010 8:31 AM

  • Link between Inbound Idoc No and Shipment No

    Can anyone tell me in which transparent table the link between the Inbound Idoc number and Shipment number are stored ?
    or is any function module in which the Shipment number is imported and the Idoc number is exported ?
    Thanx in advance.
    Regards.

    Hi Deepa,
    Please reward and close your other related post. Now here is the answer for this.
    As I mentioned in response to your previous post, this is stored in the status records of the IDoc. So you need to go to table EDIDS with your IDoc number and STATUS = 53(Application Document Posted). Read teh value in the field 'STATXT'. If there are any & they should be replaced by 'STAPA1', 'STAPA2', 'STAPA3' and 'STAPA4' depending on how many '&' you have.
    One of these 4 parameters will be your shipment number, typically it will be STAPA1.
    Let me know how it goes.
    Regards,
    Srinivas

  • Get idoc number of receiver system in a SAP-to-SAP scenario

    Hi,
    In a my custom program i create cremas idoc that i send to another SAP system to create the vendor in the second SAP.
    How can i do to get the inbound idoc number created in the receiver SAP to get and show its status in the sender SAP without to use the ALEAUD process?
    My scenario is SAP-SAP without anything between the two .
    Thanks lot.
    Matteo Vernile.

    Hi,
         Hi,
    The inbound IDoc is usually created by middleware system i.e. SAP XI, Gentran and etc.
    Once the IDoc created, you can use the inbound function module to post to the application. The function module is usually starting with 'IDOC_INPUT_xxxxx' where normally the xxxxx is the name of the IDoc message type.
    You can find the associated inbound process code/function module with the IDoc message type via transaction WE42.
    FM like IDOC_INBOUND_FROM_FILE...
    Check the Function module idoc_inbound_aysnchronous
    <b>Reward points</b>
    Regards

  • Why does an Inbound IDoc no change and differs from an Outbound IDoc no?

    Hi Experts,
    This seems to be a basic question..! But can someone kindly clarify why an IDoc number gets changed when sent from one R/3 system to another R/3 system and how does this happen???
    i.e., whenever an IDoc was triggered from R/3 system A to R/3 system B through XI/PI, the Inbound IDoc number (in system B) differs from the Outbound IDoc number (in system A)... Why does this happen and how???
    Thanks in advance!
    Br,
    G@nesh

    Hi Ganesh,
    The IDOC numbers are always Unique,
    IDOC can be generated in SAP system as a result of internal testing (WE19), or
    can be posted from a non sap system (say PI).
    So every time a new IDOC comes, it is assigned a new number to avoid confusion and also this plays a
    critical role in the  end to end testing and validation.
    If you look at the control record of the IDOC you can see a element called DOCNUM. this stores to actual IDOC number.
    from PI side you can  use IDX5 and in ECC  We02/05 to notice the idoc numbers.
    Regards,
    Srinivas

  • Error in number range while testing inbound idoc via we19

    hi all,
    i have done all configurations but while testing the inbound idoc via we19 i am getting an error 'error in assigning number to idoc'..i checked and found that the number range object for idoc is edidoc in it number interval is defined from 1 to 99
    i dont think that anything is wrong with the number object..
    Can u tell me how dow i eliminate this error?

    Increase Higher limit the reason is when you look at current idoc number ( This idoc number already exists ) ,it will not create new idoc number.
    System will get the number from SNRO Based on IDOC Object.
    Just look at EDIDC and see the current idoc number.
    Simple example :
    I have one number - 100 ,it is already exists in database,if i insert same record to the database ,did system will accept ?
    Thanks
    Seshu

  • How to get Get IDOC Number for Inbound IDOCS

    Hi,
    I am using the FM -- IDOC_INPUT_HRMD for creating Inbound IDOCS.
    I populate the values for Control Record and Data Record and the IDOC is posted successfully and i get the status 53 in the status Table.
    But the problem is the field for IDOC number(DOCNUM in IDOC_STATUS Table of the FM ) is empty.
    How can i get the DOCNUM for the IDOC posted as a result of this FM ?
    regards,
    Siddhartha

    Hi Siddhartha,
    I think you cannot call IDOC_INPUT_HRMD fm directly from the external program as this fm only handles the application logic part and not the idoc number generation and save part.
    So I think you have to call IDOC_INBOUND_SINGLE from your external program and then get the IDOC number.
    Then if you need the status records then you need to call another fm and feed IDOC number that you have got from IDOC_INBOUND_SINGLE (there is one IDOC_READ_COMPLETELY but it is not a remote enabled fm)
    <b>OK, I just found one RFC enabled fm which you can use,
    <b>EDI_DOCUMENT_READ_ALL_STATUS</b></b>
    Hope this helps..
    Sri
    Message was edited by: Srikanth Pinnamaneni

  • Inbound idoc error in 51 Status of at least one serial number of item

    Dear Experts,
    There is one inbound IDOC which is in error with status 51 showing error Status of at least one serial number of item  is not allowed.
    Can you please advice why this error is coming.
    Thanks & Regards,
    Nikhil Kanegaonkar.

    An inbound IDOC in error will have the status 51, & it is marked for deletion it has a status of 68.
    http://www.dataxstream.com/2009/10/mass-status-change-sap-idoc/
    http://wiki.sdn.sap.com/wiki/display/ABAP/IDoc+Statuses
    Edited by: Krupaji on May 6, 2011 2:38 PM

  • Inbound Idoc customer number conversion

    I am new to EDI and have a question to ask you both about inbound IDOC's. We have customers sending remittance advices through EDI. The customer numbers in them are their own customer numbers. In SAP, we maintain different customer numbers. Where do the mapping of the customer numbers take place -- In the EDI subsytem itself or in SAP? If in SAP, can you let me know the procedure to do this.
    Any help will be appreciated and points awarded.
    Thanks,
    Nile.

    Hey Fren,
    1. Data Mapping
    Within the framework of SAP EDI, the conversion of a business document in IDoc format to an EDI standard format (and vice versa) is the most important task performed by a subsystem. This process is resource intensive and, hence, is better done at the subsystem level than within SAP. The following conversions and translations are carried out by the subsystem.
    Creating a control record for each inbound IDoc.
    An inbound IDoc must have a control record. The EDI subsystem builds the control record using the information stored in its local repository or from the SAP repository.
    Removing the control record during the outbound process.
    The control record in the IDoc file is used by the subsystem for housekeeping functions, such as locating the trading partner profile. The data on the control record is not needed for translating the content of the EDI documents.
    Translating data from IDoc format to EDI format.
    For an outbound transaction, the EDI subsystem converts data in the IDoc format to a suitable EDI format.
    Translating data from EDI format to IDoc format.
    For an inbound transaction, the EDI subsystem converts data in the standard EDI format to IDoc format.
    Bundling and unbundling IDocs.
    If several IDocs are passed to the EDI subsystem in one file, the subsystem separates them into individual documents. Similarly, on the inbound process the subsystem can bundle multiple IDocs into a single file to improve performance.
    2 Maintaining the Partner Profile
    A partner is defined as the business partner with whom you conduct business and exchange EDI documents. These partners are not necessarily the same as the partners in the partner profile of SAP. However, the concept is quite similar. In SAP, the partner profile maintains parameters specific to the IDoc process, and in the subsystem the partner profile maintains parameters specific to the EDI process. Some typical attributes in a partner profile are
    · A unique partner number
    · The partner type (Customer, Vendor)
    · The standard used (EDIFACT, ANSI X12, and so on)
    · The version of the EDI standard
    · The EDI message exchanged (850, 860, ORDERS, ORDCHG)
    · A functional acknowledgment flag
    3 Triggering the Inbound Process
    After receiving an inbound EDI transmission and creating an IDoc file, the subsystem is often responsible for triggering the inbound process. SAP provides a program named startrfc to start any RFC−enabled function module from the operating system level. For the EDI process, the subsystem uses the startrfc program to
    trigger the function module EDI_DATA_INCOMING. Chapter 6, "Configuring Basic EDI Components," provides the complete details and parameters of the startrfc progam.
    4 Reporting Process Status to SAP
    In an outbound process, after an IDoc has been transferred from SAP to the subsystem, SAP loses control over the process. However, SAP maintains visibility into the process by requiring the subsystem to report on the status of the process. SAP provides a file interface for the subsystem to send a status report at every milestone.
    I hope you got some idea from this process.....
    <REMOVED BY MODERATOR>
    Warm Regards,
    Abhi...
    Edited by: Alvaro Tejada Galindo on Apr 25, 2008 4:36 PM

  • How toset 2nd sales order number on the status application in Inbound Idocs

    Hi All,
    When processing inbound idocs in sales order we are splitting that idocs into two sales orders so for one sales order we are getting on Apllication with sales order number, But i want display second sales order number same as first one. can any one suggest me any function module for that....
    Regards,
    Sudhakar Reddy.A

    Hi ,
    Thanks for the relies i am writing the code in same FM (EXIT_SAPLVEDA_005) include (ZXVEDU07). this is for error message i wrote .
    Data : wa_e1ed19_E TYPE ty_e1edp19,
           wa_status1 type BDIDOCSTAT.
    if DIDOC_STATUS-status = '51' and DIDOC_STATUS-msgty = 'E' and DIDOC_STATUS-msgno = '382'.
    read table IT_E1EDP19 into wa_e1ed19_E with key idtnr = DIDOC_STATUS-msgv1.
    if sy-subrc = 0.
    wa_status1-docnum   = DIDOC_STATUS-docnum.
    wa_status1-STATUS   = DIDOC_STATUS-STATUS.
    wa_status1-MSGTY    = DIDOC_STATUS-MSGTY.
    wa_status1-MSGV1    = wa_e1ed19_E-idtnr.
    wa_status1-MSGV2   = wa_e1ed19_E-posnr.
    append wa_status1 to DIDOC_STATUS.
    clear wa_status1.
    endif.
    endif.
    Regards,
    Sudhakar Reddy .A

  • IDOC number is not in the list

    Hi,
    I am creating an inbound delivery using IDOC. The message type is DESADV and basic type is DELVRY01. After I have populated the control and data tables, I processed them using IDOC_WRITE_AND_START_INBOUND. I have generated the IDOC number after executing the program. The problem is, when I go to WE02, the idoc number is not the list. I am not sure if the IDOC I generated is successful or not. Does it have something to do with the FM that I used. I set a custom process code that will call the FM IDOC_INPUT_DESADV1. Please advise. Thanks in advance.
    Lalyn

    Hi Arun,
    Thanks for the reply. But the IDOC number is not in the list and I can't access it WE19. Do you have any other Function module that I can use to process the IDOC in ABAP? The Function module should be the one to call the FM IDOC_INPUT_DESADV1 to create an inbound delivery. That's what I think causes the error. Thanks.
    Lalyn

  • How to create the INBOUND Function Module for INBOUND IDOCs

    Hi Friends,
    Can any Suggest me How to proceed to Create an INBOUND Function Module for Processing the INBOUND IDOCS
    which are recieved from XI Server ?
    I am working in SAP-ISU
    Here i will recieve the INBOUND IDOCs for the Meter Reading Orders.
    We have a Standard INBOUND FUNCTION MODULE
    IDOC_INPUT_ISU_MR_UPLOAD
    which Uploads the Meter Reading Results.
    I copied the Same function Module into ZIDOC_INPUT_
    and working on it.
    Can any one suggest me, whether i am going in correct way or not.
    In IDOC_INPUT_ISU_MR_UPLOAD Inbound fun module,
    BAPI_MTRREADDOC_UPLOAD is used to Update or Insert the Meter Reading Results,
    My requirment is to Insert and Update the Meter Reading Orders which are Inbounded from XI.
    Can I Use the Same BAPI
    BAPI_MTRREADDOC_UPLOAD
    to Update the below fields,
    EABL-SERNR
    EABL-ZWNUMMER
    EABLG-ABLESGR
    EABL-V_ZWSTAND
    EABL-N_ZWSTAND
    EABL-ABLHINW
    EABL-ZSKIPC
    EABL-ADAT
    EABL-ATIMTATS
    EABL-ADATTATS
    EABL-ATIM
    EABL-ZMESSAGE
    EABL-ABLESER(Meter reader number)
    Kindly Suggest me,
    Thanks in Advance,
    Ganesh

    Hello Ganesh
    I think you are going completely astray with you z-function module for IDoc processing.
    If you look at TABLES parameter METERREADINGRESULTS (type BAPIEABLU ) of BAPI_MTRREADDOC_UPLOAD you will find many of the requested fields already:
    EABL-SERNR => BAPIEABLU-SERIALNO
    EABL-ZWNUMMER =>REGISTER
    EABLG-ABLESGR
    EABL-V_ZWSTAND
    EABL-N_ZWSTAND
    EABL-ABLHINW
    EABL-ZSKIPC
    EABL-ADAT
    EABL-ATIMTATS => ACTUALMRTIME
    EABL-ADATTATS => ACTUALMRDATE
    EABL-ATIM
    EABL-ZMESSAGE
    EABL-ABLESER(Meter reader number)
    Field EABL-ZMESSAGE appears to be custom field (at least I cannot find it on ECC 6.0). If this field was added using include CI_EABL then you probably can get these values into the BAPI using the EXTENSIONIN parameter.
    Check routine CHECK_UPLOADRECORDS in the BAPI which allows two extension structures:
    - BAPI_TE_EABL
    - BAPI_TE_EOSB
    Not surprisingly BAPI_TE_EABL contains the include CI_EABL.
    Regards
      Uwe

  • Sale Order from Inbound IDOC

    I am testing creating Sale Order from inbound IDOC with WE19.
    Partn. number = AAA001
    Partn. type = KU
    Partn.func = PY
    Message Type = ORDERS
    Process Code = ORDE
    I get message 51 "Error: Application document not posted" in IDOC status:
    VKORG, VTWEG, SPART cannot be determined for customer AAA001 , vendor                                                                               
    Message no. VG 204                                                                               
    Diagnosis                                                                               
    No sales organization, distribution channel or division were sent to the
        IDOC. This data is necessary if a sales order is to be added           
        automatically. If this data is unavailable, you cannot create a sales  
        order document.                                                                               
    Procedure                                                                               
    If data on the sales organization, distribution channel and division   
        have not been entered in the IDOC, it must be determined using a user  
        exit defined in the program.

    I will receive IDOC from external non-SAP system.
    How can i populate E1EDK14 segment with appropriate values:
    E1EDK14 -QUALF = 006
    E1EDK14 -ORGID = Division (VBAK-SPART)
    E1EDK14 -QUALF = 007
    E1EDK14 -ORGID = Distribution Chanel (VBAK-VTWEG)
    E1EDK14 -QUALF = 008
    E1EDK14 -ORGID = Sales Organisation (VBAK-VKORG)
    If external system does not know this values?
    Edited by: S S on Feb 28, 2009 12:46 PM

  • How to create Inbound Idocs in a ABAP program? Any function Module?

    Hello Experts,
    My requirement is : I have sales order data which I extracted from third party system in my internal tables. In the same box I need to create inbound Idocs and then consequently create sales orders.
    I have used the function module IDOC_INBOUND_WRITE_TO_DB to create inbound Idocs from Sales Orders data in internal tables. I have populated all the data records with correct PSGNUM and HLEVEL values. My plan is to create inbound idocs with this function module and send those to IDOC_INPUT_ORDERS function module which creates Sales Orders.
    If a sales order in the internal table in ABAP program contains only one item, then I am getting correct idocs. But if more than one item exists for a sales order then the line item segments which got repeated in Idoc are having PSGNUM and HLEVEL values as zero when I checked in WE02. As a result the hierarchy from the second item segment is getting disturbed and getting the status 60.
    I populated T_EDIDD with data records from  IDOC_INBOUND_WRITE_TO_DB.
    To the function module IDOC_INPUT_ORDERS,  T_EDIDC and T_EDIDD are the input. I observed that in T_EDIDD also the PSGNUM and HLEVEL values are blank.
    I am getting Status 60 with message 'EDI: Syntax error in IDoc (segment cannot be identified)' for idocs which have more than one item.
    I need to extract sales data from third party and create inbound idocs and create sales orders in one ABAP program only. I need to display corresponding Idoc numbers for the corresponding third party sales order number in a listoutput.
    Can anybody please provide inputs?
    Regards.

    Hi Anjali,
    Thanks for the response.
    I have passed the PSGNUM and HLEVEL values while populating the data records. Then I sent the data records and control record information to the function module IDOC_INBOUND_WRITE_TO_DB. Inside this function module there is code to clear the PSGNUM values and HLEVEL values.
    for compatibility: clear administration data of data records
               perform data_records_wipe
                                      tables
                                          t_data_records.
    FORM DATA_RECORDS_WIPE
                      TABLES
                          T_DATA_RECORDS_IN  STRUCTURE EDIDD.
      LOOP AT  T_DATA_RECORDS_IN.
        CLEAR: T_DATA_RECORDS_IN-MANDT,
               T_DATA_RECORDS_IN-DOCNUM,
               T_DATA_RECORDS_IN-SEGNUM,
               T_DATA_RECORDS_IN-PSGNUM,
               T_DATA_RECORDS_IN-HLEVEL.
        modify t_data_records_in.
      ENDLOOP.
    ENDFORM.                               " DATA_RECORDS_WIPE
    This is the code which is clearing all the PSGNUM and HLEVEL values. After coming out of this function module we are getting the error idocs created with disturbed hierarchy.
    I need to create INBOUND Idocs with the data in ABAP program.
    Please let me know if any inputs? Is there any function module existing to create Inbound Idocs inside an ABAP program?
    Regards

Maybe you are looking for

  • Paying for one product more than once

    Hey I've just used my app store account to buy Whatsapp massenger , the time your system asked me to insert my payment information I got an alert tells me that there is a miss match between card type and number , and I was correcting That for around

  • Error while doing Std.cost estimation.

    Hallo gurus, I am facing one problem while doing Std.Cost estimation. Let me explain in detailed.. I am doing costing estimation for a Product. This product contains both Bought out Material and Customer Supplied Products.But both are coming as Mater

  • Creation of custom BAPI for FB02

    Hi Guys, I want to create custom BAPI to update FB02 and for my requirement i found there is no standard BAPI available since i need to update lot of other fields in FB02 that is the reason, i want to use CALL TRANSACTION inside the BAPI to update FB

  • Pricing in Billing Document

    Hello ALl, I have condition in sales order pricing procedure, it is calculated based on the value of the sales order and distributed to the all the line items in the sales orders proportionally. When I am invoicing this sales order for each material

  • Using your own Domain Name

    This is what I have as my url now... http://web.me.com/seanfahey/Black_JackPress/Welcome.html I'm trying to put in my own domain name that I purchased from GoDaddy.com. Please help! Much appreciated.