IDOC Number in BPM (Bhavesh & Michal Help)

Hi ,
I tried the using the concepts from the blog (/people/mitesh.parekh/blog/2008/12/01/receiving-aleaud-as-acknowledgment-in-ccbpm)where i have the Message ID which entered into BPM
but not the message Id which triggered the IDoc send . I think i m missing some small detail where i need to capture the send step MSG Id
i'm aware that its not possible to get the Msg id in BPM . How is that ABAP Mapping in the above blog captures the message id ?
TRY.
l_msgid_ref = param->get(
IF_MAPPING_PARAM=>MESSAGE_ID ).
catch CX_SY_REF_IS_INITIAL into oref.
endtry.
Alternatively one more thread has some info
if someone can let me know where you can get this SourceDocNum would be great in this RFC Look up . in the thread Re: Idoc Acknowledgements and BPM.
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><ns0:RFC_READ_TABLE xmlns:ns0=\"urn:sap-com:document:sap:rfc:functions\"><DELIMITER/><NO_DATA/><QUERY_TABLE>IDXRCVPOR</QUERY_TABLE><ROWCOUNT/><ROWSKIPS/><DATA><item><WA/></item></DATA><FIELDS><item><FIELDNAME>SNDLAD</FIELDNAME><OFFSET/><LENGTH/><TYPE/><FIELDTEXT/></item></FIELDS><OPTIONS><item><TEXT>IDOCNUMBER EQ &apos;"
+ SourceDocNum
+ "&apos;</TEXT></item></OPTIONS></ns0:RFC_READ_TABLE>";
Since i do not have the Message ID it just creates the below payload from my mapping
This is the request being sent out using the ABAP Mapping as the Messgae ID is null .
<?xml version="1.0" ?>
- <ns0:ZALEAUDIT4XI xmlns:ns0="urn:sap-com:document:sap:rfc:functions">
<S_DOCNUM>0000000000000000</S_DOCNUM>
<S_MESTYP />
<S_SNDSYS />
<S_UPDDAT>00000000</S_UPDDAT>
</ns0:ZALEAUDIT4XI>
Looking forward for Help .

hi
you have to use Configurable Parameters in the ccBPM. in runtimeyou assign the IDOCNUM field value to the parameter and then use it in the response mapping (WSDL-ALEAUD).  you have to define the parameter in the Message Mapping under the Signature Tab.
Also you have to bind the parameter in the Operation Mapping. to do this,define a new parameter in the Operation mapping and then bind it with the parameter defined in the message mapping.
see this blog to know how:
SAP PI 7.1 Mapping Enhancements Series: Parameterized Message Mappings
rgds
RP
Edited by: Rodrigo Alejandro Pertierra on Nov 3, 2011 3:49 PM

