Stop googling SAP errors. Use our Free Essentials plan instead - no credit card needed. Start Now

Close

How To Fix W4130 - NOTE: SD documents were read using the secondary INDEX !!!!!


SAP Error Message - Details

  • Message type: E = Error

  • Message class: W4 - Messages for material discontinuation

  • Message number: 130

  • Message text: NOTE: SD documents were read using the secondary INDEX !!!!!

  • Show details Hide details


  • Self-Explanatory Message

    Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of messages in the SAP system have a message text, however this is frequently insufficient to comprehend or resolve the problem.

    To make things easier, more detailed information is frequently added to describe the issue, how to fix it, and the necessary steps or configuration modifications.

    Unfortunately, there isn't any extra information in this error notice.



    What else can you do?

    First, use our AnswerBot below to get a possible cause and solution (requires a premium subscription).

    Also, review the in-depth Common Questions & Answers listed below; you could discover a solution there or be able to connect with others who have faced similar challenges.

    You can also try searching the SAP support portal (support.sap.com) but you need a special user ID to access it. It is possible that an SAP support note exists that provides additional details about the mistake or even steps for fixing it.


Smart SAP Assistant

  • What is the cause and solution for SAP error message W4130 - NOTE: SD documents were read using the secondary INDEX !!!!! ?

    Certainly! Here's a detailed explanation regarding the SAP message W4130: "NOTE: SD documents were read using the secondary INDEX !!!!!"


    1. Cause of the Message

    • Message Type: Warning (W)
    • Message Number: 4130
    • Message Text: "NOTE: SD documents were read using the secondary INDEX !!!!!"

    This message appears when SAP reads Sales and Distribution (SD) documents (such as sales orders, deliveries, billing documents) from the database using a secondary index instead of the primary index.

    • Primary Index: The main index on the database table, optimized for the most common access patterns.
    • Secondary Index: An additional index created to speed up queries that do not fit the primary index.

    The system logs this message to inform that the query optimizer chose a secondary index to fetch SD documents, which might indicate that the query conditions do not match the primary index fields or that the primary index is not efficient for this query.


    2. Why Does This Happen?

    • The selection criteria in the program or report do not align with the primary index fields.
    • The primary index might be missing or not optimal for the query.
    • The database optimizer decided that using the secondary index is more efficient for the current query.
    • Sometimes, this message can appear during debugging or when custom reports/programs access SD documents with unusual selection criteria.

    3. Is This an Error?

    • No, it is not an error. It is a warning/note to inform the user or developer that the system used a secondary index.
    • Usually, this message does not indicate a problem unless performance issues are observed.

    4. Potential Impact

    • If the secondary index is not well maintained or if the query is inefficient, it might lead to performance degradation.
    • In rare cases, if the secondary index is missing or corrupted, it could cause runtime errors or incorrect data retrieval.

    5. Solution / Recommendations

    • Check the selection criteria: Ensure that the selection fields in your query or report correspond to the primary index fields of the SD document tables (e.g., VBAK, VBAP).
    • Analyze database indexes: Use transaction DB02 or database tools to check the status and usage of primary and secondary indexes on SD tables.
    • Performance tuning: If performance is an issue, consider:
      • Adjusting the selection criteria to better use the primary index.
      • Creating or optimizing secondary indexes if necessary (consult your BASIS/DBA team).
    • Ignore if no issues: If the message appears but there are no performance or data issues, it can be safely ignored.
    • Check OSS Notes: Sometimes SAP releases notes related to index usage or performance improvements for SD tables.

    6. Related Information

    • Tables involved: VBAK (Sales Document: Header Data), VBAP (Sales Document: Item Data), VBRK (Billing Document: Header), VBRP (Billing Document: Item), etc.
    • Indexes: Primary indexes are usually on document number and client fields.
    • Transaction Codes:
      • SE11 to view table indexes.
      • DB02 for database performance and index analysis.
    • SAP Notes: Search SAP Support Portal for notes related to "secondary index SD documents" or message W4130.

    Summary

    Aspect Details
    Message W4130: NOTE: SD documents were read using the secondary INDEX !!!!!
    Cause Query used secondary index instead of primary index to read SD documents
    Impact Usually no error; possible performance impact if indexes are not optimal
    Solution Review selection criteria, check and optimize indexes, monitor performance
    Action Ignore if no issues; consult BASIS/DBA if performance problems occur

    If you want, I can help you with specific steps to analyze indexes or optimize your queries!

    • Do you have any question about this error?


      Upgrade now to chat with this error.


Instant HelpGet instant SAP help. Sign up for our Free Essentials Plan.


Related SAP Error Messages

Click the links below to see the following related messages:

Click on this link to search all SAP messages.


Rating
The AI Support Assistant is great. It provides comprehensive assistance even on the most difficult issues. I highly recommend this service.
Rate 1
John Jordan
SAP Consultant & Author