none
How to get IDoc Status? RRS feed

  • Question

  • I have successfully transfered an strongly typed idoc from my .Net application to SAP using the following example to create a purchase order.

    http://msdn.microsoft.com/en-US/library/cc185231(v=BTS.10).aspx

    The IDocClient.Send method only returns a guid (which I can translate into a transaction id).   When I view the Idoc in SAP (using WE02) I can see status information linked to that IDoc including the PO Number.  How can I retrieve that status information or any messages from SAP about the IDoc? Or to get the new PO number I just created do I have to call an RFC to get it?

    Scott

    Friday, May 21, 2010 3:49 PM

Answers

  • So here it is: http://help.sap.com/saphelp_bw/helpdata/en/0b/2a6550507d11d18ee90000e8366fc2/frameset.htm

    "E1PRTOB contains the receiver's IDoc number and the application object generated in inbound processing, if one exists. The application object has the same format as the BOR link tools, that is, it comprises a BOR object type, object ID and logical owner system."

    IDOC audit should be a possible scenario. Send IDOCs to a send port and have a correlating direct receive port based on the transaction id. All Audit IDOCs are send periodically and contain more than one transaction id. So split them up in either a custom receive pipeline or a small dispatch orchestration. Store them in the message box in an internal format the correlating receive port is listening to. So all of your orchestrations should rehydrate and continue running.

    Hope that helps..?


    If you like my post or consider it as a valid answer, please use the buttons to show me - Oliver
    Wednesday, May 26, 2010 2:13 PM

All replies

  • As you are creating the Purchase Order, so are you sending Purchase Order No. to SAP?

    Or Purchase Order No. is created in SAP. If its created in SAP then you would need to make a RFC call to get the Order No.


    Regards, Ajeet Kumar MCTS Biztalk Server
    Sunday, May 23, 2010 11:40 AM
  • There should be three possible ways.

    First, why not use a BAPI instead of a IDOC. Should fix your problem. But I guess you're not allowed to? Or is ti just a performance issue? Due to the synchronous connection it's always better the use this as you receive any errors, generated numbers, etc.

    Nevertheless there should be a RFC function that returns you the IDOC status based on IDOC id. You can use this for polling. Have a look at SM37 and search for something like *IDOC*STAT*

    In addition there is a special "commited" IDOC. That will be sent automatically from SAP to BizTalk when your IDOC has been processed and the data has been saved to the database. I will have to have a look in the papers at work (on Tuesday) for more details if you're intrested in. You can then use the transaction ID for the correlation within BizTalk.

    Personally use BAPI calls, if not possible use the commited IDOC type. Third way would be polling the IDOC status via RFC function call, but this would be the least performant one.


    If you like my post or consider it as a valid answer, please use the buttons to show me - Oliver
    Sunday, May 23, 2010 2:22 PM
  • Yes. Make an RFC call to get the IDOC status. SAP dont send IDOC status.
    Vishnu
    Tuesday, May 25, 2010 2:57 PM
  • So here it is: http://help.sap.com/saphelp_bw/helpdata/en/0b/2a6550507d11d18ee90000e8366fc2/frameset.htm

    "E1PRTOB contains the receiver's IDoc number and the application object generated in inbound processing, if one exists. The application object has the same format as the BOR link tools, that is, it comprises a BOR object type, object ID and logical owner system."

    IDOC audit should be a possible scenario. Send IDOCs to a send port and have a correlating direct receive port based on the transaction id. All Audit IDOCs are send periodically and contain more than one transaction id. So split them up in either a custom receive pipeline or a small dispatch orchestration. Store them in the message box in an internal format the correlating receive port is listening to. So all of your orchestrations should rehydrate and continue running.

    Hope that helps..?


    If you like my post or consider it as a valid answer, please use the buttons to show me - Oliver
    Wednesday, May 26, 2010 2:13 PM
  • HI All,

     

    I'm facing an issue when I send IDOC to SAP. I'm able to send the IDOCs using the Send operation to SAP and can receive the TID (as have set the AutoConfirmSentIdocs property to true) . But my intention is to get the  IDOC number and then make an  RFC call to finish the job at SAP end.

    But in SAP I can see idocs with status 64 and they are just waiting to be triggered. That trigger is the RFC call that I need to make to close the job.  But to make RFC call I need to pass the IDOC NUmber to RFC so that it can close that job. Issue is when I make the call I always ge the TID back but not the IDOC number?

    Any idea what might be going wrong?

    Regards,

    Ahmed

     

    Sunday, December 5, 2010 10:02 AM
  • Why are you trying to trigger the processing by hand? Normally on SAP side in transaction WE20 (or WE21) you can set processing to "immediately" or "manual". If it's manual the SAP guys should use a batch job that processes the "open" idocs on a regular basis. No need to trigger this out of BizTalk.
    If you like my post or consider it as a valid answer, please use the buttons to show me - Oliver

    http://pi.hauth.me

    Sunday, December 5, 2010 2:31 PM
  • Hi Oliver,

    Thanks for the quick response on this post.

    My Client is having a requirement that I have to send an IDOC to SAP once done, I have to get the IDOC number back and then call an RFC to process this IDOC. In the existing E Gate they are doing the same. This batch will trigger the procesing of IDOCs. I'm trying to achieve the same through BizTalk.

    I know you are talking about this: http://www.itcserver.com/blog/2007/06/22/idoc-remains-in-status-62-or-64/ 

    Want to understand:

    1.If send an IDOC BizTalk calls the IDOC_INBOUND_ASYNCHRONOUS RFC to deposit the messages at SAP end. If I set the property then it get the TID which is returned as GUID. But not an IDOC numer......

    If I check in SAP then the status would be 64 (Ready to be sent for processing - YELLOW status on SAP ) ..where as client is expecting this as 53(processed) .. I also tried I suppose the SE37 to process them manually..but it get's into 51 status where the status turns RED and complains of data mis match like record didn't match in th system for a given segment.

    2. Want to know how Biztalk commits the transactions at SAP?

    3. How can I get the IDOC number back, with the condition given above it gets the GUID which can;t be sent to SAP ?

    Anything that I'm missing here...

    Regards,

    Ahmed

    Sunday, December 5, 2010 6:28 PM