Similar Messages

  • How to save IDOC number in BPM to use in ALEAUD

    Hi Experts,
    I am doing IDOC - BPM - sync SOAP scenario, i am using async to sync bridge in BPM, how can i get original IDOC number so that i can use it in webservice response message to ALEAUD mapping??

    hi
    you have to use Configurable Parameters in the ccBPM. in runtimeyou assign the IDOCNUM field value to the parameter and then use it in the response mapping (WSDL-ALEAUD).  you have to define the parameter in the Message Mapping under the Signature Tab.
    Also you have to bind the parameter in the Operation Mapping. to do this,define a new parameter in the Operation mapping and then bind it with the parameter defined in the message mapping.
    see this blog to know how:
    SAP PI 7.1 Mapping Enhancements Series: Parameterized Message Mappings
    rgds
    RP
    Edited by: Rodrigo Alejandro Pertierra on Nov 3, 2011 3:49 PM

  • IDOC Number from payload in Alerts with out BPM

    Hi Everybody,
    I need to send the IDOC Number as Alert for the user.
    Is it possible to do with out BPM either by Alert Frame Work or CCMS?
    Is there any alternative way to capture the Idoc number and display for the erroneous messages?
    Helpful Answers will be rewarded points.
    Thanks,
    Zabi

    Yes,
    You can also do it via alerts.
    Alert can be triggered in different ways.
    1) Triggering by Calling a Function Module Directly. or from UDF
    /people/bhavesh.kantilal/blog/2006/07/25/triggering-xi-alerts-from-a-user-defined-function
    2) Triggering by Calling a Function Module in the Workplace Plug-In.
    3) Triggering with an Event Linkage.
    4) Triggering with the Post Processing Framework (PPF) or Message Control (MC)
    5) Triggering from a Workflow.
    6) Triggering from CCMS with autoreaction.
    7) Triggering from BPM.
    /people/michal.krawczyk2/blog/2005/03/13/alerts-with-variables-from-the-messages-payload-xi--updated
    /people/community.user/blog/2006/10/16/simple-steps-to-get-descriptive-alerts-from-bpm-in-xi
    8) Triggering alert by configuring a rule from RWB.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/56/d5b54020c6792ae10000000a155106/content.htm
    Br,
    Madan Agrawal

  • IDOC Number Sequence Disturbed and Need to Reset by Increment - HELP Reqd

    Hi Readers,
    I need your Help / Expert Advise.  We are in the process of Upgrading our SAP R/3 System to 64 Bit R/3 System on XP Server.  We did take the existing production Image to do our testing.  Unfortunately, we see that the Outbound IDOC Sequence got disturbed and we see difference of 1000.  Ex:  1454004 and next 1455004, 1456005 and so on. 
    Did anybody happened to face such problem ?  And any of you know how to fix it.  I did try to see that SAP Transaction OYSN but no use.
    Any help is appreciated.  Let me know on any solutions.
    Outbound IDOCS affected with this.  Inbound seems OK.
    I have downloaded the WE05 IDOC results in XL Format and pasting it here for your ref. 
    <h6>IDoc Number     Segments     Status     StatusGrpg     Partner     Basic type     Time     Messg.Type     Direction     Port     Date
    0000000001456004     000007     03     @08@     LI/LF/0000307136     DELFOR01     13:13:31     DELINS     Outbox     EMDEDIALE     01/15/2009
    0000000001457004     000042     03     @08@     KU/AG/0000000067     ORDERS03     14:08:49     ORDRSP     Outbox     EMDEDIALE     01/15/2009
    0000000001458004     000042     03     @08@     KU/AG/0000000067     ORDERS03     14:17:51     ORDRSP     Outbox     EMDEDIALE     01/15/2009</h6>
    Thanks
    Venkat

    Ah yes !
    Sorry.
    do
    shutdown normal
    startup mount
    recover database until cancel;
    alter database open resetlogs;You have to "simulate" an Incomplete Recovery (or do a real Incomplete Recovery) before Oracle allows an OPEN RESETLOGS. A SHUTDOWN NORMAL ensures that you really really do not need the Online Redo Logs. So the RECOVER DATABASE UNTIL CANCEL simulates an Incomplete Recovery.
    See http://hemantoracledba.blogspot.com/2008/11/open-resetlogs-without-really-doing.html
    Hemant K Chitale
    http://hemantoracledba.blogspot.com

  • Need help with a lookup on a IDoc element for BPM

    Hello All,
       I was wondering if there is someway that I can lookup on the <b>E1EDKA1</b>segment and get the value of <b>NAME1</b> where the value of <b>PARVW = LF</b> in BPM. I appreciate any help.
    Thanks
    Message was edited by:
            Balu Yalamanchili

    HI,
    To get value of element/container variable , you cna use first context object, based on context object put switch (aslo some block/fork step ) with condition , stating that if that value of context element is matched then put control step to raise alert.
    i think you got this ,if not please let me know to explain clearly.
    Any way please see some links regarding alert..
    /people/krishna.moorthyp/blog/2006/04/08/reconciliation-of-messages-in-bpm
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    Regards
    Chilla..

  • Message Split -- File to Idoc Scenario  -  ( Without BPM )

    I have multiple records coming to XI in a File and I have to create Multiple Idocs to R/3.
    Due to Complexity of mapping I'm splitting Maaping step into 2 message Mappings.
    A-->B
    B-->C
    In the 2nd Mapping step  I'm doing message Split meaning for each Source record I'm creating multiple Idocs ( To be precise each record on the source becomes 4 idocs in the Target.
    2nd Mapping step is as follows
    Source 1..1
      Sourcerecord 0.. Unbounded
        field1  0..1
        field2  0..1
        filed3  0..1
    Target
    Message 1
        Idoc   1.. Unbounded
          Idoc Structure..
    Message 2
          Idoc   1.. Unbounded
    Message 3
          Idoc   1.. Unbounded
    Message 4
          Idoc   1.. Unbounded
    So based on some criteria each record of Source will be mapped to 4 Messages (  1 each under each Message )
    Is it possible to do this without BPM?. Iam sending all these Idocs to same R/3 System.
    Thanks for any help..RK

    Hi,
    See the blog
    /people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change
    <i>Basicly we have 2 ways of handling such scenarios:
    - we can use a block step and send multiple IDOCs from our BPM
    - we can also do a little trick and send multiple IDOCs from the XI without a BPM
    The first approach is a standard XI approach. It involves the use of a BPM
    so the speed of this transfer many not be very good in case you'd like to send
    hundreds or thousands of IDOCs in just one call.
    The second approach uses a little trick that was mentioned several times
    on the XI Froum by a number of XI developers but is still not very clear to the XI newbies.
    It allows us to send multiple IDOCs without the use of a BPM. Most probably this will be your choice
    if you'd like to use such 1:N (IDOCs) scenarios effectively.</i>
    Please see the bwlow threads also..
    IDOC Splitting
    File To IDOC Thru XI
    Multi-Mappings in BPM (XI 3.0)
    Please let me know , your prob..is solcev or not..
    Regards
    Chilla..

  • Retrieve idoc number from r/3

    Hi Experts.
    I have an interesting issue..i am sending an idoc to r/3..asynchronously from bpm..Is it possible to get the idoc number of the idoc from the r/3 system for the same idoc that i had sent.....no the docnum is not what i am looking for, dont want to create another scenario where i retrieve it using rfc..etc...
    just want the idoc number back so i can append it to the soap response..and hence wash my hands off the situation...
    Venkat

    Venkat,
    Just check this doc,if it helps https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f6d2d790-0201-0010-9382-b50b499b3fbe

  • Set IDOC number as Correlation ID in JMS Receiver Adapter

    Hi ,
    I am working in PI7.1  on IDOC to JMS interface,
    I want set  IDOC number as Correlation ID in JMS queue ,
    I did following Correlation steps ,
    1. Set JMSCorrelation ID to PI Conversation ID
    2. Checked JMS CorrelationID of request
    3.Value to PI Conversation ID
    In Adavanced Tab
    Checked Use Adapter specific Message attributes
    Checked  Fial if  Adapter specific Message attributes missing
    Checked JMS Message Correlation ID
    Additional Parameter
    DCJMSCorreleationID     String
    I have created user defined function ,  Not using BPM , i don't have correlation ID in target field data type
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/JMS", "DCJMSCorreleationID");
    return conf.put(key, messageId);
    please help to how to use UDF in mapping for mapping which field .
    Thanks ,
    Laxman.

    Hi Swetha ,
    Thanks for your response ,
    I created user defined function with one parameter , no input parmeter .
    My root node of IDOC as Structure type ,
    In UDF , i have not mapped the IDOC number
    public String CorrelationID(String messageId, Container container) throws StreamTransformationException{
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/JMS", "DCJMSCorreleationID");
    return conf.put(key, messageId);
    messageId  I need map in additonal parameter .
    Thanks ,
    Laxman.
    DCJMSCorreleationID     messageId

  • How to get R/3 IDoc number in XI (file- XI- R/3 IDoc)

    Hi all,
    I want to do something simple
    In my scenario file->XI (SP14)->R/3 IDoc, I have to return the list of IDoc numbers to the sender external application.
    So I use a BPM with steps: Receiver (from file adapter), Transformation (Grouping and Splitting) and Parallel Block.
    In this block I have a Mapping (one message to IDOC) and Send step (to Idoc adapter).
    Its works fine, but I have to know the R/3 IDoc number for each message in the block.
    I tried to find solution in this forum but I didn&#8217;t find anything useful. Can you help me with any idea or link?
    Regards,
    Emil.

    Hi all!
    I was a little bit surprised. Is my question is stupid or complex or &#8230;?
    I found something strange: In the error acknowledgment message in SOAP Header / Trace I saw that there was a runtime error:
    <Trace level="1" type="B" name="CL_XMS_MAIN-RITE_MESSAGE_LOG_TO_PERSIST" />
      <Trace level="1" type="T">Runtime exception return from pipeline processing! </Trace>
      <Trace level="1" type="T">Persist Message in Stopped State</Trace>
      <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_TO_PERSIST" />
      </SAP:Trace>
    The workflow status is still In Process.
    Any idea what happened?
    Regards,
    Emil.

  • Idoc Acknowledgements and BPM.

    All,
    My current requirement is to post an Idoc from my BPM, and get back the Idoc Acknowledgement. On the basis of the status field in the ALEAUDIT Idoc I need to determine the further course in my BPM.
    <u><b>Option 1:</b></u>
    1. In the Send Step of my BPM , I can request for Application Acknowledgement. I have done this and am able to receive the Acknowledgement and see the same against the Acknowledgement Msg ID in MONI. I am able to see the ALEAUDIT idoc triggered for my Send Step back to my BPM .
    The question in case we are to use this Option is , how do I access this AleAudit Idoc message in my BPM. As I want to have a switch, I need this to be populated in a container element of my BPM. Is this possible? Is this approach a correct one? Any Ideas?
    <u><b>Option 2</b></u>
    I can have a Send Step in my BPM to send the Idoc from XI to R3. this will be a normal Send Step with no Acknowledgements. I can also use a Receive Step in the BPM to receive the ALEAUDIT Idoc back to the BPM.
    This I guess can be done with a Receive determination where R3 is the sender and the AleAudit Idoc is the receive etc.
    Issues with this approach, I need to use a Correlation against the Send and Receive Step to send the Idoc and receive the AleAudit.
    1. What is the Correaltion that can be used?  Is there a standard correaltion. for such cases?I looked into the Idoc and the AleAudit but could' nt find a suitable Correlation Field.
    Do both these solutuons make sense? has anyone got a better approach?
    Any comments are appreciated.
    Regards
    Bhavesh
    PS: Have gone through the How to guide on Idoc Ack's and the blogs on SDN as well. But if still someone feels that there is a blog that is relevant to this issue, please do let me know if I have missed anything.

    Ha, now that was interesting question. Brains were rusty, relooked into that lookup and these are the fields of the IDXRRCVPOR we use,
    Used the RFC - RFC read table
    XI's Idoc Number is in Field IDOCNUMBER
    Original SAP IDoc Number is in Field SNDLAD.
    Code excerpt attached below.
    @ Henrique : Work's been crazy past few months. The blog is on my to do list, hopefully someday soon it should be out. My Apologies guys!
    Channel rfcChannel =     LookupService.getChannel(BusinessService, CommChannel);
    //As the call is being made to RFC, RFCAccessor is obtained.
    rfcAccessor = LookupService.getSystemAccessor(rfcChannel);
    rfcXML =
                        "<?xml version=\"1.0\" encoding=\"UTF-8\"?><ns0:RFC_READ_TABLE xmlns:ns0=\"urn:sap-com:document:sap:rfc:functions\"><DELIMITER/><NO_DATA/><QUERY_TABLE>IDXRCVPOR</QUERY_TABLE><ROWCOUNT/><ROWSKIPS/><DATA><item><WA/></item></DATA><FIELDS><item><FIELDNAME>SNDLAD</FIELDNAME><OFFSET/><LENGTH/><TYPE/><FIELDTEXT/></item></FIELDS><OPTIONS><item><TEXT>IDOCNUMBER EQ &apos;"
                             + SourceDocNum
                             + "&apos;</TEXT></item></OPTIONS></ns0:RFC_READ_TABLE>";
    inputStream = new ByteArrayInputStream(rfcXML.getBytes());
    XmlPayload inPayload = LookupService.getXmlPayload(inputStream);
    Payload outPayload = rfcAccessor.call(inPayload);
    responseStream = outPayload.getContent();
    DocumentBuilderFactory factory =DocumentBuilderFactory.newInstance();
    /* Create DOM structure from input XML */
    DocumentBuilder builder = factory.newDocumentBuilder();
    Document document = builder.parse(responseStream);
    NodeList list = document.getElementsByTagName("WA");
    for (int k = 0; k < list.getLength(); k++) {
        Node node = list.item(k);
       if (node != null) {
         node = node.getFirstChild();
                    if (node != null) {
              if (!node.getNodeValue().equals("")) {
                   OutputDocNum = node.getNodeValue();
    Regards
    Bhavesh

  • Two idocs with same idoc number in idx5

    We are using an idoc to file scenario where idocs are bundled using bpm and posted to ftp. here the issue is we are getting two idocs with same idoc number in idx5. due to which the file in ftp is getting overwritten.
    Could anyone suggest me what to do in this regard.

    Hi,
    >>>check your sender system is sending same IDoc twice ?
    if you send the same IDOC twice they both get different numbers as IDOC number is taken from the IDOC num range
    unless you're able to send the same IDOC twice with the same IDOC num somehow
    Regards,
    Michal Krawczyk

  • IDoc to File - IDoc number : Variable substitution in File Adapter

    Hi,
    I have an IDoc to File scenario. I want to use the IDoc Number as part of the target filename (using variable substitution) in the File Adapter. However, the target flat file does not have a field where I can store the IDOC number. I know the IDoc number is also stored in the message header ( under the IdocInbound tab), but is there any way I can access this in the variable substitution?
    Failing this, if I have the Idoc number in the target XML, is there any way I can skip it in the flat file generated?
    example...
    XML looks like this...
    <Root>
    <Record>
       <IdocNum>99999</IdocNum>
       <HeaderRecord>
       </HeaderRecord>
       <LineRecord>
       </LineRecord>
       <LineRecord>
       </LineRecord>
    </Record>
    </Root>
    But the flat file should be..
    HeaderRecord...
    LineRecord...
    LineRecord...
    Cheers
    Manish

    Hi Chandra,
    Thanks for this
    But this is standard stuff that is detailed in SAP help files (http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/frameset.htm)
    What I was looking for was in Sravya's blog (refer the earlier entry).
    Thanks anyway
    Cheers
    Manish

  • Get IDoc-number from flat IDoc using dynamic configuration

    Dear experts
    In an IDoc2File scenario I have added the IDoc-number to dynamic configuration using the folling code in an UDF:
    DynamicConfiguration conf = (DynamicConfiguration)
    container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey FileName = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/File","DOCNUM");
    conf.put(FileName, a);
    The information is stored in the SOAP message
    <SAP:DynamicConfiguration SOAP:mustUnderstand="1">
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="DOCNUM">0000000000012345</SAP:Record>
    </SAP:DynamicConfiguration>
    Can anybody tell me how I can access this information in the "variable substitution" section of the CC? Perhaps something like "message:docnum"?
    Additional information:
    Taking the IDoc-number from the payload using e.g. "payload:ORDERS05,1,IDOC,1,EDI_DC40,1,DOCNUM,1" does not work, since the XML-IDoc has been converted to an flat-IDoc.
    Thanks in advance for any good ideas
    Markus

    Dear Rodrigo and Sarvesh
    Thanks for your help so far! I applied your hints and now it is working fine.
    But now I have the following additional questions
    1.) My message mapping only maps the input IDoc to an output IDoc of the same type and structure. The MM is only required to process the UDF. Is there another, better solution to achieve my requirement that the IDoc-number shall be part of the filename?
    2.) In the CC you have the possibility to use temporary files (section "Processing", Option "Put File" = "Use Temporary File". I think this will not work with the given solution, will it?
    To possibly help somebody else or clarify the mechanism once again, I wrote down how my solution now looks like.
    My UDF in the message-mapping looks like this
    - Input = DOCNUM of IDoc, e.g. ORDERS05/IDOC/EDIDC/DOCNUM
    - Outpt = DOCNUM of IDoc, e.g. ORDERS05/IDOC/EDIDC/DOCNUM
    - UDF:
    public String putDynamicConfiguration(String docnum, Container container) throws StreamTransformationException{
    try
         DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
         DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
         String filename = "Prefix_" + docnum + ".txt";
         conf.put(key, filename);
         return docnum;
    catch (Exception e)
         return docnum;
    In the CC the settings are now as follows
    File Name Scheme = . -> only a dot or something else, because this field is obligatory, even if it is not used in this case.
    Variable substitution (...)
        Enable -> unchecked
    Adapter-Specific Message Attributes
        Use Adapter-Specific Message Attributes -> checked
        Fail If Adapter-Specific Message Attributes Missing -> checked
        File Name -> checked
        Directory, File Type, Temporary Name Scheme for Target File Name -> unchecked
    When I send an IDoc to PI and view the Adapte-Engine Version of the message (the SOAP-document, not the payload) I can find the Filename:
    <SAP:DynamicConfiguration SOAP:mustUnderstand="1">
    <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">Prefix_0000000000012345.txt</SAP:Record>
    </SAP:DynamicConfiguration>

  • Get IDoc number for IDoc generated through RBDMIDOC

    Hi All,
    I have a requirement where in I need to send Vendor master information through CREMAS to PI system. I am using change pointer and batch job to trigger RBDMIDOC and send IDocs.
    In case the IDoc fails a mail needs to be triggered to concerned person giving vendor number, Idoc number and date. Can anyone suggest any user exit/BADI where this can be done ??
    Note: system is 4.7C.

    Hi Chinmay
    I didn't knew you were in 4.7. Since you mentioned about the details of the workflow getting triggered, here are the options i can think of.
    In case of error it is triggering the standard task 00007989 which you can check in PFTC. This task calls the method ERRORPROCESS from Business Object IDOCAPPL. My suggestion here would be to create a subtype of BO IDOCAPPL in SWO1 transaction and add additional logic in method ERROR_PROCESS to send the mail. The details of the IDOC number and other things are available in the task container of TS00007989. But make sure you do it specific for your message type, as this will be triggered for all message types. And then change the BO and method reference in task 00007989 to point to your new BO method.
    Other options would be to delegate the BO IDOCAPPL to a new Z BO, and then modify the method IDOCAPPL. This way you don't have to change the task BO assignment, as it will implicitly use the Z BO method. May be you can get in touch with your Workflow consultant who can help you more on this.
    Regards
    Ranganath

  • Idoc number from personal number in ECC

    Hi All,
    i am new to idocs ,please tell me how to get the idoc number using the personal number.

    https://help.sap.com/saphelp_nw04/helpdata/en/d5/edf15ddcdc11d1890c0000e8216438/content.htm
    01. Go to T code We09 or WE10
    02.Give date range for Created on
    03.Give direction : Inbound or outbound
    04.Give basic Type/logical message/ Port etc  ( If you know - for faster search )
    05. Now next tab is Criteria for search in data record :--
    a. You need Segment name : find out segment name from we02 thru some existing / known Idoc .
    b. Field name : Fro WE02 can get this value
    C. Once you know Segment and field name of personal number - enter all three values and execute.
    You will get respective Idoc#
    Hope this helps. Let us  know if you need further input on this.
    Best Regards/Rajesh

Maybe you are looking for