Help, How to view the error log of oracle Job

Hi all,
I created a job in my database, which clears the archivelog. After the job is executed, it occurs error.Such as :
RMAN清理归档日志 1 问题 2010-3-19 下午03时11分00秒 GMT+08:00 PTDB 数据库实例 SYSTEM RMAN 脚本
How to view the error log of oracle Job?
Thank you.
Eric Zhou

Hello,
Besides some views (with the scheduler) that you can get on the link below:
http://download-west.oracle.com/docs/cd/B28359_01/server.111/b28310/scheduse002.htm#CHDGIDFD
You may use the LOG parameter with RMAN so as to generate a logfile on the server.
Also from EM DBConsole (starting with 10g) you may have the RMAN Backup Report.
Hope this help.
Best regards,
Jean-Valentin

Similar Messages

  • How to view the login log in window NPS after login cisco switch and without SQL server database

    how to view the login log in window NPS after login cisco switch and without SQL server database
    in summary 
    there is only log with event id 4400
    A LDAP connection with domain controller XCPAWS20.cyberport.noc for domain NOC2 is established.

    Hi adil,
    For your issue, you can create a custom security token service (STS) and then set up a trust relationship between a SharePoint 2010 farm and the custom STS.
    For more information, you can refer to the articles:
    http://forums.asp.net/t/1335229.aspx?Sharing+Authentication+Ticket+Between+ASP+NET+and+Sharepoint
    https://msdn.microsoft.com/en-us/library/office/ff955607(v=office.14).aspx
    http://www.paraesthesia.com/archive/2011/02/01/working-with-windows-identity-foundation-in-asp-net-mvc.aspx/
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • How to check the error log in sharepoint 2013 online (office 365)

    I'm working with sharepoint online instance. I'm developing a sharepoint app using Napa 365 but its giving me some error with the correlation ID. Where i have to check the error log to get the actual error description?
    Please suggest me the right direction.
    Thanks in advance!

    Hi,
    As your environment is SharePoint Online, I suggest you can create a new thread in SharePoint Online forum, you will get more detailed information from there and more experts will help you.
    Office 365 Forum:
    http://community.office365.com/en-us/f/default.aspx
    Thanks for your understanding.
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Write the Error log from background Job to the Spool request

    Hi ,
    I have a situation where in i need to capture the error log of a Z program which runs as a background job and write that log into the spool request. My Z program calls runs RSEINB00 program using the SUBMIT statement. When this Job fails the error log can be seen in SM37. But i need this error log to be sent in to a spool.
    I can read the error log using the BP_JOBLOG_READ FM and can also create a spool using the RSPO_SPOOL_OPEN FM.
    The problem is, when the Submit statement executes, due to internal valdation in the RSEINB00 program the program terminates. Due to this it is not able to perform the SY-SUBRC Check and thus doesn't read the log.
    Can anybody suggest me how to overcome this problem. I am attaching the code for your refernece.
    SUBMIT RSEINB00
           USING SELECTION-SET 'TEST2'
                           TO SAP-SPOOL
                           LIST NAME 'LOCL'
                           IMMEDIATELY space
                           KEEP IN SPOOL 'X'
           AND RETURN.
    <b>If sy-subrc <> 0.</b>           
                 CALL FUNCTION 'BP_JOBLOG_READ'
                  EXPORTING
                    CLIENT                      = SY-MANDT
                    JOBCOUNT                    = i_tbtco-jobcount
                    JOBLOG                      = i_tbtco-joblog
                    JOBNAME                     = i_tbtco-jobname
                   TABLES
                     JOBLOGTBL                   = l_joblog
                 IF SY-SUBRC <> 0.
                 else.
                    message i002 with l_joblog-msgv1.
                 ENDIF.
    <b>
    ENDIF.</b>
    Rgds,
    Kewal
    P.S. : any other approach to solve this problem will be appreciated too and the points will be rewarded suitably.

    If I select a job in SM37 and I click on "spool" I get a list with separate spool entries for each of the steps, e. g.
    Programmname/Kommand   Programmtyp   Spoolliste
    Z_MM_STAT_UPDATE_WERK  ABAP             1707445
    ZSLEEP                 Ext. Kommando
    Z_MM_STAT_UPDATE_WERK  ABAP             1707459
    ZSLEEP                 Ext. Kommando
    Z_MM_STAT_UPDATE_MARA  ABAP             1721423
    ZSLEEP                 Ext. Kommando
    Z_MM_STAT_UPDATE_WERK  ABAP             1721437
    Z_MM_STAT_UPDATE_MARA  ABAP             1721446
    Z_MM_STAT_UPDATE_WERK  ABAP             1721447
    Z_MM_STAT_UPDATE_VKORG ABAP             1721471
    ZSLEEP                 Ext. Kommando
    Z_MM_STAT_UPDATE_VKORG ABAP             1721521
    ZSLEEP                 Ext. Kommando
    Z_MM_STAT_UPDATE_VKORG ABAP             1721816
    It's in German but I'm sure you get the idea. For each Z_MM_STAT_UPDATE and variant I have a separate spool list that I can display.
    Markus

  • How can we view the error message numbers in the web ui?

    Dear all,
    How can we view the error message numbers in the web ui? It gives the error but no number.  It is possible to debug in web UI so how can we accomplish this?
    Thanks,
    FK

    Hi  Fakhan,
    You can absolutely do that.
    Check the class: CL_BSP_MESSAGES
    Also if you want to find out the exact Message Class and Message Number, go to table T100, type text in field TEXT, you will get Message Class and Message number in fields ARBGB and MSGNR respectively.
    I hope this helps.
    THanks
    Vishal

  • How can we create the error log in a ABAP program

    Hi all,
    How can we create the error log in a ABAP program
    Thanks,
    srinivas.

    Hi,
    Refer to FM's in the Function Group SBAL. For a change most of the FM's have been well documented. Also have a look at the DEMO pgms. Se38---->SBALDEMO & F4.
    Regards
    Raju Chitale

  • An internal error occurred on the report server. See the error log for more details. (rsInternalError) Get Online Help The profile for the user is a temporary profile. (Exception from HRESULT: 0x80090024)

    An internal error occurred on the report server. See the error log for more details. (rsInternalError) Get Online Help The profile for the user is a temporary profile. (Exception from HRESULT: 0x80090024) 
     while proview the report i will get this error am using sql server 2008R2,
    can u plesae hlep me out for this
     

    <Header>
      <Product>Microsoft SQL Server Reporting Services Version 2009.0100.1600.01 ((KJ_RTM).100402-1539 )</Product>
      <Locale>English (United States)</Locale>
      <TimeZone>W. Europe Standard Time</TimeZone>
      <Path>C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVEREPORT\Reporting Services\Logfiles\ReportServerService__01_30_2015_03_09_32.log</Path>
      <SystemName>WEGDACM1</SystemName>
      <OSName>Microsoft Windows NT 6.1.7601 Service Pack 1</OSName>
      <OSVersion>6.1.7601</OSVersion>
      <ProcessID>4880</ProcessID>
      <Virtualization>Hypervisor</Virtualization>
    </Header>
    rshost!rshost!5e4!01/30/2015-03:09:32:: i INFO: Currently registered url http://+:80/ReportServer_MSSQLSERVEREPORT/ on endpoint 2
    rshost!rshost!5e4!01/30/2015-03:09:32:: e ERROR: Failed to register url=http://+:80/Reports/ for endpoint 3, error=b7.
    rshost!rshost!5e4!01/30/2015-03:09:32:: w WARN: Endpoint 3 is enabled but no url is registered for vdir=/Reports, pdir=C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVEREPORT\Reporting Services\ReportManager.
    servicecontroller!DefaultDomain!1e30!01/30/2015-03:09:32:: e ERROR: Error creating HTTP endpoint. System.Runtime.InteropServices.COMException (0x800700B7): Cannot create a file when that file already exists. (Exception from HRESULT: 0x800700B7)
       at Microsoft.ReportingServices.HostingInterfaces.IRsUnmanagedCallback.CreateHttpEndpoint(RsAppDomainType application, String[] urlPrefixes, Int32 cPrefixes, String[] hosts, Int32 cHosts, Boolean wildCardPresent, String virtualDirectory, String
    filePath, Int32 authType, Int32 logonMethod, String authDomain, String authRealm, Boolean authPersist, Int32 extendedProtectionLevel, Int32 extendedProtectionScenario, Boolean enabled)
       at Microsoft.ReportingServices.Library.ServiceAppDomainController.SetWebConfiguration(RunningApplication rsApplication, Boolean enabled, String folder)
    rshost!rshost!65c!01/30/2015-03:09:32:: i INFO: Endpoint 4 is disabled and no url is registered vdir=/ReportServer_MSSQLSERVEREPORT/ReportBuilder, pdir=C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVEREPORT\Reporting Services\ReportServer\ReportBuilder.
    rshost!rshost!1e30!01/30/2015-03:09:32:: i INFO: Derived memory configuration based on physical memory as 16776696 KB
    servicecontroller!DefaultDomain!1e30!01/30/2015-03:09:32:: i INFO: Recycling the service from the default domain
    rshost!rshost!1e30!01/30/2015-03:09:46:: i INFO: Application domain type WindowsService statistics: created: 7, unloaded: 7, failed: 0, timed out: 0.
    appdomainmanager!DefaultDomain!1e30!01/30/2015-03:09:46:: i INFO: Appdomain:11 WindowsService_7 started.
    library!WindowsService_7!1e30!01/30/2015-03:09:46:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: No DSN present in configuration file, Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException:
    The report server has encountered a configuration error. ;
    servicecontroller!WindowsService_7!1e30!01/30/2015-03:09:46:: e ERROR: Error initializing configuration from the database: Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: The report server has encountered a configuration
    error. 
    resourceutilities!WindowsService_7!1e30!01/30/2015-03:09:47:: i INFO: Reporting Services starting SKU: Enterprise
    servicecontroller!WindowsService_6!1e30!01/30/2015-03:09:47:: i INFO: Service controller exiting.
    appdomainmanager!DefaultDomain!1e30!01/30/2015-03:09:47:: i INFO: Appdomain:10 unregistered.
    appdomainmanager!DefaultDomain!1e30!01/30/2015-03:09:47:: i INFO: Appdomain:10 WindowsService_6 unloading.
    appdomainmanager!DefaultDomain!1f40!01/30/2015-03:09:47:: i INFO: AppDomain:10 0 pending unload(s)
    library!WindowsService_7!2410!01/30/2015-03:09:47:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: No DSN present in configuration file, Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException:
    The report server has encountered a configuration error. ;
    library!WindowsService_7!2410!01/30/2015-03:09:47:: e ERROR: ServiceStartThread: Exception caught while starting service. Error: Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: The report server has encountered a configuration
    error. 
    library!WindowsService_7!2410!01/30/2015-03:09:47:: e ERROR: ServiceStartThread: Attempting to start service again...
    library!DefaultDomain!202c!01/30/2015-08:04:43:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: No DSN present in configuration file, Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException:
    The report server has encountered a configuration error. ;
    library!DefaultDomain!202c!01/30/2015-08:25:26:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: No DSN present in configuration file, Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException:
    The report server has encountered a configuration error. ;
    library!DefaultDomain!202c!01/30/2015-08:26:16:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: No DSN present in configuration file, Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException:
    The report server has encountered a configuration error. ;
    The above is my log file pls find it resolve my problem,am trying to add the encryption key to my configuration seetings it will through the error like The profile you were used is temporary profile.

  • PLEASE HELP ME.  Some important emails have gone to an archive mail box and i really need them.  Can someone please help me with how to view the archive email box and the emails that are in there?

    PLEASE HELP ME.  Some important emails have gone to an archive mail box and i really need them.  Can someone please help me with how to view the archive email box and the emails that are in there?

    http://kb.mozillazine.org/Recovering_deleted_mail_accounts

  • How to view the Syslog Application logs in CLI

    On CallManager 6.1.x, how do we view the Application Logs in the Syslog Viewer using the CLI?  I know how to view the traces but not the Application or System logs in CLI.  My RTMT to a customer is being blocked so I need to use the CLI.  Thanks.

    Event Viewer-Application Log = /var/log/active/syslog/CiscoSyslog.*
    Event Viewer-System Log = /var/log/active/syslog/messages.*
    From CLI:
    To list application logs:
    file list activelog syslog/CiscoSyslog.* date detail
    To list system logs:
    file list activelog syslog/messages.* date detail
    To view a specific application log:
    file view activelog syslog/CiscoSyslog.1
    To view a specific system log:
    file view activelog syslog/messages.1
    http://htluo.blogspot.com
    Michael

  • Please help me how concatenate all the error messages and send it as out parameter value.

    Hi Experts,
    Please help me how concatenate all the error messages and send it as out parameter value.
    Thanks.

    Agree with Billy, exception handling is not something that is done by passing parameters around.
    PL/SQL, like other languages, provides a suitable exception handling mechanism which, if used properly, works completely fine.  Avoid misuing PL/SQL by trying to implement some other way of handling them.

  • How do we print the error logs

    hi friends , i want to print the error log file of a bdc session method ,can any one sugest me a answer

    Check out this Sample Program
    *& Report                                             *
    *& This program is to transfer data from flat file to transaction 'FD01'
    REPORT  zgopi_report
    NO STANDARD PAGE HEADING
                            LINE-SIZE 255
                            MESSAGE-ID ZRASH.
    *                 Internal Table Declarations                          *
    *--Internal Table for Data Uploading.
    DATA : BEGIN OF IT_FFCUST OCCURS 0,
             KUNNR(10),
             BUKRS(4),
             KTOKD(4),
             ANRED(15),
             NAME1(35),
             SORTL(10),
             STRAS(35),
             ORT01(35),
             PSTLZ(10),
             LAND1(3),
             SPRAS(2),
             AKONT(10),
           END OF IT_FFCUST.
    *--Internal Table to Store Error Records.
    DATA : BEGIN OF IT_ERRCUST OCCURS 0,
             KUNNR(10),
             EMSG(255),
           END OF IT_ERRCUST.
    *--Internal Table to Store Successful Records.
    DATA : BEGIN OF IT_SUCCUST OCCURS 0,
             KUNNR(10),
             SMSG(255),
           END OF IT_SUCCUST.
    *--Internal Table for Storing the BDC data.
    DATA : IT_CUSTBDC LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
    *--Internal Table for storing the messages.
    DATA : IT_CUSTMSG LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    DATA : V_FLAG1(1) VALUE ' ',
    "Flag used for opening session.
           V_TLINES LIKE SY-TABIX,
           "For storing total records processed.
           V_ELINES LIKE SY-TABIX,
           "For storing the no of error records.
           V_SLINES LIKE SY-TABIX.
           "For storing the no of success records.
    *          Selection screen                                            *
    SELECTION-SCREEN BEGIN OF BLOCK B1.
    PARAMETERS : V_FNAME LIKE RLGRAP-FILENAME,
                 V_SESNAM  LIKE RLGRAP-FILENAME.
    SELECTION-SCREEN END OF BLOCK B1.
    *          Start-of-selection                                          *
    START-OF-SELECTION.
    *-- Form to upload flatfile data into the internal table.
      PERFORM FORM_UPLOADFF.
    *        TOP-OF-PAGE                                                   *
    TOP-OF-PAGE.
      WRITE:/ 'Details of the error and success records for the transaction'
      ULINE.
      SKIP.
    *          End of Selection                                            *
    END-OF-SELECTION.
    *-- Form to Generate a BDC from the Uploaded Internal table
      PERFORM FORM_BDCGENERATE.
    *--To write the totals and the session name.
      PERFORM FORM_WRITEOP.
    *&      Form  form_uploadff
    *     Form to upload flatfile data into the internal table.
    FORM FORM_UPLOADFF .
    *--Variable to change the type of the parameter file name.
      DATA : LV_FILE TYPE STRING.
      LV_FILE = V_FNAME.
    *--Function to upload the flat file to the internal table.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          FILENAME                      =  LV_FILE
    *     FILETYPE                      = 'ASC'
          HAS_FIELD_SEPARATOR           = 'X'
    *     HEADER_LENGTH                 = 0
    *     READ_BY_LINE                  = 'X'
    *     DAT_MODE                      = ' '
    *   IMPORTING
    *     FILELENGTH                    =
    *     HEADER                        =
        TABLES
          DATA_TAB                      = IT_FFCUST
        EXCEPTIONS
          FILE_OPEN_ERROR               = 1
          FILE_READ_ERROR               = 2
          NO_BATCH                      = 3
          GUI_REFUSE_FILETRANSFER       = 4
          INVALID_TYPE                  = 5
          NO_AUTHORITY                  = 6
          UNKNOWN_ERROR                 = 7
          BAD_DATA_FORMAT               = 8
          HEADER_NOT_ALLOWED            = 9
          SEPARATOR_NOT_ALLOWED         = 10
          HEADER_TOO_LONG               = 11
          UNKNOWN_DP_ERROR              = 12
          ACCESS_DENIED                 = 13
          DP_OUT_OF_MEMORY              = 14
          DISK_FULL                     = 15
          DP_TIMEOUT                    = 16
          OTHERS                        = 17
      IF SY-SUBRC = 0.
    *--Deleting the headings from the internal table.
        DELETE IT_FFCUST INDEX 1.
    *--Getting the total number of records uploaded.
        DESCRIBE TABLE IT_FFCUST LINES V_TLINES.
      ENDIF.
    ENDFORM.                    " form_uploadff
    *&      Form  Form_bdcgenerate
    *     Form to Generate a BDC from the Uploaded Internal table
    FORM FORM_BDCGENERATE .
    *--Generating the BDC table for the fields of the internal table.
      LOOP AT IT_FFCUST.
        PERFORM POPULATEBDC USING :
                                    'X' 'SAPMF02D' '0105',
                                    ' ' 'BDC_OKCODE'  '/00' ,
                                    ' ' 'RF02D-KUNNR' IT_FFCUST-KUNNR,
                                    ' ' 'RF02D-BUKRS' IT_FFCUST-BUKRS,
                                    ' ' 'RF02D-KTOKD' IT_FFCUST-KTOKD,
                                    'X' 'SAPMF02D' '0110' ,
                                    ' ' 'BDC_OKCODE'  '/00',
                                    ' ' 'KNA1-ANRED'  IT_FFCUST-ANRED,
                                    ' ' 'KNA1-NAME1' IT_FFCUST-NAME1,
                                    ' ' 'KNA1-SORTL'  IT_FFCUST-SORTL,
                                    ' ' 'KNA1-STRAS' IT_FFCUST-STRAS,
                                    ' ' 'KNA1-ORT01' IT_FFCUST-ORT01,
                                    ' ' 'KNA1-PSTLZ' IT_FFCUST-PSTLZ,
                                    ' ' 'KNA1-LAND1' IT_FFCUST-LAND1,
                                    ' ' 'KNA1-SPRAS' IT_FFCUST-SPRAS,
                                    'X' 'SAPMFO2D' '0120',     
                                    ' ' 'BDC_OKCODE'  '/00',
                                    'X' 'SAPMF02D' '0125',     
                                    ' ' 'BDC_OKCODE'  '/00',
                                    'X' 'SAPMF02D' '0130',     
                                    ' ' 'BDC_OKCODE'  '=ENTR',
                                    'X' 'SAPMF02D' '0340',     
                                    ' ' 'BDC_OKCODE'  '=ENTR',
                                    'X' 'SAPMF02D' '0360',
                                    ' ' 'BDC_OKCODE'  '=ENTR',
                                    'X' 'SAPMF02D' '0210',     
                                    ' ' 'KNB1-AKONT'  IT_FFCUST-AKONT,
                                    ' ' 'BDC_OKCODE'  '/00',
                                    'X' 'SAPMF02D' '0215',
                                    ' ' 'BDC_OKCODE'  '/00',
                                    'X' 'SAPMF02D' '0220',     
                                    ' ' 'BDC_OKCODE'  '/00',
                                    'X' 'SAPMF02D' '0230',     
                                    ' ' 'BDC_OKCODE'  '=UPDA'.
    *--Calling the transaction 'fd01'.
        CALL TRANSACTION 'FD01' USING IT_CUSTBDC MODE 'N' UPDATE 'S'
        MESSAGES INTO IT_CUSTMSG.
        IF SY-SUBRC <> 0.
    *--Populating the error records internal table.
          IT_ERRCUST-KUNNR = IT_FFCUST-KUNNR.
          APPEND IT_ERRCUST.
          CLEAR IT_ERRCUST.
    *--Opening a session if there is an error record.
          IF V_FLAG1 = ' '.
            PERFORM FORM_OPENSESSION.
            V_FLAG1 = 'X'.
          ENDIF.
    *--Inserting the error records into already open session.
          IF V_FLAG1 = 'X'.
            PERFORM FORM_INSERT.
          ENDIF.
    *--Populating the Success records internal table.
        ELSE.
          IT_SUCCUST-KUNNR = IT_FFCUST-KUNNR.
          APPEND IT_SUCCUST.
          CLEAR IT_SUCCUST.
        ENDIF.
    *--Displaying the messages.
        IF NOT IT_CUSTMSG[] IS INITIAL.
          PERFORM FORM_FORMATMSG.
        ENDIF.
    *--Clearing the message and bdc tables.
        CLEAR : IT_CUSTBDC[],IT_CUSTMSG[].
      ENDLOOP.
    *--Getting the total no of error records.
      DESCRIBE TABLE IT_ERRCUST LINES V_ELINES.
    *--Getting the total no of successful records.
      DESCRIBE TABLE IT_SUCCUST LINES V_SLINES.
    *--Closing the session only if it is open.
      IF V_FLAG1 = 'X'.
        PERFORM FORM_CLOSESESS.
      ENDIF.
    ENDFORM.                    " Form_bdcgenerate
    *&      Form  populatebdc
    *       FOrm to Populate the BDC table.
    FORM POPULATEBDC  USING    VALUE(P_0178)
                               VALUE(P_0179)
                               VALUE(P_0180).
      IF P_0178 = 'X'.
        IT_CUSTBDC-PROGRAM = P_0179.
        IT_CUSTBDC-DYNPRO = P_0180.
        IT_CUSTBDC-DYNBEGIN = 'X'.
      ELSE.
        IT_CUSTBDC-FNAM = P_0179.
        IT_CUSTBDC-FVAL = P_0180.
      ENDIF.
      APPEND IT_CUSTBDC.
      CLEAR IT_CUSTBDC.
    ENDFORM.                    " populatebdc
    *&      Form  FORM_OPENSESSION
    *       Form to Open a session.
    FORM FORM_OPENSESSION .
    *--Variable to convert the given session name into reqd type.
      DATA : LV_SESNAM(12).
      LV_SESNAM = V_SESNAM.
    *--Opening a session.
      CALL FUNCTION 'BDC_OPEN_GROUP'
       EXPORTING
         CLIENT                    = SY-MANDT
         GROUP                     = LV_SESNAM
         HOLDDATE                  = '20040805'
         KEEP                      = 'X'
         USER                      = SY-UNAME
         PROG                      = SY-CPROG
    *  IMPORTING
    *    QID                       =
       EXCEPTIONS
         CLIENT_INVALID            = 1
         DESTINATION_INVALID       = 2
         GROUP_INVALID             = 3
         GROUP_IS_LOCKED           = 4
         HOLDDATE_INVALID          = 5
         INTERNAL_ERROR            = 6
         QUEUE_ERROR               = 7
         RUNNING                   = 8
         SYSTEM_LOCK_ERROR         = 9
         USER_INVALID              = 10
         OTHERS                    = 11
      IF SY-SUBRC <> 0.
        WRITE :/ 'Session not open'.
      ENDIF.
    ENDFORM.                    " FORM_OPENSESSION
    *&      Form  FORM_INSERT
    *       fORM TO INSERT ERROR RECOED INTO A SESSION.
    FORM FORM_INSERT .
    *--Inserting the record into session.
      CALL FUNCTION 'BDC_INSERT'
        EXPORTING
          TCODE                  = 'FD01'
    *     POST_LOCAL             = NOVBLOCAL
    *     PRINTING               = NOPRINT
    *     SIMUBATCH              = ' '
    *     CTUPARAMS              = ' '
        TABLES
          DYNPROTAB              = IT_CUSTBDC
        EXCEPTIONS
          INTERNAL_ERROR         = 1
          NOT_OPEN               = 2
          QUEUE_ERROR            = 3
          TCODE_INVALID          = 4
          PRINTING_INVALID       = 5
          POSTING_INVALID        = 6
          OTHERS                 = 7
      IF SY-SUBRC <> 0.
        WRITE :/ 'Unable to insert the record'.
      ENDIF.
    ENDFORM.                    " FORM_INSERT
    *&      Form  FORM_CLOSESESS
    *       Form to Close the Open Session.
    FORM FORM_CLOSESESS .
      CALL FUNCTION 'BDC_CLOSE_GROUP'
        EXCEPTIONS
          NOT_OPEN    = 1
          QUEUE_ERROR = 2
          OTHERS      = 3.
      IF SY-SUBRC <> 0.
      ENDIF.
    ENDFORM.                    " FORM_CLOSESESS
    *&      Form  FORM_FORMATMSG
    *       Form to format messages.
    FORM FORM_FORMATMSG .
    *--Var to store the formatted msg.
      DATA : LV_MSG(255).
      CALL FUNCTION 'FORMAT_MESSAGE'
        EXPORTING
          ID        = SY-MSGID
          LANG      = SY-LANGU
          NO        = SY-MSGNO
          V1        = SY-MSGV1
          V2        = SY-MSGV2
          V3        = SY-MSGV3
          V4        = SY-MSGV4
        IMPORTING
          MSG       = LV_MSG
        EXCEPTIONS
          NOT_FOUND = 1
          OTHERS    = 2.
      IF SY-SUBRC = 0.
        WRITE :/ LV_MSG.
      ENDIF.
      ULINE.
    ENDFORM.                    " FORM_FORMATMSG
    *&      Form  form_writeop
    *       To write the totals and the session name.
    FORM FORM_WRITEOP .
      WRITE :/ 'Total Records Uploaded :',V_TLINES,
               / 'No of Error Records :',V_ELINES,
               / 'No of Success Records :',V_SLINES,
               / 'Name of the Session :',V_SESNAM.
      ULINE.
    ENDFORM.                    " form_writeop

  • How to rectify the errors through call transaction metod in bdc

    how to rectify the errors through call transaction metod in bdc

    Hi ,
    View the highlited part of the below code.
    REPORT ygfrivat1 NO STANDARD PAGE HEADING
                     LINE-SIZE 165
                     MESSAGE-ID yif_groc.
    Program     YGFRIVAT1
    Function    Report to Upload the VAT Adjustment File.
    Author      ARENAPU
    Date        11.05.2007
    PMTS        AM12810157
    Transport   G6DK937834
    Description:
    Modification log:
    1. Changed by  :
       Changed on  :
       PMTS        :
       Transport   :
       Tag         :
       Description :
           T A B L E S   D E C L A R A T I O N S
    TABLES: edidc,  "Control record (IDoc)
            edids,  "Status Record (IDoc)
            t001w.
    Internal Tables Declaration.
    Internal table to hold data from table EDIDS
    DATA: BEGIN OF t_edids OCCURS 0,
           docnum LIKE edids-docnum,
           logdat LIKE edids-logdat,
           logtim LIKE edids-logtim,
           countr LIKE edids-countr,
           credat LIKE edids-credat,
           uname  LIKE edids-uname,
          END OF t_edids,
    Internal table to hold data from table EDIDC
          BEGIN OF t_edidc OCCURS 0,
           docnum LIKE edidc-docnum,
           rcvprt LIKE edidc-rcvprt,
           rcvprn LIKE edidc-rcvprn,
           credat LIKE edidc-credat,
          END OF t_edidc,
    Internal table to hold data from upload file
          BEGIN OF t_tab OCCURS 0,
           cust(10),        "site/customer number
           date(10),        "transaction date
           currency(04),    "currency
           extnbr(15),      "external reference number
           pos-cont(05),    "POS controler
           pos-id(25),      "POS id
           cashier(10),     "cashier name
           qualif(04),      "qualifier of the article
           matnr(25),       "article number
           qty(10),         "quantity
           sale(16),        "sale value
           pos-tr(04),      "POS transfert type
           paymeth(04),     "payment method
           final(35),       "final price
           tarcur(04),      "target currency
           assign(35),      "assignment day
           error,
          END OF t_tab,
    Internal table for Report display.
          BEGIN OF t_tab1 OCCURS 0,
           cust(10),                    "site/customer number
           date(10),                    "transaction date
           currency(04),                "currency
           extnbr(15),                  "external reference number
           pos-cont(05),                "POS controler
           pos-id(25),                  "POS id
           cashier(10),                 "cashier name
           qualif(04),                  "qualifier of the article
           matnr(25),                   "article number
           qty(16)   TYPE p DECIMALS 2, "quantity
           sale(16)  TYPE p DECIMALS 2, "sale value
           pos-tr(04),                  "POS transfert type
           paymeth(04),                 "payment method
           final(16) TYPE p DECIMALS 2, "final price
           tarcur(04),                  "target currency
           assign(35),                  "assignment day
          END OF t_tab1,
          t_tab_temp LIKE t_tab OCCURS 0 WITH HEADER LINE,
    Internal table to Validate Customer no.
          BEGIN OF t_check OCCURS 0,
           werks LIKE t001w-werks,
           vkorg LIKE t001w-vkorg,
           value(40),
          END OF t_check,
          t_check_temp LIKE t_check OCCURS 0 WITH HEADER LINE.
    Internal table to hold data from table ZCS_PARAM.
    DATA: BEGIN OF t_zcs_param OCCURS 0.
            INCLUDE STRUCTURE zcs_param.
    DATA: vkorg LIKE t001w-vkorg,
          END OF t_zcs_param.
    *Internal table to hold Messages.
    DATA: BEGIN OF t_message OCCURS 0,
             msgnum TYPE msgnum,
             msgtyp TYPE msgtyp,
             msgtxt TYPE msgtext,
           END OF t_message.
    *Work area for table t_message
    DATA : w_message LIKE LINE OF t_message.
    Internal table to hold BDC data
    DATA: t_bdcdata LIKE bdcdata    OCCURS 0 WITH HEADER LINE,
    Internal table to collect error messages
          messtab   LIKE bdcmsgcoll OCCURS 0  WITH HEADER LINE.
    *Internal table to hold messages from call transaction
    DATA: BEGIN OF t_text OCCURS 0,
           desc(150),
           msgtxt(100),
          END OF t_text.
           D A T A   D E C L A R A T I O N S
    DATA: n TYPE i,
          gv_status(11) TYPE c, "Shows status, Production or Test
          gv_exit TYPE c,  "Exit Flag
          gv_qty(16)   TYPE p DECIMALS 2, "Variable to sum Quantity
          gv_sale(16)  TYPE p DECIMALS 2, "Variable to sum Amount
          gv_final(16) TYPE p DECIMALS 2. "Variable to sum Final Amount
    DATA: w_text(100),
          gv_mode TYPE c,
          error TYPE c.  "Flag to Indicate error.
    CONSTANSTS DECLARATION
    CONSTANTS : gc_fieldname LIKE dynpread-fieldname VALUE 'P_FNAME',
                gc_seq_no LIKE zcs_param-seq_no VALUE '00110',
                gc_object LIKE zcs_param-object VALUE 'YGFVAT',
                gc_paraname LIKE zcs_param-paraname VALUE 'VKORG',
                gc_back TYPE c VALUE 'N',
                gc_error TYPE c VALUE 'E',
                gc_all TYPE c VALUE 'A'.
               S E L E C T I O N   S C R E E N
    SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE text-001.
    PARAMETERS : p_fname LIKE rlgrap-filename OBLIGATORY.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(31) text-002 FOR FIELD p_test.
    PARAMETERS : p_test AS CHECKBOX.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK a1.
    SELECTION-SCREEN BEGIN OF BLOCK a2 WITH FRAME TITLE text-006.
    PARAMETERS : rb_back RADIOBUTTON GROUP rb1 DEFAULT 'X',
                 rb_error RADIOBUTTON GROUP rb1,
                 rb_all RADIOBUTTON GROUP rb1.
    SELECTION-SCREEN END OF BLOCK a2.
    AT SELECTION SCREEN
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname.
    *Subroutine to provide F4 help for file name
      PERFORM fr_get_filename.
           I N I T I A L I Z A T I  O N
    INITIALIZATION.
    *Subroutine to check authorization.
    PERFORM fr_authority_check.
            T O P - O F - P A G E
    TOP-OF-PAGE.
    *Subroutine to diplay header
      PERFORM fr_display_header.
             S T A R T - O F - S E L E C T I O N
    START-OF-SELECTION.
    *Subroutine to upload data from presentation server.
      PERFORM fr_upload_data.
    *Subroutine to validate records from uploaded file.
      PERFORM fr_validate_data.
    *Subroutine to build report internal table.
      PERFORM fr_build_rep.
             E N D - O F - S E L E C T I O N
    END-OF-SELECTION.
    *Subroutine to display report.
      PERFORM fr_write_report.
            F O R M   S U B R O U T I N E S
    *&      Form  fr_get_filename
          text
    FORM fr_get_filename.
      DATA : lv_repid LIKE sy-repid,         " Report id
             lv_file  LIKE ibipparms-path.   " File Path
      lv_repid = sy-repid.
    F4 help for file path.
      CALL FUNCTION 'F4_FILENAME'
           EXPORTING
                program_name  = lv_repid
                dynpro_number = syst-dynnr
                field_name    = gc_fieldname                    " p_fname1
           IMPORTING
                file_name     = lv_file.
      IF NOT lv_file EQ space.
        p_fname = lv_file.
      ELSE.
        MESSAGE e999 WITH 'Invalid Path'(005).
      ENDIF.
    ENDFORM.                    " fr_get_filename
    *&      Form  fr_upload_data
          text
    FORM fr_upload_data.
      DATA: lv_fname TYPE string.
      CLEAR lv_fname.
      lv_fname = p_fname.
    Uploading file from PC or presentation server to internal table.
      CALL FUNCTION 'GUI_UPLOAD'
           EXPORTING
                filename            = lv_fname
                filetype            = 'ASC'
                has_field_separator = 'X'
           TABLES
                data_tab            = t_tab
           EXCEPTIONS
                file_open_error     = 1.
      IF sy-subrc <> 0.
        DESCRIBE TABLE t_message LINES n.
        w_message-msgnum = n + 1.
        w_message-msgtyp = 'E'.
        MOVE text-m01  TO w_message-msgtxt.
        APPEND w_message TO t_message.
    Subroutine for writing log.
        PERFORM fr_write_log.
      ENDIF.
    ENDFORM.                    " fr_upload_data
    *&      Form  fr_validate_data
          text
    FORM fr_validate_data.
      DATA : lv_lines1 TYPE i,
             lv_lines2 TYPE i.
    *Obtain Status depending on Check box selected.
      IF p_test IS INITIAL.
        gv_status = 'PRODUCTION'.
      ELSE.
        gv_status = 'TEST RUN'.
      ENDIF.
    *Batch Mode
      CLEAR gv_mode.
      IF rb_back EQ 'X'.          "No Display
        MOVE gc_back TO gv_mode.
      ELSEIF rb_error EQ 'X'.     "Error Only
        MOVE gc_error TO gv_mode.
      ELSEIF rb_all EQ 'X'.       "All Screens
        MOVE gc_all TO gv_mode.
      ENDIF.
      IF NOT t_tab[] IS INITIAL.
        SORT t_tab BY cust.
        REFRESH t_tab_temp.
        t_tab_temp[] = t_tab[].
        SORT t_tab_temp BY cust.
        DELETE ADJACENT DUPLICATES FROM t_tab_temp COMPARING cust.
        IF NOT t_tab_temp[] IS INITIAL.
          SELECT werks vkorg FROM t001w
                             INTO TABLE t_check
                             FOR ALL ENTRIES IN t_tab_temp
                             WHERE werks = t_tab_temp-cust+0(4).
          IF sy-subrc = 0.
            SORT t_check BY werks.
          ENDIF.
          LOOP AT t_check.
            IF t_check-vkorg <> ' '.
              MOVE t_check-vkorg TO t_check-value.
              MODIFY t_check TRANSPORTING value.
            ENDIF.
          ENDLOOP.
        ENDIF.
        FREE t_tab_temp.
      ENDIF.
      IF NOT t_check[] IS INITIAL.
        REFRESH t_check_temp.
        t_check_temp[] = t_check[].
        SORT t_check_temp BY value.
        DELETE ADJACENT DUPLICATES FROM t_check_temp COMPARING value.
        IF NOT t_check_temp[] IS INITIAL.
          SELECT * FROM zcs_param INTO TABLE t_zcs_param
                   FOR ALL ENTRIES IN t_check_temp
                   WHERE seq_no   EQ gc_seq_no
                     AND object   EQ gc_object
                     AND paraname EQ gc_paraname
                     AND value    EQ t_check_temp-value.
          IF sy-subrc = 0.
            SORT t_zcs_param BY value.
          ENDIF.
        ENDIF.
        FREE t_check_temp.
      ENDIF.
      IF NOT t_tab[] IS INITIAL.
        LOOP AT t_tab.
          READ TABLE t_check WITH KEY werks = t_tab-cust BINARY SEARCH.
          IF sy-subrc <> 0.
            MOVE 'X' TO t_tab-error.
            MODIFY t_tab TRANSPORTING error.
            DESCRIBE TABLE t_message LINES n.
            w_message-msgnum = n + 1.
            w_message-msgtyp = 'E'.
            CONCATENATE t_tab-cust text-030
            INTO w_message-msgtxt SEPARATED BY space.
            APPEND w_message TO t_message.
    Subroutine for writing log.
            PERFORM fr_write_log.
            EXIT.
          ELSE.
            READ TABLE t_zcs_param WITH KEY value = t_check-vkorg
                                                         BINARY SEARCH.
            IF sy-subrc <> 0.
              MOVE 'X' TO t_tab-error.
              MODIFY t_tab TRANSPORTING error.
              DESCRIBE TABLE t_message LINES n.
              w_message-msgnum = n + 1.
              w_message-msgtyp = 'E'.
              CONCATENATE text-003 t_tab-cust text-004 t_check-vkorg
              INTO w_message-msgtxt SEPARATED BY space.
              APPEND w_message TO t_message.
    Subroutine for writing log.
              PERFORM fr_write_log.
              EXIT.
            ELSE.
              PERFORM fr_format_tab.
            ENDIF.
          ENDIF.
        ENDLOOP.
      ENDIF.
      DESCRIBE TABLE t_tab LINES lv_lines1.
      IF lv_lines1 <> 0.
        DELETE t_tab WHERE error EQ 'X'.
      ENDIF.
      DESCRIBE TABLE t_tab LINES lv_lines2.
      IF lv_lines2 <> 0.
        IF lv_lines2 <> lv_lines1.
          EXIT.
        ELSE.
          IF p_test IS INITIAL.
            LOOP AT t_tab.
    *Subroutine to build BDC table
              PERFORM fr_fill_bdctab.
    *Subroutine to Post Data into SAP.
              PERFORM fr_data_posting.
            ENDLOOP.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDFORM.                    " fr_validate_data
    *&      Form  fr_write_log
          text
    FORM fr_write_log.
      CLEAR error.
      error = 'X'.
      WRITE:/1 'Msg No'(027), 10 'Type'(028), 20 'Text'(029).
      ULINE:/1(120).
      FORMAT RESET.
      LOOP AT t_message.
        IF t_message-msgtyp = 'E'.
          FORMAT COLOR 6 INTENSIFIED .
        ELSEIF t_message-msgtyp = 'W'.
          FORMAT COLOR 3 INTENSIFIED .
        ELSEIF t_message-msgtyp = 'I'.
          FORMAT COLOR 5 INTENSIFIED .
        ENDIF.
        WRITE:/1 t_message-msgnum,
              10 t_message-msgtyp,
              20 t_message-msgtxt.
        FORMAT RESET.
      ENDLOOP.
      ULINE:/1(120).
    ENDFORM.                    " fr_write_log
    *&      Form  fr_write_report
          text
    FORM fr_write_report.
      CLEAR gv_exit.
      LOOP AT t_message.
        IF t_message-msgtyp = 'E'.
          gv_exit = 'X'.
          EXIT.
        ENDIF.
      ENDLOOP.
      IF NOT gv_exit IS INITIAL.
        EXIT.
      ELSE.
        PERFORM fr_display_report.
        IF NOT t_text[] IS INITIAL.
    Subroutine for Display Call Transaction messages.
          PERFORM fr_write_msg.
        ENDIF.
      ENDIF.
    ENDFORM.                    " fr_write_report
    *&      Form  fr_display_report
          text
    FORM fr_display_report.
      IF NOT t_tab1[] IS INITIAL.
        CLEAR: gv_qty, gv_sale, gv_final.
        LOOP AT t_tab1.
          WRITE:/1(10) t_tab1-cust,
                13(10) t_tab1-date,
                25(05) t_tab1-currency,
                32(14) t_tab1-extnbr,
                48(09) t_tab1-pos-cont,
                60(18) t_tab1-matnr,
                80(16) t_tab1-qty RIGHT-JUSTIFIED ,
                98(16) t_tab1-sale RIGHT-JUSTIFIED ,
               116(07) t_tab1-paymeth,
               125(16) t_tab1-final RIGHT-JUSTIFIED,
               143(06) t_tab1-tarcur,
               152(12) t_tab1-assign.
          gv_qty   = t_tab1-qty   + gv_qty.
          gv_sale  = t_tab1-sale  + gv_sale.
          gv_final = t_tab1-final + gv_final.
        ENDLOOP.
        FORMAT COLOR 3.
        ULINE: /(164).
        WRITE:/ 'TOTALS',
          80(16) gv_qty RIGHT-JUSTIFIED,
          98(16) gv_sale RIGHT-JUSTIFIED,
         125(16) gv_final RIGHT-JUSTIFIED,
         182 ''.
        ULINE: /(164).
        FORMAT RESET.
      ENDIF.
    ENDFORM.                    " fr_display_report
    *&      Form  FR_DISPLAY_HEADER
          text
    FORM fr_display_header.
      IF error IS INITIAL.
        FORMAT COLOR 1.
        WRITE:/ 'Date upload           :'(007),   25 sy-datum,  38 ''.
        WRITE:/ 'Production or Test Run:'(008),   25 gv_status, 38 ''.
        WRITE:/ 'Upload User Logon     :'(009),   25 sy-uname,  38 ''.
        ULINE: /(164).
        WRITE:/1(04) 'Site'(010),
              13(10) 'Date'(011),
              25(05) 'Curr.'(012),
              32(14) 'Receipt'(013),
              48(09) 'Cashier'(014),
              60(18) 'Article'(015),
              92     'Qty'(016),
              102    'Item Amount'(017),
              116(7) 'M.o.P.'(018),
              128    'Tender Amount'(019),
              143(6) 'T.Curr'(020),
             152(12) 'Assignment'(021).
        ULINE:/(164).
        FORMAT RESET.
      ENDIF.
    ENDFORM.                    " FR_DISPLAY_HEADER
    *&      Form  fr_newdynpro
          text
    FORM fr_newdynpro USING program LIKE bdcdata-program
                            dynpro  LIKE bdcdata-dynpro.
      t_bdcdata-program = program .
      t_bdcdata-dynpro  = dynpro.
      t_bdcdata-dynbegin = 'X'.
      APPEND t_bdcdata.
      CLEAR t_bdcdata.
    ENDFORM.                    " fr_newdynpro
    *&      Form  fr_loadfield
          text
    FORM fr_loadfield USING field LIKE bdcdata-fnam
                            value.
      t_bdcdata-fnam = field.
      t_bdcdata-fval = value.
      APPEND t_bdcdata.
      CLEAR t_bdcdata.
    ENDFORM.                    " fr_loadfield
    *&      Form  fr_fill_bdctab
          text
    FORM fr_fill_bdctab.
      REFRESH t_bdcdata.
      PERFORM fr_newdynpro USING 'SAPMWPUK' '100'.
      PERFORM fr_loadfield USING 'G_FILIALE' t_tab-cust.
      PERFORM fr_loadfield USING 'G_DATUM'   t_tab-date.
      PERFORM fr_loadfield USING 'BDC_OKCODE' 'BON'.
      PERFORM fr_newdynpro USING 'SAPMWPUK' '500'.
      PERFORM fr_loadfield USING 'WPSCB01-POSKREIS'   t_tab-pos-cont.
      PERFORM fr_loadfield USING 'WPSCB01-KASSID'     t_tab-pos-id.
      PERFORM fr_loadfield USING 'WPSCB01-BELEGWAERS' t_tab-currency.
      PERFORM fr_loadfield USING 'WPSCB01-CSHNAME'    t_tab-cashier.
      PERFORM fr_loadfield USING 'WPSCB01-BONNUMMER'  t_tab-extnbr.
      PERFORM fr_loadfield USING 'E1WPB02-QUALARTNR(01)'  t_tab-qualif.
      PERFORM fr_loadfield USING 'E1WPB02-ARTNR(01)'      t_tab-matnr.
      PERFORM fr_loadfield USING 'E1WPB02-MENGE(01)'      t_tab-qty.
      PERFORM fr_loadfield USING 'WPSCB03-KONDVALUE(01)'  t_tab-sale.
      PERFORM fr_loadfield USING 'E1WPB02-VORGANGART(01)' t_tab-pos-tr.
      PERFORM fr_loadfield USING 'BDC_OKCODE' 'ZAHL'.
      PERFORM fr_newdynpro USING 'SAPMWPUK' '530'.
      PERFORM fr_loadfield USING 'WPSCB06-ZAHLART'  t_tab-paymeth.
      PERFORM fr_loadfield USING 'WPSCB06-SUMME'    t_tab-final.
      PERFORM fr_loadfield USING 'WPSCB06-WAEHRUNG' t_tab-tarcur.
      PERFORM fr_loadfield USING 'WPSCB06-ZUONR'    t_tab-assign.
      PERFORM fr_loadfield USING 'BDC_OKCODE' 'SAVE'.
      PERFORM fr_newdynpro USING 'SAPMWPUK' '530'.
      PERFORM fr_loadfield USING 'WPSCB06-ZAHLART'  t_tab-paymeth.
      PERFORM fr_loadfield USING 'WPSCB06-SUMME'    t_tab-final.
      PERFORM fr_loadfield USING 'WPSCB06-WAEHRUNG' t_tab-tarcur.
      PERFORM fr_loadfield USING 'WPSCB06-ZUONR'    t_tab-assign.
      PERFORM fr_loadfield USING 'BDC_OKCODE' 'BACK'.
      PERFORM fr_newdynpro USING 'SAPLSPO1' '0200'.
      PERFORM fr_loadfield USING 'BDC_OKCODE' 'YES'.
      PERFORM fr_newdynpro USING 'SAPMWPUK' '100'.
      PERFORM fr_loadfield USING 'G_FILIALE' t_tab-cust.
      PERFORM fr_loadfield USING 'G_DATUM'   t_tab-date.
      PERFORM fr_loadfield USING 'BDC_OKCODE' 'BACK'.
    ENDFORM.                    " fr_fill_bdctab
    *&      Form  fr_data_posting
          text
    FORM fr_data_posting.
      IF NOT t_bdcdata[] IS INITIAL.
        REFRESH messtab.
        CALL TRANSACTION 'WPUK' USING t_bdcdata
                                MODE gv_mode
                                UPDATE 'S'
                                MESSAGES INTO messtab.
        IF sy-subrc = 0 .
          CLEAR w_text.
          LOOP AT messtab.
            CALL FUNCTION 'FORMAT_MESSAGE'
                 EXPORTING
                      id        = messtab-msgid
                      lang      = sy-langu
                      no        = messtab-msgnr
                      v1        = messtab-msgv1
                      v2        = messtab-msgv2
                      v3        = messtab-msgv3
                      v4        = messtab-msgv4
                 IMPORTING
                      msg       = w_text
                 EXCEPTIONS
                      not_found = 1
                      OTHERS    = 2.
            MOVE w_text TO t_text-msgtxt.
            CONCATENATE 'Site:'(031)    t_tab-cust
                        'Article:'(024) t_tab-matnr
                        'Posted Sucessfully'(032)
              INTO t_text-desc SEPARATED BY space.
            APPEND t_text.
            CLEAR t_text.
          ENDLOOP.
        ELSE.
          CLEAR w_text.
          LOOP AT messtab.
            CALL FUNCTION 'FORMAT_MESSAGE'
                 EXPORTING
                      id        = messtab-msgid
                      lang      = sy-langu
                      no        = messtab-msgnr
                      v1        = messtab-msgv1
                      v2        = messtab-msgv2
                      v3        = messtab-msgv3
                      v4        = messtab-msgv4
                 IMPORTING
                      msg       = w_text
                 EXCEPTIONS
                      not_found = 1
                      OTHERS    = 2.
            MOVE w_text TO t_text-msgtxt.
            IF messtab-msgnr EQ '213'.
              CONCATENATE 'Site:'(031)    t_tab-cust
                          'Article:'(024) t_tab-matnr
                          'Posted Sucessfully'(032)
               INTO t_text-desc SEPARATED BY space.
              APPEND t_text.
              CLEAR t_text.
              EXIT.        ELSE.
              CONCATENATE 'Site:'(031)    t_tab-cust
                          'Article:'(024) t_tab-matnr
                          'Not Posted'(033)
               INTO t_text-desc SEPARATED BY space.
              APPEND t_text.
              CLEAR t_text.
            ENDIF.
          ENDLOOP.
        ENDIF.
      ENDIF.
    ENDFORM.                    " fr_data_posting
    *&      Form  fr_authority_check
          text
    FORM fr_authority_check.
      AUTHORITY-CHECK OBJECT 'Y_VATADJ'
               ID 'VKORG' FIELD t001w-vkorg
               ID 'TCD'   FIELD 'YGFVAT'.
      IF sy-subrc NE 0.
        MESSAGE e999 WITH text-m02.
      ENDIF.
    ENDFORM.                    " fr_authority_check
    *&      Form  fr_write_msg
          text
    FORM fr_write_msg.
      SKIP.
      ULINE:/(164).
      WRITE:/
      'Messages encountered while Calling Transaction WPUK'(025),
          90 'Message Text'(026).
      ULINE:/1(164).
      LOOP AT t_text.
        WRITE:/1 t_text-desc,
              90 t_text-msgtxt,
              164 ''.
      ENDLOOP.
      ULINE:/1(164).
    ENDFORM.                    " fr_write_msg
    *&      Form  FR_BUILD_REP
          text
    FORM fr_build_rep.
      IF error IS INITIAL.
        IF NOT t_tab[] IS INITIAL.
          LOOP AT t_tab.
            MOVE:
              t_tab-cust     TO t_tab1-cust,        "site/customer number
              t_tab-date     TO t_tab1-date,        "transaction date
              t_tab-currency TO t_tab1-currency,    "currency
            t_tab-extnbr   TO t_tab1-extnbr,      "external reference number
              t_tab-pos-cont TO t_tab1-pos-cont,    "POS controler
              t_tab-pos-id   TO t_tab1-pos-id,      "POS id
              t_tab-cashier  TO t_tab1-cashier,     "cashier name
             t_tab-qualif   TO t_tab1-qualif,      "qualifier of the article
              t_tab-matnr    TO t_tab1-matnr,       "article number
              t_tab-pos-tr   TO t_tab1-pos-tr,      "POS transfert type
              t_tab-paymeth  TO t_tab1-paymeth,     "payment method
              t_tab-tarcur   TO t_tab1-tarcur,      "target currency
              t_tab-assign   TO t_tab1-assign.
            REPLACE ',' WITH '.' INTO t_tab-qty.
            CONDENSE t_tab-qty NO-GAPS.
            MOVE t_tab-qty TO t_tab1-qty.
            REPLACE ',' WITH '.' INTO t_tab-sale.
            CONDENSE t_tab-sale NO-GAPS.
            MOVE t_tab-sale TO t_tab1-sale.
            REPLACE ',' WITH '.' INTO t_tab-final.
            CONDENSE t_tab-final NO-GAPS.
            MOVE t_tab-final TO t_tab1-final.
            APPEND t_tab1.
            CLEAR t_tab1.
          ENDLOOP.
        ENDIF.
      ENDIF.
    ENDFORM.                    " FR_BUILD_REP
    *&      Form  fr_format_tab
          text
    FORM fr_format_tab.
      DATA : lv_qty TYPE string.
      IF NOT t_tab-qty IS INITIAL.
        IF t_tab-qty+0(1) EQ '-'.
          CLEAR lv_qty.
          MOVE t_tab-qty TO lv_qty.
          CLEAR t_tab-qty.
          SHIFT lv_qty LEFT CIRCULAR.
          CONDENSE lv_qty NO-GAPS.
          MOVE lv_qty TO t_tab-qty.
          MODIFY t_tab TRANSPORTING qty.
        ENDIF.
      ENDIF.
    ENDFORM.                    " fr_format_tab

  • How to view the sql query?

    hi,
      how to view the sql query formed from the xml structure in the receiver jdbc?

    You can view SAP Note at
    http://service.sap.com/notes
    But you require SMP login ID for this which you should get from your company. The content of the notes are as follows:
    Reason and Prerequisites
    You are looking for additional parameter settings. There are two possible reasons why a feature is available via the "additional parameters" table in the "advanced mode" section of the configuration, but not as documented parameter in the configuration UI itself:
    Category 1: The parameter has been introduced for a patch or a SP upgrade where no UI upgrade and/or documentation upgrade was possible. In this case, the parameter will be moved to the UI and the documentation as soon as possible. The parameter in the "additional parameters" table will be deprecated after this move, but still be working. The parameter belongs to the supported adapter functionality and can be used in all, also productive, scenarios.
    Category 2. The parameter has been introduced for testing purposes, proof-of-concept scenarios, as workaround or as pre-released functionality. In this case, the parameter may or may not be moved to the UI and documentation, and the functionality may be changed, replaced or removed. For this parameter category there is no guaranteed support and usage in productive scenarios is not supported.
    When you want to use a parameter documented here, please be aware to which category it belongs!
    Solution
    The following list shows all available parameters of category 1 or 2. Please note:
    Parameter names are always case-sensitive! Parameter values may be case-sensitive, this is documented for each parameter.
    Parameter names and values as documented below must be used always without quotaton marks ("), if not explicitly stated otherwise.
    The default value of a parameter is always chosen that it does not change the standard functionality
    JDBC Receiver Adapter Parameters
    1. Parameter name: "logSQLStatement"
                  Parameter type: boolean
                  Parameter value: true for any string value, false only for empty string
                  Parameter value default: false (empty String)
                  Available with: SP9
                  Category: 2
                  Description:
                  When implementing a scenario with the JDBC receiver adapter, it may be helpful to see which SQL statement is generated by the JDBC adapter from the XI message content for error analysis. Before SP9, this can only be found in the trace of the JDBC adapter if trace level DEBUG is activated. With SP9, the generated SQL statement will be shown in the details page (audit protocol) of the message monitor for each message directly.
                  This should be used only during the test phase and not in productive scenarios.
    Regards,
    Prateek

  • *HOW TO DELETE THE ARCHIVE LOGS ON THE STANDBY*

    HOW TO DELETE THE ARCHIVE LOGS ON THE STANDBY
    I have set the RMAN CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY; on my physical standby server.
    My archivelog files are not deleted on standby.
    I have set the CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default on the Primary server.
    I've checked the archivelogs with the FRA and they are not beign deleted on the STANDBY. Do I have to do something for the configuation to take effect? Like run a RMAN backup?
    I've done a lot ofresearch and i'm getting mixed answers. Please help. Thanks in advanced.
    J

    Setting the Policy will not delete the Archive logs on the Standby. ( I found a thread where the Data Guard product manager says "The deletion policy on both sides will do what you want" ). However I still
    like to clean them off with RMAN.
    I would use RMAN to delete them so that it can use that Policy are you are protected in case of Gap, transport issue etc.
    There are many ways to do this. You can simply run RMAN and have it clean out the Archive.
    Example :
    #!/bin/bash
    # Name: db_rman_arch_standby.sh
    # Purpose: Database rman backup
    # Usage : db_rman_arch_standby <DBNAME>
    if [ "$1" ]
    then DBNAME=$1
    else
    echo "basename $0 : Syntax error : use . db_rman_full <DBNAME> "
    exit 1
    fi
    . /u01/app/oracle/dba_tool/env/${DBNAME}.env
    echo ${DBNAME}
    MAILHEADER="Archive_cleanup_on_STANDBY_${DBNAME}"
    echo "Starting RMAN..."
    $ORACLE_HOME/bin/rman target / catalog <user>/<password>@<catalog> << EOF
    delete noprompt ARCHIVELOG UNTIL TIME 'SYSDATE-8';
    exit
    EOF
    echo `date`
    echo
    echo 'End of archive cleanup on STANDBY'
    mailx -s ${MAILHEADER} $MAILTO < /tmp/rmandbarchstandby.out
    # End of ScriptThis uses ( calls an ENV) so the crontab has an environment.
    Example ( STANDBY.env )
    ORACLE_BASE=/u01/app/oracle
    ULIMIT=unlimited
    ORACLE_SID=STANDBY
    ORACLE_HOME=$ORACLE_BASE/product/11.2.0.2
    ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
    LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
    LIBPATH=$LD_LIBRARY_PATH:/usr/lib
    TNS_ADMIN=$ORACLE_HOME/network/admin
    PATH=$ORACLE_HOME/bin:$ORACLE_BASE/dba_tool/bin:/bin:/usr/bin:/usr/ccs/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:/usr/lbin:/GNU/bin/make:/u01/app/oracle/dba_tool/bin:/home/oracle/utils/SCRIPTS:/usr/local/bin:.
    #export TERM=linux=80x25 wrong wrong wrong wrong wrong
    export TERM=vt100
    export ORACLE_BASE ORACLE_SID ORACLE_TERM ULIMIT
    export ORACLE_HOME
    export LIBPATH LD_LIBRARY_PATH ORA_NLS33
    export TNS_ADMIN
    export PATH
    export MAILTO=?? your email hereNote use the env command in Unix to get you settings.
    There are probably ten other/better ways to do this, but this works.
    other options ( you decide )
    Configure RMAN to purge archivelogs after applied on standby [ID 728053.1]
    http://www.oracle.com/technetwork/database/features/availability/rman-dataguard-10g-wp-1-129486.pdf
    Maintenance Of Archivelogs On Standby Databases [ID 464668.1]
    Tip I don't care myself but in some of the other forums people seem to mind if you use all caps in the subject. They say it shouting. My take is if somebody is shouting at me I'm probably going to just move away.
    Best Regards
    mseberg
    Edited by: mseberg on May 8, 2012 11:53 AM
    Edited by: mseberg on May 8, 2012 11:56 AM

  • How to view the Users in the Portal Activity Report

    Hello,
    Can anyone tell me how to view the Report of users who have logged in a specific time. For Example I would like to view the users who have logged in between 9.00 am and 9.15 am. Is it possible to view mentioning the country name?
    Please explain me in detail how to view the Report.
    Thnx in Advance
    cheers,
    Murali

    hi,
    You can certainly do it for hourly basis but i am not sure whether it could be done quarter an hour basis. Also The portal nodes within a cluster can be in different time zones, yet the activity data from all nodes are aggregated together and reported together. To enable the reporting of hourly data from different time zones, portal activity reports display hourly data based on the GMT time zone.
    Do see the documentation
    http://help.sap.com/saphelp_nw04/helpdata/en/fb/144120ea5b4e9c9385d493a578d6c9/frameset.htm
    Weblog :Portal SP9: Portal Activity Report
    Regards,
    Ganesh N

Maybe you are looking for