Concatenate fields of record  type

Hi
Is there some way to concatenate fields of the record type ?, example
declare
TYPE customer_sales_rectype IS RECORD
      (campo1 char(3),
      campo2  char(3),
      campo3  char(3));
  TYPE ZZZ IS RECORD (kkk customer_sales_rectype);
      x customer_sales_rectype;
begin
  x.campo1:='000';
  x.campo2:='aaa';
  x.campo3:='BBB';
end;I have a table
ID_REPORT NUMBER                                  
ID_LINE     NUMBER                                  
DT_FILE  DATE           Y                        
DS_LINE     VARCHAR2(2048) Y        My quey have more than 50 columns and must to concatenate columns, example:
select column001 ,
       ';' PV1,
       COL2,
       COL3
       COL4,
     ';' PV2,....ETC
FROM MY TABLESI think moving result of query into variable of record type I would can insert into table in column DS_LINE doing some transformatcion.
Is there some way without to use COL1||PV1||COL2||COL3||COL4||PV2... etc
thank you in advance
using 9.2.02

It's easy enough to write a function to do this. Here is a "coffee time" implementation:
create or replace function multi_concat
    (p_args sys.dbms_debug_vc2coll)
    return clob
as
    rv clob;
begin
    dbms_lob.createtemporary(rv, TRUE);
    for i in p_args.first .. p_args.last
    loop
        dbms_lob.writeappend(rv, length(p_args(i)), p_args(i));
    end loop;
    return rv;
