How to find Correct IDoc Status in SAP

Hi All,
I need some help on IDoc scenario, I have custom program to create Idoc and as well it will send IDoc to XI. I want to know idoc staus in the program to update custom table whether idoc sent successfully or not but idoc giving status as 03 (Data passed to port OK) irrespective of idoc send or not, actually idoc not sent to xi when I check SM58 showing error.
Please advice me how to find correct idoc status inside program itself.
**-----Create IDoc
  CALL FUNCTION 'IDOC_OUTBOUND_WRITE_TO_DB'
    TABLES
      int_edidd      = i_edidd
    CHANGING
      int_edidc      = wa_int_edidc
    EXCEPTIONS
      idoc_not_saved = 1
      OTHERS         = 2.
  COMMIT WORK.
  i_edidc = wa_int_edidc.
  APPEND i_edidc.
  REFRESH i_edidd.
**-----Send Idoc
  CLEAR i_edidd.
**-------Send Idoc to XI
  CALL FUNCTION 'EDI_OUTPUT_NEW'
    EXPORTING
      onl_option = 'B'
      error_flag = ' '
    TABLES
      i_edidc    = i_edidc
      i_edidd    = i_edidd.
  COMMIT WORK.
  READ TABLE i_edidc INDEX 1.
**-----Update Dispatch order status based on Idoc status.
  IF sy-subrc =  0 AND i_edidc-status ='03'.
    znxi01_update c_03 i_edidc-docnum.
    gw_success_record = gw_success_record + 1.
  ELSE.               " Error in Data Transfer
    znxi01_update c_02 i_edidc-docnum.
    gw_fail_record = gw_fail_record + 1.
  ENDIF.

