Create a new Grouping in IBY_FD_EXTRACT_EXT_PUB

Hi,
I need to create a new group in  IBY_FD_EXTRACT_EXT_PUB like below.
eg:
+*<OutboundPaymentInstruction>*+
---+
+*<OutboundPayment>*+
---+
+*<ExtendValue>*+
-- <Extend>+
---<OUTPUTVALUE>Concatenated Value - 1</OUTPUTVALUE>+
+*</Extend>*+
-- <Extend>+
---<OUTPUTVALUE>Concatenated Value - 2</OUTPUTVALUE>+
+*</Extend>*+
-- <Extend>+
---<OUTPUTVALUE>Concatenated Value - 3</OUTPUTVALUE>+
+*</Extend>*+
*</ExtendValue*
+*<OutboundPayment>*+
---+
+*<ExtendValue>*+
-- <Extend>+
---<OUTPUTVALUE>Concatenated Value - 1</OUTPUTVALUE>+
+*</Extend>*+
-- <Extend>+
---<OUTPUTVALUE>Concatenated Value - 2</OUTPUTVALUE>+
+*</Extend>*+
-- <Extend>+
---<OUTPUTVALUE>Concatenated Value - 3</OUTPUTVALUE>+
+*</Extend>*+
+*</ExtendValue>*+   
I have got the Concatenated value inside a loop, but I need to split each of the values into 80 characters and then insert it into <OUTPUTVALUE>+
So, if I have 240 characters, then I need it like+
+*<OutboundPayment>*+
---+
+*<ExtendValue>*+
-- <Extend>+
---<OUTPUTVALUE>Concatenated Value - 80 characters*</OUTPUTVALUE>*+
+*</Extend>*+
-- <Extend>+
---<OUTPUTVALUE>Concatenated Value - 80 characters*</OUTPUTVALUE>*+
+*</Extend>*+
-- <Extend>+
---<OUTPUTVALUE>Concatenated Value - 80 characters*</OUTPUTVALUE>*+
+*</Extend>*+
+*</ExtendValue>*+
What I have tried is
FUNCTION Get_Pmt_Ext_Agg(p_payment_id IN NUMBER)
RETURN XMLTYPE
IS
l_ins_ext_agg XMLTYPE;
CURSOR get_invoices_cur(cp_payment_id in number) is
SELECT IDP.document_payable_id DOCUMENT_PAYABLE_ID
,SUBSTR(IDP.calling_app_doc_ref_number,1,30) REFERENCE_NUMBER
,IDP.payment_amount PAYMENT_AMOUNT
,IDP.document_amount DOCUMENT_AMOUNT
,IDP.payment_curr_discount_taken DISCOUNT_AMOUNT
,SUBSTR(IDP.po_number,1,30) PO_NUMBER
,IPA.payment_amount PAYMENT_AMNT
,IPA.ext_branch_number EXT_BRANCH_NUMBER
,IPA.ext_bank_account_number EXT_BANK_ACCOUNT_NUMBER
,IPA.payee_name PAYEE_NAME
,IPA.int_bank_name INT_BANK_NAME
,IPA.payment_reference_number PAYMENT_REFERENCE_NUMBER
,IPA.creation_date CREATION_DATE
,IPA.payment_instruction_id PAYMENT_INSTRUCTION_ID
FROM iby_docs_payable_all IDP
,ap_invoices_all AIA
,iby_payments_all IPA
WHERE AIA.invoice_id = idp.calling_app_doc_unique_ref2
AND IPA.payment_id = IDP.payment_id
AND IDP.payment_id = cp_payment_id;
BEGIN
<Initialize all valiables>
FOR get_invoices_rec IN get_invoices_cur(p_payment_id)
LOOP
lc_concatenate: = <Get the concanated Value as required>;
lc_split:= < Written some logic to split it into char >
BEGIN
SELECT XMLConcat(
XMLElement("Extend",
XMLElement("lc_value1" lc_split))
INTO lc_extendval
FROM dual
END;
END LOOP;
BEGIN
SELECT XMLConcat(
XMLElement("ExtendVal",lc_extendval),
INTO l_ins_ext_agg
FROM dual;
END;
RETURN l_ins_ext_agg;
EXCEPTION
WHEN OTHERS THEN
RETURN NULL;
END Get_Pmt_Ext_Agg;
Now, my output comes only as the last 80 characters, I do not have the first 80 and second 80 characters.
ANy inputs to achieve all the 240 characters split into 3 rows like described above would be helpful.
Thanks

>
Now, my output comes only as the last 80 characters, I do not have the first 80 and second 80 characters.
>
based on
>
lc_split:= < Written some logic to split it into char >
>
so check logic for splitting
i can't test on your data but
>
SELECT XMLConcat(
XMLElement("Extend",
XMLElement("lc_value1" lc_split))
INTO lc_extendval
FROM dual
>
what's code doing?
looks like it's wrong because it create tag "lc_value1"
>
BEGIN
SELECT XMLConcat(
XMLElement("ExtendVal",lc_extendval),
INTO l_ins_ext_agg
FROM dual;
END;
RETURN l_ins_ext_agg;
>
what's code doing?
so try another way
FUNCTION Get_Pmt_Ext_Agg(p_payment_id IN NUMBER)
RETURN XMLTYPE
IS
l_ins_ext_agg XMLTYPE;
CURSOR get_invoices_cur(cp_payment_id in number) is
SELECT IDP.document_payable_id DOCUMENT_PAYABLE_ID
,SUBSTR(IDP.calling_app_doc_ref_number,1,30) REFERENCE_NUMBER
,IDP.payment_amount PAYMENT_AMOUNT
,IDP.document_amount DOCUMENT_AMOUNT
,IDP.payment_curr_discount_taken DISCOUNT_AMOUNT
,SUBSTR(IDP.po_number,1,30) PO_NUMBER
,IPA.payment_amount PAYMENT_AMNT
,IPA.ext_branch_number EXT_BRANCH_NUMBER
,IPA.ext_bank_account_number EXT_BANK_ACCOUNT_NUMBER
,IPA.payee_name PAYEE_NAME
,IPA.int_bank_name INT_BANK_NAME
,IPA.payment_reference_number PAYMENT_REFERENCE_NUMBER
,IPA.creation_date CREATION_DATE
,IPA.payment_instruction_id PAYMENT_INSTRUCTION_ID
FROM iby_docs_payable_all IDP
,ap_invoices_all AIA
,iby_payments_all IPA
WHERE AIA.invoice_id = idp.calling_app_doc_unique_ref2
AND IPA.payment_id = IDP.payment_id
AND IDP.payment_id = cp_payment_id;
BEGIN
<Initialize all valiables>
FOR get_invoices_rec IN get_invoices_cur(p_payment_id)
LOOP
lc_concatenate: = <Get the concanated Value as required>;and add logic for splitting like
select xmlelement("ExtendValue", xmlagg(xmlelement("Extend", substr(lc_concatenate,1+80*(level-1),80) )))
INTO lc_extendval
from dual
connect by level <= ceil(length(lc_concatenate)/80)so example
SQL>
SQL> with t as
  2  (
  3  select 1 id, lpad('a',80,'a') ||lpad('b',80,'b') ||lpad('c',80,'c') str from dual
  4  )
  5  --
  6  select xmlelement("ExtendValue", xmlagg(xmlelement("Extend", substr(str,1+80*(level-1),80) )))
  7  from t
  8  connect by level <= ceil(length(str)/80)
  9  /
XMLELEMENT("EXTENDVALUE",XMLAG
<ExtendValue><Extend>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
SQL> if you have some problem then plz post test data

Similar Messages

  • Creating a new group in LDAP using JLDAP

    Can anybody tell me how to creat a new group in LDAP using JLDAP

    Hi,
    Have a look at the following link. It will surely help you.
    <a href="http://help.sap.com/saphelp_crm50/helpdata/en/20/a4ffee7e0fcc4ebb7e5466d3903d38/frameset.htm">http://help.sap.com/saphelp_crm50/helpdata/en/20/a4ffee7e0fcc4ebb7e5466d3903d38/frameset.htm</a>
    <b>Please reward points if it helps.</b>
    Regards,
    Amit Mishra

  • Creating a new group in Mail

    Is there an easy way to create a new group in mail (or I guess it's really the Address book) from an email I already sent  to a group of people. I don't want to copy each name one by one if it's not necessary.  Thanks, Jack

    Each email address in the group is put in the To: field automatically when you put them all in the BCC field when composing the email. Nobody sees anything except their own email address.
    I think you are mistaken there, Golden. If the To: field is blank the recipients in the Bcc field will see the To: as undisclosed-recipients - if they get anything at all; some ISPs will reject a message with a blank To:. I would agree with putting the target recipients in the Bcc, but when doing this I usually put my own address in the To: field.
    AK

  • Create a new group in Active Directory ?

    Hello,
    I'd like to create a new group in Active Directory. Can somebody show me a sample code please ?
    Thanks.

    Someone should show you how to perform a search. There's a sample in this forum.
    http://forums.sun.com/thread.jspa?threadID=623860

  • Create a new group in Messaging

    How do you create a new group in messaging, I had to select ios4.33 in the Operating system as ios5 is not available yet

    Someone should show you how to perform a search. There's a sample in this forum.
    http://forums.sun.com/thread.jspa?threadID=623860

  • Runtime Error when creating a new group

    I'm getting a runtime error when creating a new group on a site collection? 
    Thanks in advance

    The most possible reason is if your site collection is reached the maximum site quota limit,then there is chance to get the run time error while creating a new group.
    In this case,you will get the error while creating/updating the group or while adding the new user/uploading any content.
    Also Ensure the group name is not having any special/unsupported characters.
    Feel free to share the error screenshot/entry in the ULS logs.
    Please remember to click 'Mark as Answer' on the answer if it helps you
    Best Regards,
    Pavan Kumar Sapara
    s p kumar

  • I just got the new Iphone 5 and when I send a message in a group text it keeps sending it as an email and as my phone number. The people in the group text are complaining that it is creating a new group message everytime I text. How do I fix this?

    I just got the new Iphone 5 and when I send a message in a group text it keeps sending it as an email and as my phone number. The people in the group text are complaining that it is creating a new group message everytime I text. How do I fix this?

    Read http://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htm l
    If you wish to share an Apple ID with family members then read: http://www.macstories.net/stories/ios-5-icloud-tips-sharing-an-apple-id-with-you r-family/

  • Cannot Create a New Group

    All of a sudden, I cannot create any new groups within Address Book! Will not work either from the plus sign at the bottom of the group list or the main menu!
    Any advice on how to resolve?

    quit Address book and delete the file homedirectory/library/application support/address book/AddressBook-v22.abcddb. then start Address Book and see if you can create groups.

  • Groups in Address book on iPad will not let me create a new group

    My address book on the iPad will not let me create a new group. The red ribbon is there and shows my groups that I already have, but when I click on the ribbon the plus sign does not appear on the group side to let me create one.
    Can anyone help me? I have turned it off and back on.

    You can't create new groups on a mobile device.

  • HT2486 how do I copy an existing Group in Contacts to create a new group with the same contacts in it?

    How do I copy an existing group in Contacts to create a new group with the same contacts in it?

    Hi there,
    Unfortunately the use case you describe hasn't been implemented in Firefox. It's not possible to move a tab group out to its own window at this point. Generally the tab groups feature hasn't been worked on much recently, not sure why.
    As to TabMixPlus, that's a third-party add-on which Mozilla doesn't directly support. You can find support links from the add-on page: https://addons.mozilla.org/en-us/firefox/addon/tab-mix-plus/
    Hope this helps.
    Cheers,
    David

  • In Address Book, how do you create a new group under "On my Mac", not under "iCloud"?

    In Address Book there are groups under "On my Mac" and groups under "iCloud".  When I do File -> "Create new group", the new group always goes under "iCloud".  How can I make a new group to go under "On my Mac".  I also tried dragging the new group from the iCloud area to the "On my Mac" area, but that doesn't do it.  Address Book is version 6.1.3.  Thanks for your help.

    Maybe look in the Preferences > Accounts & disable the iCloud account? That should force it to create a local group then re-enable the iCloud account. I would use the 'File > Export… Addressbook archive' to make a backup before you begin, but it should be fine.
    I'm not sure 10.6.8 supported iCloud natively, so perhaps that is why it is being wierd?

  • In panorama, when I left click and drag to open a new tab group, unclicking doesn't create the new group and left clicking again only creates another group without finalizing the first one.

    In Firefox 4.0 beta 11 (Windows 7 Professional) left clicking in panorama creats a new tab group but letting go doesn't finalise the group. I have XP mode on my computer and firefox b11 works fine in the virtual PC.
    Edit:
    This has continued into Firefox 4 RC2

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • When using Panorama, everytime I create a New Group, I am redirected to the Google Calendar App that I created. Tab groups are not being remembered. Any workaround?

    I am trying to use Panorama for the first time. I can successfully create a tab group, but Firefox does not remember it. When I view a new web page and try to use "add to group" I am redirected to the app tab I created for Google Calendar. I am using Windows 7 64x with Firefox as my default browser.
    Are there any know issues with the apps tap and Panorama?

    I have a somewhat related problem running FF7 on WinXP32, specifically concerning your ''I can successfully create a tab group, but Firefox does not remember it.''
    When I reopen FF, I find FF
    * ''sometimes'' does not remember all tab groups.
    * ''often'' seems to move at least 1 tab from one group to another.
    ''kursiver Text''
    I am new to using this tab grouping feature, and I have not identified a specific and consistent misbehavior yet.

  • SCOM 2012 SP1 - Created a new group and unable to "find" newly created group to create custom report

    Hello,
    I just created a new custom dynamic group based on database instances using a wildcard.  The group "DBgroup" populates just fine, I can see the members when choosing to view them via the group properties.  My issue is that when I'm going
    into the reporting pane, choosing the MS generic report library, and then choosing custom configuration...I am unable to "FIND" my group that i just created?   My questions are is there a length of time in which this group will get populated
    to the report server or do I have an issue?  I see no errors in the logs on the report server or management server.   I have not seen this before and I'm unsure where to go from here.  Any help is appreciated, thanks.

    Hello,
    Does the group pop-up in the list now? It may take hours for the new Computer Group could be used in the reports.
    Besides, did you define a Group Scope for your user role? 
    Thanks,
    Yog Li
    TechNet Community Support
    It's been over 48 hours now and still do not see the new groups.   I have no group scopes defined

  • INVALID redo log after creating a new group member

    Hi all,
    I've just followed instructions to create a new redo log file member:
    alter database add logfile member '/oracle/mplex/redo/redo01b.log' to group 1;
    When I query v$logfile, the status is INVALID though.
    SQL> select * from v$logfile where group# = 1;
    GROUP# STATUS TYPE
    MEMBER
    IS_
    1 ONLINE
    /u01/app/oracle/oradata/redo01.log
    NO
    1 INVALID ONLINE
    /oracle/mplex/redo/redo01b.log
    NO
    the oracle user owns the mplex directory and permission are fine
    [oracle@redo]$ ls -ltr
    total 51260
    -rw-r----- 1 oracle oinstall 52429312 Mar 11 11:55 redo01b.log
    Any ideas?
    Thanks

    connect to the database again as a sysdba, and run
    sql> alter system switch logfile;
    Run this command again.
    select * from v$logfile where group# = 1;
    You can get more information at http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/onlineredo.htm
    Edited by: pgoel on Mar 11, 2011 8:15 PM

Maybe you are looking for

  • Error while Installing the AIA FPack -SOA up and bpel esb consle not openin

    While insatlling AIA FP, I Started the soa suite and proces completes shows as 100% but the status for all the three process was shown as InIt ........ when i just went and seen the process atatus at command prompt by oraclehome/opmn/bin -->opmnctl s

  • Error Message"ERP adapter is called" for CRM sales order replicate to ERP

    Hi All: In our implemenation project, we use CRM7.0 stanard sales order type TA for sales order creation. And we did all the right configuration for sales order at CRM side. CRM sales order can be saved correctly. But this CRM sales order couldn't be

  • Item Instance mandatory based on SR type

    Dears, I wanted to know if i can enforce a validation on the Service Request creation in TeleService to make the Item Instance mandatory or not based on the Service Request type.

  • HELP!!! My settings are wrong need to send for printing

    Hi I am doing brochure's for my company. I am from South Africa. I use Illustrator for the brochure, Layout and Text. Last month the printer had problems with printing the brochure. I discovered my settings are wrong. This was the settings: Colour Se

  • How to get ALL command line parameters

    Hi, Is there possibility to get all command line parameters which Flex builder invokes when I press RUN button ? I am asking because I want to create mxmlc ant task with the same parameters as Flex builder. I wrote something like that below but I hav