Second occurences

Hi Nimrod,
Thanks for your reply.
Source element of my idoc occurs n times. target is 0..1
i need to pass only second occurences.
Example:
IDOC E1MARAEXTRT-FIELD1 HAVE 2 OCCURENCES.
E1MARAEXTRT[01]-FIELD1- vALUE
E1MARAEXTRT[02]-FIELD1- DESCRIPTION.
I NEED TO PASS ONLY SECOND OCCURENCES FROM SOURCE TO TARGET.
SO SOURCE I HAVE TAKEN E1MARAEXTRT.TARGET IS 0..1. i think i have to write 1 user defined function and return a second occurences to target.
but if i map E1MARAEXTRT FOR SOURCE, I HAVE ENTERED THE VALUE 2 TIMES IN FIELD1(Duplicate subtree in message mapping).but the value not came to E1MARAEXTRT.MY USER FUNTION RETURNS NULL. IF I MAP fIELD1 AS SOURCE TWO VALUES ARE COMING.
please suggest me.

Ok, This is a bit clearer.
you want to send <u>only the Description item</u> from the source message.
question:
1)Is it possible to have more then 2 items like and would and will you need them as well?:
E1MARAEXTRT[01]-FIELD1- vALUE
E1MARAEXTRT[02]-FIELD1- DESCRIPTION.
<b>E1MARAEXTRT[03]-FIELD1- BLABLABLA</b>
2)Is the <b>DESCRIPTION</b> you wrote is a name of a segment ?is it a visible value that can be used for the mapping?
You can try to use the graphical\own java function mapping to one of  the following actions:
- concatenate the two fields into one and map them to the target field (decide what you wanna do with the value prefix..)
-write a java mapping program or XSLT to map the desired node with condition on the number of nodes.
Don't give up.
Nimrod

