Relation between Table Type and CLOB

Hello ALL,
I am calling a procedure whose out parameter should be CLOB.
I am getting the output into a out parameter of type TABLE.
So how do we assign the table type data to CLOB variable.
Please let me know.
Kind Regards,
Kumar.

I presume you want to go through a pl/sql collection and agglomerate its contents to a clob. If so, this should give you teh general idea...
SQL> create or replace procedure table_to_clob
  2    (  p_owner in varchar2, p_glom out clob )
  3  as
  4      l_ntab strings;
  5      c clob;
  6  begin
  7      dbms_lob.createtemporary(c, true);
  8      select table_name bulk collect into l_ntab
  9      from all_tables
10      where owner = p_owner;
11      for i in l_ntab.first()..l_ntab.last()
12      loop
13          dbms_lob.writeappend(c, length(l_ntab(i)), l_ntab(i));
14      end loop;
15      p_glom := c;
16  end;
17  /
Procedure created.
SQL> var lc clob
SQL>
SQL> exec table_to_clob(user, :lc)
PL/SQL procedure successfully completed.
SQL>
SQL> print lc
LC
SEARCH_NOSGFP1P2GCENTITIESDOMAINSSHIPPINGSHIP_STATUSTSTADR$MYINDEX$IDR$
SQL>Cheers, APC
blog: http://radiofreetooting.blogspot.com

