Error that Table  is already been declared in code

Hi Guys I am getting the error that Table KNVP is already been declared. please correct what is the problem since it work other companies with same code
Tables: KNVP.
data: l_tabix like sy-tabix,
l_s_BIW_KNA1_S like BIW_KNA1_S.
case i_datasource.
WHEN '0CUSTOMER_ATTR'.
loop at i_t_data into l_s_BIW_KNA1_S.
l_tabix = sy-tabix.
select single * from KNVP where KUNNR = l_s_BIW_KNA1_S-KUNNR.
if sy-subrc = 0.
l_s_BIW_KNA1_S-ZZPARFN = KNVP-PARVW.
modify i_t_data from l_s_BIW_KNA1_S index l_tabix.
endif.
endloop.
endcase.
thanks
soniya

Try to modify ur code as below..
Tables: KNVP.
data: l_tabix like sy-tabix,
l_s_BIW_KNA1_S like BIW_KNA1_S.
data: i_knvp like knvp occurs 0 with header line.
case i_datasource.
WHEN '0CUSTOMER_ATTR'.
loop at i_t_data into l_s_BIW_KNA1_S.
l_tabix = sy-tabix.
clear i_knvp.
select single * from KNVP into i_knvp where KUNNR = l_s_BIW_KNA1_S-KUNNR.
if sy-subrc = 0.
l_s_BIW_KNA1_S-ZZPARFN = i_knvp-PARVW.
modify i_t_data from l_s_BIW_KNA1_S index l_tabix.
endif.
endloop.
endcase.