Hi Anil,
for setting IDOC Status you can send back a IDOC of type <i>ALEAUD01</i>.
The function IDOC_INPUT_ALEAUD takes automatically this IDOC and writes the status to the origin IDOC.
Regards Mario

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

  • How to find out the cost of SAP user for a particular user id

    Dear All,
    I got one issue like how to find out the cost of SAP user, i mean for a particular user id.
    Could you please advice me regarding this.
    Raghu

    Hello Raghu,
    I got one issue like how to find out the cost of SAP user, i mean for a particular user id.
    Could you please advice me regarding this.
    I think you need to reach out to BASIS consultant to check out the Cost involved for User ID for the SAP application.
    Regards,
    Sarthak

  • How to find the invoice status

    how to find the invoice status in ap

    Hi,
    Please elaborate your question, what Invoice are your referring? AR, AP...
    Invoice status can be found from both Front end application or from the backend using SQL query. Also provide your enviornment details to better assist you.
    Thanks &
    Best Regards,

  • How to find the NodeManager Status using WLST

    Hi All,
    can anyone please let me know how to find the nodemanager status using wlst, the nodemanager status whether it is 'Reachable' or not.
    Thank you.

    Hi Bob,
    As James pointed, we faced the same. We could not find any mbean to find the Node Manager Stat that we can monitor from Weblogic console.
    The best I can suggest, use the below WLST command after connecting to 'Node Manager:
    nm()
    Currently connected to Node Manager to monitor the domain xxxdomain.Grep for 'connected to Node Manager to monitor the domain <Your WLS domain name>' and if successfull, your node manager is UP & Connected other wise not 'Reachable'.
    Regards,
    qumar

  • How to find out existing Reports and sap scripts and smartforms ?

    Dear Friends ,
    How to find out existing Reports and sap scripts and smartforms ?
    ( e.g: how many existing reports and SAP scripts are available in MM or SD module , What is the procedure to find out ? )
    Thanking you.
    Regards,
    Subash.

    scripts r stored in TNAPR TABLES

  • How to find out SR level in SAP system

    Hi Guys,
      How to find out the SR level of our system in Windows. And can any one tell me, what are the necessary CD's required for ECC 6.0 installation. I can found all the informations but I can't found for specific installation on windows -- mssql .
    Thanks
    Regards,
    Ral

    An SR (Service Release) is simply a base release + a certain amount of SPs(Support Packs).
    So, the question you really want is what SP level is the system at.  If it's an ABAP system, you can find that in the SYSTEM menu-->STATUS.  Then click the magnifying glass under the "system data" section to see the individual SPs  for the various components.
    If it's a Java system, you need to log into the URL for the system information screen.  That is:
    http://<host>:5xx00
    (where xx is the system number)
    click "system information" and login with an administrative user.  The component listing on that screen will tell you what level your java components are on.
    You can download all needed software from
    http://service.sap.com/swdc
    You will need an OSS account, and proper authorizations given to you by an admin by the customer.  Further, you will need your downlaods to be approved via the SolMan Maintenance Optimizer by an admin at the customer.

  • How to find the IDOC for the archived message in integration engine

    Hello experts
                              In my outbound scenario (Idoc to file), I have a message id got processed from integration engine (SXMB_MONI) but failed in adapter engine (RWB) on 1week back, The same message archive in SXMB_MONI but i found same message in adapter engine.
    My question is how to find the archive message IDOC num
    We can't find in adapter engine it will show only (sender service, receiver service and interface date and time as well and receiver structure in message content tab) but not idoc no,
    Kindly provide the solution for the issue, Is there any alternative to find the idoc?
    I can search with partner in sap side but i can get lot of idoc's
    Thanks & Regards
    Rajashekar

    > We can't find in adapter engine it will show only (sender service, receiver service and interface date and time as well and receiver structure in message content tab) but not idoc no,
    >
    > I can search with partner in sap side but i can get lot of idoc's
    Hi,
    If solution given by experts in above replies doesn't work then you can try below method.
    What you can do is, take some unique values from message content tab (which came in some specific segment from IDOC)
    Now in R3 use tcode WE09 and set the dates when this was processed. Set other filter criteria as much as possible e.g. direction, idoc basic type, port, partner etc and at the bottom you can "Fast search mode" their you give the segment name and it's value.
    This will help you get you IDOC.
    Regards,
    Sarvesh

  • How to check the Idocs sent from SAP system

    How to check the outbound Idocs sent from SAP system to target systems.
    How to know the message types and target systems.

    Hi,
    In Addition with the above mentioned transaction code(WE02), u can check out idocs in these table - EDIDC, EDID4, EDIDS.  Depending on different status you can differentiate them as Inbound or Outbound Idocs...
    Cheers...
    Santosh.
    <i><b>Mark All Usefull Answers...</b></i>

  • How to find out inactive objects in sap

    Hi experts,
    How to find inactive programs in sap
    as well as function modules ,
    say simply how to find  inactive objects?
    is there any table in sap which wil holds inactive objects or any program or any transaction?
    thanks advance
    sailu

    hi,
    check this thread,
    Re: table to check status(active or inactive) of objects?
    In the above thread discussion various tables and the field having the status is mentioned.
    So u can check those tables.
    кu03B1ятu03B9к

  • How to send vendor IDOC data from SAP R/3 to XI.

    Hi experts,
    I have developed the IDOC to FILE scenario for Vendor Master Upload. I want to place flat file in local folder with in XI or Outside of XI. (Using NFS or FTP protocol in FILE adapter). My First quesstion is How to setup Folder with in XI ro Out side XI?
    And also I want to push the IDOC from SAP r/3 to test the scenario. Both XI and R/3 systems are configured to exchange data.
    How to Push Vendor IDOC from SAP R/3 to XI? (we can send XML directly to XI; but the R/3 kernal should be moe than 6.20).
    Thanks in Advance.....

    Hi,
    >>My First quesstion is How to setup Folder with in XI ro Out side XI?
    Its a normal way to creation of folders in Os level . u can create the folder in XI Server or on the FTP Server.
    ALE Settings
    Steps
    SAP XI
    1) RFC Destination (SM59)
    a) Choose create.
    b) Specify the name of the RFC destination
    c) Select connection type as 3 and save
    d) In the technical settings tab enter the details SAP SID/URL and system number#.
    e) Enter the Gateway host as same details above SID/URL.
    f) Gateway service is 3300+system number#.
    g) In the Logon /Security tab, enter the client user & Password details of Destination system.
    h) Test the connection and remote logon.
    2) Create Port (IDX1)
    a) Select create new button
    b) Enter the port name as SAP+SID (The starting char should be SAP)
    c) Enter the destination client.
    d) Enter the RFC Destination created in SAP R/3 towards other system.
    e) Save
    3) Load Meta Data for IDOC (IDX2)
    a) Create new
    b) IDOC Message Type
    c) Enter port created in IDX1.
    SAP R/3
    1) RFC Destination (SM59)
    a) Choose create.
    b) Specify the name of the RFC destination
    c) Select connection type as 3 and save
    d) In the technical settings tab enter the details SAP SID/URL and system number#.
    e) Enter the Gateway host as same details above SID/URL.
    f) Gateway service is 3300+system number#.
    g) In the Logon /Security tab, enter the client user & Password details of Destination system.
    h) Test the connection and remote logon.
    2) Create Port (We21)
    a) First Select Transactional RFC and then click create button
    b) Enter the destination port name as SAP+SID (The starting char should be SAP)
    c) Enter the destination client.
    d) Enter the RFC Destination created in SAP R/3 towards other system.
    e) Save
    3) Create Partner Profile (WE20)
    a) Create New
    b) Create the Partner no. name as same the logical system name of the destination system.
    c) Select Partner type LS
    d) Enter details for Type: US/USER, Agent, and Lang.
    e) Click on the + button to select the message type.
    f) Select Partner no. and LS which ever create above.
    g) Select Message type
    h) Select Process code related to the Message type.
    I) save.
    In SLD – System Landscape Directory
    TS for R/3 (Logical system):-Assign the client name created in R/3 as Logical system Name.
    Ts for Third Party (Logical system):-
    BS for SAP R/3 (Logical system):- Assign the client name created in R/3 as Logical system Name.
    BS for Third Party (Logical system):-Enter the XI logical system name.
    In Transaction SALE
    Define and Assign the logical system name.
    IDoc-XI-File scenario
    /people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters
    Posting the IDOC from R/3 to XI
    /people/sameer.shadab/blog/2005/07/25/reposting-idocs-instead-of-recreating--for-testing-purpose-xi
    REgards
    Seshagiri

  • How to find out open PO in SAP?

    Hi,
    I have a simple question? How to find out if the PO is open?
    Is there any field in any table in SAP which indicates this?
    Is there any report in SAP which gives list of all open PO in the system?
    Thanks,
    Pratik

    Hi
    There is no way you can find out that wheather the particualr PO is open or not and there is no such table indicating that the particular purchase order is open.
    Yes if a purchase order is already open in one system and you want to open that in your system in change mode than you can use the Tcode sm01 where you can know that which form is opened and  you can unlock that particular form and can use that in change mode.
    I hope this will help you to solve your problem
    Thanks
    Mrutyunjaya Tripathy

  • How to create an IDOC Status.

    Hi All,
    I have a requirement to create an IDOC Status, which should be a copy of existing status.
    How to accomplish the same.
    Regards,
    Neha

    Hi Neha,
    You can create the Idoc status, if it is an Inbound Idoc. Copy the Existing process code & add it to u r Inbound Partner Profile. In the process code u can create the status..Check the below code.
    if gv_error_status <> 0.
            condense gt_msgv-msgv1 no-gaps.
            translate gt_msgv-msgv1 to upper case.  "#EC TRANSLANG
            set extended check on.
            read table idoc_contrl index 1.
            idoc_status-status = '68'.
            idoc_status-uname  = sy-uname.
            idoc_status-repid  = sy-repid.
            idoc_status-routid = gv_funcname.
            idoc_status-docnum = idoc_contrl-docnum.
            idoc_status-msgv1 = gt_msgv-msgv1.
            idoc_status-msgv2 = gt_msgv-msgv2.
            append idoc_status.
            idoc_status-status = '51'.
            idoc_status-uname  = sy-uname.
            idoc_status-repid  = sy-repid.
            idoc_status-routid = gv_funcname.
            idoc_status-docnum = idoc_contrl-docnum.
            append idoc_status.
    endif.
    I hope this help you.
    Regards
    Rajendra

  • How to find business process diagrams of SAP reference model

    hello guys,
      I am reading book 'SAP R/3 Business Blueprint: Understanding Enterprise Supply Chain Management' recently. In this book, the author shows many EPC process diagrams of SAP reference model,but how could I find the process diagrams in SAP system.
      I google this 'SAP Reference model', and find transaction: SB09 Business Navigator-Process view. But I can not find this transaction in IDES4.7or ECC6 IDES.
    Thanks.
    Edited by: Justin on Jul 2, 2009 10:20 AM

    Hi RK v ,
    I really don't know what your actual requirement is , but if you want to know the objects as per the modification , then transport request will be much help to you .
    Have a look into table E070 and E071 .
    Regards ,
    Yogendra Bhaskar

  • How portal finds the vale for the sap-language parameter for iView

    In the portal one of the ABAP WebDynpro iView is getting displayed in German. The reason for that is the sap-language parameter is being passed as DE. All other iViews in the system are passing the sap-language parameter is as en.
    In our system the Logon Language property is blank for the all the iViews. Could you tell me why one specific iView the sap-language is being passed as a DE?
    How the portal finds the value for the sap-language parameter?

    Hello Venkata,
    Check if your Component locale is set to DE.
    Component locale
    This locale is defined by the following component profile properties:
    --ForcedRequestLanguage
    --ForcedRequestCountry
    Check this for more:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/42/938297a5061d69e10000000a1553f6/content.htm
    Greetings,
    Praveen Gudapati
    p.s Points are always welcome for helpful answers

