Multiple idoc with condition in BPM

please let me know whether i need to go for BPM or not BPM
The actual scenario is
I will be receiving n no. of idocs including both idoc type PEXR2001 and IDCREF01(control idoc).
Then I need to collected all payment idoc PEXR2001 which will be having one control idoc
IDCREF01.  This will be grouped by checking
if IDCREF01-E1IDRH1-PAYRUNID equals to PEXR2001-E1IDRH1-PAYRUNID and
IDCREF01-E1IDRH1-PAYRUNDT equals to PEXR2001-E1IDRH1-PAYRUNDT
so for example I will be having 5 payment idoc and 1 control.  in this I need to sum the
value of field MOABETR which is in payment idoc. after this i need to check
if IDCREF01-E1IDRS1-SUM01 equals to PEXR2001-E1IDKU5-MOABETR.
if this condition is satisfied then i will be sending the file to both email adapter and
file adapter otherwise failed file will be sending only to email adaper.
I request to give detailed step in BPM if possible.

Hi Mughda,
How would i validate using createif node function as i also need to validate fields of all the segments of the same Idoc. ?
Thanks,
Amit

Similar Messages

  • Multiple IDocs to File using BPM

    Hi All,
    I have configured a scenario of multiple IDocs to file using BPM.  In this scenario while I am triggering IDoc from R/3 system it is sent to the external program.    I am getting in the status record of WE05 as IDoc is sent to an external system with status code 03. But I am unable to view the same message in moni of the XI system.
    Also I have checked the ALE settings on both the sender and receiver side and it is fine.
    Also in SM58 nothing is there in queue.
    Can anyone solve this issue of mine?
    Cheers,
    Neethu.

    Hi,
    in many cases it's a problem with the RFC connection. You should try an authorization test in SM59 of the R/3 system.
    This might also be useful:
    http://help.sap.com/saphelp_nw04s/helpdata/en/6a/e6194119d8f323e10000000a155106/frameset.htm
    Regards
    Patrick

  • Multiple Idoc to file without BPM

    Hi All,
    I am using xml [HTTP destination|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/30ea2fdf-f047-2a10-d3a2-955a634bde6b ] in ECC system to collect Idocs(say 100,200 etc) of particular type (say MATMAS05) and sending it as a single message with multiple Idoc noes for same message type to PI 7.1 system, In PI I need to create the single node for each IDoc on target side based on certain validations on the fields of various segments( with unbounded occurences ) occuring at various levels . Node should be created only if all the fields are validated,even if a single field fails validation node for that IDoc should not be created on target side.
    for example:
    >>MATMAS
      >>|_E1MARAM
         >> |_ MATNR
         >>| _E1MAKTM
           >>   |_MAKTX
    If there are 100 MATMAS nodes in the message and if MAKTX field of third E1MAKTM segment in 97 th IDOC node fails validation the node for this IDOC node should not be created on the target side..
    Currently I am trying to do it using UDF but due to performance point of view I do not want to execute Loop across various segments twice, once to validate the fields and second time to generate node.
    Can anybody help me in this ?
    Thanks,
    Amit

    Hi Mughda,
    How would i validate using createif node function as i also need to validate fields of all the segments of the same Idoc. ?
    Thanks,
    Amit

  • Create multiple idoc with multiple receivers based on value mapping table

    Hi,
    Scenario: 
    Step1 : sender sends a finance doc iin the form of an idoc. This idoc will have multiple line items based on profit center. Do determine the value of receiving comp code(header field) n receiving system(logical sys name) value mapping table has to be used.
    Solution so far: I can put an rfc lookup for fetching receiving comp code from mapping table with i/p paraameter as profit center . And split the incoming idoc based on comp code value by using split by value. Now I need your advise 2 take this further.
    Issue 1 : say the incoming idoc has 4  line seg wid 4 diff profit center
    Profit center.       Rec comp code.   Recv sys
    P1.                       C1.                        R1
    P2.                       C2.                        R1
    PS.                       C2.                        R1
    P3.                       C3.                        R2
    Nw using this info, I want 3 diff idocs to be created for each unique comp code.
    Idoc 1 : for C1 wid one line item + 1 for reconsilation ( to be generated additionally)
    Idoc2 : for C2 wid 2 line items + 1 for reconsilation
    Idoc 3: for C3 wid 1 line item + 1 for reconsilation
    Idoc 1 and idoc 2 shud be sent to R1.
    Idoc 3 shud be sent to R2.
    Kindly advise on this

    Hi experts,
    U all r pretty close, but let me put this more clearly.
    Step1: create multiple idocs based on unique comp code - I'm able to do this using rfc lookup n split by value. So I get 3 idocs each for c1, c2 n c3.
    Nw as per the values from value mapping table.
    Idoc for c1 contains 1 line seg.
    Idoc for c2 contains 2 line segs.
    N idoc for c3 contains 1 line seg.
    steps2 n 3,  where I do not have a confirmed solution yet n need ur advise.
    Step 2 : for each idoc generated I need 2 create n additional segment, mapping 4 which will be based on the values in the original segments for that idoc.
    In d above scenario, idoc for c1 contains 1 line seg, nw I want 2 add one more seg to it. The amount and pisting key values in this segment wud be calculated based on the values of the amount and posting key belonging to the original segment in this idoc.
    Similarly for idoc for c2 there are 2 segs, nw I need one more, means 3 in allm
    Hence for idoc for c3, 1 orig already present + 1 more. = total 2.
    Nw I need ur advise on how 2 generate this additional seg in each idocm
    Step 3: when all dese 3 idocs are generated, ( in this case itz 3, in real time it can be n), I need to find their respective receivers using rfc lookup n then based on the receiver send 2 resp recvng systm
    Nw how do I do this?
    Please explain with examples if possible 4 bettr understanding.
    u2020ђąu03B7kўu03C3u03C5 in advance.

  • UPDATE multiple columns with conditional SET parameters

    I have a procedure that updates multiple columns of a table using the procedure's parameter. Is it possible to have one update statement with conditional SET parameter?
    CREATE TABLE TEMP
    (POL_NUM NUMBER,
    OED DATE,
    TERM NUMBER,
    TRANS_CD CHAR(2));
    INSERT INTO TEMP VALUES (1, '1 AUG 2009', 12, 'NB');
    INSERT INTO TEMP VALUES (2, '4 AUG 2009', 12, 'XL');
    INSERT INTO TEMP VALUES (3, '2 AUG 2009', 12, 'RN');
    COMMIT;
    CREATE OR REPLACE PROCEDURE TMP_PROC (
      pPOL_NUM NUMBER,
      pOED IN DATE,
      pTERM IN NUMBER,
      pTRANS_CD CHAR2)
    AS
    BEGIN
      IF pOED IS NOT NULL THEN
        UPDATE TEMP SET OED = pOED WHERE POL_NUM = pPOL_NUM;
      END IF;
      IF pTERM IS NOT NULL THEN
        UPDATE TEMP SET TERM = pTERM WHERE POL_NUM = pPOL_NUM;
      END IF;
      IF pTRAN_CD IS NOT NULL THEN
        UPDATE TEMP SET TRANS_CD = pTRANS_CD WHERE POL_NUM = pPOL_NUM;
      END IF;
      COMMIT;
    EXCEPTION
      WHEN OTHERS THEN
         NULL;
    END;Is it possible to replace multiple IFs from the code to have only one UPDATE statement with condition that update the column only if the passed parameter is not null? In real scenario I have more than 3 columns and I don't want to write many IF blocks.
    Please help Gurus!!
    Edited by: Kuul13 on Sep 18, 2009 1:26 PM

    Hi,
    You certainly don't want to issue separate UPDATE statements for every column; that will be really inefficent.
    SQL has several ways to implement IF-THEN-ELSE logic. CASE is the most versatile, but NVL will do everything you need for this job. You can use one of those to set a column to itself (and therefore not really update that column) when appropriate.
    For example:
    CREATE OR REPLACE PROCEDURE TMP_PROC (
      pPOL_NUM   IN       NUMBER,
      pOED          IN   DATE,
      pTERM          IN   NUMBER,
      pTRANS_CD  IN       CHAR
    AS
    BEGIN
         UPDATE  temp
         SET     oed      = NVL (poed,       oed)
         ,     term      = NVL (pterm,       term)
         ,     trans_cd = NVL (ptrans_cd, trans_cd)
         WHERE     pol_num      = ppol_num;
      COMMIT;     -- Maybe
    END    tmp_proc;"EXCEPTION WHEN OTHERS THEN NULL" is almost always a bad idea. If there's an error, don't you want to know about it? Shouldn't you at least log a message in a warnings table or something?
    Think careflully about whether or not you want to COMMIT every time you call this procedure.
    Just as it's inefficient to issue a separate UPDATE statement for every column, it's also inefficient to issue a separate UPDATE statement for every row. If efficiency is important, it should be possible to UPDATE several rows in a single UPDATE statement, using NVL (or CASE, or COALESCE, or NULLIF, or NVL2, or ...).
    This was a very well-written question! Thanks for providing the CREATE TABLE and INSERT statements, and such a clear explanation.

  • Report for multiple IDOCs with multiple POs

    Hi,
    In our project PO goes out to vendor through EDI 850 and Outbound IDOC is generated for this.Some times its failed due to connection issue at vendors end. so sometimes  we need to send  PO nos and its related IDOC nos  to EDI team as per their request.I can get IDOC number for a particular PO from WE09.But that transaction is for single PO i belief.But sometimes there are  20-30 pos and if we want to search its related IDOC at a single time then how can i search this in SAP?Is there any standard SAP functionality or i have go custom report?

    you need to copy the idoc failed idoc numbers, and segment name in which your PO resides
    Go to table EDID4, pass Segment name and idoc numbers, you will find all related PO numbers in
    Application data column, please note this column is a merged column
    You will need to download it as unconverted Text , call in Excel -Text column and get the records
    There is no other easy way for this
    Thanks
    DD

  • Query of multiple counts with conditions or multiple querys

    I have this demo table
    create table qtyrtu
    rtunam varchar2(10) not null,
    entity varchar2(10) not null,
    linked number(3) not null
    Insert into qtyrtu values ('02vh1', 'zdvh', 100);
    Insert into qtyrtu values ('02vh2', 'zdvh', 0);
    Insert into qtyrtu values ('02eh1', 'zdvh', 0);
    Insert into qtyrtu values ('02sh1', 'stvh', 100);
    Insert into qtyrtu values ('02sh1', 'stvh', 0);
    Insert into qtyrtu values ('02sh1', 'stvh', 100);
    Insert into qtyrtu values ('02tx', 'zdch', 100);
    Insert into qtyrtu values ('02ta', 'zdch', 100);And my result expected would be the next one.
    Entity | Count(rtunam linked by 100) | Count (rtunam linked by 0)
    STVH    2   1
    ZDCH    2   0   
    ZDVH    1   2The problem is that I don't know how to query the 0, when I do my query(by column) it shows this:
    select entity, count(rtunam) from qtyrtu where linked = 100 group by entity order by entity asc;
    STVH    2
    ZDCH    2   
    ZDVH    1
    select entity, count(rtunam) from qtyrtu where linked = 0group by entity order by entity asc;
    STVH     1
    ZDVH     2And I need to show all the counts( even the 0)
    Regards

    Hi,
    Thanks for posting the sample data and the results; that really helps!
    Here's one way:
    SELECT    UPPER (entity)                    AS upper_entity
    ,       COUNT (CASE WHEN linked = 100 THEN 1 END)     AS cnt_100
    ,       COUNT (CASE WHEN linked = 0   THEN 1 END)     AS cnt_0
    FROM       qtyrtu
    GROUP BY  entity
    ;It looks like rtunam plays no role in this problem: is that right?
    You already know how to get the separate column results, using a WHERE clause to ignore certain rows, but you can't use a WHERE clause here, because to want to ignore different rows for the two COUNT columns. A CASE expression can be like a WHERE clause that applies only to one column.

  • Multiple IDOC to Multiple IDOC scenario without BPM steps????

    Hi
    Could you please give me the solution for this ???
    I want steps for sending all IDOCs at a time- ---"Multiple IDOC to Multiple IDOC scenario without using BPM".???
    thanks
    3nadh

    Hello,
    Refer the below, for certain details!
    /people/swaroopa.vishwanath/blog/2007/01/22/ale-configuration-for-pushing-idocs-from-sap-to-xi     ALE configuration for pushing idocs from SAP to XI
    /people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change     XI: IDOC bundling - the "trick" with the occurance change
    Regards,
    Jilan

  • Creation multiple idocs on creation of a Purchase order

    Hi all,
      I am having a requirement wherein if I create/change any purchase order with multiple Items in one system, I need to create multiple sales orders in the receiving system with each item. That is, the sending system should send multiple ORDERS idocs to the receiving system with each item as one IDoc and need to create a Sales order for each item in the receiving system.
      I am able to configure the systems in such a way that if I create a Purchase order with multiple items, it is sending one ORDERS idoc with multiple and henceforth, creating only one Sales order in the receipient system. But, not able to acheive the scenario I have mentioned above, i.e., creating multiple IDocs with one item each for the same purchase order.
      So, Can anybody know how to handle this scenario? Also, can you please let me know whether is there any standard procedure for handling this scenario?

    Hi Adithya,
    I too facing the same kind of requirement, can u please let me know how you achieved sending multiple idocs.
    Thanks,
    Kashif

  • BPM with conditional start not getting triggered

    Hi
    I have developed a BPM which collects a few IDocs with a correlation based on the message content.
    When triggering the BPM in Development, everything works as intended. (Messages are collected together based on the value of the correlation)
    After this we decided to transport the BPM to Test by using NWDI. The deployment was successful, but when we try to run the scenario, the message gets delivered successfully in the monitor, but no BPM process is being triggered.
    Audit log in monitor:
    I've tried the same with the BPM in Dev but there it works fine, when trying in Test or Production, the BPM isn't getting triggered. Same when trying to trigger the process through the WS Navigator or SoapUI.
    The endpoint url we use is always the: http://host:port/MessagingSystem/receive/JPR/XI
    I can see the process in the process repository (but due to a conditional start, I cannot start it from there with a test).
    Do you have any suggestions on how to troubleshoot this?
    I can see nothing in the NWA Logs / Developer Traces either.
    Our system is a PO 7.40 SP5.
    Thanks in advance.
    Best regards,
    Nicolas

    Hi Nick
    thanks for the quick reply.
    The runtime version of the BPM is indeed the same for DEV and TEST.
    The BPM Actions don't show anything unfortunately, so doesn't seem to have triggered anything.
    The user has the SAP_BPM_TRIGGER_EVENT role so it should be able to trigger the process.
    The NWA Logs don't show up anything besides:
    JPR successfully processed the message
    And the following logs for the BPM:
    Returned destination xxxx.com/collectlabel~bpm*1400504350735*0, type WSProvider to user xxxx
    I can see the BPM Service in running state on the Java Services/Applications as well, so I would think everything is alright.
    br,
    Nicolas

  • Collect Multiple IDOC(Single IDOC type) to single file using BPM

    Hi All,
    When i am generating multiple IDOC for the same message type, i am getting multiple payload for the same as a result i used to get multiple files generated in application server.
    Now if i use BPM only to collect multiple IDOC to a file then what all the steps that i need to follow for the same.
    Ex: I want to post 10 IDOC for a single IDOC type,, Now using BPM in XI i want to collect all the 10 IDOCs with multiple payload into one single message and then want to process this in XI to generate the file.
    It would be glad if anyone refer me a good step by step blog for the same.
    Thanks in advance,
    Jay

    Thanks a lot Abhisek.
      I have also got a blog explaining the exact thing. But in the blog the ID part was missing which is present in the link you have provided.
    I will be glad if you can through some light on the ID part,, however the IR part and the BPM part is now mostly okay to me.
    I will configure this today only,, and may seek your help for any huddle.
    Thanks a lot once again.
    Regards,
    Jay.

  • One src message to multiple IDocs without BPM?

    Hi guys!
    Is it possible to cerate multiple IDocs from one source incoming message without BPM?
    I tried the scenario, but I get following error:
    <SAP:Code area="OUTBINDING">CO_TXT_MMF_ENGINETYPE</SAP:Code>
    <SAP:Stack>Messages in multi-message format can only be sent to one Adapter Engine</SAP:Stack>
    Any ideas?
    Thanx a lot!
    Olian

    Hi
    Sorry my earlier link was with BPM.
    refer to this blog by Michal
    /people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change
    Regards,
    Kumar

  • Multiple Idocs to XI with exception handling.

    Hi,
    I m doing a scenario,sending multiple idocs to file via XI.while doing dis,i m using BPM.For the BPM part i m following the blog https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2034..but [original link is broken] [original link is broken] [original link is broken] [original link is broken] wen i check in SXMB_MONI,my message isn't successfully processed out f BPM.In this,exception is triggered at d beginning.and it always throw exception and message not successfully processed out f BPM.In the workflow it is showing error in the first step and remaining steps are compIeted.Here, i m throwing exception by the use f deadline branch.Can,anybody tell me how to handle dis exception/error?

    Hi Rajeev,
    I am using a loop with in a block inside the BPM inside which receive step and container element is used.In parallel to loop branch,i m using deadline and exception branch same as in blog 2034.i m using infinite loop wid time limit mentioned in the deadline branch.After coming out f dis block,i m using transformation step and den send step is used.When i check in graphical workflow,i m getting error in send step stating that an empty container element is used while sending.But,wen i m checking technical workflow,i m getting error in first step after the creation of workflow and workflow started messages in the log details.after which the exception occured is shown in the workflow system..
    Thanks,
    Anoop Garg

  • How to create multiple idocs based on complex condition

    HI Users,
    my scenario is jms(xml file) to idoc. for each file have multiple records for each record i need to create multiple idocs.
    source structure:
    <lineitem>
    <student sid="cid">456</student>
    <hreference>
    <reference rtype="number">123</reference>
    </hreference>
    <hreference>
    <reference rtype="number">789</reference>
    </hreference>
    <hreference>
    <reference rtype="char">147</reference>
    </hreference>
    now condition is One input message must create only one output message for each unique  rtype="number" and sid="cid" combination.
    for example
    1. rtype="number" and sid="cid" the value combination means 123456 for this one idoc
    2.  rtype="number" and sid="cid" the value combination means 789456 for this one idoc
    --> the below file shows with out sid="cid"
    <lineitem>
    <student sid="abc">456</student>
    <hreference>
    <reference rtype="number">123</reference>
    </hreference>
    <hreference>
    <reference rtype="number">789</reference>
    </hreference>
    <hreference>
    <reference rtype="number">147</reference>
    </hreference>
    in this case we have to consider only rtype="number" so here we need to create  3 idocs.
    Could anyone help me in this regard.
    Thanks in advance

    Hi Swathip,
    Change the occurence of the IDoc to "unbounded", so that multiple IDocs can get create
    Try with below logic
    If (SID = "CID")
    Then
         If(rtype = "number")
              concat(student,reference ) ---> removeContext ---> Idoc          
    Else
         rtype ---> removeContext ---> Idoc
    If combination of unique  student and reference can occur more than once in the XML, use sort command and splitByValue (Value Change)
    Edited by: chandra shekhar on Jul 3, 2011 12:53 PM

  • How to isolate error with a record/segment in IDOC with multiple records

    I have an IDOC with multiple records/segments (typically 1000 records/segments). Sometime XI can not process the IDOC because of some control characters in data.
    1. How can I pre-processed the IDOC to remove those control characters?
    Can I use XPATH expression/Java class to do it? How can I configure the XPATH expression/Java class in XI to pre-process the file?
    2. Until I have answer to 1st question. I would like to find out the error is exactly for which record? What configuration can I do in XI to isolate the error is with which record/segment in IDOC?
    Thanks in advance.

    Split the IDoc.
    with in the UDF, after the validations if every thing fine, pass as successful records to success_MT and pass it to target system using Branching in BPM.
    if errors found in the record, then store the error records in Hash table with in UDF, get the IDoc number, frame as a string and raise alert.
    U have to do this in the context of IDoc.
    If U wanna get the IDoc Number, Segment Name and field name for every failure, U can pass the expected error field name as constant to UDF, frame the sentence in the UDF like -> <b>IDoc 1234321 segment – SEG001 – field – FLD03 has a special character ‘*’</b>.
    If U wanna pass this string to source/target, U can do in error messages branch in BPM.
    U must use BPM for splitting the IDoc, since it is multi-mapping.
    reg.,
    Yallabandi.

Maybe you are looking for

  • Why is draw table empty after i import from memory id 'SAP_APPLICATION' ?

    Hello, I have the following data draw like draw. data intdraz like draz occurs 0 with header line. import draw           intdraz from memory id 'SAP_APPICATION' at this point draw table is empty and does not contain the information of the selected fi

  • Error occured When I migrated my APP from JSF1.1 to JSF1.2 in Tomcat6.X

    Recently, I accepted a work from my leader that migrate the exist web application based JSF from JSF1.1 to JSF1.2. Because JSF1.2 must be run in those web servers that implementsJSP2.1 I downloaded Tomcat6.X from apache and put jsf-impl.jar together

  • MFBF - issue with Planned quantity graeter than Backflush quantity

    Hi Experts, In MFBF, I am getting warning message no. RM124 - 'backflush qty > planned order qty'. I want to convert this message into Error Mesasge. How to convert this warning message into error message? The background is the backflush quantity fie

  • DLLs in Enterprise Application

    Hello! I'm working on enterprise application (EAR), which is deployed on Sun Java Application Server 9.1. Modules are run via Web Start, by using JNLP generated by Application Server. I want my app using some DLLs (jdic from https://jdic.dev.java.net

  • RG54GS & Nortel Contivity problems

    Hi Guys, I am having trouble in connecting to my work LAN via Nortel contivity client. If I plug a LAN cable into my toshibia Tecra laptop, I am able to start up the client and get into my works LAN. But via wireless I am unable to do so. I can start