Smartform error: Incorrect nesting

Hi,
   I have been trying to use Spell_Amount in smartform. The code I have used is working fine in report but giving following error in smartform :
Incorrect nesting: Before statement "Form", the structure introduced by "Function" must be concluded with "Endfunction".
Code I have used is:
TABLES SPELL.
DATA : T_SPELL LIKE SPELL OCCURS 0 WITH HEADER LINE.
Data : S_WRBTR LIKE BSEG-WRBTR.
SY-TITLE = 'SPELLING NUMBER'.
PERFORM SPELL_AMOUNT USING s_wrbtr 'inr'.
FORM spell_amount USING s_wrbtr pwaers.
  CALL FUNCTION 'SPELL_AMOUNT'
       EXPORTING
            amount    = s_wrbtr
            currency  = pwaers
            filler    = space
            language  = 'E'
       IMPORTING
            in_words  = t_spell
       EXCEPTIONS
            not_found = 1
            too_large = 2
            OTHERS    = 3.
endform.
Can I have some help?
Thnx

Try the following code:
it worked for me.
In Global Definitions --> Global Data Define:
WORDS type Spell
wt_total type tablename-fieldname " wt_total is the field you want in words.
Create a Window Words and place it after you have the value of wt_total.
In Window Words:
Rt. Click--> Create --> flow Logic --> Program Lines
Output Parameters --> wt_total,
                                     Words.
call function 'SPELL_AMOUNT'
exporting
   amount          = wt_total
*   CURRENCY        = ' '
*   FILLER          = ' '
*   LANGUAGE        = SY-LANGU
importing
   in_words        = words
* EXCEPTIONS
*   NOT_FOUND       = 1
*   TOO_LARGE       = 2
*   OTHERS          = 3
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
3. Create a text and put value
&Words-word& in it.
Let me know if it worked...
<removed by moderator>
Edited by: Thomas Zloch on Feb 17, 2012