Similar Messages

  • REGEXP_REPLACE issue/bug - replaces only every second occurence

    Hi All
    I am using
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE     10.2.0.1.0     Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    I need a regular expression to rename a variable in a mathematical formula, when testing my code I discovered that if the variable was repeated right after itself only one occurence was replaced. I need to only replace whole words as some variables can be a subset of a longer variable name, and variable names can have underscores in them.
    Below is an example of what happens.
    Can someone please tell me why this happens? Example code is:
    SELECT REGEXP_REPLACE('ab+ab+ab+ab+ab+ab+ab+abc+abc+ab', '(\W|^)ab(\W|$)' , '\1xy\2',1,0,'i') from DUAL;
    The regular expression matches all 'ab' with a non alpha character or beginning line before and a non alpha or end of line at the end.
    I then replace the 'ab' with 'xy' and keep the original non alpha on either side. What happens is that only every second occurence is replaced.
    If I place a space after every '+' then it replaces all occurences. (Obviously this is a user field in a table of mathematical formulas so I cannot expect the user to worry about this problem.)
    I believe it may be due to the fact the pointer in finding all occurence is moved incorrectly and it does not find the match immediately after.
    Can someone please explain this? Or am I missing something in my example.
    Thanks
    Dudley

    Is this what you require? I changed your query a bit.
    SQL> SELECT REGEXP_REPLACE ('ab+ab+ab+ab+ab+ab+ab+abc+abc+ab',
      2                         '(\W|^)ab(\W|$)',
      3                         '\1xy\2',
      4                         1,
      5                         0,
      6                         'i'
      7                        )
      8    FROM DUAL;
    REGEXP_REPLACE('AB+AB+AB+AB+AB+
    xy+ab+xy+ab+xy+ab+xy+abc+abc+xy
    1 row selected.
    SQL>
    SQL> SELECT REGEXP_REPLACE ('ab+ab+ab+ab+ab+ab+ab+abc+abc+ab',
      2                         '(ab)(\W|$)',
      3                         'xy\2',
      4                         1,
      5                         0,
      6                         'i'
      7                        )
      8    FROM DUAL;
    REGEXP_REPLACE('AB+AB+AB+AB+AB+
    xy+xy+xy+xy+xy+xy+xy+abc+abc+xy
    1 row selected.
    SQL> -- checking data with white spaces
    SQL> SELECT REGEXP_REPLACE ('ab + ab + ab + ab + ab + ab + ab + abc + abc + ab',
      2                         '(ab)(\W|$)',
      3                         'xy\2',
      4                         1,
      5                         0,
      6                         'i'
      7                        )
      8    FROM DUAL;
    REGEXP_REPLACE('AB+AB+AB+AB+AB+AB+AB+ABC+ABC+AB',
    xy + xy + xy + xy + xy + xy + xy + abc + abc + xy
    1 row selected.
    SQL> Regards,
    Jo

  • Map the second occurrence of IDOC

    Hi All,
            i have been facing problem to map the second occurences of IDOC to target field.Ex:IDOC[02]-field1.
    In the mapping for source i have specifed IDOC and generated advanced used defined function and mapped to target field. But i have entered the value in field1 ex: field1. the values not came in IDOC.i have checked in DISPLAY Queue also.if i map field1 i have received these values. But field1 contains occurences of 0..1. so i am getting error in used defined funtion.
         Please guide me.

    Ok, This is a bit clearer.
    you want to send <u>only the Description item</u> from the source message.
    question:
    1)Is it possible to have more then 2 items like and would and will you need them as well?:
    E1MARAEXTRT[01]-FIELD1- vALUE
    E1MARAEXTRT[02]-FIELD1- DESCRIPTION.
    <b>E1MARAEXTRT[03]-FIELD1- BLABLABLA</b>
    2)Is the <b>DESCRIPTION</b> you wrote is a name of a segment ?is it a visible value that can be used for the mapping?
    You can try to use the graphical\own java function mapping to one of  the following actions:
    - concatenate the two fields into one and map them to the target field (decide what you wanna do with the value prefix..)
    -write a java mapping program or XSLT to map the desired node with condition on the number of nodes.
    Don't give up.
    Nimrod

  • Find the IDOC occurences?

    Hi,
       i have a problem to find the second the occurences of IDOC value.
    Ex: E1BPE1MATHEAD[01]-field.
         E1BPE1MATHEAD[02]-field.
    i need to pass from source to target only a Second OCCURENCE.E1BPE1MATHEAD[02]-field in mapping. 
           so please tell me how to find second occurences of idoc in message mapping and how to map it?

    Hi Suresh,
    Create a java function with Cache Type "Context".
    with One Argument(say a) and a Result(sau result).
    Inside the function use ResultList functions
    result.addSuppress(); (this will supress the occurence)
    and
    result.addValue(a[0]); (this will add the occurence)
    to add or supress the occurences of the incoming string array(E1BPE1MATHEAD in this case).
    in this case when you need 2nd instance, you need to
    do result.addSuppress() only once in your code
    and to add the occurance do result.addValue(a[0]).
    do the following mapping
    E1BPE1MATHEAD -> your Function name -> Target
    E1BPE1MATHEAD-field -> Target-field
    for additional help go to the link below
    http://help.sap.com/saphelp_nw04/helpdata/en/f8/2857cbc374da48993c8eb7d3c8c87a/frameset.htm
    Regards,
    Vijay

  • RecordSet Structure Sequence Variable in JMS like in File Adapter

    Hi all,
    We are having some problems trying to find how to implement the functionality of the variable recordset structure in a JMS adapter.
    We do have a structure with this form:
    HR - data
    AR - data
    AR - data
    HR - data
    The two first chars are the keyfield, and our comm channel is just ignoring the second occurence of the Header (HR).
    In a File adapter, we would use the Recordset Sequence = Variable parameter but, is there anything similar for the JMS adapter?
    Thanks in advance, Iñaki.

    Hi Kamesh,
    I believe it's a namespace issue, pls check namespace of your consumed message and one used in your transformation..should match.
    Test your xslt separately (by including correct namespaces,especially in tag <element1> ... source in ur xslt)
    Thanks,
    Faiz

  • Need to display data from one group while in another repeating group

    I have a repeating group in my .rft file which displays line level data that has a quote number in it.
    At the end of this repeating group I need to display the total for the quote number but these values are in another group that's within a differnt group higher up in the XML tree. Both of the groups have quote number so there is a link between the two. How do I do this? When I add the "higher up" repeating group within the current group I can't get any data to show. Any help would be appreciated.
    Kind Regards

    Here's the data, I do know how to to move up the tree like a file system but I think my problem is I need to move up the tree and repeat based on the value (quote number) of the lower node.
    For instance for each quote number in repeating group G_FORX_OPS_QTE_ORDER_LINES loop through the occurances of same quote number in G_OPPCAT_BREAKDOWN so I can get a total of the fields by quote number
    This is overly simplified but it would be like this
    <?for-each-group:G_FORX_OPS_QTE_ORDER_LINES;QUOTE_NUMBER?>
    quote number 1428
    various line level data....
    various line level data....
    etc....
    -- Open loop to get data from other group (Only get data for quote 1428!!)
    <?for-each-group:/FORX_AS_OPPOR/LIST_G_OPPORTUNITY_SHEET/G_OPPORTUNITY_ID/LIST_G_OPPCAT_BREAKDOWN/G_OPPCAT_BREAKDOWN;./QUOTE_NUMBER1?>
    Total For Quote 1428
    Billing Class
    BILLABLE: Billable total in dollars
    INTERNAL: Internal total in dollars
    <?end for-each-group?>
    <!-- Generated by Oracle Reports version 6.0.8.26.0
    -->
    - <FORX_AS_OPPOR>
    - <LIST_G_OPPORTUNITY_SHEET>
    - <G_OPPORTUNITY_ID>
    <COMMENTS1>Opportunity Includes Quote Number(s): 1428-2 1443-1 1444-1 Order Number(s): 159038-10 159044-3</COMMENTS1>
    <CUSTOMER_ID>1183</CUSTOMER_ID>
    <UPDATED_BY>CTYNER</UPDATED_BY>
    <DEPOSITS>5704.68</DEPOSITS>
    <OPPORTUNITY_ID>1000216</OPPORTUNITY_ID>
    <OPPORTUNITY_NAME>1000216:UAT DEMO</OPPORTUNITY_NAME>
    <CUSTOMER_NUMBER>103736</CUSTOMER_NUMBER>
    <ENTITY>FSG</ENTITY>
    <SOLD_TO>ALLSTATE INSURANCE COMPANY</SOLD_TO>
    <CONTRACT_ID>S620_N</CONTRACT_ID>
    <SALESREP_ID>2239</SALESREP_ID>
    <SALES_REP_NAME>Conley, Michael</SALES_REP_NAME>
    <ORDER_ACCEPTANCE>Skokie</ORDER_ACCEPTANCE>
    <BOOKED_COUNT>2</BOOKED_COUNT>
    <TERRITORY_NAME>Enterprise - Enterprise</TERRITORY_NAME>
    - <LIST_G_OPPCAT_BREAKDOWN>
    - <G_OPPCAT_BREAKDOWN>
    <QUOTE_NUMBER1>1428</QUOTE_NUMBER1> First Occurence of 1428
    <INT_ITM_TYPES>HARDWARE</INT_ITM_TYPES>
    <OPPORTUNITY_ID3>1000216</OPPORTUNITY_ID3>
    <INT_BILLING_CLASS>BILLABLE</INT_BILLING_CLASS>
    <SUM_ITM_COUNT>5</SUM_ITM_COUNT>
    <SUM_ITM_PRICE>151500.4</SUM_ITM_PRICE>
    <SUM_ITM_COST>1688</SUM_ITM_COST>
    <SUM_ITM_GPM>149812.4</SUM_ITM_GPM>
    <SUM_ITM_MARKUP>88.7514218009478672985781990521327014218</SUM_ITM_MARKUP>
    </G_OPPCAT_BREAKDOWN>
    - <G_OPPCAT_BREAKDOWN>
    <QUOTE_NUMBER1>1428</QUOTE_NUMBER1> Second Occurence of 1428
    <INT_ITM_TYPES>INVOICE_ADJUSTMENT</INT_ITM_TYPES>
    <OPPORTUNITY_ID3>1000216</OPPORTUNITY_ID3>
    <INT_BILLING_CLASS>BILLABLE</INT_BILLING_CLASS>
    <SUM_ITM_COUNT>4</SUM_ITM_COUNT>
    <SUM_ITM_PRICE>29.72</SUM_ITM_PRICE>
    <SUM_ITM_COST>0</SUM_ITM_COST>
    <SUM_ITM_GPM>29.72</SUM_ITM_GPM>
    <SUM_ITM_MARKUP />
    </G_OPPCAT_BREAKDOWN>
    - <G_OPPCAT_BREAKDOWN>
    <QUOTE_NUMBER1>1443</QUOTE_NUMBER1>
    <INT_ITM_TYPES>HARDWARE</INT_ITM_TYPES>
    <OPPORTUNITY_ID3>1000216</OPPORTUNITY_ID3>
    <INT_BILLING_CLASS>BILLABLE</INT_BILLING_CLASS>
    <SUM_ITM_COUNT>5</SUM_ITM_COUNT>
    <SUM_ITM_PRICE>2084</SUM_ITM_PRICE>
    <SUM_ITM_COST>1748</SUM_ITM_COST>
    <SUM_ITM_GPM>336</SUM_ITM_GPM>
    <SUM_ITM_MARKUP>.192219679633867276887871853546910755149</SUM_ITM_MARKUP>
    </G_OPPCAT_BREAKDOWN>
    - <G_OPPCAT_BREAKDOWN>
    <QUOTE_NUMBER1>1444</QUOTE_NUMBER1>
    <INT_ITM_TYPES>HARDWARE</INT_ITM_TYPES>
    <OPPORTUNITY_ID3>1000216</OPPORTUNITY_ID3>
    <INT_BILLING_CLASS>BILLABLE</INT_BILLING_CLASS>
    <SUM_ITM_COUNT>4</SUM_ITM_COUNT>
    <SUM_ITM_PRICE>1500.4</SUM_ITM_PRICE>
    <SUM_ITM_COST>1364</SUM_ITM_COST>
    <SUM_ITM_GPM>136.4</SUM_ITM_GPM>
    <SUM_ITM_MARKUP>.1</SUM_ITM_MARKUP>
    </G_OPPCAT_BREAKDOWN>
    - <G_OPPCAT_BREAKDOWN>
    <QUOTE_NUMBER1>1444</QUOTE_NUMBER1>
    <INT_ITM_TYPES>INVOICE_ADJUSTMENT</INT_ITM_TYPES>
    <OPPORTUNITY_ID3>1000216</OPPORTUNITY_ID3>
    <INT_BILLING_CLASS>BILLABLE</INT_BILLING_CLASS>
    <SUM_ITM_COUNT>4</SUM_ITM_COUNT>
    <SUM_ITM_PRICE>66.28</SUM_ITM_PRICE>
    <SUM_ITM_COST>0</SUM_ITM_COST>
    <SUM_ITM_GPM>66.28</SUM_ITM_GPM>
    <SUM_ITM_MARKUP />
    </G_OPPCAT_BREAKDOWN>
    - <G_OPPCAT_BREAKDOWN>
    <QUOTE_NUMBER1>1428</QUOTE_NUMBER1>
    <INT_ITM_TYPES>EXPENSE_ADJUSTMENT</INT_ITM_TYPES>
    <OPPORTUNITY_ID3>1000216</OPPORTUNITY_ID3>
    <INT_BILLING_CLASS>INTERNAL</INT_BILLING_CLASS>
    <SUM_ITM_COUNT>1</SUM_ITM_COUNT>
    <SUM_ITM_PRICE>0</SUM_ITM_PRICE>
    <SUM_ITM_COST>22.98</SUM_ITM_COST>
    <SUM_ITM_GPM />
    <SUM_ITM_MARKUP />
    </G_OPPCAT_BREAKDOWN>
    - <G_OPPCAT_BREAKDOWN>
    <QUOTE_NUMBER1>1444</QUOTE_NUMBER1>
    <INT_ITM_TYPES>EXPENSE_ADJUSTMENT</INT_ITM_TYPES>
    <OPPORTUNITY_ID3>1000216</OPPORTUNITY_ID3>
    <INT_BILLING_CLASS>INTERNAL</INT_BILLING_CLASS>
    <SUM_ITM_COUNT>1</SUM_ITM_COUNT>
    <SUM_ITM_PRICE>0</SUM_ITM_PRICE>
    <SUM_ITM_COST>22.98</SUM_ITM_COST>
    <SUM_ITM_GPM />
    <SUM_ITM_MARKUP />
    </G_OPPCAT_BREAKDOWN>
    - <G_OPPCAT_BREAKDOWN>
    <QUOTE_NUMBER1>1428</QUOTE_NUMBER1>
    <INT_ITM_TYPES>REVENUE_ADJUSTMENT</INT_ITM_TYPES>
    <OPPORTUNITY_ID3>1000216</OPPORTUNITY_ID3>
    <INT_BILLING_CLASS>INTERNAL</INT_BILLING_CLASS>
    <SUM_ITM_COUNT>1</SUM_ITM_COUNT>
    <SUM_ITM_PRICE>20</SUM_ITM_PRICE>
    <SUM_ITM_COST>101</SUM_ITM_COST>
    <SUM_ITM_GPM />
    <SUM_ITM_MARKUP />
    </G_OPPCAT_BREAKDOWN>
    </LIST_G_OPPCAT_BREAKDOWN>
    - <LIST_G_FORX_OPS_QTE_ORDER_LINES>
    - <G_FORX_OPS_QTE_ORDER_LINES>
    <ORDER_ACCEPTANCE1>SKOKIE</ORDER_ACCEPTANCE1>
    <COMMITMENT />
    <COMMITMENT_APPLIED_AMOUNT />
    <PARTIAL_COMMENTS />
    <COMMENT_FOR_INVOICE />
    <QUOTE_DATE>07/13/2009 02:00:10PM</QUOTE_DATE>
    <LINE_NUMBER>1</LINE_NUMBER>
    <EXTD_SELLING_PRICE>880</EXTD_SELLING_PRICE>
    <ORDER_PAY_TERM>Automated Term Due in 44 Days</ORDER_PAY_TERM>
    <QUOTE_PAY_TERM />
    <ITEM_CATEGORIES>HARDWARE.MACHINE.SERVER.</ITEM_CATEGORIES>
    <QUOTE_STATUS>Order Submitted</QUOTE_STATUS>
    <QUOTE_USER>Tyner, Chris</QUOTE_USER>
    <OPPORTUNITY_ID1>1000216</OPPORTUNITY_ID1>
    <DATASOURCE>1</DATASOURCE>
    <HEADER_ID>398631</HEADER_ID>
    <LINE_ID>900897</LINE_ID>
    <LINE_TYPE_ID>1181</LINE_TYPE_ID>
    <ORDER_NUMBER>159038</ORDER_NUMBER>
    <ORDER_VERSION>10</ORDER_VERSION>
    <TEAM>IBM</TEAM>
    <OPPORTUNITY_NAME1 />
    <QUOTE_NAME>1000216:IBM:UAT DEMO</QUOTE_NAME>
    <QUOTE_NUMBER>1428</QUOTE_NUMBER>
    <QUOTE_VERSION>2</QUOTE_VERSION>
    <NEW_PARTIAL>0</NEW_PARTIAL>
    <COMMIT_DEL_DATE>13-JUL-09</COMMIT_DEL_DATE>
    <ORDERED_QUANTITY>1</ORDERED_QUANTITY>
    <PO_NUMBER>098534089</PO_NUMBER>
    <GROUP_NUM>1</GROUP_NUM>
    <INVENTORY_ITEM_ID>845256</INVENTORY_ITEM_ID>
    <ORDERED_ITEM>7978BDU</ORDERED_ITEM>
    <PRODUCT>7978BDU</PRODUCT>
    <ITEM_DESCRIPTION>X3550, XEON QUAD CORE E5430 80W 2.66GHZ/1333MHZ/12MB L2, 2X1GB CHK, O/BAY 2.5IN HS SAS, SR 8K-I, PCI-E RISER CARD, ULTRABAY ENHANCED DVD-ROM/CD-RW COMBO DRIVE, 670W P/S, RACK</ITEM_DESCRIPTION>
    <MANUFACTURER_DESCRIPTION>IBM</MANUFACTURER_DESCRIPTION>
    <TYPE />
    <EQUIPMENT_CODE>B</EQUIPMENT_CODE>
    <TAX_CLASS_CODE>HW</TAX_CLASS_CODE>
    <CLS />
    <SUBINVENTORY />
    <UNIT_LIST_PRICE>0</UNIT_LIST_PRICE>
    <ITEM_UNIT_COST>800</ITEM_UNIT_COST>
    <VENDOR_INVENTORY_RETURN />
    <SHIPPING_TYPE />
    <SHIPPING_ORG>DSP</SHIPPING_ORG>
    <SOLD_TO1>ALLSTATE INSURANCE COMPANY</SOLD_TO1>
    <SOLD_TO_ACCOUNT_NUMBER>103736</SOLD_TO_ACCOUNT_NUMBER>
    <INVOICE_TO_LOCATION>10110384</INVOICE_TO_LOCATION>
    <INVOICE_TO>ALLSTATE INSURANCE COMPANY</INVOICE_TO>
    <INVOICE_TO_ACCOUNT_NUMBER>103736</INVOICE_TO_ACCOUNT_NUMBER>
    <INVOICE_TO_ADDRESS1>2775 SANDERS RD</INVOICE_TO_ADDRESS1>
    <INVOICE_TO_ADDRESS2 />
    <INVOICE_TO_ADDRESS3 />
    <INVOICE_TO_ADDRESS4 />
    <INVOICE_TO_EMAIL />
    <INVOICE_TO_PHONE_NUMBER>847-402-0223</INVOICE_TO_PHONE_NUMBER>
    <INVOICE_TO_ADDRESS5>NORTHBROOK, IL, 60062-6110, US</INVOICE_TO_ADDRESS5>
    <INVOICE_TO_CONTACT>CRAIG SOCKEL</INVOICE_TO_CONTACT>
    <L_INVOICE_TO_LOCATION>10110384</L_INVOICE_TO_LOCATION>
    <L_INVOICE_TO_ACCOUNT_NUMBER>103736</L_INVOICE_TO_ACCOUNT_NUMBER>
    <L_INVOICE_TO>ALLSTATE INSURANCE COMPANY</L_INVOICE_TO>
    <L_INVOICE_TO_ADDRESS1>2775 SANDERS RD</L_INVOICE_TO_ADDRESS1>
    <L_INVOICE_TO_ADDRESS2 />
    <L_INVOICE_TO_ADDRESS3 />
    <L_INVOICE_TO_ADDRESS4 />
    <L_INVOICE_TO_EMAIL />
    <L_INVOICE_TO_PHONE_NUMBER>847-402-0223</L_INVOICE_TO_PHONE_NUMBER>
    <L_INVOICE_TO_ADDRESS5>NORTHBROOK, IL, 60062-6110, US</L_INVOICE_TO_ADDRESS5>
    <L_INVOICE_TO_CONTACT>CRAIG SOCKEL</L_INVOICE_TO_CONTACT>
    <SHIP_TO_ACCOUNT_NUMBER>103736</SHIP_TO_ACCOUNT_NUMBER>
    <SHIP_TO>ALLSTATE INSURANCE COMPANY</SHIP_TO>
    <SHIP_TO_LOCATION>10271260</SHIP_TO_LOCATION>
    <SHIP_TO_ADDRESS1>3075 SANDERS RD STE 12C</SHIP_TO_ADDRESS1>
    <SHIP_TO_ADDRESS2 />
    <SHIP_TO_ADDRESS3 />
    <SHIP_TO_ADDRESS4 />
    <SHIP_TO_ADDRESS>NORTHBROOK, IL, 60062-7119, US</SHIP_TO_ADDRESS>
    <SHIP_EMAIL>[email protected]</SHIP_EMAIL>
    <SHIP_TO_PHONE_NUMBER>847-402-0223</SHIP_TO_PHONE_NUMBER>
    <SHIP_TO_CONTACT>ORLANDO LOPEZ</SHIP_TO_CONTACT>
    <L_SHIP_TO_ACCOUNT_NUMBER>103736</L_SHIP_TO_ACCOUNT_NUMBER>
    <L_SHIP_TO>ALLSTATE INSURANCE COMPANY</L_SHIP_TO>
    <L_SHIP_TO_LOCATION>10271260</L_SHIP_TO_LOCATION>
    <L_SHIP_TO_ADDRESS1>3075 SANDERS RD STE 12C</L_SHIP_TO_ADDRESS1>
    <L_SHIP_TO_ADDRESS2 />
    <L_SHIP_TO_ADDRESS3 />
    <L_SHIP_TO_ADDRESS4 />
    <L_SHIP_TO_ADDRESS>NORTHBROOK, IL, 60062-7119, US</L_SHIP_TO_ADDRESS>
    <L_SHIP_EMAIL>[email protected]</L_SHIP_EMAIL>
    <L_SHIP_TO_PHONE_NUMBER>847-402-0223</L_SHIP_TO_PHONE_NUMBER>
    <L_SHIP_TO_CONTACT>ORLANDO LOPEZ</L_SHIP_TO_CONTACT>
    <DEL_TO_ACCOUNT_NUMBER>103736</DEL_TO_ACCOUNT_NUMBER>
    <DEL_TO>ALLSTATE INSURANCE COMPANY</DEL_TO>
    <DEL_TO_LOCATION>10110327</DEL_TO_LOCATION>
    <DEL_TO_ADDRESS1>3075 SANDERS RD</DEL_TO_ADDRESS1>
    <DEL_TO_ADDRESS2 />
    <DEL_TO_ADDRESS3 />
    <DEL_TO_ADDRESS4 />
    <DEL_TO_ADDRESS>NORTHBROOK, IL, 60062-7119, US</DEL_TO_ADDRESS>
    <DEL_TO_EMAIL />
    <DEL_TO_PHONE_NUMBER>847-402-0223</DEL_TO_PHONE_NUMBER>
    <DEL_TO_CONTACT />
    <UNIT_SELLING_PRICE>880</UNIT_SELLING_PRICE>
    <BILL_TO_LAST_UPDATE>21/04/2009 02:25:18PM</BILL_TO_LAST_UPDATE>
    <SHIP_TO_LAST_UPDATE>13/07/2009 01:31:45PM</SHIP_TO_LAST_UPDATE>
    <BILL_TO_UPDATED_BY>SLUMPP</BILL_TO_UPDATED_BY>
    <SHIP_TO_UPDATED_BY>CTYNER</SHIP_TO_UPDATED_BY>
    <ORDER_QUOTE_USER>CTYNER</ORDER_QUOTE_USER>
    <PARTICIPANTS>Conley, Michael Order:159044 100% and Conley, Michael Order:159038 100% and Conley, Michael Quote:1443 50% and Jones, Maureen Quote:1443 50%</PARTICIPANTS>
    <ORDERED_DATE>07/13/2009 02:23:23PM</ORDERED_DATE>
    <BOOKED_DATE>07/13/2009 02:31:15PM</BOOKED_DATE>
    <ORDER_QUOTE_STATUS>BOOKED</ORDER_QUOTE_STATUS>
    <ORDER_USER_STATUS>RE-BOOK REQD</ORDER_USER_STATUS>
    <BUYER>Tyner, Chris</BUYER>
    <SERIAL_NUM>45784687</SERIAL_NUM>
    <INVOICE_HANDLING_FORMAT_VALUE />
    <INVOICE_HANDLING_FORMAT />
    <PRINT_TRADE_NAME_VALUE>No</PRINT_TRADE_NAME_VALUE>
    <ITEM_EXTD_COST>800</ITEM_EXTD_COST>
    <QUOTE_APPROVERS>Tyner, Chris</QUOTE_APPROVERS>
    </G_FORX_OPS_QTE_ORDER_LINES>

  • Mapping problem in idoc

    Hi
      I had a source segment E1EDP20 (0---99 occurences), i need to pass a constant value to target field poitem.
      the requirement is
    on every occurence of  E1EDP20, the constant value should be incremented by 1 and that constant should be passed to target field poitem.
    Ex- on first occurence of E1EDP20 the constant value should be 1.
          on second occurence of E1EDP20 the constant value should be 2.
         on third occurence of E1EDP20 the constant value should be 3.
    like this as long as on  E1EDP20 occurs the constant value should be incremented by 1.
    the constant should be passed to targetfield poitem.
    pls suggest what is the logic should i write for the above requirement.
    regards
    raghu

    If your requirement is to make the string length to 4 padding with 0's before, then try the below udf.
    public static String Pad(String input, String padChar, int iLength, String sPadDir) {
              StringBuffer strBuf = new StringBuffer(input);
              String sTemp = "";
              int iInputLen = input.length();
              if (iInputLen >= iLength)
                   return input;
              if (sPadDir.length() != 0) {
                   if (sPadDir.equalsIgnoreCase("right")) {
                        for (int j = 0; j < iLength - iInputLen; j++) {
                             sTemp = strBuf.append(padChar).toString();
                   } else if (sPadDir.equalsIgnoreCase("left")) {
                        for (int h = 0; h < iLength - iInputLen; h++) {
                             sTemp = strBuf.insert(h, padChar).toString();
                   } else {
                        sTemp = "Pad Direction Incorrect";
              } else {
                   sTemp = "Pad Direction Does not exist";
              return sTemp;
    constant value->UDF->Target
    If you use the above UDF, you would get the output as 0xxx if your input is xxx,00xx for xx input,000x for x input.
    Regards,
    Swetha.

  • The 'Keep Flag' property -- How does it work? Why does it work?

    Within my calculation views I had been encountering problems properly aggregating the measures, when certain attributes were excluded from the result set. An SAP consultant recommended setting the attributes' KeepFlag property to True; that resolved the problem, but I'm not sure why.
    The help feature within HANA Studio doesn't mention the Keep Flag property. I haven't been able to find much information about this property online, either.
    Exception aggregation modeling with Graphical Calc view states:"The Keep flag will always add [the specified] columns in the group by clause even if they are not selected in the query." This is a good start; however, is there any additional documentation regarding this property?

    Thanks, Jody. That explanation is helpful. So should Keep Flag be set to True for all of the columns that the user could potentially exclude from the result set? To illustrate: Given the following sample data:
    PRODCODE   LOCATION   QUANTITY
    12345      A                 1
    23456      B                10
    34567      C               100
    12345      A                 1
    If the result set excludes LOCATION, the aggregated results are incorrect; i.e.,
    PRODCODE   QUANTITY
    12345             1
    23456            10
    34567           100
    The second occurence of 12345 / A / 1 is inexplicably excluded. Setting LOCATION's Keep Flag property to True restores the second occurrence--resulting in the correct quantities; i.e.,
    PRODCODE   QUANTITY
    12345             2
    23456            10
    34567           100
    Of course, calculation views typically have many more attribute columns. Should the Keep Flag property be set to True for every one of the columns that the user could potentially exclude from the result set?

  • Help with Understanding Regular Expressions

    Hello Folks,
    I need some help in understanding the Regular Expressions.
    -- This returns the Expected string from the Source String. ", Redwood Shores,"
    SELECT
      REGEXP_SUBSTR('500 Oracle Parkway, Redwood Shores, CA,aa',
                    ',[^,]+,', 1, 1) "REGEXPR_SUBSTR"
      FROM DUAL;
    REGEXPR_SUBSTR
    , Redwood Shores,
    However, when the query is changed to find the Second Occurrence of the Pattern, it does not match any. IMV, it should return ", CA,"
    SELECT
      REGEXP_SUBSTR('500 Oracle Parkway, Redwood Shores, CA,aa',
                    ',[^,]+,', 1, *2*) "REGEXPR_SUBSTR"
      FROM DUAL;
    REGEXPR_SUBSTR
    NULLCan somebody help me in understanding Why Second Query not returning ", CA,"?
    I did search this forum and found link to thread "https://forums.oracle.com/forums/thread.jspa?threadID=2400143" for basic tutorials.
    Regards,
    P.

    PurveshK wrote:
    Can somebody help me in understanding Why Second Query not returning ", CA,"?With your query...
    SELECT
      REGEXP_SUBSTR('500 Oracle Parkway, Redwood Shores, CA,aa',
                    ',[^,]+,', 1, *2*) "REGEXPR_SUBSTR"
      FROM DUAL;You are looking for patterns of "comma followed by 1 or more non-comma chrs followed by a comma."
    So, let's manually pattern match that...
    '500 Oracle Parkway, Redwood Shores, CA,aa'
                       ^               ^
                       |               |
                               |
                               |
                      Here to here is the
                      first occurence.So the second occurance will start searching for the same pattern AFTER the first occurence.
    '500 Oracle Parkway, Redwood Shores, CA,aa'
                                        ^
                                        |
    i.e. the search for the second occurence starts heretherefore the first "," from that point is...
    '500 Oracle Parkway, Redwood Shores, CA,aa'
                                           ^
                                           |
                                          hereand there is nothing there matching the pattern you are looking for because it only has the
    "comma follwed by 1 or more non-comma chrs"... but it doesn't have the "followed by a comma"
    ...so there is no second occurence,

  • Help for changing the case of a selected word of a multiline text to upper

    DBVersion:10g
    Foms Version:10g
    Hi Experts,
    Actually i have a requirement where i have to change the case of a selected word by a user into upper case.
    ex: FFFFFF hhhhh GGGG
    when user selects hhhhh and click on some button or any other option it should change it to upper case.
    plss help me out.
    regards :(
    Edited by: user123 on May 11, 2011 12:46 PM

    Here is some PL/SQL code to change a particular occurence of a word in a text.
    In this case, I change the second occurence of the "two" word:
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> set serveroutput on
    SQL>
    SQL> declare
      2   c varchar2(100) := 'one two three four one two three four one two three four' ;
      3   c2 varchar2(100);
      4   i integer;
      5   j integer := 0 ;
      6   pos integer := 1 ;
      7   occurence integer := 2 ; -- occurence to change
      8  begin
      9   loop
    10    i := instr(c,'two', pos);
    11    exit when j = (occurence-1) or i = 0;
    12    j := j + 1;
    13    pos := pos + i ;
    14   end loop;
    15   i := instr(c,'two', pos);
    16   if i > 0 then
    17     c2 := substr( c,1,i-1) || upper(substr(c,i, length('two')))
    18        || substr(c, i+length('two'));
    19   end if ;
    20   dbms_output.put_line(c2);
    21  end;
    22  /
    one two three four one TWO three four one two three four
    PL/SQL procedure successfully completed.Francois

  • Year-to-date behaviour when filtered on day-of-week

    In our data warehouse design, the time dimension has - amongst others - following columns:
    - day id [ = YYYYMMDD format ]
    - day of week [ = name of day of week: Monday, Tuesday, ... ]
    - week id [ = IYYYIW format ]
    - year id [ = IYYY ]
    Our fact table, which contains turnover information, has - amongst others - following columns:
    - net amount [ = physical table column containing numeric value ]
    - net amount ytd [ = logical column: ToDate(net amount, year id) ]
    An analysis was built based upon this dimension and fact table, which is filtered with prompted values. Prompts are foreseen for week and day of week.
    When filtering on week the behaviour is very much as expected; the "net amount" is assigned the total net amount of the chosen week, and the "net amount ytd" is assigned the total net amount for the year up to the chosen week.
    When adding day-of-week to the filter condition however the result is not as expted; the "net amount" is assigned the total net amount for the chosen day in the chosen week, as hoped for, but the "net amount yet" still is assigned the total net amount for the year up to the chosen day of the chosen week, while I would expect it to be the total net amount of all chosen day-of-weeks (for example, all Tuesdays) of the year up to the Tuesday in the chosen week.
    Having a look at the query behind the analysis, the (simplified) code for the YTD information looks like this:
    SELECT SUM("net amount")
    FROM   "fact",
           "time dimension" td1,
           "time dimension" td2
    WHERE  td1."week id" = (prompt week value)
    AND    td1."day of week" = (prompt day of week value)
    AND    td1."year id" = td2."year id"
    AND    td2."week id" <= td1."week id"
    AND    fact."day id" = td2."day id"As I said, it is simplified, OBIEE in fact uses a bunch of sub queries and ranking sequences to pull this off, but this is in a nutshell the result. And as seen in the query, the second occurence of the time dimension is not filtered on day of week, which results in the YTD sum for all days, not just Tuesdays, or whatever day was selected.
    It makes sense in a way, after all, filtering on week does not limit the second occurence of the time dimension to filter on week either. But is there any way to force OBIEE to make an exception and come up with following query (or something similar that does the trick):
    SELECT SUM("net amount")
    FROM   "fact",
           "time dimension" td1,
           "time dimension" td2
    WHERE  td1."week id" = (prompt week value)
    AND    td1."day of week" = (prompt day of week value)
    AND    td1."year id" = td2."year id"
    AND    td2."week id" <= td1."week id"
    AND    td2."day of week" = (prompt day of week value)
    AND    fact."day id" = td2."day id"Thanks in advance for your input.
    Edited by: Kurt Geens on Mar 12, 2013 2:52 PM

    805771 wrote:
    Yes, but I don't want to create 7 different jobs, one for each day of the week. Isn't there a way to do this in PL/SQL? It took me 10 seconds in SQL Server's TSQL.Yes you keep showing some TSQL syntax that obviously does not do what you are asking for.
    >
    SELECT
    CASE DATEPART(dw,GETDATE())
    WHEN 4 THEN (SELECT COUNT(*) FROM ADR_VLDN )
    ENDSo the equivalent in Oracle would be
    SQL> var n number
    SQL> begin
      2    if to_char(sysdate,'D') = '4' then
      3      select count(*) into :n from dual;
      4    end if;
      5  end;
      6  /
    PL/SQL procedure successfully completed.
    SQL> print n
             N
             1Also takes 10 seconds.

  • Display void on check for supplier check prining Report

    Hi All,
    My requirement is to display void on the check for every occurence of the check(except the first occurence).
    For example
    i have 10 invoice's.in my case i will display five invoices on the first page and the next five on page number 2.
    I will display the check on every page.In this case the second occurence of the check i.e. on page number 2 should be voided.
    This should hold good for different vendors as well
    For example i have 2 vendors.....vendor A and Vendor B
    Suppose vendor A has 8 records and vendor B has 10 records
    Then for this case vendor A records would be displayed on two pages(as we can only display five records on each page).Here for vendor A the check should be voided on the second page.Same case for vendor B.
    How do i go about it?
    Any help would be appreciated.
    Thanks in advance.

    Hi
    Without seeing the XML I can be specific but you should be about to do something like
    if: position() >1
    Show void image
    end if
    position() is the record pointer you are currently on. So anyting greater than the first you would show the void image
    I wrote an article a while back on conditional check signature images. check out the article here and there is a link to sample template at the end.
    http://blogs.oracle.com/xmlpublisher/2006/04/conditional_check_signature_im.html
    Regards
    Tim
    http://blogs.oracle.com/xmlpublisher

  • Mapping to new node with each loop

    Does anyone know how to add a new node to a message each time through a loop (in a BPM) like this....
    Source message before the first mapping iteration
    <source>
    <data>first occurence</data
    </source>
    Target message after the first mapping iteration
    <target>
    <record>
    <data>first occurence</data>
    </record/
    </target>
    Source message before the second mapping iteration
    <source>
    <data>second occurence</data
    </source>
    Target message after the second mapping iteration
    <target>
    <record>
    <data>first occurence</data>
    </record/
    <record>
    <data>second occurence</data>
    </record/
    </target>

    Hi,
    Mapping is based on he data passed. i.e. if the occurance of the Mapping fields is 0...unbounded. Then you can have multiple nodes.
    But if you will be looking as 1st instance of mapping will create one node and then another instance will increment the nodes. Then I doubt this could be directly possible.
    Thanks
    swarup

  • Transaction FMN5N - but impossible to create PO with solved Earmarked Fund

    Hello,
    The display consumption history of Eamarked funds shows an open amount of 58 819, 07 but Transaction FMRP_RFFMEP1OX withthe filter criteria doc. No.1200000197 shows an open amount of 15 965,18 (Amount type 0100 (58 819,07) and Amount type 0200 (42 853, 8 - ))
    Transaction FMN5N to reconstruction of Earmarked Funds in FM. Amounttype 0200 ( + 42 853, 8  ) for doc. No.1200000197 but impossible to create a purchase order (42 853, 89) with doc. No. 1200000197. Open amount from document 1200000197 001 exceeded by 45,71 %
    Somebody already had a similar problem ?
    Thank you
    Fabian

    FMN5N made a 1 occurence in table FMIOI  and the the open amount (transaction FMX3) shows is correct (58 819,07)
    In table FMIO, First occurence : Btart 0100 - TRBTR 58 819, 07- TCODE : FMX1
    Second occurence : Btart 0200 -TRBTR - 42 853, 89 - TCODE :  ME23N
    Third occurence : Btart 0200 42 853, 59 -TOCDE : FMN5N
    In KBLP, WTFREE and HWFREE is 15 965,18
    I want to create un purchase order. The system does not accept an purchase ordre of a value of more than 15 965,18.
    The SAP relase is SAP ERP 6.0 / NW7.01 EHP4

  • Replace n:th string

    Anyone have a nice suggestion for how to replace the n:th string in a string.
    Example lets say we have text = "wooho wooho wooho".
    And i want to call text.replace("wooho", "blaha", 2);
    Which would replace the second occurence in the string so that it would return "wooho blaha wooho".
    Any suggestions?

    Fixed it! Wasn't so hard after all :P
    import java.util.regex.Matcher;
    import java.util.regex.Pattern;
    public class StringReplacer {
         public static String replaceNth(String text, String regexp, String replace, int n){
              Pattern p = Pattern.compile(regexp);
              Matcher m = p.matcher(text);
              StringBuffer sb = new StringBuffer();
              int i=0;
              while (m.find()) {
                   if (n == i){
                        m.appendReplacement(sb, replace);
                        break;
                   i++;
              m.appendTail(sb);
              return sb.toString();
         public static void main(String[] args){
              String text = "aaaa woohoo fdsfd woohoo fdsfds woohoo fjdskf";
              String r = replaceNth(text, "woohoo", "blaha", 1);
              System.out.println(r);
    }

Maybe you are looking for

  • How to write Decode ?

    Hi All, please tell me how to write below statement in using decode statement in a single query. if A1 IS NULL and A2 IS NOT NULL then C := 'NA'; elsifF A1 IS NULL AND A2 IS NULL then C:='Success'; end if; Regards, Subir

  • ORA-01031: insufficient privileges on CLOB table

    Hi, Our application on RAC encountered ORA-01031: insufficient privileges when trying to insert into clob table. However it is not always happen on the application. Sometimes it happens and sometimes not. I have tried to manually insert into the data

  • How to open .mkv file in premiere pro 5.5

    having trouble opening .mkv files?

  • Log4j command line

    hello, i have been making an application that uses log4j, and its been working fine in eclipse, but now i wish to run it from a command line and have no idea how to include the log4j jar file. any help is apprectiated. Thanks, Vojnik

  • How can I test the Hardware without AHT

    I want to buy a new Mac at a little Shop, but the Mac has no CD and I can't find AHT for a late 2005 Power Mac. So I ask you, how can I check if the Power Mac is okay or not?? Thank you