Need to split value based on "+"

Hi All,
I need to split my input value based on "+" symbol.
Sample Input Value : 4506407171+4506661488+4506661489+4506548333
Out put Value 1: 4506407171
Out put Value 2: 4506661488
Out put Value 3: 4506661489
Out put Value 4: 4506548333
Please suggest a UDF
Thanks & Regards,
Mahi.

Hi Mahi,
The + sign is a special character and needs to be escaped before splitting. Please see code below:
UDF: Context Type
Argument: inp        (String)
for(int a=0;a<inp.length;a++){
  String tmp[] = inp[a].split("\\+");
  for(int b=0;b<tmp.length;b++){
  result.addValue(tmp[b]);
Regards,
Mark

Similar Messages

  • Value Based Status Profile

    Dear Gurus,
    I want to use status profile for setting the document status.
    I have scenario in which i need to use value based status.
    That means a user 1 should be able to set the status if the Net Value of the sales order has reached A amount
    If the Net Value is above A and upto B User 2 should be able to set the status. and so on.
    I am aware of the authorization key in the status profile, but do not know how to link it to a value.
    Your reply in this matter is highly appreciated.
    Thanks
    KS

    Not sure what kind of status you want but if you are looking for value based  credit release then it can be done through maintain authorization option in credit management section of basic functions.

  • Split delivery based on partner type

    Hi Forum Colleagues
    I have a scenario where in I need to split delivery based on partner type at line item level.
    I am aware I need to look into copy control routine to be able to address this concern, however I am unable to find the solution.
    Could someone guide me.
    Regards
    Kalpesh
    Edited by: Kalpesh Mirchandani on Mar 31, 2009 7:07 AM

    Hi
    I am getting the following error
    Item 000002: delivery split due to conflicting header data (Function Y2: Partner Number: 5100001701 <-> 5100001154)
    I have created new delivery type in which I have checked "Delivery Split Part" which should ideally address this issue but it is not.
    I would like to create delivery for each line item having different partner number. I am unable to locate the routine in which I could include the logic to separate the deliveries based on line item.
    Pls guide.
    Regards
    Kalpesh
    Edited by: Kalpesh Mirchandani on Mar 31, 2009 2:01 PM
    Edited by: Kalpesh Mirchandani on Apr 1, 2009 6:59 AM

  • PTO Accruals - Ceiling value needs to be grade based

    Release 11i.10.2
    Details of the plan
    =============
    Accrual Formula = PTO_PAYROLL_BALANCE_CALCULATION
    Carry Over Formula = PTO_PAYROLL_CARRYOVER
    Payroll Balance Reset Date = 1st January
    Period of Ineligibility = 6 months
    Accrual Band
    Years of Service = 0-99
    Annual Rate = 30
    Maximum Carry Over = 15
    Requirement
    ========
    Ceiling is to be 60 for employees in Grade A1-A5 and for the rest there is not limit.
    Can someone please help me? The Standard form does not seem to fulfill the needs and when I open forumlas PTO_PAYROLL_BALANCE_CALCULATION, PTO_PAYROLL_CARRYOVER I am unable to understand exaclty which part of the code should be modified.
    Pls Help
    Regards
    Woqar

    To achieve your requirement, you need to change the accrual sub formula PTO_PAYROLL_PERIOD_ACCRUAL. Follow the below steps.
    A.Create a pl/sql function :
    1. Create a new Pl/Sql Function in similar lines with parameters as p_assignment_id, p_date_earned, p_plan_id and p_number_of_years;
    2. The new function should call the pl/sql function per_utility_functions.Get_Accrual_Band passing values of p_plan_id and p_number_of_years.
    3. After the above function call, invoke your custom procedure to get the accrual value based on grade (passing p_assignment_id and p_date_earned as parameters).
    4. call the procedure per_formula_functions.set_number to set the ceiling value.
    So overall your function should like this
    FUNCTION <function name>(p_assignment_id NUMBER,p_date_earned DATE,p_plan_id NUMBER, p_number_of_years NUMBER ) RETURN NUMBER IS
    < variables declaration>
    l_ceiling number;
    BEGIN
    l_return := per_utility_functions.Get_Accrual_Band(p_plan_id,p_number_of_years);
    IF l_return = 1 THEN
    return l_return;
    ELSE
    l_return := <your custom function>(p_assignment_id,p_date_earned,l_ceiling);
    l_error := per_formula_functions.set_number('CEILING' ,l_ceiling);
    END IF;
    END <function name>;
    l_error := per_formula_functions.set_number('CEILING' ,l_ceiling);
    B. Create a Formula Function with the above pl/sql function with p_assignment_id, p_date_earned, p_plan_id as context usages and p_number_of_years as parameter.
    C. Copy the Formula PTO_PAYROLL_PERIOD_ACCRUAL and replace the entry of Get_Accrual_Band with your custom formula function defined in step B.
    D. Copy the formula PTO_PAYROLL_BALANCE_CALCULATION and replace the entry of PTO_PAYROLL_PERIOD_ACCRUAL with your custom formula defined in step C.
    Hope this helps.
    Regards,
    Sharath

  • Based on select list, i need to retrieve values in other select list

    Hi,
    am new to apex using apex3.2, i need to retrieve values in select list based on the other select list vale with out refreshing page.
    ie i have region select list and country select list,in country corresponding region country must be display but with out refreshing page.
    can you please any body guide me.
    Regards
    shashidhar
    Edited by: 871140 on Jul 7, 2011 10:34 PM

    Hi,
    you can use cascading LOV for that, i which the other LOV field will be changing depending upon the selection of other value(which is in LOV).
    http://www.inside-oracle-apex.com/oracle-apex-4-0-cascading-lovsselect-lists/
    Regards,
    Mini
    Mark Answers Promptly

  • Return array value based on selection criteria

    I have one data field that holds text data similar to below:
    "Meeting Room 1 (Projector), Meeting Room 2 (Whiteboard), Meeting Room 3 (Video Conferencing)"
    "Meeting Room 3 (LCD Display), Meeting Room 1 (Video Conferencing), Meeting Room 2 (Whiteboard)"
    The meeting rooms are not always in the same order, I cant count on Meeting Room 1 being followed by Meeting Room 2 etc.
    My objective is to only return the meeting room that has the Whiteboard.
    I'm aware that I can use SPLIT to seperate the Meeting Rooms by the comma and place their components into an array.
    What I'm not sure how to do is return the meeting room with the Whiteboard when that could be [1] in the Array or [2] or [3] in the array.
    I need to return the array value based on its contents. Could someone help me 'search' the array created by the SPLIT command and always return that value with the word 'Whiteboard'

    This works
    whileprintingrecords;
    global stringvar x:='';
    global numbervar n:=1;
    While n <= Ubound(split('......, Meeting Room X (Whiteboard),..............', ",")) Do
    if split('..........., Meeting Room X (Whiteboard), ............', ",")[n] like '*Whiteboard*'
    then x:=split('.............., Meeting Room X (Whiteboard), ..............', ",")[n];
    n := n + 1;
    x;
    Just replace my string with your field.
    Ian

  • IN operator:- multiple value :- need to pass values in bundles

    Hello Everybody
    I am facing a strange problem . I got a requirement in which i need to pass around 55,000 values in the IN operator of the select query. It looks like that select query has a limitation of 2000 values. I planned to split the values based on the package of 2000 entries. this is working fine when we have just one IN operator.
    But how to make bundles when we have more than one like 2 or 3 IN operators with the values more than 2000 entries.
    eg.select vbeln matnr from vbap where vbeln in (1000, 2000, 3000, 4000......) and matnr in (11,22,33,44,...)
    and vbeln > 002234255 or matnr <> '55665.
    Please help me in breaking the query.
    Thanks in advance
    Regards,
    Khushboo

    Hi,
      You can do  one thing  .
    1)   First there is no limitation to have values  in Ranges  .
          but there  is limitation  when passing ranges to  SQL query  i.e in Operator  .
         Which will result in Dump  .
    2)  So in order to avoide that   you can have your values  in Ranges  .
    3) Then from SQl query select all raw data   whithout using ranges  .
    4) then now use that internal table in which you have selected raw data  .
    5) now you can use that ranges in loop endloop for internal table condition and filter those data .
      But see while comparing  fields  there should be compatibility  .
    tables : mara .
    TYPES  :  begin of w_mara ,
                      bismt type MARA-BISMT  ,
                    end of w_mara .
    TYPES : BEGIN OF W_BISMT  .
      INCLUDE STRUCTURE MARA .
      TYPES : END  OF W_BISMT  .
    data : it_mara type STANDARD   table OF W_MARA WITH HEADER LINE  .
    data : it_mara1 type STANDARD   table OF W_MARA WITH HEADER LINE  .
    DATA : IT_BISMT TYPE STANDARD TABLE OF W_BISMT  WITH HEADER LINE  .
    DATA : IT_BISMT1 TYPE STANDARD TABLE OF W_BISMT  WITH HEADER LINE  .
    RANGES : P_BISMT FOR  MARA-BISMT  .
      SELECT   BISMT FROM MARA
      INTO CORRESPONDING FIELDS OF TABLE  IT_MARA
      where bismt  is not null  .
    delete it_mara where bismt  is initial .
    SELECT  * FROM MARA
    INTO CORRESPONDING FIELDS
    OF TABLE IT_BISMT.
    LOOP AT IT_BISMT where bismt  in p_bismt   .
    move-corresponding  it_bismt to it_bismt1 .
    append it_bismt1 .
    clear it_bismt1 .
    ENDLOOP.
    Edited by: Rob Burbank on Sep 24, 2010 9:09 AM

  • Result may contain single string or comma separated need to split into rows

    Hi, All... I've searched through the forums and found plenty on splitting comma separated into rows; though I'm struggling applying it to my situation. I have data that looks like the below where I need to split a value into multiple rows if it should be but the same field in the table may also contain a string that should not be separated (indicated by the "Array" field being 0 or 1)...
    WITH t AS
    (SELECT 1 as array, '"Banana", "Apple", "Pear"' as str FROM dual union all
    SELECT 0, 'Fruit is delicious' FROM dual union all
    SELECT 0, 'So are vegetables' FROM dual union all
    SELECT 1, '"Bean", "Carrot", "Broccoli"' FROM dual union all
    SELECT 1, '"Apple", "Banana"' FROM dual)I've looked through many of the connect_by posts on the forum and I haven't come across one that splits a field if it should be but doesn't if it should not be... may have missed it because there are plenty of these requests on the forum!
    If you're feeling even more ambitious - the ultimate goal is to count the number of times a particular answer appears in an array - so notice the last portion of the data contains "Apple", "Banana"... the result would show:
    RESULT
    Banana             2
    Apple              2
    Pear               1
    Bean               1
    Carrot             1
    Broccoli           1
    Fruit is delicious
    So are vegetablesI can always sort them later based on other fields in the table - but the result above would be my ultimate goal!
    Any help is always appreciated. Thanks! 11g

    Hi,
    The examples you found should work for you. Just use a CASE expression to determine if str needs to be split or not, by looking at array.
    Here's one way:
    WITH     got_part_cnt     AS
         SELECT     array, str
         ,     CASE
                  WHEN  array = 0
                  THEN  1
    --              ELSE  1 + REGEXP_COUNT (str, '", "')     -- See note below
                  ELSE  1 + ( ( LENGTH (str)
                                  - LENGTH (REPLACE (str, '", "'))
                         / 4
              END          AS part_cnt
         FROM    t
    ,     cntr     AS
         SELECT  LEVEL     AS n
         FROM     (
                  SELECT  MAX (part_cnt)     AS max_part_cnt
                  FROM    got_part_cnt
         CONNECT BY     LEVEL     <= max_part_cnt
    ,     got_sub_str          AS
         SELECT     CASE
                  WHEN  p.array = 0
                  THEN  p.str
                  ELSE  REGEXP_SUBSTR ( p.str
                                   , '[^"]+'
                             , 1
                             , (2 * c.n) - 1
              END     AS sub_str
         FROM     got_part_cnt  p
         JOIN     cntr           c  ON  c.n <= p.part_cnt
    SELECT       sub_str
    ,       COUNT (*)     AS cnt
    FROM       got_sub_str
    GROUP BY  sub_str
    ORDER BY  cnt          DESC
    ,            sub_str
    {code}
    The only database at hand right now is Oracle 10.2, which doesn't have REGEXP_COUNT.  I had to use a complicated way of counting how many times '", "' occurs in str in order to test this in Oracle 10.  Since you have Oracle 11, you can un-comment the line that uses REGEXP_COUNT in the first CASE expression, and remove the alternate ELSE clause (that is, the next 5 lines, up to END).
    To make sure that this query is really paying attention to array, I added this row to the sample data:
    {code}
    SELECT 0, '"Bean", "Carrot", "Broccoli"' FROM dual union all
    {code}
    Even though str looks just like a delimited list, array=0 tells the query not to split it, so it produces these results:
    {code}
    SUB_STR                               CNT
    Apple                                   2
    Banana                                  2
    "Bean", "Carrot", "Broccoli"            1
    Bean                                    1
    Broccoli                                1
    Carrot                                  1
    Fruit is delicious                      1
    Pear                                    1
    So are vegetables                       1
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Need to restrict values in F4 help for Batch Characteristic

    Hi,
    I need to restrict values in F4 Help for a batch characteristic based on values entered for another characteristic. I could not find any BADI or Exit for this purpose. There is a BADI CACL_VALUE which is triggered after an entry is selected from dropdown list but nothing when we press F4. I thought of using Object Dependency but I need to write a programming logic for the requirement. Please let me know if there is any way to write program in Object Dependency or any other way for this requirement.
    Regards,
    Nikhil

    Hi nikhil simha,
    first of all, find out which search help is called.
    [Hierarchy of the Search Help Call|http://help.sap.com/saphelp_nw70/helpdata/en/0b/32e9b798da11d295b800a0c929b3c3/frameset.htm]
    may help you.
    If you know the search help, you may enhance it, but first of all you should check the where-used-list and make sure that the search help shows the requested behavior only in the context where you want it to.
    If it is your own program, you may be better off to create your own search help and define the triggering fields as search help interface input fields. Then you can use the values to filter results.
    Regards
    Clemens

  • How to split Value in a field while importing

    Hi,
    I want to split Value in Field and map it 2 target Field.
    Suppose Street field having values with House number and street name ,need to split  at House Number and street name and map it 2 fields
    EX : 1123 Dhuram Ave:    Need to split 1123 and Dhuram Ave ,need to map it to 2 target field.
    Here I don't have any delimeter in the field Value.
    Please help on this.
    Thanks,
    Madhu
    Edited by: Madhusudhan Honnappa on Nov 30, 2010 5:19 PM

    Hello.  I'm assuming this is a custom import as typically, standard extractors would have the house number and street already seperated into unique fields.  Here is a quick routine I tried out that would split the field.  Only thing I would add is that if writing this from scratch you would want to check that the first character is numeric and also that all characters before the space are numeric.  This routine assumes that the field will be like xx yy  where xx = house number and yy is the street.  Mainly, it would assume anything before the first space is the house number and anything after is the street.
    YLEN = STRLEN( YYINPUT ).
    YTIMES = 0.
    DO YLEN TIMES.
       IF YYINPUT+YTIMES(1) = SPACE.
          YOFFSET = YTIMES.
          "House Number" = YYINPUT(YOFFSET).
          YOFFSET = YTIMES + 1.
          "Street" = YYINPUT+YOFFSET.
          EXIT.
       ENDIF.
       YTIMES = YTIMES + 1.
    ENDDO.
    I'm sure there are many ways to go about this and may be some standard FMs you can call.  I just like trying to write it first to get a better understanding.  Not sure if this quick example will give you exactly what you need, but hopefully will at least give you a place to start.
    Thanks

  • Split valuation based on stor. loc.

    Dear Guru,
    Please guide me how may I configure split valuation based on stor. loc. My company in multi level marketing (MLM). We have stor at Brunei as well. Our business set different price if any stocks parked at Brunei stor. loc.
    Exp: Material A - RM1 at M'sia stor loc.
    - if this material transfered to Brunei branch, it should calculate as RM1.50
    - so stor. loc. should shows different valuation
    I need to configure this for existing material. Bus. use PO, GR & IR for this procurement.Please assist me guru.
    rgds,
    nantha

    Hi,
    Valuation category is used if you want to have a split valuation i.e. you have an option of differentiating partial stocks of material according to particular criteria & handling them differently regarding valuation within a plant.
    Why Required? : 1)Your valuation of  Brunei & M'sia may be different
    Following configuration reqd.
    1)In global setting we have to define Valuation category( Say storage Location) & Valuation type( Brunei & M'sia
    2) Active split valuation in MM
    3) Assign valuation type to category in customizing
    5) In Material Master enter valuation category in accounting view & choose price control V
    6) Extend Material Master view for both valuation type
    7) valuation category to be active /assign for plant
    8) In local definition Define Valuation category to Valuation area.
    Then for every transaction (Valuation relevant) may be GR, GI, and Phy. Inventory you must mention valuation type during transaction to get your material valuated separately.
    By this u will able to map your requireemnt & able to valuate diffrently.
    Vivek

  • Problem in populating lookup values based on the lookup query from database

    HI all
    I have problem of population look-up values based on look-up query
    I am giving the details what i am trying
    I need to populate the values from the UD_LDAP_USR table into the field of UD_USRGRPC_NisNetTriple of type lookup
    i planned to set the properties of lookup as like this
    look up query as select UD_LDAP_USR_COMMON_NAME as NisNetTriple from UD_LDAP_USR
    ColumnNames as UD_LDAP_USR_COMMON_NAME
    Column captions as UD_LDAP_USR_COMMON_NAME
    Column width as 30
    Lookup Column Name as UD_LDAP_USR_COMMON_NAME
    But when i try to add ColumnName as wht i mentioned above i m getting invalid property exception,update failed
    I am not sure about that are we able to use other Connector table prefix with UD into the another processFrom
    Let me give update on this issue
    Urgent,struck my work here
    thanks
    Nagaraj

    Thanks for the reply raghav
    I tried but it was not working
    I gave like what u specified but no use
    It is throwing exception like set look-up query for the field
    Any one help me out on this issue
    Edited by: Nagaraju Chowdary on Jan 21, 2013 3:41 AM
    Edited by: Nagaraju Chowdary on Jan 21, 2013 3:42 AM

  • Timestamp data type on S[range C on E] constant value-based range windows

    Hello,
    My questiong is about how can we use timestamp value on S[range C on E] constant value-based range windows.
    I have a LotEvent which i should collect and sum lastQty data for last ten minutes of market time (sendDate)
    A normal [range 600] query does not work for me because i would like to use the exact time which data has been generated by the market (sendDate).
    Here is the event;
    public class LotEvent{
         private Double totalQty;
         private float lastQty;
         private String symbol;
         private String messageType;
         private Integer dataInterval;
         private String sendDate;
    send date is always in "MM-dd-yyyy HH:mm:ss" format.
    I have tried to use the following query but this gives an error;
    Invalid statement: "select symbol, sum(lastQty) as lastQty, 10 AS dataInterval
    +from lotInputChannel [range INTERVAL "0 0:0:15.0" DAY TO SECOND on >>sendDate<<]+
    group by symbol"
    Cause: Datatype char is not valid for value based windows
    Action: Use a valid datatype for value based windows>
    Here is the CQL;
    <?xml version="1.0" encoding="UTF-8"?>
    <wlevs:config xmlns:wlevs="http://www.bea.com/ns/wlevs/config/application">
    <processor>
    <name>lotProcTenMin</name>
    <rules>
         <query id="tenMin"> <![CDATA[select symbol, sum(lastQty) as lastQty, 10 AS dataInterval 
                from lotInputChannel [range INTERVAL "0 00:10:00.0" DAY TO SECOND on sendDate]
    group by symbol]]> </query>
    </rules>
    </processor>
    </wlevs:config>
    i have tried this cql after changing the sendDate data type to long which is the time in milliseconds value but it did not work.
    select symbol, sum(lastQty) as lastQty, 10 AS dataInterval
    from lotInputChannel [range INTERVAL "0 00:10:00.0" DAY TO SECOND on to_timestamp(sendDate)]
    group by symbol
    The query above does not work also when sendDate is a String in "MM-dd-yyyy HH:mm:ss" format
    At last i tried the following query with sendDate as time in milliseconds (long) value. It works! but i still would like to know how to use timestamp in S[range C on E] queries
    select symbol, sum(lastQty) as lastQty, 10 AS dataInterval
    from lotInputChannel [range *600000* on sendDate]
    group by symbol
    public class LotEvent{
         private Double totalQty;
         private float lastQty;
         private String symbol;
         private String messageType;
         private Integer dataInterval;
         private long sendDate;
    Could anybody please help me with this issue?
    Edited by: user8830791 on 01-Aug-2011 06:39

    It seems that you should configure the channel "lotInputChannel" as an application timestamped channel.
    You can do that as follows -
    - Have "sendDate" as a long and let its unit be milliseconds
    - Use the following child elements of <channel> for the "lotInputChannel"
    <wlevs:application-timestamped is-total-order="true">
    <wlevs:expression>sendDate*1000*1000</wlevs:expression>
    </wlevs:application-timestamped>
    The multiplication by 10^6 is required since the units need to be converted into nanos
    With this, you could use the query -
    select symbol, sum(lastQty) as lastQty, 10 AS dataInterval
    from lotInputChannel [range 10 minutes]
    group by symbol
    Of course, for the above to work, a requirement is that the value of "sendDate" is non-decreasing.
    That is if e1 is before e2 in the "lotInputChannel" then e1.sendDate <= e2.sendDate
    Edited by: Anand Srinivasan on Aug 2, 2011 6:57 AM

  • BAPI function module to get condition type and its values based on delivery number?

    Hi All,
    I would like to have the BAPI function module to get condition type value based on delivery number before invoice is created.please provide detail program for as a reference .please reply as soon as possible its urgent.
    Regards,
    saaikumar.

    If you haven't already, you may first need to search via the SAP transaction "BAPI" in the area this is applicable to.  Failing that I do hope you get an answer.

  • Calculate Average value based on Day ??

    Hello,
    I am trying to calculate the Average value based on a day. The data is presented as follows...
    Day          SOCount
    Mon                34
    Mon                 56
    Mon                 67
    Tues               24
    Tues               25
    Tues               23
    Weds              45
    Weds              69
    The issue im having is that the Day column needs to be grouped first and the SOCount sumed together. Then the Average SO Count needs to be calculate based on this.
    Thanks

    Thanks for the reply,
    The solution you have provided only gives me the average of the count of the SO Count, not the actual average of all the values added together then  divided by the count..
    The report i am creating only has charts in it. So i am trying to create a chart showing the
    Average Sale Order Value by day.
    I should have metioned this from the start, sorry.
    Is it possible to do ?
    Edited by: davitali on Nov 4, 2011 6:32 AM

Maybe you are looking for

  • Error while opening the EXCEL Sheet from a Report Program

    Hi All, I am getting an error saying 'SYLK: File Format is not valid' when my program is trying to open an excel sheet. I am using the function module WS_EXCEL to download it to excel sheet. Following is the code: Excel download types: begin of t_exc

  • Nokia N95 - Faulty ?

    Hi Everyone I am new here... I dont know if this post is in the right place.. but my question is I have a Nokia N95 which is N95 RM-159 v21.0.016 Well the problem, I have is when I switch my Nokia N95 on... The Keypad lights will show up.. after the

  • How to test AV transmission on one PC

    Problem: I tried to run the AVTransmit2.java and AVReceive2.java (from sun website (JMF solutions)) on the same PC with the follwing commands. java AVTransmit2 vfw://0 127.0.0.1 2020 (1st console) --> The RTP session starts smoothly and starts transm

  • Order item authorization object

    Hi all I am working with service orders in CRM 4.0. When I create a service order with several items, each of these items is assigned to a different user, so that he can solve it. I would like to know if there is a standard way to allow users editing

  • Capabilities of Oracle BPEL Process manager

    Please help with the following small queries : 1)Capabilities of Oracle BPEL Process manager ? 2)Integration of Oracle BPEL Process manager and Oracle Business Rules ? 3)Integration of Oracle BPEL Process manager and OPA ? Edited by: user613889 on Ju