Similar Messages

  • Upgrade 4.5B to 4.7 -- ERROR: "VBAK has already been declared".

    Dear Friends,
    After upgrade 4.5B to 4.7, there is the same ERROR when executing most of SD transaction and creating/displaying/modifying PO and GR.
    This error is related to SD pricing procedure. In the ABAP error dump said that: VBAK has already been declared. I have tried to look for SAP Notes but cannot find one.
    I think this problem is a common problem in upgrading from 4.X to 4.7. Need help from you guys who ever have upgrading experience.. : )
    Does anyone know on how to FIX this problem?
    Cheers,
    Will
    THE ABAP DUMP is as below:
    ===============================================
    Syntax error in program "SAPLV61A ".
    What happened?
    The following syntax error occurred in the program SAPLV61A :
    ""VBAK" has already been declared."
    Error in ABAP application program.
    The current ABAP program "SAPLMEPO" had to be terminated because one of the
    statements could not be executed.
    This is probably due to an error in the ABAP program.
    What can you do?
    Please eliminate the error by performing a syntax check
    (or an extended program check) on the program "SAPLV61A ".
    You can also perform the syntax check from the ABAP/4 Editor.
    If the problem persists, proceed as follows:
    Print out the error message (using the "Print" function)
    and make a note of the actions and input that caused the
    error.
    To resolve the problem, contact your SAP system administrator.
    You can use transaction ST22 (ABAP Dump Analysis) to view and administer
    termination messages, especially those beyond their normal deletion
    date.
    Error analysis
    The following syntax error was found in the program SAPLV61A :
    ""VBAK" has already been declared."
    How to correct the error
    Probably the only way to eliminate the error is to correct the program.
    If you cannot solve the problem yourself, please send the
    following documents to SAP:
    1. A hard copy print describing the problem.
    To obtain this, select the "Print" function on the current screen.
    2. A suitable hardcopy prinout of the system log.
    To obtain this, call the system log with Transaction SM21
    and select the "Print" function to print out the relevant
    part.
    3. If the programs are your own programs or modified SAP programs,
    supply the source code.
    To do this, you can either use the "PRINT" command in the editor or
    print the programs using the report RSINCL00.
    4. Details regarding the conditions under which the error occurred
    or which actions and input led to the error.
    Information on where terminated
    The termination occurred in the ABAP program "SAPLMEPO" in "REFRESH_TABLES".
    The main program was "RM_MEPO_GUI ".
    The termination occurred in line 35 of the source code of the (Include)
    program "MM06EF0R_REFRESH_TABLES"
    of the source code of program "MM06EF0R_REFRESH_TABLES" (when calling the
    editor 350).
    ===============================================

    Check OSS Note 133433 is exactly axplain your problems
    will resolve your problems

  • Error : The label 'http' has already been declared. Label names must be unique within a query batch or stored procedure.

    Hi all,
        I have created one SP for sending mail with formatting the HTML code inside script whenever i am individually declaring it and printing its expected but the problem at time of executing SP its giving error like this
    Msg 132, Level 15, State 1, Line 47
    The label 'http' has already been declared. Label names must be unique within a query batch or stored procedure.
    what is the possibilities to overcome this problem follwing is my stored procedure code 
    ALTER PROCEDURE [dbo].[USP_DataLoadMailsend_essRules]
    AS
    BEGIN
    SET NOCOUNT ON;
    SET XACT_ABORT ON;
    BEGIN TRY
    ---BEGIN TRANSACTION T1
    DECLARE @packagelogid INT
    DECLARE @batchlogid INT
    DECLARE @packagestatus CHAR(2)
    select @batchlogid =19870
    --print(@batchlogid)
    DECLARE @script VARCHAR(MAX)
    DECLARE @tableHTML VARCHAR(MAX)
    DECLARE @mailheader VARCHAR(50)
    DECLARE @count INT
    DECLARE @recipients1 VARCHAR(50)
    DECLARE @subject1 VARCHAR(200)
    DECLARE @sql VARCHAR(MAX)
    Declare @UserId varchar(Max)
    Declare @Information varchar(max)
    Declare @TableHTML1 varchar(max)
    Declare @TableHTML2 varchar(max)
    SET @mailheader = ''
    SET @mailheader = (select case
    WHEN FileUpload = 'F'
    THEN 'BussinessRules is Aborted'
    WHEN (InRule = 'S')
    AND (
    SELECT sum(isnull(ErrorRecords, 0)) tot
    FROM abc.FileUploadSummary z
    WHERE z.BatchId = bts.BatchId
    GROUP BY BatchId
    ) > 0
    THEN 'BussinessRules is Processed with Errors'
    WHEN InRule = 'F'
    THEN 'BussinessRules is Failed'
    WHEN (InRule = 'S')
    AND (
    SELECT sum(isnull(ErrorRecords, 0)) tot
    FROM abc.FileUploadSummary z
    WHERE z.BatchId = bts.BatchId
    GROUP BY BatchId
    ) = 0
    THEN 'BussinessRules is Succeeded'
    end
    from abc..BatchStatus bts where BatchId=@batchlogid)
    /* Selecting Person Mail as Recipient */
    SELECT TOP 1 @recipients1 = EmailId FROM abc.PersonEmail
    WHERE PersonId = ( SELECT TOP 1 personid FROM abc.FileUploadSummary WHERE BatchId = @batchlogid )AND EmailTypeId = 1
    /* Selecting UserId*/
    select top 1 @UserId=loginid from abc.FUS where BatchId=@batchlogid
    /*Selecting Information about the Status */
    Set @Information=
    (select case
    WHEN FileUpload = 'F'
    THEN 'BussinessRules is Aborted'
    WHEN (InRule = 'S')
    AND (
    SELECT sum(isnull(ErrorRecords, 0)) tot
    FROM abc.FileUploadSummary z
    WHERE z.BatchId = bts.BatchId
    GROUP BY BatchId
    ) > 0
    THEN 'BussinessRules is Processed with Errors'
    WHEN InRule = 'F'
    THEN 'BussinessRules is Failed'
    WHEN (InRule = 'S')
    AND (
    SELECT sum(isnull(ErrorRecords, 0)) tot
    FROM abc.FileUploadSummary z
    WHERE z.BatchId = bts.BatchId
    GROUP BY BatchId
    ) = 0
    THEN 'BussinessRules is Succeeded'
    end + N' <br> <B>BatchId= '+ convert(varchar(250),(select @batchlogid)) +'</B>'
    from abc..BatchStatus bts where BatchId=@batchlogid )
    /*Selecting the Error Reason*/
    if exists (select 1 from BatchStatus where BatchId=@batchlogid and ( InRule='f'))
    begin
    set @TableHTML1 = '<table border=1><tr><th>Sr.No.</th><th><P>Error Reason :</th></tr>'+
    cast((select td= ROW_NUMBER()over (order by (select 1)),'',
    td=isnull(e.ErrorDescription, '')
    from abc.x.tbPackageErrorLog e --50594
    join abc.x.tbPackageLog p -- 10223
    on p.PackageLogID=e.PackageLogID
    where p.BatchLogID= @batchlogid FOR XML PATH('tr'), TYPE )
    as NVarchar(max)) +'</table>'
    -- print @tableHTML
    if not exists (select 1 from BatchStatus where BatchId=@batchlogid and ( InRule='f'))
    set @TableHTML2 = 'Error Reason :N/A'
    end
    -- insert into #tmp values ( @TableHTML1)
    --select * from #tmp
    Set @tableHTML= 'Hello '+@UserId+', <br>Information:'+isnull(@Information,'') +
    '<Table Border=1><Tr><th>Sr No</th><th>Uploaded files </th>:'+
    CAST ((select td= ROW_NUMBER()over(order by f.FileUploadId), '',
    td = f.TableName , ''
    from abc.FileUploadSummary F where BatchId=@batchlogid
    FOR XML PATH('tr'), TYPE ) AS NVARCHAR(max) )
    +'</table>'+
    'Error Reason :'+isnull(isnull(@TableHTML1,'')+ isnull(@TableHTML2,''),'N/A')+ --concat (isnull(@TableHTML1,''),isnull(@TableHTML2,'')
    '<br> Please login to Your Account for further Details..!'
    +'<br>@Note: This is system generated message, Do not reply to this mail. <br>Regards,<br>'+
    'Admin'
    print @tableHTML
    SET @sql = ' EXEC msdb.dbo.sp_send_dbmail @profile_name = ''DBA_mail_test''
    ,@recipients = ''' + isnull(@recipients1,'''') + ''',@subject = ''' + isnull(@mailheader,'''') + ''',
    @body = ''' +isnull(@tableHTML,'''')+ ''',
    @body_format = ''HTML'''
    Exec(@sql)
    END TRY
    BEGIN CATCH
    PRINT error_message()
    -- Test whether the transaction is uncommittable.
    -- IF (XACT_STATE()) = - 1
    -- ROLLBACK TRANSACTION --Comment it if SP contains only select statement
    DECLARE @ErrorFromProc VARCHAR(500)
    DECLARE @ErrorMessage VARCHAR(1000)
    DECLARE @SeverityLevel INT
    SELECT @ErrorFromProc = ERROR_PROCEDURE()
    ,@ErrorMessage = ERROR_MESSAGE()
    ,@SeverityLevel = ERROR_SEVERITY()
    --INSERT INTO dbo.ErrorLogForUSP (
    -- ErrorFromProc
    -- ,ErrorMessage
    -- ,SeverityLevel
    -- ,DateTimeStamp
    --VALUES (
    -- @ErrorFromProc
    -- ,@ErrorMessage
    -- ,@SeverityLevel
    -- ,GETDATE()
    END CATCH
    END
    please help me to solve this problem
    Niraj Sevalkar

    This is no string http in your procedure. Then again the error message points to a line 47 outside a stored procedure. I can't tell it is outside, since there is no procedure name.
    But I see that you have this piece of dynamic SQL:
    SET @sql = ' EXEC msdb.dbo.sp_send_dbmail @profile_name = ''DBA_mail_test''
    ,@recipients = ''' + isnull(@recipients1,'''') + ''',@subject = ''' + isnull(@mailheader,'''') + ''',
    @body = ''' +isnull(@tableHTML,'''')+ ''',
    @body_format = ''HTML'''
     Exec(@sql)
    Why is this dynamic SQL at all? Why not just make plain call to sp_send_dbmail?
     EXEC msdb.dbo.sp_send_dbmail @profile_name = 'DBA_mail_test'
    ,@recipients = @recipients1, @subject = @mailheader, @body = @tableHTML
    Erland Sommarskog, SQL Server MVP, [email protected]

  • HT1539 I am getting an error that my Disc cannot be found, may be dirty, etc...  Please reinsert and try again.  After retrying, I cannot download, as the redemption code indicates that it has already been used.  How do I download movie now?

    I am getting an error that my Disc cannot be found, may be dirty, etc...  Please reinsert and try again.  After retrying, I cannot download, as the redemption code indicates that it has already been used.  How do I download movie now?

    Thanks for the quick advice!
    Unfortunately, I am still unable to open my core productivity apps, namely Skype and Evernote. Twitter, as well, could not start. But interesting quick fix though, I never knew you could do that.
    Here's the error log after the restart:
    What else should I try?

  • Method "GET_CHANGE_HISTORY" has already been declared

    During the "EXECUTION OF REPORTS AFTER PUT" phase in a SAINT upgrade to ERP 6.0 EHP 3 (on the way to EHP 4), we got a TP_STEP_FAILURE error.  After digging through the logs, the underlying cause seems to be a syntax error in CL_WER_EXP_METHOD_CALL that was stopping the program RDDEXECL.  The error message is "Method "GET_CHANGE_HISTORY" has already been declared".  We can run a check of the class in the ABAP Editor, which gives the above error message, but there does not appear to be a way to edit the class through the ABAP Editor (Change/Display button is grayed out), and we wouldn't know what to do even if we could.  We are using a 32-bit RHEL4 system.  Any advice would be appreciated.

    We managed to implement the note.  In order to get around the "modification/enhancement mode" error, we clicked "Check" with the alias selected, and it showed the "has already been declared" message.  We double-clicked the message and deleted the lines about GET_CHANGE_HISTORY, then clicked Save and it asked us if we wanted to delete the alias.  We did that for all six classes (without activating any of them--this caused errors), and then, after all the aliases had been deleted, activated all of them at once.  To do that, we went to the main screen of SE24, entered one of the classes, hit activate, and clicked on "Entire Workspace" or some such button, then selected all of the components and activated.  Now SAINT is running past the point it had stopped before, so I believe this issue has been resolved.  Thanks, Peter!  I will award you some points.

  • I purchased Creative Cloud through the Employee Purchase program. Had to reimage system. Need help reinstalling application. I have "redemption" code, but get error saying it has already been redeemed. Please advise.

    I purchased Creative Cloud through the Employee Purchase program. Had to reimage system. Need help reinstalling application. I have "redemption" code, but get error saying it has already been redeemed. Can you please advise how I go about getting my software reinstalled? If I was given the serial number when I redeemed, I don't have any record of it.
    Thank you,
    Starla

    Hi Starla Mehaffey,
    I would suggest you to sign in with your Adobe ID during installation and your product will automatically recognize your membership details.
    Refer this Link for any further assistance:- Redemption Code Help
    Hope that helps,
    Regards,
    Rahul Tyagi

  • C++: error: 'std::unique_ptr' has not been declared

    Hi.  I'm trying to compile some C++ code (that I didn't write) and I keep getting this error
    error: ‘std::unique_ptr’ has not been declared
    I've just got all my .h and .cpp files in one folder, and from there I'm trying
    g++ -std=c++11 *.cpp
    I know this probably looks bad, but I don't have a makefile.
    The real point is, why doesn't gcc recognize unique_ptr when I'm explicitly specifying to g++ to use c++11?

    IIRC, xcode does not use gcc by default; the libraries would be different implementation.  I realize we are talking about std:: here, but perhaps the header files have a different hierarchy.  That, or  Xcode is pulling some slight of hand and helping you without asking.

  • HT201209 My wife purchased an iTunes gift card for me and I scratched off the back to get the code and when I entered it to redeem it told me that it had already been redeemed what do I do?

    My wife purchased an iTunes gift card for me and I scratched off the back to get the code and when I entered it to redeem it told me that it had already been redeemed what do I do?

    Try Here  >  http://support.apple.com/kb/TS1292
    If no joy...
    Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact
    And there is this...
    http://www.apple.com/hk/en/support/itunes/store/giftcard/

  • My iTunes gift card that I just bought says that it's already been redeemed

    My iTunes gift card says that it's already been redeemed and I just bought it

    I had the exact same problem a couple of weeks ago and was instructed to scan of the front and back of the card and copy the original store receipt. I have the card, but not the original purchase receipt; not possible with a Christmas gift from couple of years ago.
    I've had correspondence witha couple of the itunes customer services team who have been very unhelpful.
    There is something very wrong in the itunes system where gift cards can be redeemed by 3rd parties (before the panels have even ben scratched off).
    I would be interested to hear of any other similar experiences

  • I have had 4 mac computers and after years of downloading songs from itunes, I keep recieving a message that I need to set up an account.  when I try to make a new account, i get an error that says i already have an account.  please help!

    I have had 4 mac computers and after years of downloading songs from itunes, I keep recieving a message that I need to set up an account.  when I try to make a new account, i get an error that says i already have an account.

    Have you tried checking the Store drop-down menu in the iTunes interface to see if you are signed in the existing account?

  • HT4059 I purchased an iBook and when I try to download it I get sent in a circle. Message pops up that it's already been purchased & I need to go to store to download but it never downloads, stays in pause mode. I have been charged for the book but can't

    I purchased an iBook and when I try to download it I get sent in a circle. Message pops up that it's already been purchased &amp; I need to go to store to download but it never downloads, stays in pause mode. I have been charged for the book but can't retrieve it. I've successfully purchased books before without trouble.very frustrated

    Hi Peggs,
    Try this:
    Open your iBooks app on your iPad
    Select the Store Button at the top
    Select Purchased at the bottom
    You will see your AppleID on the right at the bottom, then Redeem, then Support
    Click on your Apple ID, and when the AppleID window comes up with the options, Sign Out
    Then Sign In again and try redownloading your book
    Hope this helps!
    Cheers,
    GB

  • I just scratched off my iTunes card and when I put in the code it said that it has already been redeemed.

    When I scratched off my iTunes card, I immediately put in the code and it said that it had already been redeemed. Any ideas of how I can get the card to work?

    Hi, amenic22. 
    Thank you for visiting Apple Support Communities.
    If you are having issues redeeming an iTunes Gift Card, here is an article that you may find helpful.  See the section labeled Contact iTunes Store Support.
    If you can't redeem your iTunes Gift Card or code
    http://support.apple.com/kb/HT6021
    Cheers,
    Jason H.

  • I downloaded a movie. It isn't in video app nor iTunes. I tried the settings general restrictions and it isn't restricted. I am positive I rented the movie because when I go back to iTunes and press rent it says that it has already been rented.

    I downloaded a movie. It isn't in video app nor iTunes. I tried the settings>general>restrictions and it isn't restricted. I am positive I rented the movie because when I go back to iTunes and press rent it says that it has already been rented. How do I get to this movie?

    Having the same problem. Watched 25 minutes of a rental and it stopped with the message"unable to load video"
    Using current version IPad mini.
    Ios7 is  HUGH PIECE OF CRAP!!!!

  • How do i download CC once I have put in redemption code? It keeps telling me that it has already been redeemed/activated and will not let me go any further.

    How do I download CC once I have put in redemption code? It keeps telling me that it has already been redeemed/activated and will not let me go any further.

    if you've used your adobe id to pay for a cc subscription, download the cc desktop app and install it, Download Adobe Creative Cloud apps | Free Adobe CC trial
    use the desktop app to install your subscribed programs.

  • What are all the errors that can be corrected by using tran code rsrv?

    hi all,,
    what are all the errors that can be corrected by using tran code rsrv?
    can anyone list me out a list of errors that can be rectified using rsrv. And let me know the steps involved to rectify those errors using trns code rsrv.
    regds
    hari

    Hi Kalyan,
    I have urgent need of the RSRV DOCS.
    Can you mail it to [email protected]
    I will highly appreciate.
    Thanks in Advance
    SS
    Points will be awarded

Maybe you are looking for

  • Sending from FCPS to Color doesn't work (choosing Color is not possible)

    Hi, i bought the final cut studio 3 update for my final cut 4.5 HD application and installed the full 47GB update and i ran all possible software updates. i even reinstalled my mac os 10.5.6 befor installing fcp. if i right click the footage in final

  • I'm having problems logging in to accounts on certain sites

    I am able to login on my IPad and have been able to login with my macbook until just recently. Help!

  • Direct Billing from Delivery Document?

    Hi Team, We were using and a order to billing process so far. Here once the SO ins created from the SO i had the option to do direct billing. By which the vf01 will be open with the invoice details. Now i am implementing a order- delivery - billing.

  • Business Graphics and Data Tables

    Hi All, I have a SAPGUI application which uses the SAP Chart to display a pretty simple column chart with a data table underneath. With the SAPGUI Chart Options this is set as so: [Chart Options |http://www.assetcentric.com.au/images/chart-options.pn

  • IPhoto worked after user transfer, now quits unexpectedly every time...

    Here is the error message I receive when iPhoto quits: Process:         iPhoto [2587] Path:            /Applications/iPhoto.app/Contents/MacOS/iPhoto Identifier:      com.apple.iPhoto Version:         9.5.1 (902.17) Build Info:      iPhotoProject-902