Maximum number of lines in UTL_FILE?

I am using the UTL_FILE package to dump the content of a package to a file. But I find that for packages that are large, the file is getting truncated when written out (it breaks at around 1680 lines or so).
I confirmed that there is no problem with the read part, by doing a dbms_output.put_line for that particular package.
Is there any setting on the maximum number of lines that can be written out here? I am using version 8i or Oracle. Thanks.
Regards,
Srini

OK, here is my code: thank you.
CREATE OR REPLACE PACKAGE BODY Code_Dump AS
PROCEDURE write_nonpackage_to_file(fname IN VARCHAR2) IS
fileHandler UTL_FILE.FILE_TYPE;
fileName VARCHAR2(400);
CURSOR c_file_content IS SELECT * FROM user_source WHERE name = fname AND NOT (type like '%PACKAGE%') order by line;
BEGIN
fileHandler := UTL_FILE.FOPEN('/users/mydir/tmp', fname || '.sql', 'w',1022000);
UTL_FILE.PUTF(fileHandler, 'CREATE OR REPLACE ');
<<file_writing_loop>>
FOR each_record IN c_file_content LOOP
UTL_FILE.PUT(fileHandler, each_record.text);
END LOOP file_writing;
UTL_FILE.FCLOSE(fileHandler);
END write_nonpackage_to_file;
PROCEDURE write_package_to_file(fname IN VARCHAR2) IS
fileHandler UTL_FILE.FILE_TYPE;
fileName VARCHAR2(400);
rec_type VARCHAR2(40);
CURSOR c_spec_file_content IS SELECT * FROM user_source WHERE name = fname AND type LIKE 'PACKAGE' order by line;
CURSOR c_body_file_content IS SELECT * FROM user_source WHERE name = fname AND type LIKE 'PACKAGE BODY' order by line;
BEGIN
dbms_output.enable(10000000);
fileHandler := UTL_FILE.FOPEN('/users/mydir/tmp', fname || '.sql', 'w',1022000);
UTL_FILE.PUTF(fileHandler, 'CREATE OR REPLACE ');
<<file_spec_loop>>
FOR each_record IN c_spec_file_content LOOP
UTL_FILE.PUTF(fileHandler, each_record.text);
END LOOP file_spec_loop;
UTL_FILE.PUTF(fileHandler, '/\n');
<<file_body_loop>>
FOR each_record IN c_body_file_content LOOP
UTL_FILE.PUTF(fileHandler, each_record.text);
END LOOP file_body_loop;
UTL_FILE.FCLOSE(fileHandler);
END write_package_to_file;
PROCEDURE dump_code (p_dump_what IN VARCHAR2) IS
CURSOR c_all_code IS
SELECT DISTINCT name, type FROM user_source;
my_copy VARCHAR2(40);
BEGIN
my_copy := p_dump_what;
<<each_file>>
FOR each_record IN c_all_code LOOP
IF each_record.type = my_copy THEN
dbms_output.put('parameter: ' || my_copy ||' ');
dbms_output.put_line('record type: ' || each_record.type);
END IF;
IF each_record.type <> 'PACKAGE' AND each_record.type <> 'PACKAGE BODY' AND each_record.type = my_copy THEN
dbms_output.put_line(each_record.name);
write_nonpackage_to_file(each_record.name);
END IF;
IF each_record.type = 'PACKAGE' AND each_record.type = my_copy THEN
write_package_to_file(each_record.name);
END IF;
END LOOP each_file;
END;
END Code_Dump;

