2014 Mar 26 11:23 AM
I have some warnings that pop up in EPC on certain SELECT SINGLE statements where I just want to get any of the records that match a partial key. This is listed as a warning but I'd like to ignore that as its implications are irrelevant to my situation.
Unfortunately, I can't find the pragma that I can use for this. EPC suggests using the legacy pseudo comment "#EC WARNOK". As I don't want to use pseudo comments, I looked for the corresponding pragma using program ABAP_SLIN_PRAGMAS. For WARNOK this lists "NOCOMMENT" as the pragma to use. However, when using this, I get the standard check warning "Unknown prgama 'NOCOMMENT'".
Is this pragma incorrect? How can I disable the EPC warning on this select using a pragma instead of a pseudocomment?
2014 Mar 26 11:29 AM
You can simply use select up to one rows rather than using the Pragma
For me it works
select
single * "#EC WARNOK
from bseg where bukrs eq '0001'.
I have some warnings that pop up in EPC on certain SELECT SINGLE statements where I just want to get any of the records that match a partial key. This is listed as a warning but I'd like to ignore that as its implications are irrelevant to my situation.
Unfortunately, I can't find the pragma that I can use for this. EPC suggests using the legacy pseudo comment "#EC WARNOK". As I don't want to use pseudo comments, I looked for the corresponding pragma using program ABAP_SLIN_PRAGMAS. For WARNOK this lists "NOCOMMENT" as the pragma to use. However, when using this, I get the standard check warning "Unknown prgama 'NOCOMMENT'".
Is this pragma incorrect? How can I disable the EPC warning on this select using a pragma instead of a pseudocomment?
2014 Mar 26 11:29 AM
You can simply use select up to one rows rather than using the Pragma
For me it works
select
single * "#EC WARNOK
from bseg where bukrs eq '0001'.
2014 Mar 26 11:36 AM
That is definitely a good workaround and according to a fair few SCN discussions the best approach since it differentiates full-key versus partial key selects from one another despite being technically identical in function and performance.
However, I'd still like to know what can be done pragma-wise. WARNOK is not the only pseudo comment I see that has a NOCOMMENT pragma defined in ABAP_SLIN_PRAGMAS, ENHOK and TRANSPORT are others.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |