Do you have any question about this error?
Message type: E = Error
Message class: D3 - CCMS - DB2 on OS390
Message number: 787
Message text: INDEX ALL can only be followed by KEYCARD or NUMCOLS
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.
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.
D3787
- INDEX ALL can only be followed by KEYCARD or NUMCOLS ?The SAP error message D3787 indicates that there is an issue with the use of the
INDEX ALL
command in your ABAP code. This command is typically used in conjunction with database table operations, and the error suggests that it is not being used correctly.Cause:
The error occurs when the
INDEX ALL
command is not followed by the required keywordsKEYCARD
orNUMCOLS
. In ABAP, when you useINDEX ALL
, you need to specify what kind of information you want to retrieve about the index. The two valid options are:
KEYCARD
: This retrieves the cardinality of the index, which indicates the number of unique key values.NUMCOLS
: This retrieves the number of columns in the index.If neither of these keywords is provided after INDEX ALL
, the system raises the error D3787.
To resolve this error, you need to modify your ABAP code where the INDEX ALL
command is used. Ensure that it is followed by either KEYCARD
or NUMCOLS
. Here’s an example of how to use it correctly:
DATA: lv_keycard TYPE i,
lv_numcols TYPE i.
" To get the cardinality of the index
CALL FUNCTION 'INDEX_ALL'
EXPORTING
tabname = 'YOUR_TABLE_NAME'
IMPORTING
keycard = lv_keycard.
" To get the number of columns in the index
CALL FUNCTION 'INDEX_ALL'
EXPORTING
tabname = 'YOUR_TABLE_NAME'
IMPORTING
numcols = lv_numcols.
INDEX ALL
command and its usage.By ensuring that your use of INDEX ALL
is correctly formatted, you should be able to resolve the D3787 error.
Get instant SAP help. Start your 7-day free trial now.
D3786
You must enter an index name after INDEX
Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...
D3785
INDEX ALL specified; other indexes not included in generated statement
Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...
D3788
Sort over a internal table failed
Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...
D3789
No parameters were inserted
Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...
Click on this link to search all SAP messages.