Maybe you are looking for

  • Facing problem in "Add to Report" in Database expert in Crystal Reports

    Hi, I am using Crystal Reports XI R2 Service Pack 3 with Visual Studio 12.0 and Oracle Server as the Data source. I am trying to add an SP to the crystal report. When i select the SP and click the Add (>) button, it is not getting moved to the select

  • Issue in View creation

    Hi, Im trying to create view on top of a table in pl\sql. My table has 5 columns and my view needs 12 columns. (5 from base table and 7 additional columns which will be hardcoded in view definition.) Create or replace view Dstage_v (ID, Tran_Type,Acc

  • Requirements to bring up temporarily network isolated DC

    Hi Folks. A question that has been nagging me for a while..   We are a school district with over 50 physical sites (With matching AD sites and subnets).   Each site has a domain controller. (The primary data center has 3 DC's, including the FMSO role

  • Data Forms member drill down

    Hi, In data forms when i drill down to some member i always have the ancestor at the bottom. Is it possible to set it up to have the ancestor on the top? When i drill down i would like to have my e.g. Revenue Total as a member on top and its descenda

  • Search help BBP_CATEGORY_VALUE2

    Hello Experts, For a requirement to restrict the value list in the product category search help for Limit items, we have implemented  "WD_BADI"  and assigned custom search help (Value type - DDIC). The Custom search help we have assigned is exact cop