Similar Messages

  • The relation between table mbew and mbewh

    MORNING!
      I wanna know the relation between table mbew and mbewh.
      I finded some materials in table mbewh have total valuated stock , but these materials don't have value .
      Thanks a lot !

    Hi Roy, please check this link.
    http://www.sapfans.com/forums/viewtopic.php?p=4330&sid=a1b0e2c950bb90aa410b796d9ce0a13c
    REgards,
    Rich Heilman

  • What is the relation between req type and checking group

    Could any1 please explain me the link between requirement type and checking group?
    Also please throw some light on the other terms in ATP like requirement class and checking rule.
    Thanks in advance

    Dear VGR,
    The requirement type refers to the origin type, for example, goods receipt for purchase order (Type B) or goods issue to cost centers (Type K).
    The criterion that groups together all checking rules for all application areas for a material.
    In conjunction with the checking rule, the checking group defines the scope of the availability check for each business event, that is, which stocks, goods receipts, and goods issues are taken into account in the availability check, and whether replenishment lead time is checked.
    Checking rule
    A rule that defines how the availability check is performed.
    The checking rule, in conjunction with the checking group, determines the scope of the availability check for every business operation; that is, which stocks, receipts, and issues are included in the availability check and whether the check is performed with or without the replenishment lead time.
    I hope this will help you,
    Regards,
    Murali.

  • Table relation between Output Type and Spool

    Hi all,
    Is there a way to determine the table's relation between an Output Type and a Spool table for a printout.
    Thanks
    William Wilstoth

    Hi,
    See the Table TSP01 to store spool requests.
    Regards,
    Ballack.
    Reward Points if helpful.

  • Relation between message type and output type in ALE

    Hi
    I have a meeage type with me. I want to find the processing routine for the idoc. Procesing routine is acessed from  NACE - application -output type ( as far as i know ). Now how do i know the output type for the message type. Are the output type and message type related ?
    thanks
    sankar

    Hi,
    U can see the output type for message type here WE20 ->outbound parameters -> message control
    For invoice if mesage type is INVOIC and its output type is RD00 or ESYM or MAIL.
    output type is four character code which describes characteristics of output itself
    Regards

  • Relation between tables BSEG and COEP

    Hi,
    I am developing a report where I want to know the relationship between BSEG and COEP or COBK table is there any field or other way to know.
    Thanks in Advance.
    Regards,
    Kiran

    BSEG contains is the line items of the Accounting Docs ( header is BKPF) . This are primary costing data.
    On the other hand COEP is the line item data for secondary costing data. COBK is the header table for COBK.
    Though you will find BELNR in both BKPF - BSEG and COBK-COEP, but if you look at the data elements, they are BELNR_D and CO_BELNR respectively.

  • Relation between movement type and Schedule Line Item Cat

    I have a situation for Return Sales Order, there's two lines items with
    *Item Cat                      Schedule Line Item Cat         Stock
    REN(Normal)                 YN (Returns 657)                 Blocked
    RENN (Free Goods)      DN (Returns)                        Return Stock
    Question is, the user would like all the return stock to be posted to Block stock which should be using movement type 657. How can I configure this.

    Hello Sarvanand
    Assign Sched Line category YN to item category RENN using this path:
    SPRO/IMG/Sales and Distribution/Sales/Schedule Lines/Assign Schedule Line Categories
    Don't change movement type of standard Item cat DN.
    Thanks.

  • Relation between msg type & Idoc type

    i have a X msg type which is already assigned to Y idoc type.
    can I assign the same X msg type to a new Z Idoc type.
    If yes, what is the effect on the old assignment?
    note: Y & Z have no relation at all. both of then are two different Idoc types.

    Hi,
    it is a problem, If u assign a X message type to more than 1 message type, becuase message type is only identifier in the ALE or EDI configurations. Using this identifier u have to configure in the ALE or EDI.
    This is one-to-one relation between Message type and Idoc type.
    Reward me if it is ok.
    Regards,
    Subbarao

  • Is there any table for relation between batch number and valuation type ?

    hi,
    I would like to know where i can find relation between batch number and valuation type ?
    thank you and Best regards
    Fernand

    Hello
    MCHA

  • Difference between line type and internal table?

    Hi..
    I wanted to know, what is the difference between Line type and Internal Table?

    Hi,
        Before the 4.7 release in SAP if we want to define an internal table we have to write the defination using the occurs statement and we need to define all the fields using INCLUDE STRUCTURE or indidually all the fields ine by one.
    From 4.7 release of R/3 SAP introduced the Line type concept and it's part of the ABAP OOPS concept. for internal table defination we don't need to use the occur statements. Instead INCLUDE structure  we need to create a Line type for that structure in Se11 and then we can define the internal table like :
    DATA : ITAB TYPE TABLE OF <LINE_TYPE>.
    Only thing is this table will be  a table without header. So for internal table processing we need to define a work area structure of type line of line type  . EX:
    DATA: WA_ITAB TYPE LINE OF <LINE_TYPE>.
    Hope this helps.
    Thanks,
    Greetson

  • Relation between different GUID and tables in RPM

    Hi All,
    can you tell me the relation between different GUID and tables in RPM. Many thanks.
    Regards,
    J B

    Hi Deepesh,
    Try the foll. join :
        SELECT  fragment_guid  INTO  (some internal Table)
             FROM  comm_pr_frg_rod
             WHERE  product_guid  = (your product guid list)
    This should give u a complete match of the products.
    Hope this helps.
    Regards,
    Raviraj

  • Difference between line type and table type

    hi,
    can any one explain the difference between line type and table type . and how to declare a internal table and work area in BSP's

    hi,
    Go through this blog, this might help you.
    /people/tomas.altman/blog/2004/12/13/sdn-blog-how-to-do-internal-tables-in-bsp
    People who have worked with ABAP for a while sometimes forget that the internal table concept is rather different than what exists in most programming languages. It is very powerful, but at the same time can be confusing.
    In SAP it is possible to have a table which is the rows and a headerline which is the working area or structure which can then be commited to the table.
    With a BSP, if we try to create an internal table within the BSP event or layout we will get the following error: mso-bidi-
                            "InternalTableX" is not an internal table - the "OCCURS n" specification is mso-bidi- missing.
    class="MsoNormal"><![if !supportEmptyParas]>The problem we are seeing as an inconsistency has to do with the difference between classic ABAP and ABAP Objects. When SAP introduced ABAP Objects they decided to clean up some of the legacy syntax and create stricter rules. However they didn't want to break the millions of line of code that already existed, so they only implemented these stricter checks when OO is being used. Therefore you can declare a table with a header line in a regular ABAP program or Function Module but you can't have one with a header line in OO.
    Because everything in BSP generates ABAP OO classes behind the scenes, you get these same stricter syntax checks. My suggestion is that you have a look in the on-line help at the section on ABAP Objects and always follow the newer syntax rules even when writing classic ABAP programs.
    In a BSP when we need to work with a table we must always do the following:
    1, in the Types definitions create a structure:
                            types : begin of ts_reclist,
    mso-bidi-        style='mso-tab-count:2'>                            receiver type somlreci1-receiver,
    mso-bidi-        style='mso-tab-count:2'>                 style='mso-tab-count: 1'>             rec_type type somlreci1-rec_type,
    mso-bidi-         style='mso-tab-count:2'>                            end of ts_reclist.
    mso-bidi- <![if !supportEmptyParas]> <![endif]>
    but we must remember this is only a structure definition and we cannot store anything in it, although we can use it elsewhere as a definition for Structures(WorkAreas)
    2, in our Types definitions (this is the best place for this one as we can then access it from many areas without having to create it locally) so in the Types definitions we must create a TableType:
    class="MsoNormal">                         types : tt_reclist type table of ts_reclist.
    class="MsoNormal"><![if !supportEmptyParas]> <![endif]> this TableType is our table definition and again we cannot store anything in it, but we can use it elsewhere as a definition for InternalTables
    3, now that you have laid the foundations you can build and in the event handler, it is now simply a case of creating the InternalTable based upon the Table definition:
                           data: t_reclist type tt_reclist.
    and creating the structure based upon the structure definiton:
    <![if !supportEmptyParas]>   <![endif]>                         data: s_reclist type ts_reclist.
    as described above, the structure becomes the work area and this is where you assign new values for elements of the table eg:<![endif]>
                            s_reclist-receiver = '[email protected]'.   "<-- change address
    mso-bidi- <![if !supportEmptyParas]> <![endif]>
    mso-bidi-                         s_reclist-rec_type = 'U'.
    and then once the data is in the elements of the structure, the structure can be appended to the internal table as follows: class="MsoNormal">
                            append s_reclist to t_reclist.
    <![if !supportEmptyParas]> <![endif]>
    the internal table will then be readable for the ABAP function and can be applied for example as follows: class="style1">           style='mso-tab-count:1; font-family: "Courier New", Courier, mono;'>          
    class="style1">CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
                            EXPORTING
    style='mso-tab-count:2'>                                    document_data = docdata
    style='mso-tab-count:2'>                                    DOCUMENT_TYPE = 'RAW'
    style='mso-tab-count:2'>                                    PUT_IN_OUTBOX = 'X'
    style='mso-tab-count:2'>                                    COMMIT_WORK = 'X' "used from rel.6.10
                            TABLES
    mso-bidi-font-size: style='mso-tab-count:2'>                                    receivers = t_reclist
    class="style1"> <![if !supportEmptyParas]>   <![endif]>
    <![if !supportEmptyParas]>F inally, a comment from Thomas Jung,
    <![if !supportEmptyParas]> “when defining my work area for an internal table I like to use the like line of statement. That way if I change the structure of my table type, I know that my work area will still be OK. Second, your types and table types don't have to just be declared in your code. You can create a table type in the data dictionary and use it across multiple programs(also great for method and function parameters). I really push hard for the other developers at my company to use the Data Dictionary Types more and more.”
    Hope this helps, Do reward.

  • Difference between shipping type and shipment type

    hi to all
    what is teh differe nce between shiiping type and shipment type .
    what is the shipment number
    . can u pls tell relation between shipment and delivery tables .
    sorry to ask this question ??????   pls tell the answer .

    hi to all
    what is teh differe nce between shiiping type and shipment type .
    what is the shipment number
    . can u pls tell relation between shipment and delivery tables .
    sorry to ask this question ??????   pls tell the answer .

  • Relationship between material type and industry sector

    Hi experts
    when using t-code mm01,there are two fields material type and industry setor in screen.Is there any relationship between material type and industry sector? I want to know if user be able to see the material type related to particular industry sector?
    thanks in advance!

    Hello
    There is no direct relationship between the material type and the industry sector.
    The industry sector is used only for field sttus maintenance (fields in display/optional/requierd entry) in transactions.
    We will assign seperate field reference groups to industry sectors and deopending on how we configure the field references, the fields will appear for the materials created for that industry sector.
    regards

  • Where can I find the relation between company code and plant?

    where can I find the relation between company code and plant?
    I need to the list of plants under a company code.
    Which table?

    yes,wayne weng   .What you said is right.
    Thank you very much!
    My MSN:[email protected]

Maybe you are looking for