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

Extended syntax check

Former Member
0 Likes
879

In ECC 6.0, I have two errors in my extended syntax check

1).   Char. strings w/o text elements will not be translated:
'Store%'
(The message can be hidden with "#EC NOTEXT)

with below coding

SELECT kunnr name2 j_3astcu

FROM kna1

INTO TABLE gt_kna1

FOR ALL ENTRIES IN gt_soldto1

WHERE ( name2 LIKE 'STORE%'

OR name2 LIKE 'Store%'

OR name2 LIKE 'store%'

OR name2 LIKE 'DC%'

AND land1 = 'US' )

OR ( j_3astcu = gt_soldto1-store_no

AND land1 = 'US' ).

2).

SELECT-OPTIONS : s_mail1 FOR somlreci1-receiver NO INTERVALS.

The current ABAP command is obsolete
 With "LOOP AT itab", one of the additions "INTO", "ASSIGNING", or "TRANSPORTING NO
 FIELDS" is required in the 00 context
Internal Message Code: LOOP 012
 (The message cannot be hidden using pseudo-comment "#EC .., bzw. durch SET
 EXTENDED CHECK OFF/ON)

LOOP AT s_mail1.

*-----If email id entered on the selection screen doesnot contain

    • '@' and '.', then give relevent message to user as popup.*

IF s_mail1-low NA gc_at OR s_mail1-low NA gc_dot.

MESSAGE e038(zs) WITH text-m08 text-m09 text-m13.

ENDIF.

ENDLOOP.

Please suggest me howcan I avoid string Store% as well as select-option.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
749

Hi,

1)

'Store%'(001)...add (001) to the text...then double click on the 001 to create the text element..

2) Create a work area and use that in the loop at...

data: wa_mail1 like line of s_mail1.

LOOP AT s_mail1 INTO wa_mail1.

ENDLOOP.

Thanks

Naren

5 REPLIES 5
Read only

Former Member
0 Likes
750

Hi,

1)

'Store%'(001)...add (001) to the text...then double click on the 001 to create the text element..

2) Create a work area and use that in the loop at...

data: wa_mail1 like line of s_mail1.

LOOP AT s_mail1 INTO wa_mail1.

ENDLOOP.

Thanks

Naren

Read only

Former Member
0 Likes
749

1. Check out the SAPhelp for the where sql_cond (LIKE) in a select stmt.

2. You must either use a work area to loop into or use field symbols. Itabs with header lines are obsolete. Again SAP help for loop at itab will be a great help.

Regards

Greg Kern

Read only

former_member194669
Active Contributor
0 Likes
749

1. Declare the "Store%" in text elements and use in select statment

Eg : WHERE name2 LIKE text-001

2.

data : wa_receiver like line of s_mail1.

LOOP AT s_mail1 into wa_receiver.

...

...

ENDLOOP.

a®

Read only

matt
Active Contributor
0 Likes
749

In my opinion, the answers given to your first question so far, are wrong. When there is a specific reason for using a text string in a select, then it should remain precisely as that. So you should use "#EC NOTEXT. It is wrong to put them in a text element, as they will never be translated.

The extended syntax check doesn't exist so that you can remove the cause, it is so that you can address it. Many violations of the extended syntax checker have a valid reason. That's why you get the "#EC exceptions. But if you use them, then make sure you can justify it.

matt

Read only

Former Member
0 Likes
749

put a constant to 'Store%'. you wont get next time.

regards

guru