Determine number of lines of multiline container in ccBPM

Hi guys,
during my process a loop over a multiline element and send each entry to SAP backend.
After shipment of the message the process waits for some time, to prevent problems caused by parallel messages in the backend.
At the moment I use a block in the "for each" mode. But with this solution the wait step is executed unnecessary, after sending the last message of the multiline container variable.
Is there a possibility to check the number of entries and solve this issue with a normal loop step and preventing the process for unnecessary wait step?
I search SDN for some information relating this issue, but without success.
Any help appreciated, thanks in advance
Kind regards
Jochen

Hi Shabarish,
thanks for helping.
You are right I want to know how many entries are in the multiline container.
I also thought about an export parameter in the transformation step where the multiline message is created.
In this parameter I could return the number of entries.
Maybe this would be an adequate approach for this issue.
Unfortunately I wasn´t able to evaluate such a export parameter, when I tried it last time.
I mentioned the issue in this [thread|;.
maybe you know how to solve this issue..?
kind regards
Jochen

Similar Messages

  • BPM: How to return the total number of lines in Multiline Container Element

    Hi all:
    I am trying to follow the following blog to do message splitting:
    /people/narendra.jain/blog/2005/12/30/various-multi-mappings-and-optimizing-their-implementation-in-integration-processes-bpm-in-xi
    In the blog, total number of messages for Message1 was returned to Count in Message 2.
    If I do not want to create message 2, if there any way to return total number lines in multiline elements ? Because this number need to be used to specify in loop condition:
    While Indxe != TotalNumberOfLines
    Thanks
    Liang

    Hi, Matias:
    For the loop block option, your answer is passing message count in different message type is best option !
    I really do not know why SAP does not deliver a build-in function to return the number of items in multiline element at run time ?
    Now the question for the second option: ForEach block:
    When I leave current line of block properties empty, the compile does not pass
    I have to input a another element (Var_Cur) in current line
    Inside my block, I have one send step, it will send Var_Dest[Index],  followed by a container operation step to increment Index by 1.
    With above setup, I compile it, compile passed, but it says:
    "Container Element Var_Cur in Step Block1 is initialized but not used"
    then I added another containter operation step in block:
    Var_Cur = Var_Dest[Index]
    I modified send step to send Var_Cur rather than Var_Dest.
    Up to now, I can compile it without any warnings.
    But when I send message to IE, the message pass pipe line, but it seems does not pass the BPE.
    When I go to SXI_CACHE, to check the return code for my Integration process is 0, means no error.
    But my message does not reach my target system.
    Where do you think I made wrong ?
    Thanks
    Liang

  • Determining number of lines in a File without loading it to memory

    hello guys,
    I'm just wondering if there is a way to know the number of lines in a file without having to load the file entirely into memory and count the lines.
    in my project i have a restriction that says that i'm not allowed to load into memory more than 10 KB. i have to read the file block by block, say ten lines at a time.
    I actually did the second point which is reading the file 10 lines at a time, but still the total number of lines is still hard coded.
    thank you for your help !
    I

    ralfph wrote:
    hello guys,
    I'm just wondering if there is a way to know the number of lines in a file without having to load the file entirely into memory and count the lines.
    in my project i have a restriction that says that i'm not allowed to load into memory more than 10 KB. i have to read the file block by block, say ten lines at a time.
    I actually did the second point which is reading the file 10 lines at a time, but still the total number of lines is still hard coded.
    thank you for your help !
    ISo just read a line at a time, increase a counter, and don't save the line. As long as no one line is longer than 10 kB, you're fine.
    If it's possible for a line to be longer than 10 kB, then you'll have to read into a byte[] or char[] and iterate over it looking for end of line characters.

  • Script to determine number of lines of text in a paragraph?

    I'm revisiting an issue I first posted here last summer, thanks to all who offered help, but I've not been able to sort it out.
    http://forums.adobe.com/thread/455526?tstart=0
    What I'm after is  a 'search function' to insert into a FindChangeByList.
    Jongware suggested the following - but when inserted into my list I can't get it to do anything - it doesn't throw up a Javascript error.
    app.findTextPreferences = NothingEnum.nothing;
    app.findTextPreferences.appliedParagraphStyle = "Callout_3";
    foundItems = app.activeDocument.findText();
    for (var i=foundItems.length-1; i>=0; i--)
      if (foundItems[i].paragraphs[0].lines == 2)
        foundItems[i].paragraphs[0].appliedParagraphStyle = "Callout_2";
      if (foundItems[i].paragraphs[0].lines == 1)
        foundItems[i].paragraphs[0].appliedParagraphStyle = "Callout_1";
    I regularly receive a 'word' document on which I run a 'FindChangeByList' which cleans up and formats the text with a number of GREP/text searches.
    One of the search lines converts a particluar string of text to a paragraph style "Callout_3" (the most common occurence of Callouts).
    This style applies a paragraph rule, above and below the line, to create a coloured block/band out of which said text is reveresed.
    The problem that I have is that the style (because of the paragraph rules), only works correctly if the paragraph has x3 lines of text.
    I have styles set up for every other eventuality - Callout_1 (for single line of text), Callout_2 (for x2 lines of text) etc.
    What I'm looking for is a script that can count the number of lines in the paragraph (once the "Callout_3" style has been applied) and then change the style accordingly to the number of lines in each paragraph/Callout.
    Any further thoughts?
    Steve

    Hi Steve!
    Well, I said it was untested ... Found two major errors. First one is also visible when you manually search for the style "Callout_3". Rather than marking each and every paragraph on its own, InDesign gathers as much as possible. Hence, just testing paragraph[0] would miss out all other paragraphs. Explicitly looping over all paragraphs per "found item" does work.
    The other one is sort of a "syntax" error. Merely testing "lines == 2" does not work -- but it doesn't give an error either! Apparently, it's okay to compare an object ("lines") to a number, even though it doesn't work. The property to check is "lines.length" -- that returns the number of lines for a paragraph.
    Putting it all together results in this script.
    'And now I shall test it,' said Wen. This time he twisted it gently to and fro. 'That si-si-si That simple-ple, eh eheh simple, eh?'
    ... And I tested it.
    app.findTextPreferences = NothingEnum.nothing;
    app.findTextPreferences.appliedParagraphStyle = "Callout_3";
    foundItems = app.activeDocument.findText();
    for (var i=foundItems.length-1; i>=0; i--)
    for (var j=0; j<foundItems[i].paragraphs.length; j++)
      if (foundItems[i].paragraphs[j].lines.length == 2)
       foundItems[i].paragraphs[j].appliedParagraphStyle = "Callout_2";
      if (foundItems[i].paragraphs[j].lines.length == 1)
       foundItems[i].paragraphs[j].appliedParagraphStyle = "Callout_1";

  • How to send message from multiline container to same webservice or bus. sys

    Hi All,
    I want to send message from multiline container to a syn web service sequentially.
    I am getting that multiline container after a transformations step (1: n mapping).
    where i dont known what will be the value for n (number of message in multiline container). This will vary; depend upon input message to BPM.
    Scenario is like this.
    1. Receive step
    2. Transfromation to 1: n
    3. Want to send message from multiline container to a web service (business service),default loop and block step doesn’t give desirable result.
    any help will be appreciable
    Regards,
    Adish

    Adish Jain wrote:>
    > where as, if I will use block, it will send the same message to multiple receivers which are present in multiline receiver container. So need to think in different manner.
    Not necessarily.
    When you use block step in ForEach mode, you can select the container variable from:
    - a receiver container;
    - an interface container;
    The line element can then be either a receiver or an interface.
    The problem is that for this to work, the interfaces need to be async (since they are to be used as containers) and hence you won't be able to make your scenario work.
    But again, explain why your scenario with loop step didn't work.
    The only gap here is how to determine the number of loops (defining the counter variable value). But that can be easily solved if you include a new message with occurrence 1 as a target message of your mapping and as a container in your bpm.
    This new message needs only 1 single field, that should be filled with the number of messages you've created in the mapping (you could use count standard function, f.ex.).
    In your bpm, make sure to pass this fields value into the counter container right after your transformation step.
    Regards,
    Henrique.

  • Receiver determination step in the BPM and multiline container

    i have made a file2file scenario where:
    there is a BPM,
    the BPM has a send step which contains a receive step,
    a transformation that mapps the incomin message to two messages(Split-messgae case),
    and then a FORK step which sends the two messges to through 2 SEND steps to the intended receiver services.
    It didnt work......and i followed a blog->  /people/sudharshan.aravamudan/blog/2005/12/01/illustration-of-multi-mapping-and-message-split-using-bpm-in-sap-exchange-infrastructure   ............... which suggested to have a
    "receiver-determination" step in the BPM before the SEND step.... it says that this
    "receiver-determination" step will put the message in a MULTILINE container..
    i m confused bout this step ........ can anybody explain.....
    please help

    HI,
    In receiver determination step selctthe multi line container element.in container editor create the one element with type as receiver and select the check box.
    A Receiver Determination step returns set of receivers configured for the output abs interfaces in the directory and puts it into receiver which is a multiline container receiver element
    Regards
    Chilla

  • "receiver-determination" step and multiline container

    i have made a file2file scenario where:
    there is a BPM,
    the BPM contains a receive step,
    a transformation that mapps the incomin message to two messages(Split-messgae case),
    and then a FORK step which sends the two messges to through 2 SEND steps to the intended receiver services.
    It didnt work......and i followed a blog-> /people/sudharshan.aravamudan/blog/2005/12/01/illustration-of-multi-mapping-and-message-split-using-bpm-in-sap-exchange-infrastructure ............... which suggested to have a
    "receiver-determination" step in the BPM before the SEND step.... it says that this
    "receiver-determination" step will put the message in a MULTILINE container..
    i m confused bout this step ........ can anybody explain.....
    please help

    Receiver Determination step will return all receivers that are configured in Integration Directory, for that particular message interface, having the BPM as the sender service.
    So, more than one receiver may return. Hence you need to define the receiver container as a multiline container.
    Here you go with explanations- for Receiver Determinations in BPM-
    http://help.sap.com/saphelp_nw04/helpdata/en/11/13283fd0ca8443e10000000a114084/content.htm

  • Determine the number of lines of textfield or floating field

    Hi,
    Is there a way to determine the number of lines of text in a textfield or in a floatingfield.
    My problem is that I'm creating a form with three tables(made of subforms) underneed each other that needs to be set to hidden when the total of rows is greater than 25.
    Now it would be easy to just count the rows but these rows can exist of multiple lines of text.
    The fields of my row are floating fields so when the text is bigger than the displayable width the text continous on a new line in the same row. So I need to know when this happens because now I can show only 24 rows.
    I tried counting the characters but this doesn't work, when there are a lot of 'i,j,l' or other small characters I can place 40 characters in my textfield, but when there are a lot of 'm,w' characters I can place only 22 characters in my field.
    I also tried to use xfa.layout.h(TextField1,"cm") to determine the height of the field, but it always retuns the value -1. I get the same -1 with the y or x - position.
    Does anybody have an idea how to solve this problem?
    Thanks in advance,
    RonnyR

    oops ... i got it thanks.
    code below -----
    for(var i=0; i <= s.length-1; i++)
    sCurrentLetter = s.substring(i,i+1);
    if (s.charCodeAt(i) == 13)
    // this is a line break

  • Multiline container in workflow ?

    How Can I display multiline container element in the Send Email Task in workflow.
    I have one activity called Create PO in forground. I have to send the PO number and materials number to the responsible agent(I have agents) by Email.
    can I do it in workflow. please let me know.

    Hi Amar,
    We don't have any direct way to refer multiline container in send mail. You can achieve this indirectly. You create a big string in workflow container. Then create a custom object from SW01. Create a method in this object. This method should take the multiline element as the input and concatenates the lines and returns the big string. Now the object is created, create a new task before send mail stpe. This task will be calling the custom object method which takes the multiline element and returns the string. Then use this string in the mail. Hope this helps.
    Thanks
    hari

  • Error in Workflow Multiline Container

    I'm facing with two error during implementing multiline container: "Agent determination for step '0000000002' failed" and "Result of agent resolution does not agree with agents of task".
    What I've done is:
    - "AGENTS" container created which refer to USR02-BNAME. In the properties tab, I checked the multiline check box. The contents of this container is coming from method in the main workflow. In the workflow log, I saw this container filled correctly. Its contain 2 line of user id.
    - I have subworkflow-2 that I set as multiline element in tab "other" and filled "AGENTS" container in that field. This subworkflow contain only one task that need to be executed by many user. The binding from previous subworkflow to this subworkflow-2 is: &AGENTS[&_WF_PARFOREACH_INDEX&]& --> &AGENTS1&
    "AGENTS1" is single container which refer to USR02-BNAME.
    - The binding from subworkflow-2 into task is: &AGENTS1& --> &AGENTS1&
    When I executing this workflow and checked in the workflow log "AGENTS1" container is filled with "000001" same value with container WfParForEach_Index.
    Hopefully out there can help me on this issue.

    Hello,
    I have the same problem. I've found this link http://mailman.mit.edu/pipermail/sap-wug/2008-March/028123.html where a possible solution is detailed.
    I have planned to  made test on it in next day.
    Regards,
    Corrado.

  • Fill Multiline container from multi records in source XML ?

    Hi,
    scenario: File-XI-RFC-File(BPM).
    Read company id from source file, call BAPI(company_get_detail) using RFC receiver adapter and then write response to another file.
    This works fine for one record(one RFC call to BAPI) using the BPM.
    Now, I would like to implement the process for multiple records using block(forEach) to make multiple RFC calls in BPM.
    <i>I understand that i have to create multiline container and map 1:n from input xml into that container.</i>  I need help here.
    BPM Steps:
    <b>Receive source file - fill multicontainer ?</b>
    Open block step (forEach)
       send sync RFC call
       save Response in another multiline container
    close block
    send step - write response to file(receiver)
    file structure:
    <ns0:MT_compRqst_multi xmlns:ns0="http://abc.com/FileToRFCBPM">
       <DT_record>
          <companyID>000001</companyID>
       </DT_record>
       <DT_record>
          <companyID>000002</companyID>
       </DT_record>
    </ns0:MT_compRqst_multi>

    Hi -
    For your requirement, as Bill implied, you need a multi-mapping (Transformation step) that maps your single message with multiple records to multiple, <i>complete</i> messages with one record each. 
    To get you started, basically, for the multi-mapping, create a message mapping with your source and target MTs the same (as the one you posted).    Then in "Messages" tab, for your Target message, change the occurance to "0..unbounded".   Now if you go back to the "Design" tab, you see that both your source and target messages have a "Messages/Messages1" wrapper around them.  In the end, the target message would look like the following and would correspond to your multi-line container element:
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
        <ns0:Message1>
            <ns0:MT_compRqst_multi xmlns:ns0="http://abc.com/FileToRFCBPM">
                <DT_record>
                    <companyID>000001</companyID>
                </DT_record>
            </ns0:MT_compRqst_multi>
            <ns0:MT_compRqst_multi xmlns:ns0="http://abc.com/FileToRFCBPM">
                <DT_record>
                    <companyID>000002</companyID>
                </DT_record>
            </ns0:MT_compRqst_multi>
        </ns0:Message1>
    </ns0:Messages>
    You'll need further steps - Interface Mapping, ccBPM (Transformation step, adjusting your Block settings, container element for multi-line element, etc.).   There are some blogs on multi-mapping within ccBPM that will help you - just do a search.
    Note that if your scenario has a large number of records, this approach is not performance friendly.
    Regards,
    Jin

  • How can i know the number of lines in field-symbol internal table

    how can i know the number of lines in field-symbol internal table

    Hi,
    If your field symbol has been defined as an internal table :
    Use std describe as
    Data: l type i.
    describe <fs> lines l.
    'l' will contain the number of lines as needed.
    FYI
    The size of this storage area in a field symbols depends on the number of table lines which is not fixed, but determined dynamically at runtime.
    Regards,
    Amit

  • Restriction on number of line items in an automatically generated document

    Hi all,
    As per my info, an accounting document must have a minimum of 2 line items to complete the document. At the same time an accounting document can have a maximum of 999 line items.
    My observation:-
    When I am posting depreciation using t-code AFAB, system is posting depreciation document (document type AF). While checking, I found that the system has posted around 16 document for a period.
    On further checking, I observed that the each document contains a max 100 line items.
    I am using SAP 4.7
    My Query:-
    a> Is there any way / place wherein we can restrict the maximum number of line items possible for a given docuemnt type or for all document types in the client?
    b> In case it is not possible to restrict the number of line items per document, what could be possible reason for the system behaviour wherein it is posting about 100 line items per document & thereafter starts a new document.
    Thanking you in advance
    Santosh K Agarwal

    Hi,
    I have been reading CIN. There I came across with a statement i.e. "There is restriction on no of line items to be in an Excise Invoice".
    where you read this i dont know
    but yes for outgoing excise invoice we can put limitation in sap cin
    as per incoming excise invoice i think no  limitation
    in path SPRO-tax on goods movemnet-India-basic setting-maintain excise registration here you can maintain this
    and yes this for india only for other country they may have different
    Regards
    Kailas ugale

  • How to get the number of lines of a FileReader

    I need to calculate the number of lines of a FileReader object. How can I do that ?

    I wrote the following some while ago. It assumes that a line is terminated by '\n' but it should be easy to adapt.
    import java.io.*;
    public class LineCounter
        public static int countLines(File file, String encoding) throws IOException
            int lineCount = 0;
            Reader reader = new InputStreamReader(new FileInputStream(file), encoding);
            char[] buffer = new char[4096];
            for (int charsRead = 0; (charsRead = reader.read(buffer)) >= 0;)
                for (int charIndex = 0; charIndex < charsRead ; charIndex++)
                    if (buffer[charIndex] == '\n')
                        lineCount++;
            reader.close();
            return lineCount;
        public static void main(String[] args)
            try
                File file = new File("/home/sabre/work/dev/maps/EUROPE.RIV");
                long startTime = System.currentTimeMillis();
                int lineCount = countLines(file, "UTF-8");
                double time =  (System.currentTimeMillis() - startTime) / 1000.0;
                System.out.println("File size = " + file.length() + " contains " + lineCount + " lines taking " + time);
            catch (Exception e)
                e.printStackTrace();
    }

  • Number of Line Items Issue at the time of Payroll posting

    Dear All,
    While creating a posting document (Payroll posting) for FI, the maximum number of line item allowed is 999 where as I have 1464 line items. I am creating only one document based on Company code and it is giving me the following error, which is because of number of line item;
    Acct determination not defined for trans. HRA 1002  in chart of accts AGCA
    Message no. F5113
    Diagnosis
    An automatic posting cannot be created because the account determination for transaction HRA with keys 1002  is not defined in chart of accounts AGCA.
    System Response
    The document cannot be posted.
    Procedure
    Depending on the type of processing, you can hold the document and post it later. If this is not possible and the error cannot be eliminated straightaway in customizing, you must leave processing and enter the document later.
    Procedure for the system administrator
    Correct the account determination for the specified transaction. Proceed
    Please tell me how to create least amount of documents for posting?
    Regards.

    SPRO> payroll >Reporting posting payroll result to Accoutning > Activities in Account system >Assigning Accounts >Assign Technical accounts
    Here eneter 1001 payroll clearing account and next enter 1002 same payroll clearing account. by doing this it will allow document splitting.

Maybe you are looking for