Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Unknown Pragmas

Former Member
0 Likes
3,844

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?

1 ACCEPTED SOLUTION
Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
1,995

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?

2 REPLIES 2
Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
1,996

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'.

Read only

0 Likes
1,995

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.