Spool generated more than 1

Hi Expert,
My functional assigned my program (subroutine entry) and my smartforms to output type in MB1B.
I tried to posted MB1B, and the smartforms display correctly. But when i check in SP02 spool generated more than 1 for the same smartforms.
Seems like the smartforms was called for several times (same with how many spool created) --> i checked in the code the smartforms was called one time only in subroutine entry.
Maybe this information make you guys more idea:
Before i forgot to clear my internal table in the print program (subroutine entry) that called the smartforms and the internal table was append.
This what happened:
1 smartforms = 1 page (itab 1 record)
When i posted MB1B --> 2 spools --> 1 is 1 page (correct), 2 is 2 pages.
1 smartforms = 2 pages (itab 2 records)
When i posted MB1B -> 4 spools --> 1 is 2 pages (correct), 2 is 4 pages, 3 is 6 pages, 4 is 8 pages.
What i try to show is, why the itab also append? Even i forgot to clear the itab should be 1 soubroutine entry called 1 time only every time posted MB1B right? so the itab should not be append.
Now i clear the itab before call the smartforms.
This what happened:
1 smartforms = 1 page (itab 1 record)
When i posted MB1B --> 2 spools --> 1 is 1 page (correct), 2 is 1 page.
1 smartforms = 2 pages (itab 2 records)
When i posted MB1B -> 4 spools --> 1 is 2 pages (correct), 2 is 2 pages, 3 is 2 pages, 4 is 2 pages.
The pages correctly already, but why the spool still generated more than 1 spool?
Any idea for the possibility why this happen?
Best Regards,
Victor.

Hi Prashant,
If let say inside smartforms got multiple loop? is it can cause multiple spool?
I thought only if multiple call on the smartforms (not multiple loop inside the smartforms itself) will create multiple spool?
Btw Prashant,
If you see what happened when i forgot to clear my internal table.
2 records --> become 4 records --> become 6 records --> become 8 records..
What make me confuse is, this smartforms or the entry program that append that itab was called only by output type?
Is it possible the ouput type itself that triggered the smartforms more than 1 time?
Best Regards,
Victor.

