MV logs getting truncated

I am trying to setup Master to Materialized view(Snapshot) replication and Materailzed view logs getting truncated when I create MV at Snapshot site. Is there any way to prevent truncating MV logs at master site while creating MV at sanpshot site?
Here are steps that I perforemd, Initally I made two copy of database one as master and other is Snpshot with unique global name.
At Master site:
1. MV logs created.
2. Some DML happned at Master site, MV logs are populated.
Snapshot(MV) site:
1. MV created using prebuilt table option.
then I checked on Maste site MV logs are truncated but DML that happened in step 2 at Master site that are missing at Snapshot site.
Is there any way to prevent truncating MV logs at master site while creating MV at sanpshot site?
Thanks.
Pravin

This is a restriction of the prebuilt table "At registration time, the table must reflect the materialization of a subquery." Even if you could prevent the snapshot log from getting truncated (i.e. by creating a second snapshot against the same master table), the snapshot you created on prebuilt still will NOT refresh those records. As far as the snapshot log is concerned, once you create the snapshot with prebuilt, it must be consistent. The trick is, you have to keep the users from updating the master table until you have issued the create snapshot command.

Similar Messages

  • What determines when logs get rotated?

    I need to write a script to parse /private/var/log/secure.log and create a report consisting of the time and userid of each login. But secure.log gets archived periodically, and then the archives get deleted, so I need to time the execution of this script to whatever it is that triggers this archiving so I can record the logins before the log gets rotated.
    Looking at the logs and archives, it's a little hard to tell what's going on.
    % ls -l /private/var/log/secure.*
    -rw-r----- 1 root admin 8153 Jul 24 21:37 /private/var/log/secure.log
    -rw-r----- 1 root admin 2232 Jul 21 23:16 /private/var/log/secure.log.0.gz
    -rw-r----- 1 root admin 2196 Jul 7 08:21 /private/var/log/secure.log.1.gz
    -rw------- 1 root admin 6275 Jun 29 22:29 /private/var/log/secure.log.2.gz
    The time intervals are not the same, and neither are the file sizes, so the logs don't appear to get rotated on a regular schedule or when they reach a certain size. It does seem to happen between logins, I think.
    /private/etc/periodic/daily/100.clean-logs looks like it deletes old logs, but it isn't involved in archiving or deleting archived logs. /private/etc/periodic/daily/500.daily has a routine for archiving logs, but I don't understand it well enough to see what triggers it.

    I've written the script for doing user accounting on the Panther machines, but I'm still having trouble understanding what's going on on my own machine. I'm not positive, but I think there might be some serious problems with launchd and how it manages logs. Something is definitely not right.
    According to the documentation Mark referred me to,
    Beginning in Mac OS X v10.4, the preferred way to add a timed job is to use a launchd(8) timed job. A launchd timed job is similar to a cron(8) job, with two key differences:
    * Each launchd job is described by a separate file. This means that you can add launchd timed jobs by simply adding or removing a file.
    * If the computer is asleep at the designated time, a launchd job executes as soon as the computer wakes. This is similar to the behavior of anacron and other cron replacements).
    From what I'm seeing, this simply isn't happening. Look at the listing I posted above:
    % ls -l /private/var/log/secure.*
    -rw-r----- 1 root admin 8153 Jul 24 21:37 /private/var/log/secure.log
    -rw-r----- 1 root admin 2232 Jul 21 23:16 /private/var/log/secure.log.0.gz
    -rw-r----- 1 root admin 2196 Jul 7 08:21 /private/var/log/secure.log.1.gz
    -rw------- 1 root admin 6275 Jun 29 22:29 /private/var/log/secure.log.2.gz
    This log is rotated by the script /private/etc/periodic/weekly/500.weekly, but it clearly isn't being rotated weekly. The dates the three archives were created fall on a Friday and two Saturdays, and there is a two week gap between 0 and 1. I am positive that my laptop was not asleep for a week or more. I use it every day. I noticed that the permissions on secure.log.2.gz are wrong, but I don't think that's the cause of the problem. It's just another sign of the hinkiness that abounds here.
    The situation looks even stranger when you look at the dates of the first and last entries in each file:
    secure.log.2: Jun 19 22:34:51 - Jun 29 22:29:19
    secure.log.1: Jun 30 20:15:36 - Jul 7 08:20:33
    secure.log.0: Jul 7 11:33:01 - Jul 21 23:16:07
    secure.log: Jul 22 15:35:03 - Jul 27 22:43:46 (and counting)
    So it looks secure.log.0 and secure.log.2 were truncated and archived around midnight--different days of the week, but at least they avoided getting entries from the same date in two different files. But look at secure.log.1. 8:21 in the morning??? Why???? It's not like it was asleep or anything. I had been using it until around 12:30, and started in again at around 6:30 Saturday morning. Why does it decide it's time to rotate the log at 8:21? And this is after it has already waited two weeks!
    So if you're doing user accounting on a weekly basis, this just isn't helpful, and it sure isn't helpful if you're trying to do it monthly. You basically need to re-concatenate the files and split them out by grepping the dates. In other words, before you can do what you need to do, you have to undo what the periodic maintenance routines have done.
    And you have to hope they haven't destroyed the records you need.
    Among all the other mysteries I'm trying to sort out, I'm trying to understand why the /private/etc/periodic/monthly/500.monthly script didn't run at the end of June. One thing I can't do is go back and look at the system.log, because they rotate them daily (or they intend to, but this doesn't work correctly either) and only keep the last seven. Here's what the log rotation script looks like:
    for i in system.log; do
    if \[ -f "${i}" \]; then
    printf %s " ${i}"
    if \[ -x /usr/bin/gzip \]; then gzext=".gz"; else gzext=""; fi
    if \[ -f "${i}.6${gzext}" \]; then mv -f "${i}.6${gzext}" "${i}.7${gzext}"; fi
    if \[ -f "${i}.5${gzext}" \]; then mv -f "${i}.5${gzext}" "${i}.6${gzext}"; fi
    if \[ -f "${i}.4${gzext}" \]; then mv -f "${i}.4${gzext}" "${i}.5${gzext}"; fi
    if \[ -f "${i}.3${gzext}" \]; then mv -f "${i}.3${gzext}" "${i}.4${gzext}"; fi
    if \[ -f "${i}.2${gzext}" \]; then mv -f "${i}.2${gzext}" "${i}.3${gzext}"; fi
    if \[ -f "${i}.1${gzext}" \]; then mv -f "${i}.1${gzext}" "${i}.2${gzext}"; fi
    if \[ -f "${i}.0${gzext}" \]; then mv -f "${i}.0${gzext}" "${i}.1${gzext}"; fi
    if \[ -f "${i}" \]; then
    touch "${i}.$$" && chmod 640 "${i}.$$" && chown root:admin "${i}.$$"
    mv -f "${i}" "${i}.0" && mv "${i}.$$" "${i}" && if \[ -x /usr/bin/gzip \]; then
    gzip -9 "${i}.0"; fi
    fi
    fi
    done
    That last part is just plain weird. They get done rotating all the gzipped archives, and then they need to test to see if there is a new log file, and if not, create one, then archive it. Archive an empty log??? What for? Don't you want to see if there's a current log, and that it has at least one line of data in it, before you start the whole process? Why bother rotating logs if there's no new information? And then, after they archive it, they don't create a new log? All of the other log rotation scripts archive the current log then create a new one. Why should this one be different? This just looks like a mistake.
    Also, I'm not the most experienced shell scripter, but isn't this just plain crude and ugly? Instead of using a loop to do a repetetive task, with a variable you can change to set a limit on the number of iterations, they've hard-coded each step. And this is in the script that we're not supposed to change, and it can't be overridden. Nice.
    So if we want to change how frequently our log files get trashed, we need to write a daily.local script that takes the truncated, archived files and decompresses them, concatenates them, and puts them somewhere out of harms way? Is that how we're supposed to proceed? Follow them around and undo what they do then try to do it right? Heaping more ugliness upon ugliness?
    And keep in mind that the timing mechanism that controls it all is broken, and if you want to do your monthly reports at the end of the month, or your weekly reports at the end of the week, you either have to wait around until this byzantine Rube Goldberg machine spits out the logs you need or go to the terminal and call periodic to run whatever process you want it to run manually after all.
    I am starting to wish I'd never looked at this.

  • Data getting truncated while exporting report to a text file in crystal 10?

    Hi All,
    I am using crystal 10.When exporting report to a text file ,a dialog prompts asking for Character perinch with a default value 9.If I change the value from 9 to 16 i am getting the correct data(that means character per inch value is 16) and it update "CharPerInch" value in registry under following location to 16.
    HKEY_CURRENT_USER\Software\Crystal Decisions\10.0\Crystal Reports\Export\Text
    The dialog asked for character per inch also has option to select not to prompt again and i also selected that in first go.
    When i export the report again in text format it didn't prompt for number of character per inch but the data gets truncated.
    What i believe is even though it updates entry in registry and reads, it is not using the same value for export. It never consider the value that is in registry, if the check box is not selected then it is using the value entered in the dialog and if the check box is selected then in the next run it uses the default value as 9.
    Can anyone suggest me how to override this problem ? Is there any other setting place in registry where i can enter the number of character per inch.I don't want to crystal to prompt always for character per inch.

    Hi Venkateswaran,
    The other option to avoid truncation of the data could be
    Right click the text filed
    Click on Format Text to open the Format Editor
    On Common tab check the text box for Can Grow.
    This will prevent the data from truncating in preview as well as while exporting to text.
    Otherwise you will have to set the characters per inch to 16 each time. I donu2019t see changing the registry value causing any difference here.
    Regards,
    Aditya Joshi

  • Error Message in selection screen Status bar is getting truncated

    Hi Guys,
    Error Message in selection screen Staus bar is getting truncated (full message is not getting displayed).... can anybody tell me how to reslove this

    Hi
    Maimum we can give the error message length is 50 char. If you give more than that it will get truncated.
    What you can do this split 50 and 50 like that you can give 200 chnars.
    Data : Text1 type char50
              Text2 type char50
    If sy-surc ne 0.
    Message Text1 Text2  TYPE "E'' or 'S'
    endif.

  • Application server file values getting truncated

    Hi,
    I'm sending a file to Application server with minimun 1800 characters in a singlw row. The file is getting uploaded into the server but with only 255 chars in the same row. All others are getting truncated.
    Can anyone please suggest on this?
    Thanks
    Itishree.

    Hi,
    You can download your file from application server using CG3Y.
    And upload your file to application server using CG3Z.
    I think just a typo mistake by the one who answered before me.
    Regards,
    Bharati Singh

  • ALV Header getting truncated in excel

    I am using the GRid Layout. but when i am downloading the output in the Excel sheet, the headers are getting truncated.
    I have tried increasing the width in the FIELDCAT and also removing the coulmn-optimze option in the layout also. but still after trying the headers are getitng truncated.
    Any pointers how can i download without the headers getting truncated.
    Thanks

    Refer the code snippet:
    Follow this way:
    CONSTANTS :  c_delim TYPE c VALUE cl_abap_char_utilities=>horizontal_tab.
    data :it_excel_dwnld TYPE STANDARD TABLE OF t_zzidwnld_data     ,
           wa_excel_dwnld TYPE t_zzidwnld_data .                      .
       CONCATENATE   'Physical Inventory Document'
                    'Item '
                    'Material '
                    'Material Description'
                    'Material Group'                
                    'Plant'
                    'Sloc'
                    'Doc Date'
                    'Book Qty'
                    'Counted Qty'
                    'Value of Phy Inv Count'
                    'Standard Price'
                    'Difference Qty'
                    'ABS Qty'                        
                    'BUn'
    INTO wa_excel_dwnld-line
                                   SEPARATED BY c_delim.
      APPEND wa_excel_dwnld TO it_excel_dwnld.
      CLEAR: wa_excel_dwnld.
    LOOP AT it_output INTO wa_output.
    CONCATENATE   wa_output-iblnr
                      wa_output-zeili
                      wa_output-matnr
                      wa_output-maktx
                      wa_output-matkl       
                      wa_output-werks
                      wa_output-lgort
                      wa_output-bldat
                      v_buchm
                      v_menge
                      v_wrtzl
                      v_stprs
                      v_difqy
                      v_absqy              
      INTO wa_excel_dwnld-line
                           SEPARATED BY c_delim.
        APPEND wa_excel_dwnld TO it_excel_dwnld.
      ENDLOOP.
    CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                = l_flname
          filetype                = 'ASC'
          write_field_separator   = '#'
        TABLES
          data_tab                = it_excel_dwnld

  • In Read_text FM, the data after 256 characters gets truncated

    Hi All,
    In this FM, the internal table can't have string type field. In my case the data is in multiple lines of internal table and I am concatenating into a single field which is of type DESCRIPTIONS(string). I am passing this data to a table in smartform.Only 255 characters are printed, remaining data gets truncated. I am using CONVERT_OTF and SX_TABLE_LINE_WIDTH_CHANGE FMs to create PDF. Is it the limitation or I am incorect here?

    Your posting title is misleading; there's nothing wrong with FM READ_TEXT.  Yes, it returns a table of type TLINE, as you've noted.  Perhaps you could close this post and repost in FORM PRINTING with an appropriate title like: Can't show more than 255 characters of text.....but search first, because you cannot be the first person to encounter this limitation.

  • Report output getting truncated in email attachment

    Hello Gurus,
    My requirement is to send a report output as an email attachment.
    I have done the coding for this but have a small problem. In the attachment the report is getting truncated after certain length.
    Can you advise wats the problem ?
    Regards,
    Suhas

    Hello Guys,
    I too was contemplating on those lines. But actually i was calculating the File Size incorrectly.
    Changed the code & now it working !!!!!!!
    BR,
    Suhas

  • Problem in download to application server- file column is getting truncated

    We have a program for which there are 2 options a list output or file to be placed on the application server. The TXT file is of length 525 characters.
    My problem is while the list output is generated the whole list is getting outputted, but when we take a output on the application server last 10 columns are getting truncated.
    Can somebody give a help on this.
    Thanks in advance.
    Jilly

    Use the function module
    ARCHIVFILE_SERVER_TO_CLIENT
    Pass the values: as download file and destination in the respective fields.
    File to be downloaded in :(Pass the exact file name)
    PATH :                          
    SDEC01\SAPMNT\INT\HR\OUT\FMLA-20080205-0728
    and
    Destination to download the file in:
    TARGETPATH                      C:\DOCUMENTS AND SETTINGS\JILFEM\MY DOCUMENTS\FMLA-20080205-0728
    Regards,
    Jilly

  • E-mails get truncated when forwarded

    When I forward an e-mail from within the e-mail app, the e-mail does not get forwarded completely. For some reason the original text gets truncated.
    I first noticed this on IOS 6 on both the iPhone 5 and iPad 3rd gen.
    Please advice me what to do, because this way the e-mail app is not reliable.
    Kind regards.

    Thank you. I will have to try this out with a known troublesome link, but I don't recall getting an "open with" dialog in these circumstances. Also, as I understand these things (and I probably don't) the links I have tried to use have been communication links rather than a file opening function. The problem I got the other day was on a BBC site and the function of the link (which was an e-mail address) was to enable me to post a question. I was able to use that address to post the question without using the link shortcut - just sent an e-mail.

  • HTML result gets truncated after including of the JSF page

    Hi there,
    I'm trying to create a page that will include dynamically content of JSF pages from another web application.
    Thus, there is a web application (Pages) that is deployed under web context: /test-pages and another web application (Faces) that is deployed under web context: /test-faces.
    The source code of /test-pages/IndexPage.jsp
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></meta>
    <title>
    IndexPage
    </title>
    </head>
    <body>
    <h3>Page Start</h3>
    <jsp:include page="header.jsp"/>
    <br>
    <h1>Index Page of the test-pages application</h1>
    <br>
    <jsp:include page="footer.jsp"/>
    </body>
    </html>
    The source code of /test-pages/header.jsp
    <%
    ServletContext servletContext = request.getSession().getServletContext().getContext("/test-faces");
    RequestDispatcher reqDispatcher = servletContext.getRequestDispatcher("/faces/header.jsp");
    reqDispatcher.include(request, response);
    %>
    The source code of /test-pages/footer.jsp
    <h2>Simple Footer</h2>
    The source code of /test-faces/header.jsp
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <f:subview id="myID">
         <f:verbatim>
              <h2>Faces Header</h2>
         </f:verbatim>
    </f:subview>
    The HTML execution result (http://localhost:7001/test-pages/IndexPage.jsp):
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></meta>
    <title>
    IndexPage
    </title>
    </head>
    <body>
    <h3>Page Start</h3>
         <h2>Faces Header</h2>
    Could you help me understand, why the result gets truncated after including of the JSF page.
    Thanks,
    Sasha

    Thanks you for reply!
    Unfortunately, still no luck!
    Any other ideas will be highly appreciated!

  • The last digit of invoice vbeln is getting  truncated  in the file

    Hi Experts,
    I'm facing problem in both quality and production,the last digit of invoice vbeln is getting  truncated  in the file when i do export-> local file ->spread sheet.I'm having an alv report using grid display alv is getting display.when output is displayed  i'm getting vbeln as 0430098109 and when i'm trying to download into XLS file using export local file spread sheet i'm getting vbeln as 043009810, last digit not appering in the file
    Thanks in advance.

    PERFORM reset_component_price.
    LOOP AT tab_documenti .
        IF tab_documenti-waerk = co_krw .
          tab_documenti-netwr = tab_documenti-netwr * 100 .
        ENDIF .
        MODIFY tab_documenti .
      ENDLOOP .
    DESCRIBE TABLE tab_documenti LINES num.
      IF num > 0.
        IF importa = 'X'.
          PERFORM esporta_file.
        ELSE.
          PERFORM stampa2.
        ENDIF.
      ENDIF.
    *&      Form  recupero_trigger_fatturazione
          text
    FORM recupero_trigger_fatturazione.
      SELECT vkorg fkdat kunnr vbeln vtweg spart vbtyp
             INTO CORRESPONDING FIELDS OF TABLE tab_vkdfs
             FROM vkdfs
             WHERE vkorg IN s_vkorg
              AND  fkdat IN s_edatu
              AND  kunnr IN s_kunnr
              AND  vbeln IN s_vbeln
              AND  vtweg IN s_vtweg
              AND  spart IN s_spart
              AND  vbtyp IN s_vbtyp.
    ENDFORM.   
    *&      Form  TERMINO_REPERIMENTO_DATI_DOCUM
    FORM termino_reperimento_dati_docum.
      IF NOT port IS INITIAL. "APAB 26/01/04
        REFRESH l_tab_vbak. CLEAR l_tab_vbak.
        SELECT vbeln
               erdat ernam                "APAB 26/01/04
               vkorg vtweg spart kunnr
               vkbur vkgrp vbtyp auart augru
               INTO CORRESPONDING FIELDS OF TABLE l_tab_vbak
               FROM vbak
               WHERE vbeln IN s_vbeln "EQ tab_vkdfs-vbeln Ceriati
               AND   ernam IN s_ernam "APAB 26/01/04
               AND   kunnr IN s_kunnr
               AND   vkorg IN s_vkorg
               AND   vtweg IN s_vtweg
               AND   spart IN s_spart.
        CHECK sy-subrc EQ 0.
        LOOP AT l_tab_vbak WHERE vkbur IN s_vkbur AND
                                 vkgrp IN s_vkgrp AND
                                 auart IN s_auart AND
                                 augru IN s_augru.
          REFRESH l_tab_vbap. CLEAR l_tab_vbap.
          SELECT vbeln posnr pstyv werks kondm matnr netwr waerk kwmeng
                 netpr prodh taxm1 knumh                "APAB 26/01/04
                 INTO CORRESPONDING FIELDS OF TABLE l_tab_vbap
                 FROM vbap
                 WHERE vbeln EQ l_tab_vbak-vbeln "tab_vkdfs-vbeln.Ceriati
                   AND pstyv IN s_pstyp. "Ceriati
          CHECK sy-subrc EQ 0.
    APAB 26/01/04 start - find order reason
          CLEAR l_tab_vbak-bezei.
          SELECT SINGLE bezei INTO l_tab_vbak-bezei FROM tvaut
                              WHERE spras EQ sy-langu
                              AND   augru EQ l_tab_vbak-augru.
    find client description
          CLEAR : l_tab_vbak-name1,l_tab_vbak-land1.
          SELECT SINGLE name1 land1 INTO (l_tab_vbak-name1,l_tab_vbak-land1)
                                                                   FROM kna1
                                              WHERE kunnr = l_tab_vbak-kunnr.
    Ceriati imposte
          SELECT SINGLE taxkd INTO tab_documenti-taxm1 FROM knvi
                                     WHERE kunnr = l_tab_vbak-kunnr
                                     AND  aland = 'IT'
                                     AND  tatyp = 'MWST'.
          LOOP AT l_tab_vbap WHERE werks IN s_werks AND
                                   kondm IN s_kondm AND
                                   matnr IN s_matnr.
            IF l_tab_vbak-auart = 'Z1OI' AND ( l_tab_vbap-pstyv = 'TAX' OR
                                               l_tab_vbap-pstyv = 'TAD' ).
              SELECT SINGLE * FROM vbup WHERE vbeln = l_tab_vbap-vbeln
                                        AND   posnr = l_tab_vbap-posnr.
              CHECK vbup-fksaa NE 'C'.
            ENDIF.
            CLEAR vbep.
            CLEAR: qta_uscita_t, qta_cons_t.
            REFRESH l_tab_vbfa.
            SELECT vbelv posnv posnv vbeln posnn vbtyp_n rfmng
            INTO CORRESPONDING FIELDS OF TABLE l_tab_vbfa
               FROM vbfa
               WHERE vbelv EQ l_tab_vbap-vbeln  AND
                     posnv EQ l_tab_vbap-posnr AND
                     vbtyp_n EQ 'J'.
            LOOP AT l_tab_vbfa.
              qta_cons_t = l_tab_vbfa-rfmng + qta_cons_t.
            ENDLOOP.
            REFRESH l_tab_vbfa.
            SELECT vbelv posnv posnv vbeln posnn vbtyp_n rfmng bwart
            INTO CORRESPONDING FIELDS OF TABLE l_tab_vbfa
               FROM vbfa
               WHERE vbelv EQ l_tab_vbap-vbeln
                 AND posnv EQ l_tab_vbap-posnr
                  AND BWART NE SPACE
                 AND ( vbtyp_n EQ 'R'
                  OR   vbtyp_n EQ 'h' ).
            LOOP AT l_tab_vbfa.
              IF l_tab_vbfa-vbtyp_n = 'h'.
                l_tab_vbfa-rfmng = l_tab_vbfa-rfmng * -1.
              ENDIF.
              qta_uscita_t = qta_uscita_t + l_tab_vbfa-rfmng.
            ENDLOOP.
            SELECT * FROM vbep WHERE vbeln EQ l_tab_vbap-vbeln AND
                  posnr EQ l_tab_vbap-posnr
                 AND edatu IN s_edatu
                  ORDER BY edatu.
              CHECK vbep-bmeng NE 0.
              MOVE vbep-bmeng TO tab_documenti-menge.
    CLEAR: qta_uscita,qta_cons.
              IF qta_cons_t = 0.
                CLEAR qta_cons.
                IF qta_uscita_t NE 0.
                  IF qta_uscita_t > vbep-bmeng.
                    qta_uscita = vbep-bmeng.
                    qta_uscita_t = qta_uscita_t - vbep-bmeng.
                  ELSE.
                    qta_uscita = qta_uscita_t.
                    CLEAR qta_uscita_t.
                  ENDIF.
                ENDIF.
              ELSE.
                IF qta_cons_t > vbep-bmeng.
                  qta_cons = vbep-bmeng.
                  qta_cons_t = qta_cons_t - vbep-bmeng.
                ELSE.
                  qta_cons = qta_cons_t.
                  CLEAR qta_cons_t.
                ENDIF.
                IF qta_uscita_t NE 0.
                  IF qta_uscita_t > vbep-bmeng.
                    qta_uscita = vbep-bmeng.
                    qta_uscita_t = qta_uscita_t - vbep-bmeng.
                  ELSE.
                    qta_uscita = qta_uscita_t.
                    CLEAR qta_uscita_t.
                  ENDIF.
                ENDIF.
              ENDIF.
              qta_cons = qta_cons - qta_uscita.
    CLEAR: tab_documenti-inco1, tab_documenti-vsart,
                     tab_documenti-bstkd, tab_documenti-bstdk.
              SELECT SINGLE inco1 vsart zterm bstkd bstdk
                                                INTO (tab_documenti-inco1,
                                                     tab_documenti-vsart,
                                                     tab_documenti-zterm,
                                                     tab_documenti-bstkd,
                                                     tab_documenti-bstdk)
                                                      FROM vbkd
                                           WHERE vbeln = l_tab_vbap-vbeln
                                           AND   posnr = l_tab_vbap-posnr.
    IF sy-subrc NE 0.
                SELECT SINGLE inco1 vsart zterm bstkd bstdk
                                                  INTO (tab_documenti-inco1,
                                                        tab_documenti-vsart,
                                                       tab_documenti-zterm,
                                                       tab_documenti-bstkd,
                                                       tab_documenti-bstdk)
                                                                  FROM vbkd
                                             WHERE vbeln = l_tab_vbap-vbeln
                                             AND   posnr = '000000'.
              ENDIF.
    CLEAR makt.
              SELECT SINGLE * FROM makt WHERE matnr = l_tab_vbap-matnr
                                          AND spras = sy-langu.
              IF sy-subrc = 0.
                tab_documenti-maktx = makt-maktx.
              ENDIF.
    IF qta_cons = l_tab_vbap-kwmeng.
                tab_documenti-qta_c = vbep-bmeng.
                tab_documenti-qta_a = l_tab_vbap-kwmeng - qta_cons
                                                        - qta_uscita.
                CLEAR qta_cons.
              ELSEIF
               qta_cons <= vbep-bmeng.
                tab_documenti-qta_c = qta_cons.
                tab_documenti-qta_a = vbep-bmeng - qta_cons - qta_uscita.
    ENDIF.
    l_tab_vbap-netwr = l_tab_vbap-netpr * ( tab_documenti-qta_a +
                                                     tab_documenti-qta_c ).
    MOVE: l_tab_vbak-vbeln TO tab_documenti-vbeln,
                    l_tab_vbak-vkorg TO tab_documenti-vkorg,
                    l_tab_vbak-vtweg TO tab_documenti-vtweg,
                    l_tab_vbak-spart TO tab_documenti-spart,
                    l_tab_vbak-kunnr TO tab_documenti-kunnr,
                    l_tab_vbak-vkbur TO tab_documenti-vkbur,
                    l_tab_vbak-vkgrp TO tab_documenti-vkgrp,
                    l_tab_vbak-vbtyp TO tab_documenti-vbtyp,
                    l_tab_vbak-auart TO tab_documenti-auart,
                    l_tab_vbak-augru TO tab_documenti-augru,
                    l_tab_vbak-bezei TO tab_documenti-bezei, "APAB 26/01/04
                    l_tab_vbak-erdat TO tab_documenti-erdat, "APAB 26/01/04
                    l_tab_vbak-ernam TO tab_documenti-ernam, "APAB 26/01/04
                    l_tab_vbak-name1 TO tab_documenti-name1, "APAB 26/01/04
                    l_tab_vbak-land1 TO tab_documenti-land1, "APAB 26/01/04
                    tab_vkdfs-fkdat  TO tab_documenti-fkdat.
              MOVE: l_tab_vbap-vbeln TO tab_documenti-vbeln,
                    l_tab_vbap-posnr TO tab_documenti-posnr,
                    l_tab_vbap-pstyv TO tab_documenti-pstyv,
                    l_tab_vbap-werks TO tab_documenti-werks,
                    l_tab_vbap-kondm TO tab_documenti-kondm,
                    l_tab_vbap-matnr TO tab_documenti-matnr,
                    l_tab_vbap-netwr TO tab_documenti-netwr,
                    l_tab_vbap-waerk TO tab_documenti-waerk,
                    l_tab_vbap-netpr TO tab_documenti-netw1, "APAB 26/01/04
                    l_tab_vbap-prodh TO tab_documenti-prodh.
    MOVE: vbep-edatu TO tab_documenti-fkdat.
    IF  NOT tab_documenti-qta_a IS INITIAL
              OR  NOT tab_documenti-qta_c IS INITIAL.
                APPEND tab_documenti.
              ENDIF.
    CLEAR tab_documenti.
            ENDSELECT.
          ENDLOOP.
        ENDLOOP.
        CLEAR tab_documenti.
    ENDIF.
    IF NOT boll IS INITIAL. "APAB 26/01/04
        LOOP AT tab_vkdfs WHERE vbtyp EQ 'J'.
          SELECT SINGLE * FROM vbuk WHERE vbeln EQ tab_vkdfs-vbeln.
          CHECK sy-subrc = 0.
          IF vbuk-wbstk = 'C'.
            PERFORM prendi_dati.
          ELSE.
            IF port EQ 'X'.
              PERFORM prendi_dati.
            ENDIF.
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDFORM.

  • Spool header is getting truncated in SP01 after ECC6.0 upgrade

    Hi Experts,
    We have recently upgraded our SAP System from 4.6C version to ECC6.0. We are facing some problem with Spool display.
    Issue: Column header is truncated in spool list display through SP01 (Applied necessary notes)/ ZSP01(Created based on note 186603). The column header is not getting truncated while executing report in online mode.
    Can anybody else got the problem or have any suggestions to rectify this problem?
    Rgds,
    Vinodkumar

    Hello Vinodkumar,
    I have seen this problem and the solution was to follow the note 1226758:
    Do not forget Call SPAD and choose Settings -> Spool System -> Other. Select
    'SP01: Number of Columns for List Display from Format'.
    Hope it helps to you.
    Best regards,
    Rafael

  • Spool Output getting truncated

    Hi,
        I am using ALV grid display in a report.When we schedule the report in background and check the spool,The output is getting truncated (For eg Customer number is getting truncated ).I have checked the print parameters of background job,The format is passed as 'X_PAPER'.
    Pls suggest.
    Thanks
    Rakesh.

    Hi Rakesh,
    In SM36 during the Job creation Click on Print Specifications , Properties, Double click on Format value and change it to the required width.
    Use transaction SPAD to create width if it isn't available.
    Vijay

  • Leading zeros getting truncated in plsql report

    Hi,
    I've a requirement of a plsql report with an excel output. When i see the output in excel, the leading zeros get truncated. Is there any suggestion for this, other than enclosing within ' '. Because this particular solution prints the output along with quotes which is not acceptable. Please help me with this.
    -Divya Goteti

    Just prefix with =" and " at teh end of column. like
    select '="' || bank_account_no || '"' from employee_bank_list
    but if you are using same report for pdf also then use decode in pre/postfix.
    Imran

Maybe you are looking for