Similar Messages

  • Maximum number of line items in sales order

    hi,
    Is there a limit on the maximum number of line items that are permitted in a sales order?
    Thanks,
    Shailaja

    Hi
       I think the correct reply would be 999,999 because data type of item number POSNR is NUM 6, which means that it can hold upto value 999,999.
         However, at the same time keep the following into consideration:
    1. FI document has a restriction of 999 line items per document. So, depending on the account settings, there will be a lower limit. E.g. if each Sales order line item results in 2 line items in the accounting document, then the max. no. of SO line items is limited to 499.
    2. If FI summarization is active, then the system summarizes the account postings, thus reducing the no. of FI line items. Hence, a SO can accomodate more than 999 line items. However, this means that certain line item level details will not be available to the Finance guys (which they may not like).
    3. As the number of line items in a Sales order increases, the system performance suffers greatly. There are performance fixes available, but in general, it is painful to load a SO with large no. of line times through BDC's. 10 Sales orders with 100 lines each consume less system resources than 1 Sales order with 1000 lines.

  • Maximum number of line items in PO/SA....

    Hi,
    1.
    What is the limitation on maximum number of line items in a PO/schedulling agreement/Contract.
    2.
    Also what is the maximum permissible number of lines in a single accounting document possible.As far as I know there is a limitation of counter 999 meaning if an aaccounting document is generated after GR then it will only allow max 999 lines.
    Is there any other way to avoid this.Because in my case I have for several line items in PO and several pricing conditions with separate GL account.Now when I do GR and if a PO has many line items with about 4 to 5 conditions then for each line item there would be minimum 6-7 entries.
    How can this best be handled in SAP.
    I was being adviced to split the GR but is there any better way or is there any option like summerised acounting document ?
    Please suggest as this is most critical for me.
    Thanks in advance
    Regards,
    manOO

    Hi,
    There is no limitation in PO.  But if you want, you can use following user exit;
    <b>EXIT_SAPMM06E_012</b>
    With regard to Maximum Number of items: There is a limit of (999) line items which can be posted per FI document. This is because the line item number (BSEG-BUZEI) field length is defined as (3) numeric positions, i.e., (999) line items.
    The most commonly used workarounds are as follows:
    (1) Implement FI summarization (per note 36353).
    (2) Cancel the original billing document and split it into smaller documents using different payment terms but actually with the same terms, in case of invoice verification.
    This will avoid the (999) line item limit for FI postings. Please also have a look at the note 117708 and 77161.
    Bye,
    Muralidhara

  • How do i detect the maximum number of lines

    Situation:
    I have a textfield that displays about 8 lines of text before
    the content would need to be scrolled to view the remaining
    content.
    Question
    Rather than having some ActionScript that is constantly
    trying to scroll the field, how do i detect the following.
    How do i determine the maximum number of lines that may be
    displayed in a textField (or any type of text field) before
    scrolling would be needed?
    Please specify the method. Thank you.

    When tracing the output using the bottomScroll, it only tells
    me how many liines I have output to the textfiedl, it does not tell
    me how many lines the textfield can hold.
    How do I determine how many lines a textfield can
    hold?

  • Maximum number of lines textfield

    Hi everybody !
    I need to set a maximum number of lines on a text field that should be expandable up to that line number and not beyond.
    Who do I know how to do?

    You can control the number of chars in the field, you can limit the field to the visible area but you cannot dictate a number of lines that the field can be. The closest thing you can get is to make  the field the max number fo lines and then use "limit to visible area" so that people cannot add more text.
    Paul

  • Maximum number of line items

    Dear All,
    I am facing an issue in the maximum number of line items EBP purchase order.
    We are in SRM 4.0 using extended classic scenario.
    In EBP PO, if the number of line items is more than 50 then we are getting the dump error "Field symbol has not yet been assigned" when we try to display the PO in Process purchase order transaction.
    In process purchase order, if we click on the start after enting the PO number then it is giving the dump error. But we could able to display the PO by clicking on the details icon of the PO after searching with time frame.
    Dump error is occuring only when we try open the PO header node to see the list of items of the PO. Until the PO is having 50 line items we dont have a problem. If the PO is having 51st item then we are getting the dump error.
    Have anyone faced this issue? Please help me to resolve this.
    Thanks.

    Pradeep,
    Dump error details:
    What happened?
        Error in ABAP application program.
        The current ABAP program "SAPLBBP_PDH_SEARCH" had to be terminated because one
         of the
        statements could not be executed.
        This is probably due to an error in the ABAP program.
    Error analysis
        You attempted to access an unassigned field symbol
        (data segment 32774).
        This error may occur for any of the following reasons:
        - You address a typed field symbol before it is set using ASSIGN
        - You address a field symbol that points to a line in an internal table
          that has been deleted
        - You address a field symbol that had previously been reset using
          UNASSIGN, or that pointed to a local field that no longer exists
        - You address a global function interface parameter, even
          though the relevant function module is not active,
          that is it is not in the list of active calls. You can get the list
          of active calls from the this short dump.
    Information on where terminated
        The termination occurred in the ABAP program "SAPLBBP_PDH_SEARCH" in
         "SUB_LIST_GET".
        The main program was "SAPLBBP_PO_UI_ITS ".
        The termination occurred in line 191 of the source code of the (Include)
         program "LBBP_PDH_SEARCHF10"
        of the source code of program "LBBP_PDH_SEARCHF10" (when calling the editor
         1910).
    Thanks.

  • Maximum number of line items in delivery

    HI experts,
    For open sales orders deliveries are created through VL10c in  background  job
    what are maximum number of  line items a delivery can have and How do I ristrict the Line items?
    Thanks in Advance.

    In standart there is not limit of quantity items in Delivery.
    But you can make limit - see Note 103334.
    SAP recomended 300 pos.

  • Maximum Number of line iten reached in FI

    Hi All,
    i ahve a question that wether the settings in OBYC is depends on sales organization / Plant? i mean, we have two sales orhganizations under one company code and orders in sales organization 1000 we are able to bill without any problem even for more number of materials. but for sales organization 7000 we are getting the subject error while doing PGI, i found that we should maintain / do the summerization of the documents in OBYC t-code. there i found for billing type VBRP and VBRK the settings sre maintained. what should i do? is there any other setting need to maintain?
    Thanks & Regards
    Ashwini

    i have a question that wether the settings in OBYC is depends on sales organization / Plant?
    To me, NO, it does not depend on sales organization. I assume your issue is based on the pricing procedure used by these sales organization. It looks you have two different pricing procedure for these two sales organizations. If pricing procedure are different, then check the number of pricing condition types and associated account keys. This will influence number of line items posted in the accounting. So you may need to summarize the line items. Take a look at OSS 1675235  - Error message F5727 "Maximum number of items in FI reached" when release SD billing document to accounting, Note 36353 - AC interface: Summarizing FI documents and/or 1483198  - Error F5 727 "Maximum number of items in FI reached" when releasing invoice to accounting
    Regards,

  • What is the maximum number of line items we can enter in an order...

    Hi,
       Can anyone explain what is the max number of line items that v can enter in an order....
    or if i want to increase the number of line items than the max where it is controlled.
    Because my mm counter part is facing this in the PO he could make only 9999,the problem is when posting...the accounting document is not getting generated bcas of exceeding the limit.
    venugopal

    hi,
    this is my personal experiance that we can enter at the most 499 line items in SALES ORDER.
    This is because for every line item there will be 2 financial entries, debit and credit. and 1 FI document can have at the most 999 line items (which we can not increase without KEY fromSAP)
    If we divide 999 by 2 then it comes to 499.50 so you can enter at the most 499 line items in Sales order.
    Regards
    Vishal

  • Maximum number of lines in Al11 for csv and txt files

    Hello Experts,
    I need to extract millions of records to a file in AL11 from several DSO - based on fiscal period and year. Can anyone tell me about the maximun number of lines a csv and txt file can hold in AL11.
    Points will be assigned.
    Kevin.

    Hi.
    As per my knowledge there is no limit for text files but for csv file its 1048576 rows.
    Hope this helps.
    Regards
    Sai

  • Set maximum number of line in text area

    Hi !
    I need to limit my text area to 3 lines. How do I do this ?
    I was thinking about character limitation but if the user
    press "enter" 3 times, I'm screwed since it is only 3 characters
    but it bust my 3 lines limit.
    Thx guys !

    You should never limit them to a set number of lines. Go for
    character limitation and test the input value before allowing them
    to submit the form.

  • What is the maximum number of lines per PO?

    Are their line limitations per PO? I'm trying to find out if there is a max number of lines you can have on a given PO.
    I assume performance starts to get effected at some point, but at what point might that be? 100 lines, 1000, 5000? We are looking at creating some standard PO's with 500+ lines on them, so we can create ASN against them via iSupplier.
    If you know or have any experience dealing with large PO's please fill me in.
    Thanks,
    Jeremy

    Hello,
    We used to have an interface who imported standard PO, with a contract number as PO number, then the number of lines was increasing. We had a first problem from 200 lines, we had to apply a patch, then the limit was about 900 lines. I made a few searches but this occurs 2 years ago and I'm not even able to find the SR or a patch number ...
    But from a business point of view, it's obviously a bad idea to always have the same PO with a high number of lines (hard to match invoices, PO is never closed, etc.) , from this problem we choose to import PO with PO number generated from the BL number + an suffix (to avoid duplicates PO numbers)
    Hope it helps a little,
    Kind regards,
    Xavier

  • Maximum number of lines in an import XMl

    Thewre seems tio be a maximum numbers of rows that you can send in an update XMl message. This number seems to be 10000. Can anyone confirm this?
    Next question: How can we increase this number?We have an import of 60000 rows and do nort want to spend all day submitting xml.
    Best regards,
    Hans Freund

    Thewre seems tio be a maximum numbers of rows that you can send in an update XMl message. This number seems to be 10000. Can anyone confirm this?
    Next question: How can we increase this number?We have an import of 60000 rows and do nort want to spend all day submitting xml.
    Best regards,
    Hans Freund

  • Maximum number of lines 999 reached in FI - Post Goods Issue Vl02N

    Hi
    While doing PGI for more than 500 items, the FI line items have reached more than 999 and system issues the Msg " maximum no of items in FI reached."
    As per Note 36353, we have maintained blank values for MKPF (reference transaction) in table TTYPV using transaction OBCY.
    Now when we tried to post the PGI for more than 500 items, system has issued the foll. msg "Error in FI Data Compression".
    Help us in solving this issue.
    Thanks

    Hi,
    Were you able to solve this issue, we have around 708 lines in the Outbound Delivery, as it would create more than 999 FI lines it is failing.
    Thanks.
    regards,
    Raj

  • Maximum number of lines / text in a cell

    I am compiling information in a spreadsheet. One column is for URLs. I'm entering multiple URLs (i.e. www.webiste.com) in the same cell. In order to go the next line (from within the same cell), I press "Option-Return" and type the next line of text (URLs).
    It's been working fine until last night when I entered maybe 50 URLS. Typing "Option-Return" would not go to the next line even though there was space left in the cell.
    I tried different things, like pasting text at the end of the last line. The text would not appear. Yet, when I select the whole cell and copy-paste it into a Text document, that new text appears.
    Is that a bug or is it just me who does not know how to use Numbers?

    I made a test.
    I imported bookmarks from Safari.
    I cleaned the file to keep only the URLs
    There where 415 for a total of 21440 characters.
    I pasted all of them in a single cell.
    I saved the doc, re opened it.
    The cell was correctly embedding the 415 URLs.
    It's a foolish use of the spreadsheet.
    It was just a test for the fun.
    Yvan KOENIG (VALLAURIS, France) mercredi 2 juin 2010 15:13:37

Maybe you are looking for