end multi_concat;
/And the proof of the coffee is in the dunking of the doughnut:
SQL> select multi_concat ( sys.dbms_debug_vc2coll ( ('Red Fish', 'Blue Fish', 1, 'Fish',2,'Fish'))
  2* from dual
MULTI_CONCAT(SYS.DBMS_DEBUG_VC2COLL('REDFISH','BLUEFISH',1,'FISH',2,'FISH'))
Red FishBlue Fish1Fish2Fish
SQL> I would add a TO_STRING member function to your type and use something like the above to implement it.
Alternatively, use the data dictionary to generate a string which joins all your type's attributes with the concatenation operator.
Cheers, APC

Similar Messages

  • Field for Record Type

    Hi All,
              I have to show one output in ALV.One of the o/p fields is "Record Type" which has possible entries as 1.Current Stock 2. Safety Stock 3. Process Order 4.Planned Order.
    Is there any field in any table for record type with above mentioned possible entries.Even if a field for Order type is there please mention.
    Thanks in Advance,
    Saket.

    Hi
    Please check this
    /BI0/OIRECORDTP                Record type
    CFRECTY                        Record type
    FE_RRCTY                       Record type
    MAFID                          Record type
    P106_RTYPE                     Record type
    PAR_TIREG                      Record type
    PES_190TIP                     Record type
    PPT_TSREC                      Record type
    RECNO                          Record type
    RECTP_EBES                     Record type
    RSART                          Record type
    SISATZ                         Record type
    VVISATZA                       Record type

  • Can a field validation point to fields of another record type?

    Field Validation based on another Record Type Field
    I am trying to build validation into a custom object that sums fields under the Account record type.
    The names of the fields from OBI (the table location and field name):
    "- Account Custom Metrics".S_INT_13+"- Account Custom Metrics".S_INT_14+"- Account Custom Metrics".S_INT_11
    My questions: can a field validation point to fields of another record type? My thought was that if OBI can look across record types than all of CRM should be able to, including field validations.
    Thank you,
    David

    Hi !
    I'm afraid this is not possible for the moment. You'll have to wait for the Release 16 I think to have such possibilities.
    The R16 will allow you to create workflow rules accross different record types (e.g. Create a task on the Account linked to the service request when a new service request is created). I hope there will be the same possibilities with the validation rules...
    Hope this will help, feel free to ask more.
    Max

  • How to create a LookUp field, selecting a value from another record type ??

    Hello all,
    I am looking to create a new field in Opportunity in CRM On Demand where we can give the user an option to select one of the records. Data in this search applet should come from another Record Type in CRM On Demand. I am not able to find any similar literature in the Help books.
    I would appreciate if somebody could give me real life steps please.
    Thanks a lot

    Okay. I found the solution to this.
    Now, along with this single reference, we also wish to bring the values of some more joined fields from the other record type in the Opportunities screen.
    We were hoping that the Default value, and using fx, we should be able to achieve this using "joinedfieldvalue". However, it's not bringing back any value. Our expression is -
    JoinFieldValue('<CustomObject3>',[<CustomObject3Id>],'<stState_ITAG>')
    Please help if you have done this before.
    Thanks & Regards

  • Trying to reference field name of my record Type in my procedure!

    Hello,
    I am stuck. I am trying to reference field names in my record type declared in my Package declaration.
    Here is an example. Don't be scared, it's a very simple package. I just need some directions what to use to accomplish this.
    --look into this part of the package body
    FOR cur_rate IN c_rate
    LOOP
    rate_data(1).field_name := cur_rate.rate_pct;
    --field name = AK_PCT, AL_PCT and so on ...
    END LOOP;
    END rate_tab_qry;
    CREATE OR REPLACE PACKAGE rate_pkg IS
    TYPE rate_rec IS RECORD (
    id cycle_rates.id%TYPE
    ,cycle cycle_rates.cycle%TYPE
    ,scac cycle_rates.scac%TYPE
    ,gbloc cycle_rates.gbloc%TYPE
    ,code cycle_rates.code%TYPE
    ,AK_PCT cycle_rates.rate_pct%TYPE
    ,AL_PCT cycle_rates.rate_pct%TYPE
    ,AR_PCT cycle_rates.rate_pct%TYPE
    ,so on...
    TYPE cycle_rate_tab IS TABLE OF rate_rec INDEX BY BINARY_INTEGER;
    PROCEDURE rate_tab_qry(rate_data IN OUT cycle_rate_tab,
    p_id cycle_rates.id%TYPE,
    p_cycle cycle_rates.cycle%TYPE,
    p_scac cycle_rates.scac%TYPE,
    p_gbloc cycle_rates.gbloc%TYPE,
    p_code cycle_rates.code%TYPE);
    END;
    CREATE OR REPLACE PACKAGE BODY rate_pkg IS
    PROCEDURE rate_tab_qry(rate_data IN OUT cycle_rate_tab,
    p_id cycle_rates.id%TYPE,
    p_cycle cycle_rates.cycle%TYPE,
    p_scac cycle_rates.scac%TYPE,
    p_gbloc cycle_rates.gbloc%TYPE,
    p_code cycle_rates.code%TYPE)
    IS
    CURSOR c_rate IS
    SELECT state, rate_pct
    FROM cycle_rates
    WHERE cycle = p_cycle
    AND scac = p_scac
    AND gbloc = p_gbloc
    AND code = p_code;
    BEGIN
    rate_data(1).id := p_id;
    rate_data(1).cycle := p_cycle;
    rate_data(1).scac := p_scac;
    rate_data(1).gbloc := p_gbloc;
    rate_data(1).code := p_code;
    FOR cur_rate IN c_rate
    LOOP
    rate_data(1).field_name := cur_rate.rate_pct;
    --field name = AK_PCT, AL_PCT and so on ...
    END LOOP;
    END rate_tab_qry;
    I need to know, how to reference my field name for each state in my procedure that are in my record type. The problem is it won't allow me to use something like this.
    select state || '_PCT
    from cycle_rates;
    which would eventually show me each state concatenated with '_PCT, e.g. AK_PCT and that's my field names.
    For example,
    FOR cur_rate IN c_rate
    LOOP
    rate_data(1).field_name := cur_rate.rate_pct;
    --field_name = AK_PCT, AL_PCT and so on...
    END LOOP;
    I would appreciate it if somene can direct me. Thanks.
    Message was edited by:
    [email protected]

    This is a sample output from my cusror. Just to make it easier for you guys to see it.
    ST RATE_PCT
    AK 0
    AL 2
    AR 2
    AZ 2
    CA 2
    CO 2
    CT 2
    DC 2
    DE 2
    FL 2
    Hope it helps.

  • How to edit LOV of the status field in activity record type?

    Hi experts
    I just want to edit the list of values of status field in activity record type, it is a read only filed, can anyone tell me if it is possible to edit? seems like it is referenced from a field called "EVENT_STATUS";
    Thanks,
    Tiger

    Tiger, at this time it is not possible to edit the values in this field.

  • Auto-populating fields based on another field (must access dif record type)

    This is a long one. I basically want to know if it's possible to have several fields auto-populated based on the data in another. It gets a little tricky here, because the information I want to auto-populate will have to be searched for in another record type. An example will hopefully make my request clear:
    I have 10's of thousands of records of the "Product" record type that each have a product number. Well, let's say I have several fields to enter into an "Opportunity" record type, based on the information for this product number in the "Products" record type. I want to know if I can enter the product number on the "Opportunity" record, and have OnDemand go look up this product number in the "Product" record type, pull information from that record, and auto-populate that additional information in certain fields back on the "Opportunity" record that I am entering information for.
    I know a workflow can do this on simple things where you have a few different part numbers and can create a workflow for each, but I literally have 40k part numbers, and I can't very well create that many workflows. If there was a way to dynamically script the workflow to use the part number in the field on the "Opportunity" record and go fetch the data to auto-populate, that would be nice.
    I also can't use a cascading picklist because, again, there are around 40k products records and picklists have a limit to how many choices you can have.
    My think tank has run empty, and I am out of ideas. I was wondering if there is any other way to get this done, or if it's even possible?
    Thanks,
    B
    Edited by: user10885599 on Feb 5, 2009 11:54 AM

    As I read this, I am wondering if you would be able to use the new JoinFieldValue() function to update the fields. The problem is that the Opportunity record does not have a direct link to products. The Revenue table does however, so you should be able to do this from Revenue, if that is how you are using the application.
    The process would be to create a workflow that watches for new Revenue records, and updates the new fields in the Revenue object using the JoinFieldValue function to pull the data.

  • Field record type CO-PA document

    Dears,
    someone knows I can set-up the record type in a document of CO-PA depending on the billing type or the sales order type?
    Many thanks in advance
    Vittoria

    Dear Vittoria,
          You cannot change the record type in COPA. It is hard coded by SAP depending on the transaction. For incoming sales order posting to COPA the record type is 'A'. For billing to COPA the record type is 'F'.
    regards
    Waman

  • How to assigne value in sub record type

    Dear below mention record type database,now i want to assigne value in payr_rec type,in this recrocrd type have one column party_id,but how can assigne value int this field ,
    TYPE group_rec_type IS RECORD(
    group_name VARCHAR2(255),
    group_type VARCHAR2(30),
    created_by_module VARCHAR2(150),
    -- Bug 2467872
    mission_statement VARCHAR2(2000),
    application_id NUMBER,
    party_rec PARTY_REC_TYPE := G_MISS_PARTY_REC
    please guide.

    to get the desired default party_rec attribute value, just assign the "sub-record" attribute defaults as desired; PL/SQL will assign a default (non-null) record as the party_rec value using those attribute defaults:
    create or replace package P_Test_It
    as
         type party_rec_type is record (
              dummy varchar2(1) default 'X'
         type group_rec_type is record (
              group_name VARCHAR2(255),
              group_type VARCHAR2(30),
              created_by_module VARCHAR2(150),
              -- Bug 2467872
              mission_statement VARCHAR2(2000),
              application_id NUMBER,
              party_rec PARTY_REC_TYPE
    end;
    set serveroutput on
    declare
         rec p_test_it.group_rec_type;
    begin
         dbms_output.put_line(rec.party_rec.dummy);
    end;
    X
    PL/SQL procedure successfully completed.Hope it helps.
    Gerard

  • Concatenate fields in hr payroll attendance report

    Hi all,
    I need to concatenate three fields PERNR, BEGDA and  ATTIND  into a string.after concatenating I need to count no. of records present for this combination into internal table and compare this count with other oracle database records count.if both counts are not same then need to display these three fields mismatched records in the output.can anyone provide some help to achieve this.
    Thanks in advance,
    Regards,
    Harshada

    Hi,
    Create an internal table with 2 columns; first being the concatenated string field, the other being an integern (name it COUNT or something meaningful).
    Build up your internal table by doing the concatenation - move the concatenated value into the first field.  Set the second field to 1 then COLLECT the entries into the internal table.  After processing, there will be only one entry for each combination and the COUNT column will indicate the number of times that combination was found.
    Regards,   Andy

  • Oracle Account Receivables Lockbox Error, No ITEM NUM on PAYMENT record type.

    Hi,
    For "Process Lockbox" program. The program completes normally, but receipts are not created and I am getting below error in log file:-  
    "AR-ARLFMT: No ITEM NUM on PAYMENT record type."
    This error message is similar to error message mentioned in note id (Troubleshooting Known Issues In Lockbox (Doc ID 1366298.1)) :-
    2.10. Lockbox ends with error: "AR-ARLFMT: No PAYMENT NUM on PAYMENT record type"
    Symptoms
    You are trying to run lockbox and receive this error message in the log file:
    AR-ARLFMT: No PAYMENT NUM on PAYMENT record type.
    Your lockbox interface program has completed successfully, however,there is No Data Found in the AR_PAYMENTS_INTERFACE table.
    Solution
    Responsibility: Receivables Manager
    Navigation: Setup > Receipts > Lockboxes > Transmission Formats
    For the Transmission Format name that you are using, make sure that there is a 'Transmission Record' defined and that there is a Transmission Field with a Field Type of  'Record Identifier' defined.
      Make sure to include the check number in Transmission Format and Control file
    and item number is:-
    Item Number: A sequence number that your bank assigns to a specific payment. This number associates an invoice with a receipt.
    I am passing item number, but still I am getting this error.
    Can anybody please help.
    Thanks in advance.
    Regards
    Gagan Garg

    Hi,
    For "Process Lockbox" program. The program completes normally, but receipts are not created and I am getting below error in log file:-  
    "AR-ARLFMT: No ITEM NUM on PAYMENT record type."
    This error message is similar to error message mentioned in note id (Troubleshooting Known Issues In Lockbox (Doc ID 1366298.1)) :-
    2.10. Lockbox ends with error: "AR-ARLFMT: No PAYMENT NUM on PAYMENT record type"
    Symptoms
    You are trying to run lockbox and receive this error message in the log file:
    AR-ARLFMT: No PAYMENT NUM on PAYMENT record type.
    Your lockbox interface program has completed successfully, however,there is No Data Found in the AR_PAYMENTS_INTERFACE table.
    Solution
    Responsibility: Receivables Manager
    Navigation: Setup > Receipts > Lockboxes > Transmission Formats
    For the Transmission Format name that you are using, make sure that there is a 'Transmission Record' defined and that there is a Transmission Field with a Field Type of  'Record Identifier' defined.
      Make sure to include the check number in Transmission Format and Control file
    and item number is:-
    Item Number: A sequence number that your bank assigns to a specific payment. This number associates an invoice with a receipt.
    I am passing item number, but still I am getting this error.
    Can anybody please help.
    Thanks in advance.
    Regards
    Gagan Garg

  • How does a record type and table type works

    Hi,
    How a record type and table type work for the ref cursor,
    below i m giving an example but its giving me errors
    can any one help me for this?
    declare
    type empcurtyp is ref cursor;
    type rectype is record (veid t.emp_id%type, vename t.ename%type);
    TYPE tabtype IS TABLE OF rectype;
    empcv empcurtyp;
    vtab tabtype;
    begin
    open empcv for select emp_id,ename from t;
    loop
    fetch empcv into vtab;
         exit when empcv%notfound;
         dbms_output.put_line(vtab.vename||vtab.veid);
    end loop;
    close empcv;
    end;
    here we hav table t and i m taking only two fields of the table t which r emp_id and ename.

    Hi,
    What errors are you getting with this? From experience you don't need a loop to put the records into the ref cursor its usually done on block.
    HTHS
    L :-)

  • Could not find Order and Quote objects in Record Type Access window

    Hi All,
    We are using the CRM OD (not sure about the version).
    I am trying to enable the Order or Quote Object in CRM On Demand.
    But I cannot find Order and Quote records in "Record Type Access window". Do I need to enable it form any where else first ?
    Thanks
    Sai

    Thanks for the reply Naren.
    I am implementing the "Lead to Order Integration Pack for Oracle CRM On Demand and Oracle E-Business Suite 2.5".
    As part of it I am trying to enable the Order or Quote objects from the section "Enabling the Order or Quote Object in CRM On Demand" of the document: Part No. E15784-01.
    I see the following steps in that section:
    To enable the Order or Quote objects in CRM On Demand:
    1. Sign in to the CRM On Demand system.
    2. On the welcome page, click the Admin link.
    3. On the Admin Homepage, navigate to Role Management & Access Profiles, and then Role Management.
    4. In the Role Management wizard, perform the following steps:
    a. Select the role name for which you want to enable the Quote or Order objects.
    b. In Step 2, Record Type Access, select the Can Access, Can Read, and Can Create check boxes for the Order or Quote objects.
    c. In Step 5, Tab Access & Order, move the Order or Quote items from the Not Available to the Selected Tab section.
    d. Click Finish.
    5. Click Admin, User Management and Access Controls, Access Profiles.
    6. In the Access Profiles wizard, perform the following steps:
    a. Click Edit Link beside the role name for which you want to enable the Quote or Order objects.
    b. For Step 2, Specify Access Levels, change the value of the Default Access field for the Order or Quote objects from No Access to Read/Edit for Sales Users. Set to Read/Edit/Delete for the appropriate administrative users.
    7. Click Finish.

  • Lsmw.conv is not a session record (type 0)

    Hi
    i am using lsmw to import gl master records. all my steps are correct but on the last step when i have to run batch input session the message below appears:
    lsmw.conv is not a session record (type 0)
    i have used the method both ticking and un-ticking file without session records but still doesn't work.
    can anyone advise as to what the issue could be?
    thanks.
    Waheed

    Hi
    Have you checked box "Field names at start of file" in the Specify file step of the LSMW. This needs to be checked if your input file has column headings as first row. Otherwise, this should be unchecked.
    Regards
    Sowmya

  • For what is the field SVER with type RSRSVER in structure RSDRI_S_SELNODE ?

    Does anyone know what does the field SVER with type RSRSVER in structure RSDRI_S_SELNODE mean ??
    Thx....

    If this indicator is set, the material is costed using costing with a quantity structure (BOM and routing).
    The system searches for any existing cost estimates with quantity structure for the individual materials; it ignores existing cost estimates without quantity structure. If the system does not find any valid costing data for the materials, it costs the material or accesses the price in the material master.
    If this indicator is not set, the planned costs for the material are calculated using the cost estimate without quantity structure. In this case, you use unit costing to create the quantity structure manually by entering costing items for materials and activity types, for example.
    The system now searches for any existing cost estimates without quantity structure. If a cost estimate without quantity structure exists for a material, the results of this cost estimate are included in a cost estimate with quantity structure. If there is no cost estimate without quantity structure, the cost estimate with quantity structure accesses the price in the material master record. The planned costs for this material then go into the cost estimate with quantity structure as raw material costs.
    This does not apply if the indicator Ignore prod cost est w/o qty structure is set in the costing variant.

Maybe you are looking for

  • Syncing my apps before upgrade?

    Hi, New poster here! So I have a iPhone 3GS, iOS 4.1 and a home computer with Windows 7  and iTunes 11. So it's finally time to update to iOS6!   Iwant to make sure EVERYTHING is backup before I go anyforward. As a selmon iTunes user, it's been a whi

  • Maximum disk size for Z61m?

    I want to replace the original 80 MB HDD of my Z61m with a faster and larger one. What't the maximum disk size the controller/BIOS can cope with? Gurk  Thinkpad Tablet Thinkpad T431s ThinkPad Yoga S240 with OneLink Dock Solved! Go to Solution.

  • MRP - project stock - safety stock

    Hello, My MRP plans on a project stock. When I try to fill in the field "safety stock" in material master data MRP plans the safety amount on unrestricted use stock. I would like it to be planned on a specified project. Do you know how to do it? Best

  • Change cell background rule: how to change automatically?

    Hi All, I'm using a sheet as follows: the purpose is to take note of lap times on a circuit. I've 3 sectors (S1, S2, S3) which compose an entire lap. I would insert in the sectors cells a rule that will change the background of the cell when the sect

  • Deploying a Flex iPad App wirelessly without registering a device's UIUD

    Hi Is there any information or step by step guide to building and deploying a Flex iPad app wireless, without registering the device's ID? Is this possible with Flex? We do have an iOS Developer Enterprise Program license. Every set of instructions f