Similar Messages

  • Incorrect Nesting, before the statement ENDFUNCTION

    Hello:
    I have this simple ABAP program, but I don't seem to make it work:
    FUNCTION Z_SAP_GET_CREDIT.
    ""Interfase local
    *"  IMPORTING
    *"     VALUE(CLIENT_ID) TYPE  Z_CLIENT_ID OPTIONAL
    *"  EXPORTING
    *"     VALUE(CREDIT_LIMIT) TYPE  STRING
    *"     VALUE(CONDITIONS) TYPE  STRING
    *"  EXCEPTIONS
    *"      USER_DOES_NOT_EXIST
    TYPES: BEGIN OF credit_eq_type,
             WEBTR  TYPE string,
             ZTERM  TYPE int4,
           END OF credit_eq_type .
    DATA: credit_eq TYPE credit_eq_type.
    SELECT SINGLE *
    FROM KNB1
    INTO CORRESPONDING FIELDS OF credit_eq
    WHERE KUNNR = CLIENT_ID.
    *CREDIT_LIMIT = credit_eq-WEBTR.
    ENDFUNCTION
    I get this error:
    Incorrect Nesting, before the statement "ENDFUNCTION", the structure introduced by SELECT must conclude with "END SELECT"
    I've done selects before and it wasn't needed.... what is this?
    Thanks
    Alex

    Even though you are specifying SELECT SINGLE * in your code, you are not providing the full key of KNB1 which also includes company code BUKRS. So system expects either a ENDSELECT or your INTO statement to be followed by TABLE itab instead of just INTO strcuture. That is why you got this error. So either do option 1 or 2 as follows.
    <u>Option 1</u>
    TYPES: BEGIN OF credit_eq_type,
             WEBTR LIKE KNB1-WEBTR,
             ZTERM LIKE KNB1-ZTERM,
           END OF credit_eq_type .
    DATA: credit_eq TYPE TABLE OF credit_eq_type with header line.
    SELECT SINGLE webtr zterm FROM KNB1
                              INTO TABLE credit_eq
                             WHERE KUNNR = CLIENT_ID.
    *CREDIT_LIMIT = credit_eq-WEBTR.
    <u>Option 2</u>
    TYPES: BEGIN OF credit_eq_type,
             WEBTR LIKE KNB1-WEBTR,
             ZTERM LIKE KNB1-ZTERM,
           END OF credit_eq_type .
    DATA: credit_eq TYPE credit_eq_type.
    SELECT webtr zterm FROM KNB1 UP TO 1 ROWS
                       INTO credit_eq
                      WHERE KUNNR = CLIENT_ID.
    ENDSELECT.
    *CREDIT_LIMIT = credit_eq-WEBTR.
    <u>Option 3</u>
    TYPES: BEGIN OF credit_eq_type,
             WEBTR LIKE KNB1-WEBTR,
             ZTERM LIKE KNB1-ZTERM,
           END OF credit_eq_type .
    DATA: credit_eq TYPE credit_eq_type.
    SELECT SINGLE webtr zterm FROM KNB1
                              INTO Credit_eq
                             WHERE KUNNR = CLIENT_ID
                               AND BUKRS = <either constant
    or another import parameter from the function module>.
    *CREDIT_LIMIT = credit_eq-WEBTR.
    3rd option is the best one if you have BUKRS. In the case where you don't have BUKRS, use the option 1. Option 2 is least efficient. <b>But in any case, please do not use SELECT * with INTO CORRESPONDING FIELDS when you need only two fields. Instead specify the fields AND yes you cannot use INTO with incompatable fields. They have to be compatible.
    Srinivas
    Message was edited by: Srinivas Adavi

  • Empty TOC KindleGen/ ePub Incorrect nesting level error

    Neither is a question but hopefully a solution for anyone who has been going through hell (like me) trying to get a working TOC for mobi and ePub files.
    I have INDD CS6, Kindle Plugin installed - but I think this also applies to earlier versions of Indd
    For Mobi (kindle) - If you got your TOC set via the Layout menu and still don't see the Table of Contents menu in Kindle Previewer- make sure to go to your PARAGRAPH STYLE - EXPORT TAGGING and UNCHECK!!! SPLIT DOCUMENTS (it even says there ePUB only).  I also  suggest you do it for all Paragraph styles you are using in your MOBI file. Kindle previewer no longer gave me an error and I can see both of my TOC's  now - that said this took me several weekends and countless nervous breakdowns to figure out.....
    For ePub incorrect nesting level - this happened to me due to the fact that I have used 2 levels for my TOC (some of you may use even 3 or 4)
    To get rid of the error I had to edit the TOC style and change the levels for both my "included paragraph styles" (the ones you add to the left column) to LEVEL 1 - yes for BOTH. I say this again - SET ALL all included paragraph styles levels to digit 1 (ONE).
    I think this is a serious bug Adobe really should fix asap -  I truly wasted several weekends on this, pulled all my remaining hair out and had suicidal (and other very violent)  thoughts ...
    I hope this post will help all of you who is dealing with either of those problems....
    Happy ePublishing everyone

    Neither is a question but hopefully a solution for anyone who has been going through hell (like me) trying to get a working TOC for mobi and ePub files.
    I have INDD CS6, Kindle Plugin installed - but I think this also applies to earlier versions of Indd
    For Mobi (kindle) - If you got your TOC set via the Layout menu and still don't see the Table of Contents menu in Kindle Previewer- make sure to go to your PARAGRAPH STYLE - EXPORT TAGGING and UNCHECK!!! SPLIT DOCUMENTS (it even says there ePUB only).  I also  suggest you do it for all Paragraph styles you are using in your MOBI file. Kindle previewer no longer gave me an error and I can see both of my TOC's  now - that said this took me several weekends and countless nervous breakdowns to figure out.....
    For ePub incorrect nesting level - this happened to me due to the fact that I have used 2 levels for my TOC (some of you may use even 3 or 4)
    To get rid of the error I had to edit the TOC style and change the levels for both my "included paragraph styles" (the ones you add to the left column) to LEVEL 1 - yes for BOTH. I say this again - SET ALL all included paragraph styles levels to digit 1 (ONE).
    I think this is a serious bug Adobe really should fix asap -  I truly wasted several weekends on this, pulled all my remaining hair out and had suicidal (and other very violent)  thoughts ...
    I hope this post will help all of you who is dealing with either of those problems....
    Happy ePublishing everyone

  • Incorrect nesting error in user exit include

    Hi,
    In one of my requirement I had to add an additional screen using EXIT_SAPMM06E_016, this Function module exists in XM06 Function group, this exit holds an include ZXM06U41.
    This function group holds screens, so when I implement a screen and create the PBO module in this particular include, it by default includes
    MODULE STATUS_XXX OUTPUT.
    ENDMODULE.
    When i check this include it says:
    Incorrect nesting: Before the statement "MODULE", the structure introduced by "FUNCTION" must be concluded with "ENDFUNCTION".
    I have no clue where the open function is?
    Your help will be very much appreciated.
    Please help.
    Thanks,
    -Sandeep

    You cannot define a screen module in a function module code.
    Refer to available documentation how to properly implement enhancements of this kind. Enhancement name is MM06E005 (in SMOD). Screen definitions and the corresponding modules will happen in function group XM06, not in the exit function module.
    Edit: To elaborate, your PBO module will go into include ZXM06ZZZ, or better yet, into new include ZXM06O01 which should be part of ZXM06ZZZ (just to keep the usual naming convention).
    Edited by: Tamas Hoznek on Feb 28, 2012 2:51 PM

  • Incorrect nesting in smartfroms program-line

    Hi .
    when i have use code in different program it's work fine .
    but when same code use in smartforms program-lines it's give me following error.
    Incorrect nesting: Before the statement "FORM", the structure introduced by "FUNCTION" must be concluded by "ENDFUNCTION" . . .
    Regards.
    Sam.

    HI
    My code
    DATA mwsbp TYPE komp-mwsbp .
    data : p_ebeln TYPE ekpo-ebeln ,
    p_ebelp TYPE ekpo-ebelp .
    *data: p_mwsbp TYPE komp-mwsbp .
    PERFORM calculate_tax USING p_ebeln p_ebelp CHANGING mwsbp .
    FORM calculate_tax USING p_ebeln TYPE ekpo-ebeln
    p_ebelp TYPE ekpo-ebelp
    CHANGING p_mwsbp TYPE komp-mwsbp .
    CONSTANTS: bstyp_info VALUE 'I',
    bstyp_ordr VALUE 'W',
    bstyp_banf VALUE 'B',
    bstyp_best VALUE 'F',
    bstyp_anfr VALUE 'A',
    bstyp_kont VALUE 'K',
    bstyp_lfpl VALUE 'L',
    bstyp_lerf VALUE 'Q'.
    DATA : taxcom TYPE taxcom ,
    t_konv TYPE TABLE OF komv WITH HEADER LINE .
    DATA: BEGIN OF tkomv OCCURS 50.
    INCLUDE STRUCTURE komv.
    DATA: END OF tkomv.
    DATA: BEGIN OF tkomvd OCCURS 50. "Belegkonditionen
    INCLUDE STRUCTURE komvd.
    DATA: END OF tkomvd.
    DATA : BEGIN OF tkomvh OCCURS 50.
    INCLUDE STRUCTURE komv.
    DATA : vtext LIKE t685t-vtext.
    DATA : END OF tkomvh.
    SELECT SINGLE *
    INTO ekko
    FROM ekko
    WHERE ebeln = p_ebeln .
    SELECT SINGLE *
    INTO ekpo
    FROM ekpo
    WHERE ebeln = p_ebeln
    AND ebelp = p_ebelp .
    SELECT SINGLE *
    INTO t001
    FROM t001
    WHERE bukrs = ekko-bukrs .
    taxcom-bukrs = ekpo-bukrs.
    taxcom-budat = ekko-bedat.
    taxcom-waers = ekko-waers.
    taxcom-kposn = ekpo-ebelp.
    taxcom-mwskz = ekpo-mwskz.
    taxcom-txjcd = ekpo-txjcd.
    taxcom-shkzg = 'H'.
    taxcom-xmwst = 'X'.
    IF ekko-bstyp EQ bstyp_best.
    taxcom-wrbtr = ekpo-netwr.
    ELSE.
    taxcom-wrbtr = ekpo-zwert.
    ENDIF.
    taxcom-lifnr = ekko-lifnr.
    taxcom-land1 = ekko-lands.
    taxcom-ekorg = ekko-ekorg.
    taxcom-hwaer = t001-waers.
    taxcom-llief = ekko-llief.
    taxcom-bldat = ekko-bedat.
    taxcom-matnr = ekpo-ematn.
    taxcom-werks = ekpo-werks.
    taxcom-bwtar = ekpo-bwtar.
    taxcom-matkl = ekpo-matkl.
    taxcom-meins = ekpo-meins.
    IF ekko-bstyp EQ bstyp_best.
    taxcom-mglme = ekpo-menge.
    ELSE.
    IF ekko-bstyp EQ bstyp_kont AND ekpo-abmng GT 0.
    taxcom-mglme = ekpo-abmng.
    ELSE.
    taxcom-mglme = ekpo-ktmng.
    ENDIF.
    ENDIF.
    IF taxcom-mglme EQ 0.
    taxcom-mglme = 1000.
    ENDIF.
    taxcom-mtart = ekpo-mtart.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    CALL FUNCTION 'J_1BSA_COMPONENT_ACTIVE'
    EXPORTING
    bukrs = ekko-bukrs
    component = 'BR'
    EXCEPTIONS
    component_not_active = 1
    OTHERS = 2.
    *endfunction.
    IF sy-subrc IS INITIAL.
    komk-mandt = ekko-mandt.
    komk-kalsm = ekko-kalsm.
    IF ekko-kalsm = ''.
    komk-kalsm = 'RM0000'.
    ENDIF.
    komk-kappl = 'M'.
    komk-waerk = ekko-waers.
    komk-knumv = ekko-knumv.
    komk-lifnr = ekko-lifnr.
    komp-kposn = ekpo-ebelp.
    komp-matnr = ekpo-matnr.
    komp-werks = ekpo-werks.
    komp-matkl = ekpo-matkl.
    komp-infnr = ekpo-infnr.
    komp-evrtn = ekpo-konnr.
    komp-evrtp = ekpo-ktpnr.
    CALL FUNCTION 'RV_PRICE_PRINT_ITEM'
    EXPORTING
    comm_head_i = komk
    comm_item_i = komp
    language = 'E'
    TABLES
    tkomv = tkomv
    tkomvd = tkomvd.
    CALL FUNCTION 'J_1B_NF_PO_DISCOUNTS'
    EXPORTING
    i_kalsm = ekko-kalsm
    i_ekpo = ekpo
    IMPORTING
    e_ekpo = ekpo
    TABLES
    i_konv = t_konv.
    IF NOT ekko-llief IS INITIAL.
    taxcom-lifnr = ekko-llief.
    ENDIF.
    ENDIF.
    CALL FUNCTION 'FIND_TAX_SPREADSHEET'
    EXPORTING
    buchungskreis = t001-bukrs
    EXCEPTIONS
    not_found = 1
    OTHERS = 2.
    CALL FUNCTION 'CALCULATE_TAX_ITEM'
    EXPORTING
    i_taxcom = taxcom
    IMPORTING
    e_taxcom = taxcom
    EXCEPTIONS
    mwskz_not_defined = 1
    mwskz_not_found = 2
    mwskz_not_valid = 3
    steuerbetrag_falsch = 4
    country_not_found = 5
    OTHERS = 6.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    p_mwsbp = taxcom-wmwst .
    WRITE:/  mwsbp .
    ENDFORM. " calculate_tax
    Regard
    Sam

  • Printing dunning notices using SMARTFORMS,error during parameter transfer

    Hi Friends,
                    I face a error message "Include text ZGA_DUN_HDR does not exist (object TEXT, ID ST)" when i run the dunning run.
                    I had searched every node for text ZGA_DUN_HDR in the smartform,I didnt find the text in it.
    However when I execute the smart form for print preview an error message "Printing dunning notices using SMARTFORMS,error during parameter transfer".This error i believe is due to wrong parameter passing in the fm 'GET_SF_DUNN_DATA'.It raises an error no_parameters_found.All parameters are passed correctly.
                    Can you guys help me out.
    Edited by: RAJIV KAUSHAL on Nov 14, 2008 6:03 PM

    you can create this text ZGA_DUN_HDR  in SO10 tcode and try ...

  • How to fix 'Unexpected error: Incorrect value: Location URL' in WSDL

    Hi All,
    Using SOAMANAGER  transaction, I created a service ECC_CUSTOMERQUOTEERPCRTRC and its binding 'ECC_CUSTOMERQUOTEERPCRTRC_binding' using the Create Service option under the tab Configurations and using the web service definition 'ECC_CUSTOMERQUOTEERPCRTRC'.  When I click on the link "Open WSDL document for selected binding" under the tab 'Overview', I get the following XML code in the popup window for the WSDL.
    - <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    - <soap:Body>
    - <soap:Fault>
      <faultcode>soap:Server</faultcode>
      <faultstring>Unexpected error: Incorrect value: Location URL for subject IF {http</faultstring>
    - <detail xmlns:slibfault="http://xml.sap.com/2005/11/esi/slib/fault/">
      <slibfault:timestamp>Wed, 17 Nov 2010 22:29:02 GMT</slibfault:timestamp>
    - <slibfault:exception>
      <slibfault:text>Incorrect value: Location URL for subject IF {http://sap.com/xi/APPL/Global2}:CustomerQuoteERPCreateRequestConfirmation_In not found</slibfault:text>
      <slibfault:position program="CL_SIDL_SUBJECT_ADAPTER=======CP" include="CL_SIDL_SUBJECT_ADAPTER=======CM006" line="47" />
      </slibfault:exception>
      </detail>
      </soap:Fault>
      </soap:Body>
      </soap:Envelope>
    The XML code for nthe WSDL displays an error 'Unexpected error: Incorrect value: Location URL for subject IF '. It looks like the code could find the required URL. Please let me know how to fix this error.
    Thanks in advance.
    --R D

    Hello.
    In SOAMANAGER delete your "unexpected" service (endpoint).
    Then create it again.
    If same error will occurs - try to delete all definitions of this service (include sicf-transaction) and then create it completely again.
    Hope it helps.

  • Smartforms error 173

    I would like to know how to solve the following error in smartforms:
    Error number: 173
    Message     : "Table does not fit into window."
    Exception   : FORMATTING_ERROR
    Message ID  : SSFCOMPOSER
    I am trying to fit a main window and another window in a
    template
    Thanks in advance

    As I discovered, this error occurred when there is a conflict between the window created for a template and the template itself. The main node for the template is the window in which one can define a height. In the template, which is the node below the window node, one is also required to enter a value for height that has to be the same value. This can be done in the Template table (tab Template), you’ll find the height defined that is in conflict with the height defined in the table of the window.

  • Multi-value parameter report - error : Incorrect syntax near ',' with multi-valued parameter in SSRS

    Hey,
    I created a report in Reporting Services  where I added multi-value parameter
    ( Filter).  When I run my report, and try to select more than one parameter, I get an error:  Incorrect syntax near ','
    then i put in parameter expression :  join(Parameters!Filter.Value,",")  
    and add : dbo.ufnSplit  before calling parameter in query :
    >>>  set @valwhere = 'table.field IN (select * from dbo.ufnSplit(' + @Filter + ' , '',''))'
    but i still have errors : incorrect syntax near 'text'  which is the second value of the picklist of the parameter,
    Please Any idea ?
    Thanks !!

    I have sometimes had to collate as default with the SQL query
    currently I've just using
    CompanyName in
    (selectitemfromdbo.fnSplit(@function,','))
    In the SSRS report text box I have Join(Parameters!Company.Value,",")

  • Sync encountered an error, incorrect username or password. Changed password, updated password, still same error. How do I change username?

    I am using Firefox 5 in Ubuntu 11.04 Natty. When Firefox tries to sync it gives an error; "incorrect account name or password". I went to the "change password" link, followed the emailed link, changed my password and updated the password in Sync preferences. I have done this three times but still get the incorrect account name or password error. What do I need to do now?

    This happened a few days ago as well. I've read elsewhere that the problem is with their servers, not our accounts (cannot find the link now). Whenever the servers get back online, or updated, or whatever, the problem will go away. It's been taking longer than usual to get back this time, so that yellow banner at the bottom has become quite annoying.

  • [Execute SQL Task] Error: Executing the query "DECLARE_@XMLA nvarchar(3000) ,__@DateSerial nvarch..." failed with the following error: "Incorrect syntax near '-'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly,

    Hi
    DECLARE @XMLA nvarchar(3000)
    , @DateSerial nvarchar(35);
    -- Change date to format YYYYMMDDHHMMSS
    SET @DateSerial = CAST(GETDATE() AS DATE);
    --SELECT @DateSerial
    Set @XMLA = 
    N' <Batch xmlns="http://schemas.microsoft.com/analysis services/2003/engine">
     <ErrorConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2"
    xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2" xmlns:ddl100_100="http://schemas.microsoft.com/analysisservices/2008/engine/100/100" xmlns:ddl200="http://schemas.microsoft.com/analysisservices/2010/engine/200"
    xmlns:ddl200_200="http://schemas.microsoft.com/analysisservices/2010/engine/200/200">
    <KeyErrorLimit>-1</KeyErrorLimit>
    <KeyNotFound>IgnoreError</KeyNotFound>
    <NullKeyNotAllowed>IgnoreError</NullKeyNotAllowed>
     </ErrorConfiguration>
     <Parallel>
    <Process xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2" xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2"
    xmlns:ddl100_100="http://schemas.microsoft.com/analysisservices/2008/engine/100/100" xmlns:ddl200="http://schemas.microsoft.com/analysisservices/2010/engine/200" xmlns:ddl200_200="http://schemas.microsoft.com/analysisservices/2010/engine/200/200"
    xmlns:ddl300="http://schemas.microsoft.com/analysisservices/2011/engine/300" xmlns:ddl300_300="http://schemas.microsoft.com/analysisservices/2011/engine/300/300">
     <Object>
     <DatabaseID>MultidimensionalProject5</DatabaseID>
     <CubeID>giri</CubeID>
     <MeasureGroupID>Fact Internet Sales</MeasureGroupID>
     </Object>
     <Type>ProcessFull</Type>
     <WriteBackTableCreation>UseExisting</WriteBackTableCreation>
     </Process>
      </Parallel>
    </Batch>';
    EXEC (@XMLA) At SHALL-PCAdventureWorksDw ;
     iam executive the    query when iam getting below error.
      [Execute SQL Task] Error: Executing the query "DECLARE
    @XMLA nvarchar(3000)
    , @DateSerial nvarch..." failed with the following error: "Incorrect syntax near '-'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set
    correctly, or connection not established correctly. 
     how to solve this error;
     please help me

    What are you trying to do? What sort of data source is  SHALL-PCAdventureWorksDw?
    When you use EXEC() AT, I would execpt to see an SQL string to be passed to EXEC(), but you are passing an XML string????
    If you explain why you think this would work in the first place, maybe we can help you.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • System.Data.SqlClient.SqlException (0x80131904): SQL Server detected a logical consistency-based I/O error: incorrect checksum

    Hello,
    I am migrating client's database to my hosted environment, the client runs
    SQL Server 2008 R2, and we run SQL Server 2014.
    I am stuck on restoring one log file, which left below error message when I restore it:
    Restoring files
      DBFile_20150401030954.trn
    Error Message: System.Data.SqlClient.SqlException (0x80131904): SQL Server detec
    ted a logical consistency-based I/O error: incorrect checksum (expected: 0x512cb
    ec3; actual: 0x512dbec3). It occurred during a read of page (1:827731)
    in databa
    se ID 49 at offset 0x000001942a6000 in file 'F:\MSSQL12.INSTANCE9\MSSQL\Data\Ody
    sseyTSIAKL_Data.mdf'.  Additional messages in the SQL Server error log or system
     event log may provide more detail. This is a severe error condition that threat
    ens database integrity and must be corrected immediately. Complete a full databa
    se consistency check (DBCC CHECKDB). This error can be caused by many factors; f
    or more information, see SQL Server Books Online.
    RESTORE LOG is terminating abnormally.
       at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolea
    n breakConnection, Action`1 wrapCloseInAction)
       at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception
    , Boolean breakConnection, Action`1 wrapCloseInAction)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObj
    ect stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
       at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand
     cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler,
    TdsParserStateObject stateObj, Boolean& dataReady)
       at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
       at System.Data.SqlClient.SqlDataReader.get_MetaData()
       at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, Run
    Behavior runBehavior, String resetOptionsString)
       at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBe
    havior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 time
    out, Task& task, Boolean asyncWrite, SqlDataReader ds)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehav
    ior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletio
    nSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehav
    ior, RunBehavior runBehavior, Boolean returnStream, String method)
       at System.Data.SqlClient.SqlCommand.ExecuteScalar()
       at OnBoardingTrnRestore.FileRestorer.FileIsRestored(SqlConnection connection,
     String sourceBackupFileName, String sourceDatabaseName, String destinationDatab
    aseName, String databaseName, String strFileName) in c:\Dev\WiseCloud\OnBoarding
    TrnRestore\OnBoardingTrnRestore\FileRestorer.cs:line 223
    ClientConnectionId:6f583f98-9c23-4936-af45-0d7e9a9949ea
    Finished
    I have run restore filelistonly and verifyonly in both client and my box, and both worked well:
    XXX_Data D:\Program Files (x86)\XXX\Data\YYY_Data.mdf
    restore filelistonly:
    D PRIMARY
    70922469376 35184372080640
    1 0
    0 00000000-0000-0000-0000-000000000000
    0 0
    0 512 1
    NULL 279441000014839500242
    66CC6D17-575C-41E5-BB58-3FB4D33E288C
    0 1 NULL
    XXX_Log E:\Program Files (x86)\XXX\Log\YYY_Log.ldf
    L NULL
    31985762304 35184372080640
    2 0
    0 00000000-0000-0000-0000-000000000000
    0 0
    0 512 0
    NULL 0
    00000000-0000-0000-0000-000000000000 0
    1 NULL
    restore verifyonly:
    Attempting to restore this backup may encounter storage space problems. Subsequent messages will provide details.
    The path specified by "D:\Program Files (x86)\XXX\Data\YYY_Data.mdf" is not in a valid directory.
    Directory lookup for the file "E:\Program Files (x86)\XXX\Log\YYY_Log.ldf" failed with the operating system error 3(The system cannot find the path specified.).
    The backup set on file 1 is valid.
    Dbcc checkdb also confirmed there is no error in client sql server database.
    dbcc checkdb (XXX, NOINDEX) 
    Results as follows:
    DBCC results for 'XXX'.
    Warning: NO_INDEX option of checkdb being used. Checks on non-system indexes will be skipped.
    Service Broker Msg 9675, State 1: Message Types analyzed: 17.
    Service Broker Msg 9676, State 1: Service Contracts analyzed: 9.
    Service Broker Msg 9667, State 1: Services analyzed: 7.
    Service Broker Msg 9668, State 1: Service Queues analyzed: 7.
    Service Broker Msg 9669, State 1: Conversation Endpoints analyzed: 0.
    Service Broker Msg 9674, State 1: Conversation Groups analyzed: 0.
    Service Broker Msg 9670, State 1: Remote Service Bindings analyzed: 0.
    Service Broker Msg 9605, State 1: Conversation Priorities analyzed: 0.
    DBCC results for 'sys.sysrscols'.
    There are 23808 rows in 350 pages for object "sys.sysrscols".
    DBCC results for 'BMBoard'.
    There are 0 rows in 0 pages for object "BMBoard".
    DBCC results for 'CusOutturnHeader'.
    There are 0 rows in 0 pages for object "CusOutturnHeader".
    CHECKDB found 0 allocation errors and 0 consistency errors in database 'XXX'.
    DBCC execution completed. If DBCC printed error messages, contact your system administrator.
    We use ftp to transfer the log files from the another country to here, I confirmed the file's MD5(checksum) is same as the copy in client's environment, we have tried to upload the file a couple of times, same outcome.
    The full backup is fine, I have successfully restored a series log backups prior to this file.
    Has anyone seen this issue before? It is strange, all information indicates the file is good,but somehow it goes wrong.
    Below are the version details:
    Client: 
    MICROSOFT SQL SERVER 2008 R2 (SP2) - 10.50.4000.0 (X64) 
    My environment:
    Microsoft SQL Server 2014 - 12.0.2480.0 (X64) 
    Jan 28 2015 18:53:20 
    Copyright (c) Microsoft Corporation
    Enterprise Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: )
    Thanks,
    Albert

    Error Message: System.Data.SqlClient.SqlException (0x80131904): SQL Server detec
    ted a logical consistency-based I/O error: incorrect checksum (expected: 0x512cb
    ec3; actual: 0x512dbec3). It occurred during a read of page (1:827731)
    in databa
    se ID 49 at offset 0x000001942a6000 in file 'F:\MSSQL12.INSTANCE9\MSSQL\Data\Ody
    sseyTSIAKL_Data.mdf'.  Additional messages in the SQL Server error log or system
     event log may provide more detail. This is a severe error condition that threat
    ens database integrity and must be corrected immediately.
    Hi Albert,
    The above error message usually indicates that there is a problem with underlying storage system or the hardware or a driver that is in the path of the I/O request. You can encounter this error when there are inconsistencies in the file system or if the database
    file is damaged.
    Besides other suggestions, consider to use the
    SQLIOSim utility to find out if these errors can be reproduced outside of regular SQL Server I/O requests and change
    your databases to use the PAGE_VERIFY CHECKSUM option.
    Reference:
    http://support.microsoft.com/en-us/kb/2015756
    https://msdn.microsoft.com/en-us/library/aa337274.aspx?f=255&MSPPError=-2147217396
    Thanks,
    Lydia Zhang
    Lydia Zhang
    TechNet Community Support

  • Error in nested group function used with column name.

    Hi Team,
    If i used nested group function with column name its not working. Could you please any one suggest me.
    How to use it.
    Regards,
    Venkat.
    Please find Spool ........
    SQL> select user_name,max(max(CNT)) from (select USER_NAME,count(*) CNT from v$open_cursor group by USER_NAME)
    2 group by user_name,CNT;
    select user_name,max(max(CNT)) from (select USER_NAME,count(*) CNT from v$open_cursor group by USER_NAME)
    ERROR at line 1:
    ORA-00937: not a single-group group function
    SQL> select max(max(CNT)) from(select USER_NAME,count(*) CNT from v$open_cursor group by USER_NAME)
    2 group by user_name;
    MAX(MAX(CNT))
    605

    Venkat wrote:
    Hi Sayan
    Its giving output like below, but not given maximum CNT.
    SQL> select user_name,max(CNT)from (select USER_NAME,count(*) CNT from v$open_cursor group by USER_NAME)
    2 group by user_name;
    USER_NAME MAX(CNT)
    BANES_LERG 6
    VENE_USER 8
    USER3 339
    DBUS 106
    VEL_USER 37
    SYS 597
    6 rows selected.Check it - Re: Error in nested group function used with column name.
    and previous post

  • PROCESS CHAIN error "Incorrect start date"

    hi sap gurus,
    I have parent chain in that a newly created meta chain is creating problem.I am getting error in the process chains since two days i am not able to solve this.Can anybody try to help me.
    error: Incorrect start date: 00.00.0000; Start time 00:00:00 RSM     847
    After that the process chain is turning red,but when i manually execute the process chain its running properly.
    Please help me its urgent.

    hi gurus,
    Its working fine now.
    Solution:
    first exchange the variant with the smae and then activate and run.After that it will work in the process chain.
    Thanks a lot to every body,especially MOHAN KRISHNA,

  • Incorrect nesting upgrade from 4.5b to ecc 6.0

    Hi All,
    Please let me know when ever try to activate the program  i got incorrect nesting:Before start-of-selection the structure introduced by if must be concluded by endif, even if and endif exists also.
    If i removed start-of-selection it showed statement is not accessble.
    Please go through the following code and give suggestions regarding this.
    Thanks in Advance,
    Padmaja.
      INCLUDE MZF112F81RS001                                             *
    update zhotelrep_log of latest changes RS001
         tp_cchangemade = 'X'.
         IMPORT TP_CCATCH_CUR_VBAP FROM MEMORY ID 'catch'.      "RS001
         IF TP_CCATCH_CUR_VBAP = ' '.
    get all item.
           SELECT *
            FROM VBAP
            INTO CORRESPONDING FIELDS OF TABLE TA_VBAP_NEW
           WHERE VBELN EQ WA_RB_VBAK-VBELN
             AND MATKL IN RA_MATKL.
            and VGTYP eq wa_rb_vbak-vbtyp.
           PERFORM PROCESS_ACTIVITY_LOG.
           PERFORM ZHOTELREP_LOG_UPDATE.
           TP_CCATCH_CUR_VBAP = 'X'.
           EXPORT TP_CCATCH_CUR_VBAP TO MEMORY ID 'catch'.      "RS001
          perform zhotelrep_log_update.
         ENDIF.

    You will have to look for SAP Release Notes for version 4.7 (Enterprise) and also SAP ERP 5.0 + 6.0
    Yes that's a lot, but a big upgrade jump too.

Maybe you are looking for

  • My screensaver keeps switching back to national geographic from iPhoto

    my screensaver keeps switching back to national geographic from iPhoto pictures

  • How do i chat while video is on

    I'm new to skype and dont know how to chat while the video is on. Is there a button somewhere i need to push? I have a windows 8.1 computer. I see peoples messages in some kind of popup cloud but dont know how to respond with writing. can someone ple

  • SOA 11g: EM Console not coming up HTTP 404

    Hi All, While trying to restart servers, they came up fine (admin and managed) however EM console doesn't open and throws a HTTP 404 error. Error seen in log file is below: <JspServlet error: Servlet unable to dispatch to the following requested page

  • Runtime exception in workflow

    We have used the BLOCK task type in our workflow to catch all runtime exceptions. I want the exception details (that gets thrown automatically by the system at runtime) to be sent as part of a notification/mail task type to our administrator. 1. How

  • About the command 'HOST'

    My environment: Oracle Workgroup Server for Windows NT (Version 7.3.4) Can anyone, who can connect the Oracle database with a legal db account through the SQL*Plus, run the command ‘HOST’ normally? How to limit the usage of command ‘HOST’? Thanks!