Similar Messages

  • Spool List more than 99 pages to PDF File to Mail

    Hi All,
    I want to convert a big spool list (342 Pages) to PDF file to send it by e-mail.
    I use the following code to convert my spool to PDF file:
    Convert to PDF file*
      CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
        EXPORTING
          src_spoolid              = w_spool_id
          no_dialog                = 'X'
          dst_device               = c_device
        IMPORTING
          pdf_bytecount            = gd_bytecount
        TABLES
          pdf                      = it_pdf_output
        EXCEPTIONS
          err_no_abap_spooljob     = 1
          err_no_spooljob          = 2
          err_no_permission        = 3
          err_conv_not_possible    = 4
          err_bad_destdevice       = 5
          user_cancelled           = 6
          err_spoolerror           = 7
          err_temseerror           = 8
          err_btcjob_open_failed   = 9
          err_btcjob_submit_failed = 10
          err_btcjob_close_failed  = 11
          OTHERS                   = 12.
      CHECK sy-subrc = 0.
    Transfer the 132-long strings to 255-long strings*
      LOOP AT it_pdf_output.
        TRANSLATE   it_pdf_output           USING ' ~'.
        CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
      ENDLOOP.
      TRANSLATE gd_buffer USING '~ '.
      DO.
        it_mess_att = gd_buffer.
        APPEND it_mess_att.
        SHIFT  gd_buffer LEFT BY 255 PLACES.
        IF gd_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
    The problem with the FM 'CONVERT_ABAPSPOOLJOB_2_PDF' is when my spool have more than 99 pages. In this case, the FM generate a backscreen job (sm37) to convert my spool and generate a binary PDF spool.
    After this step, the 'FM SO_DOCUMENT_SEND_API1' send an e-mail with the binary PDF File recovered in the spool list but i can't open the file with Adobe Reader because the format is wrong.
    Someone knows how could i convert my big spool list to PDF file to send it by e-mail adress ?
    Thanks a lot for your precious help that i need so much !

    Generate big spool list
    REPORT  ZGEN_SPOOL.
    tYPE-POOLS: slis.
    TYPES: BEGIN OF str_mara,
    matnr TYPE mara-matnr,
    ersda TYPE mara-ersda,
    ernam TYPE mara-ernam,
    laeda TYPE mara-laeda,
    aenam TYPE mara-aenam,
    vpsta TYPE mara-vpsta,
    END OF str_mara.
    DATA: i_mat TYPE TABLE OF str_mara,
    wa_mat LIKE LINE OF i_mat.
    DATA:params LIKE pri_params.
    DATA: days(1) TYPE n VALUE 2,
    valid TYPE c.
    DATA: obj TYPE REF TO cl_salv_table.
    SELECT matnr
    ersda
    ernam
    laeda
    aenam
    vpsta
    UP TO 4999 ROWS
    FROM mara INTO CORRESPONDING FIELDS OF TABLE i_mat.
    TRY.
    CALL METHOD cl_salv_table=>factory
    IMPORTING
    r_salv_table = obj
    CHANGING
    t_table = i_mat.
    CATCH cx_salv_msg .
    ENDTRY.
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
    EXPORTING
    * destination = 'QAS'
    list_name = 'ZTEST_VERTEX'
    list_text = 'TEST'
    no_dialog = 'X'
    immediately = ' '
    expiration = days
    IMPORTING
    * OUT_ARCHIVE_PARAMETERS =
    out_parameters = params
    valid = valid
    * VALID_FOR_SPOOL_CREATION =
    EXCEPTIONS
    archive_info_not_found = 1
    invalid_print_params = 2
    invalid_archive_params = 3
    OTHERS = 4
    IF sy-subrc ne 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    TRY .
    NEW-PAGE PRINT ON PARAMETERS params NO DIALOG.
    CATCH cx_sy_nested_print_on .
    ENDTRY.
    CALL METHOD obj->display.
    NEW-PAGE PRINT OFF.

  • A single table line generating more than 2 lines when exporting to Excel

    Guys,
    I do have an interactive report on apex with a varchar2(4000) column that is generating more than 1 excel row per table row. In another words:
    Table my_report
    file_id number,
    file_comment varchar2(4000)
    Query on report
    select file_id, file_comment from my_report
    It generates 5 lines on report screen but, when I export to excel using csv or xls format, it generates more than 5 lines. On file_comments field on excel, some of them has a break in 2 or 3 lines. Seems to me a line feed problem with CHR(13) or chr(10).
    Anyone as a solution or a similar problem like this? Any idea?
    Andre.

    you could try to remove the linebreaks in the select.
    select file_id, file_comment, replace(replace(file_comment,CHR(13)),CHR(10)) file_comment_nobreak
    from my_reportThen depending on the type of report you could show one column, but export the other column in the excel/csv file. Not sure if this works with an interactive report too.

  • RS_TREE... FMs : How do I generate more than one tree at a time ?

    Dear experts,
    we are using the RS_TREE function modules (such as RS_TREE_CREATE,
    RS_TREE_ADD_NODE...) for protocol purposes in various applications.
    Now it turned out to be a problem to generate more than one tree at the same
    time. It's always like "the last one wins".
    The initialization with RS_TREE_CREATE seems to destroy tree structures
    being in the process of construction.
    Does anyone have an idea of how to solve that kind of problem ?
    Thanks in advance for your (desperately wanted) help.
    Andreas

    Do you mean items in Finder?
    To highlight (select) a whole block of items :
    - click the top item you want
    - hold down Shift
    - click the bottom item you want
    The whole range from top to bottom will be highlighted
    To select random items :
    - click the first item
    - hold down the Command key
    - click any more items anywhere in the list
    Just the items you clicked will be highlighted
    This technique works also in apps like iTunes, iPhoto, etc.

  • How to multiple/ parellal sets of books to generate more than one financial statement based on different (or the same) accounting principles.

    How to multiple/ parallel sets of books to generate more than one financial statement based on different (or the same) accounting principles.
    My Client needs Parallel Ledger in SAP B1 similar like SAP ECC. Is this functionality available ?

    Dear Mr. Nagrajan,
    Thank you for your response. I have already gone through documents but not able to understand. Is there any setup for this ? or its just work around i.e. using template and special field in JV i.e. Ref. 1 /2
    My doubts :
    I understand that Chart of Account structure is one and common for IFRS and other accounting method. We need to create only those account separately ( 2 times with prefix like IFRS revenue account, GAAP Revenue account).
    Now at time of entry, Assume some entries / adjustment are specifically for IFRS and not for other ledger. In this case, What need to do ?
    You have mentioned about DTW approach but do we need to insert all JV's again with other ledger ?
    Someone suggested that if any entry which are specific to IFRS Ledger, We need to user Ref.1 /2 column or Transcation code column and in which we can put IFRS
    Based on this, Need to create 2 seperate template for IFRS and other ledger for all report.
    This is my understanding of Solution in SAP B1. Please help me to clarify my though process
    Please do needful.If you have done implemenation and if you can share doucment, it would be great help.
    Email :[email protected]

  • Is it possible to display spool having more than 50 pages?

    Hi All,
    Is it possible to display spool having more than 50 pages?
    Standard SAP transactions like SP01/SP02/SM37allows till 50 pages if i am not wrong!
    Thanks,
    Vinod.

    in the setting of any spool I selected 10000 pages as the last page... I dont have spool to check and see if it really displays all 10000 pages.
    sp01> getin into some spool > hit settings buttons on the top.

  • Generate more than 36 subroutines?

    Dear all,
    how can I generate more than 36 subroutine pools or dynamic programs (not perstistent programs)?
    Best regards,
    Christoph
    what I do (test case):
    Data: it_prog type stringtab.
    append 'Program SUBPOOL.' to it_prog.
    append 'Data: result type i.' to it_prog.
    append 'form eval changing result.' to it_prog.
    append ' result = result + 1.' to it_prog.
    append 'endform.' to it_prog.
    Do 100 times.
    Do 100 times.
    CALL METHOD lc_test->process
    EXPORTING
    it_tab = it_prog
    receiving
    RESULT = result
    enddo.
    method PROCESS.
    Data: prog type string.
    generate subroutine pool it_tab name prog.
    endmethod.
    Message was edited by:
    Christoph Aschauer

    HI,
    see this example.
    REPORT  ZBHEX2.
    DATA: prog TYPE string,
          tab  TYPE STANDARD TABLE OF string,
          mess TYPE string,
          sid  TYPE string.
    APPEND 'PROGRAM subpool.'                        TO tab.
    APPEND `DATA spfli_tab TYPE TABLE OF spfli.`     TO tab.
    APPEND `LOAD-OF-PROGRAM.`                        TO tab.
    APPEND `  SELECT *` &
           `         FROM spfli` &
           `         INTO TABLE spfli_tab.`          TO tab.
    APPEND `FORM loop_at_tab.`                       TO tab.
    APPEND ` write:/ 'abcd'. `                       TO tab.
    APPEND `  DATA spfli_wa TYPE spfli.`             TO tab.
    APPEND `  LOOP AT spfli_tab INTO spfli_wa.`      TO tab.
    APPEND `    PERFORM evaluate_wa USING spfli_wa.` TO tab.
    APPEND `  ENDLOOP.`                              TO tab.
    APPEND `ENDFORM.`                                TO tab.
    APPEND `FORM evaluate_wa USING l_wa TYPE spfli.` TO tab.
    APPEND `  WRITE: / l_wa-carrid, l_wa-connid.`    TO tab.
    APPEND `ENDFORM.`                                TO tab.
    GENERATE SUBROUTINE POOL tab NAME prog
             MESSAGE mess
             SHORTDUMP-ID sid.
    IF sy-subrc = 0.
      PERFORM ('LOOP_AT_TAB') IN PROGRAM (prog) IF FOUND.
    ELSEIF sy-subrc = 4.
      MESSAGE mess TYPE 'I'.
    ELSEIF sy-subrc = 8.
      MESSAGE sid TYPE 'I'.
    ENDIF.
    rgds,
    bharat.

  • Workflow generate more than one instnace

    Hello All,
                I had called my work flow from Module Pool using Event "SAP_WAPI_CREATE_EVENT"  and also calling two other event which also working as terminating event in that same work flow which i had called using  "SAP_WAPI_CREATE_EVENT_UPD_TAST".. it is not inmy work flow but for all workflow it generate more than one instance..... in our system...
    Please give appropriate solution as soon as Possible.....
                                                                             Thank You....

    Hi all,
    Thanks for ur replies.
    I wud elaborate on the issue..
    Basically I am trying to execute a multilevel approval scenario.
    For that I have an initiator of the workflow and multiple approvers (acting one at a time - i.e at single instance, single approver would be available)
    When Initiator clickd on 'Send for approval' - command button in module pool, "SAPI_WAPI_CREATE_EVENT" is being called to trigger the workflow.
    I have created a business object which will get me the next approver. Here, it happens, at times , that the multiple work items for the same workflow event are being sent to approver's Inbox. (altho' at times it works fine - single work item). Checking the event queue : TCODE : SWEL ; the EVENT INSTANCE IDs are same for all the work item instances.
    Later on when the approver executes the workitem (approves/rejects - command button in module pool), again multiple instances are created ( with same event instance ID). Here we are using the function module "SWE_CREATE_EVENT_IN_UPD_TASK".
    Althou' things work perfect sometimes, all this happens randomly.
    Glad to hear to ur suggestions and comments.
    Thanks & Regards.
    Edited by: HardikParikh on May 28, 2009 7:05 PM

  • ME22 Transaction Generating more than one spool

    Hello,
    It has been noticed that in some company codes PO is printed (via ME22) in more than one copy
    I noticed that for one PO - three or four spool requests are generated.
    When i changed PO in ME22 and triggered for output it is generating 4 r more spools.
    Since it is the standard transaction i think Configuration should be changed.
    Where can i get those settings. I need only 1 spool for one output.
    Please help.

    Hi,
    Please check the output condition record (NACR) for application EF (Purchase Order). Select the key combination for the corresponding purchasing output determinatino. Then go to the communication area and check number of messages perhaps it was setup more than 1.
    Regards,
    Ferry Lianto

  • ME22 Transaction Generating more than one spool for an OUTPUT

    Hello,
    It has been noticed that in some company codes PO is printed (via ME22) in more than one copy I noticed that for one PO - three or four spool requests are generated.
    When i changed PO in ME22 and triggered for output it is generating 4 r more spools.Since it is the standard transaction i think Configuration should be changed.
    Where can i get those settings. I need only 1 spool for one output.
    Please advice any change in set up / configuration to be done, so that only one copy of PO is printed.
    Please help.

    Hi,
    Please check the output condition record (NACR) for application EF (Purchase Order). Select the key combination for the corresponding purchasing output determinatino. Then go to the communication area and check number of messages perhaps it was setup more than 1.
    Regards,
    Ferry Lianto

  • Spool output more than 255 characters

    Hi ,
    i am running a ALV report in background whose output is more than 255 characters . but spool is showing only 255 charcters.
    Do we have any setting to change to display all characters.
    Or any OSS notes that can be applied.
    Thanks & regards,
    Sonika Ahuja

    Hi,
    You need to change the Format Type through SPAD transaction. The Format Type decides the number of rows and columns per page. By creating a new format type as per your requirement would solve the probelm.
    Also, in the Report declaration, change the Line-Size to 300 or as per the width of your output.
    For further details pls. refer this thread :
    Re: Spool List output display > 255 char when the rpt is run in Background
    Best regards,
    Prashant

  • [Web] Is there a way to generate more than 1 CSS file?

    Obviously using model.appearance. with AddCustomCSS lets us generate a CSS file.
    I could create an AddPage file that uses maps nonCSS values into a pregenerated CSS file. The problem is that live_update doesn't handle these well.
    (if someone wants to write a more indepth look at doing stuff in Live Update, that would be fine with me, not to mention Matthew Campagna and John Beardsworth)
    Is there an alternative way, or are we restricted to one CSS file per model section? why do I need more than 1? iFrames. I don't want the same body values etc inside the iFrame HTML.

    Let me put it another way:
    What would I need to add to live_update.js to have nonCSS values force a refresh?

  • Using a ommand to generate more than one row of data in utl file

    Hi Guys
    This might be a pretty long one. But I require help with regards to using outer and inner loops within my code.
    Here is the task:
    Each account involved with the DCA Allocation has an entry in the DCAACCOUNTALLOCATION table to track its progress. The STATUS value of the entry shows the position of the account in the DCA Allocation process.
    The status entry being tested is 3.
    Below is the code:
    create or replace
    PROCEDURE DCA_BMW_OUT
    IS
    -- Declare all variables as reference
    v_out_file UTL_FILE.FILE_TYPE;
    v_row_Count NUMBER;
    r_bmw NUMBER;
    v_out_directory all_directories.directory_path%type;
    v_out_filehandle UTL_FILE.FILE_TYPE := NULL;
    v_out_buffer varchar2 (32767);
    v_records NUMBER;
    body_output varchar2(32759 BYTE);
    dictionary_guarantorsexist varchar2 (1 Char);
    -- Text required within this part of the procedure
    v_body varchar2(32767 BYTE);
    v_header VARCHAR2(32759 BYTE);
    BEGIN
    FOR r_bmw IN
    ( SELECT *
    FROM dcaadditionaldata
    WHERE directory_name IS NOT NULL
    ) LOOP
    BEGIN
    -- Output file to be added into the directory specified
    v_out_file := utl_file.fopen (r_bmw.directory_name, 'DCAExport_1_' || TRIM(TO_CHAR(SYSDATE,'DDMMYYYY_HH24MISS')) || '.txt', 'W');
    -- The Header data which will be outputted to the file
    v_header := 'KennzeichenBrgschaftsforderungGesamtforderung|Währung|Übergabedatum|DifferenzierungAnwalts-oderInkassofall|MainMarktpartnernummer|
    MainAnrede|MainTitel|MainName|MainVorname|MainStraße|MainHausnummer|MainPLZ|MainOrt|MainLand|MainGeburtsdatum|MainTelefonnr.Schuldner|G1Marktpartnernummer
    G1Anrede      G1Titel      G1Name      G1Vorname      G1Straße      G1Hausnummer      G1PLZ      G1Ort      G1Land      G1Geburtsdatum      G1Telefonnr.Schuldner      G2Marktpartnernummer      G2Anrede      G2Titel
    G2Name|G2Vorname|G2Straße|G2Hausnummer|G2PLZ|G2Ort|G2Land|G2Geburtsdatum|G2Telefonnr.Schuldner|G3Marktpartnernummer|G3Anrede|G3Titel|G3Name|G3Vorname|
    G3Straße|G3Hausnummer|G3PLZ|G3Ort|G3Land|G3Geburtsdatum|G3Telefonnr.Schuldner|G4Marktpartnernummer|G4Anrede|G4Titel|G4Name|G4Vorname|G4Straße|G4Hausnummer|
    G4PLZ|G4Ort|G4Land|G4Geburtsdatum|G4Telefonnr Schuldner|G5Marktpartnernummer|G5Anrede|G5Titel|G5Name|G5Vorname|G5Straße|G5Hausnummer|G5PLZ|G5Ort|G5Land|
    G5Geburtsdatum|G5Telefonnr.Schuldner|Kundennr.|Bestandsnr.|Finanzierungsnr.|KennzeichenFinanzierung/Leasing|Kennzeichenprivat/gewerblich|
    reguläresVertragsende|Laufzeit|Vertragsdatum|Vertragsstatus|Ratenbetrag|Filiale/Gebiet|Finanzierungstyp|BankverbindungKonto|BankverbindungBLZ|
    RSVKennzeichen|Kündigungsdatum|Modell|Fahrgestellnummer|KFZKennzeichen|KFZZulassungsdatum|CoD1Marktpartnernummer|CoD1Anrede|CoD1Titel|CoD1Name|
    CoD1Vorname|CoD1Straße|CoD1Hausnummer|CoD1PLZ|CoD1Ort|CoD1Land|CoD1Geburtsdatum|CoD1Telefonnr.Schuldner|CoD2Marktpartnernummer|CoD2Anrede|CoD2Titel|
    CoD2Name|CoD2Vorname|CoD2Straße|CoD2Hausnummer|CoD2PLZ|CoD2Ort|CoD2Land|CoD2Geburtsdatum|CoD2Telefonnr.Schuldner|CoD3Marktpartnernummer|CoD3Anrede|
    CoD3Titel|CoD3Name|CoD3Vorname|CoD3Straße|CoD3Hausnummer|CoD3PLZ|CoD3Ort|CoD3Land|CoD3Geburtsdatum|CoD3Telefonnr.Schuldner|CoD4Marktpartnernummer|
    CoD4Anrede|CoD4Titel|CoD4Name|CoD4Vorname|CoD4Straße|CoD4Hausnummer|CoD4PLZ|CoD4Ort|CoD4Land|CoD4Geburtsdatum|CoD4Telefonnr.Schuldner|
    CoD5Marktpartnernummer|CoD5Anrede|CoD5Titel|CoD5Name|CoD5Vorname|CoD5Straße|CoD5Hausnummer|CoD5PLZ|CoD5Ort|CoD5Land|CoD5Geburtsdatum|
    CoD5Telefonnr.Schuldner Y|Y|5830,99|EUR|20/08/2009|DCA|4|123456|Herr||Mueller|Rainer|Messigasse|33|84432|Filz|Deutschland|01/07/1957|08912345|234567|Frau|Dr|Mueller|Rita|Messigasse|33|84432|Filz|Deutschland|13/12/1955|08912345|||||||||||||||||||||||||||||||||||||||||||||||||76543|5000234567||Lease|Privat|12/12/2013|60|12/12/2008||250,50|US|Rate|1234567890|32343450|N||BMW 320 i|W34567890PA34567|M-H-3456|09/12/2008||||||||||||||||||||||||
    N|450,80|EUR|20/08/2009|DCA|4|987654|Frau||Meier|Heide|Beinstr.|44|86353|Laus|Deutschland|03/06/1949|08987654|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||87654||8765675585|Loan|Gewerblich|14/03/2012|72|14/03/2006||500,01|DF|Select|976579657|32343450|N||BMW 500 sl|W94567890PA34568|M-H-3457|10/03/2006|34343434|Herr|Dipl|Meier|Rudolf|Heislestr.|69|85433|Maus|Deutschland|28/05/1945|08934567|234567|Frau|Dr|Mueller|Rita|Messigasse|33|84432|Filz|Deutschland|13/12/1955|08912345
    Y|33970,50|EUR|20/08/2009|Lawyer|4|64646464|Frau||Schmidt|Susanne|Hueftgasse|55|89363|Maus|Deutschland|23/08/1933|08934567|34343434|Herr|Dipl|Meier|Rudolf|Heislestr.|69|85433|Maus|Deutschland|28/05/1945|08934567|234567|Frau|Dr|Mueller|Rita|Messigasse|33|84432|Filz|Deutschland|13/12/1955|08912345|||||||||||||||||||||||||||||||||||||98757|5000785675||Lease|Privat|11/11/2009|48|11/11/2005||380,70|GH|Zielrate|234567899|32343450|Y||BMW 380 s|W54567890PA34569|M-H-3458|07/11/2005||||||||||||||||||||||||
    N|10040,20|EUR|20/08/2009|Lawyer|4|4865465|Herr||Schulz|Karl|Nasenweg|77|83354|Schuh|Deutschland|18/01/1965|08972545|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||46789|50004765787||Lease|Privat|16/09/2012|60|16/09/2007||1234,56|OS|ZUS|98765432|32343450|Y||BMW 280 i|W74567890PA34570|M-H-3459|12/09/2007||||||||||||||||||||||||';
    utl_file.PUT_LINE(v_out_file,v_header,TRUE);
    -- Below will output a row of data which satisfy the requirements.
    FOR body_output IN
    ( SELECT
    AccountDetails.CUSTOMERNUMBER, AccountDetails.ACCOUNTNUMBER, CUSTOMERDETAILS.CDTITLE, CUSTOMERDETAILS.CDFIRSTNAME, CUSTOMERDETAILS.CDLASTNAME, AccountDetails.ACCOUNTTYPE,
    AccountDetails.ORIGINALCONTRACTENDDATE, AccountDetails.CONTRACTTERM, AccountDetails.CONTRACTENDDATE, AccountDetails.BRANCHAREA, AccountDetails.PRODUCTTYPE,
    AccountDetails.HOUSEBANKACCOUNT, AccountDetails.CARMODEL, AccountDetails.CARLICENCE, AccountDetails.ARREARSBALANCE, AccountDetails.CODEBTOR, AccountDetails.GUARANTORNUMBER
    FROM AccountDetails
    JOIN CUSTOMERDETAILS ON AccountDetails.CUSTOMERNUMBER = CUSTOMERDETAILS.CUSTOMERS1
    WHERE EXISTS
    ( SELECT *
    FROM Dcaaccountallocation
    JOIN DebtEpisodes ON DebtEpisodes.ACCOUNTID = Dcaaccountallocation.ACCOUNTID
    WHERE Dcaaccountallocation.dcaid = 41
    AND Dcaaccountallocation.status = 3
    AND DebtEpisodes.DCASentDate IS NULL
    AND Dcaaccountallocation.ACCOUNTID = AccountDetails.ACCOUNTNUMBER
    AND DebtEpisodes.DCAORLAWYER = 'DCA'
    LOOP
    UTL_FILE.PUT_LINE (v_out_file,
    body_output.CUSTOMERNUMBER|| '|' || body_output.ACCOUNTNUMBER|| '|' ||body_output.CDTITLE|| '||' ||body_output.CDFIRSTNAME || '|||||' ||
    body_output.CDLASTNAME|| '||||' || body_output.ACCOUNTTYPE|| '|' ||body_output.ORIGINALCONTRACTENDDATE|| '||||' ||body_output.CONTRACTTERM || '|||||' ||
    body_output.CONTRACTENDDATE|| '|' || body_output.BRANCHAREA|| '||' ||body_output.PRODUCTTYPE|| '||' ||
    body_output.HOUSEBANKACCOUNT|| '|||' || body_output.CARMODEL|| '||||' ||body_output.CARLICENCE|| '|' ||
    body_output.ARREARSBALANCE|| '||||' || body_output.CODEBTOR|| '|' ||body_output.GUARANTORnumber);
    END LOOP;
    UTL_FILE.fclose (v_out_file);
    EXCEPTION
    WHEN OTHERS THEN
    UTL_FILE.put_line (v_out_file, 'failed');
    -- If any errors occur when closing the file, then we close the opened file.
    IF utl_file.is_open(v_out_file) THEN
    UTL_FILE.fclose (v_out_file);
    END IF;
    END;
    UPDATE DebtEpisodes
    SET handoverdate = null
    WHERE DCAORLAWYER = 'DCA'
    AND accountid IN
    ( SELECT accountid
    FROM Dcaaccountallocation
    WHERE Dcaaccountallocation.status = 3
    AND Dcaaccountallocation.dcaid = 41
    END LOOP;
    END DCA_BMW_OUT;
    Currently, the above codes issue is that although many rows of data have been inputted in all the tables, with regards to the select criteria above (in italics), it only produces one row of data when i expect more than one to appear.
    If the query only outputs one row but you're expecting it to produce more than one row, then you need to dissect the statement to find out where the output is being unduly restricted
    I was told maybe an outerloop or an inner loop would do the trick, but really stuck on how and where to put it.
    Hope this makes sense guys and I would really appreciate your time.
    Thanks

    if i run this particular code
    ( SELECT
    AccountDetails.CUSTOMERNUMBER, AccountDetails.ACCOUNTNUMBER, CUSTOMERDETAILS.CDTITLE, CUSTOMERDETAILS.CDFIRSTNAME, CUSTOMERDETAILS.CDLASTNAME, AccountDetails.ACCOUNTTYPE,
    AccountDetails.ORIGINALCONTRACTENDDATE, AccountDetails.CONTRACTTERM, AccountDetails.CONTRACTENDDATE, AccountDetails.BRANCHAREA, AccountDetails.PRODUCTTYPE,
    AccountDetails.HOUSEBANKACCOUNT, AccountDetails.CARMODEL, AccountDetails.CARLICENCE, AccountDetails.ARREARSBALANCE, AccountDetails.CODEBTOR, AccountDetails.GUARANTORNUMBER
    FROM AccountDetails
    JOIN CUSTOMERDETAILS ON AccountDetails.CUSTOMERNUMBER = CUSTOMERDETAILS.CUSTOMERS1
    WHERE EXISTS
    ( SELECT *
    FROM Dcaaccountallocation
    JOIN DebtEpisodes ON DebtEpisodes.ACCOUNTID = Dcaaccountallocation.ACCOUNTID
    WHERE Dcaaccountallocation.dcaid = 41
    AND Dcaaccountallocation.status = 2
    AND DebtEpisodes.DCASentDate IS NULL
    AND Dcaaccountallocation.ACCOUNTID = AccountDetails.ACCOUNTNUMBER
    AND DebtEpisodes.DCAORLAWYER = 'DCA'
    This returns 1 row of data
    However if i run a small part of the above code...
    SELECT *
    FROM Dcaaccountallocation
    JOIN DebtEpisodes ON DebtEpisodes.ACCOUNTID = Dcaaccountallocation.ACCOUNTID
    WHERE Dcaaccountallocation.dcaid = 41
    AND Dcaaccountallocation.status = 2
    It returns a lot of rows with a status of 2
    Now i presume what I am going to do is to ensure that all the fields provide satisfactory requirements, with regards to the above code. Although I have many records in all the stated tables already.
    :(

  • Smartform generating more than one page while printing

    Good evening everyone.
    I have created a smartform and now I am trying to print it. I have executed RSTXPDFT4 program in SE38 and entered the spool number and saved my smartform. But now my smartform is having more number of pages even though in print preview there is only one page. The same page is repeating again and again. Whats might be the problem? Please help.
    Dev.

    Hi Antony,
    Thanks very much.
    As I said before when executing RSTXPDFT4 and trying to save the smartform to my system then it is showing many pages and that too the first page is not at all the output of my smartform and the rest are my smartform output which is repeating. I don't know from where it has come. I think there is some problem in my smartform itself.
    But if I go into SP01 then it is showing only one page that too the first page which is not my smartform output.
    Dev.

  • Generating more than 10 repeatable forms in a contract in Documaker

    Is there any setting in INI file or somewhere in documaker which can be adjusted to tell AFP or PDF to print 10 or more repetable forms in a contract?

    Can you share any example of such trigger? However, I tried to mock up input xml and printed the form n-number of times.
    Since XML is generated form other system, I do not think at this moment people will like to have so other team involved to make that changes in XML. I was looking for something is DM itself.
    Someone in this forum has suggested for FormList trigger, I tried with that, changing the repeatbale forms count to 10, this has made the form to trigger required numbe rof time but it is not letting other form to trigger in the formset.
    I tried generating PDF 11 time in hope that it will trigger other form after that many time Gendat has reached.
    Do not know why other form are not triggering when receipient count copy is increased.
    Exapmple:-
    <ML_Formset>
    <ML_Form><ML_LongFormNumber>CL 32 30 06 05</lm_LongFormNumber></ML_Form>                    
    <ML_Form><ML_LongFormNumber>ML 00 03 09 07</ML_LongFormNumber></ML_Form>
    <ML_Form><ML_LongFormNumber>CL 32 36 06 05</ML_LongFormNumber></ML_Form>
    </ML_Formset>
    In here ML 00 03 09 07 is repeatble form having receipient copy count = 10 in Form List Trigger. (Trigger is Manual)
    Other form has receipient copy count = 1
    Requirement:-
    In the form set there are forms that is catagorized as repetable and that I have to print repeatable number of time.
    Any suggestion will be helpful.

Maybe you are looking for