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

SLIN/SCI error - Clarrification

Former Member
0 Likes
1,282

In SLIN, I am getting below error.

can you please tell me how to consider this.

1)Messages for Obsolete Statements(Error)

The current ABAP command is obsolete

Within classes and interfaces, you can only use "TYPE" to refer to ABAP Dictionary

types, not "LIKE" or "STRUCTURE".

FORM F_OUTPUT_SVF

USING

LI_CSVFILEHEADER_IN LIKE I_CSVFILEHEADER

LI_CSVFILEDATA_IN LIKE I_CSVFILEDATA

L_LNAME TYPE RSPOLNAME

L_PMODE TYPE CHAR1

CHANGING

L_RC TYPE CHAR1

L_STATUS LIKE EXTCMDEXEX-STATUS <-Pointing here

L_R_FILENAME TYPE STRING.

2)In SCI..Performance Checks

....Analysis of WHERE Condition for SELECT

......Warnings

........Message Code 0003

..........Program ZGTPPO010 Include ZACGZ010 Row 81 Column 0

.......... Table ZACGT03: No First Field of a Table Index in WHERE

..........Condition

In source code

SELECT SINGLE JOBID FORM OUTFILEPATH

FROM ZACGT03

INTO (LWA_ZACGT03-JOBID,

LWA_ZACGT03-FORM,

LWA_ZACGT03-OUTFILEPATH)

WHERE PROGRAMID = SY-REPID. <-Pointing here.

Regards

Chandra

9 REPLIES 9
Read only

Former Member
0 Likes
1,182

Hi,

In form:

FORM F_OUTPUT_SVF

USING

LI_CSVFILEHEADER_IN LIKE I_CSVFILEHEADER

LI_CSVFILEDATA_IN LIKE I_CSVFILEDATA

L_LNAME TYPE RSPOLNAME

L_PMODE TYPE CHAR1

CHANGING

L_RC TYPE CHAR1

L_STATUS LIKE EXTCMDEXEX-STATUS <-Pointing here

L_R_FILENAME TYPE STRING.

Replace with:

FORM F_OUTPUT_SVF

USING

LI_CSVFILEHEADER_IN TYPE I_CSVFILEHEADER

LI_CSVFILEDATA_IN TYPE I_CSVFILEDATA

L_LNAME TYPE RSPOLNAME

L_PMODE TYPE CHAR1

CHANGING

L_RC TYPE CHAR1

L_STATUS TYPE EXTCMDEXEX-STATUS <-Pointing here

L_R_FILENAME TYPE STRING.

and supply key fields from ZACGT03

in select query:

SELECT SINGLE JOBID FORM OUTFILEPATH

FROM ZACGT03

INTO (LWA_ZACGT03-JOBID,

LWA_ZACGT03-FORM,

LWA_ZACGT03-OUTFILEPATH)

WHERE PROGRAMID = SY-REPID. <-Pointing here.

Hope this helps.

BR

Dep

Read only

Former Member
0 Likes
1,182

Hi,

Change LIKE to TYPE here. L_STATUS TYPE EXTCMDEXEX-STATUS

Hide the message using the command shown in SLIN...may be "#EC NO FIRST FIELD.

Regards,

Ganga

Read only

0 Likes
1,182

Hi

1) But in SAP help says, both LIKE and TYPE in USING or Changing are allowed right?

Is this pottential error to be corrected?

2)Does this error is potential to be correct.

can you please tell me how it could affect in program. In my case key fields are not known at this point of time.

so i cant use in Where condition.

Regards

Read only

0 Likes
1,182

These are not potential errors. You can ignore them.

Regards,

Ganga

Read only

matt
Active Contributor
0 Likes
1,182

Do not ignore these errors The statements are obsolete in this context. They are flagged up because

a) they are not necessary

b) they are not syntactically correct in all contexts.

c) they may be flagged as actual errors in the future

Therefore - do not use them. Use the alternatives. It's really not difficult.

Read only

deepak_dhamat
Active Contributor
0 Likes
1,182

Hi ,

Use self join i.e like below mara .

select single * from mara

where bismt = bismt

and matnr = matnr .

SELECT SINGLE JOBID FORM OUTFILEPATH

FROM ZACGT03

INTO (LWA_ZACGT03-JOBID,

LWA_ZACGT03-FORM,

LWA_ZACGT03-OUTFILEPATH)

WHERE PROGRAMID = SY-REPID

and jobid = jobid

and form = form .

and When you Declare using Like . i.e you are allocating memory initially .

when you declare using TYPE i.e it will allocate memory dynamically .

regards

Deepak.

Read only

0 Likes
1,182

Hi

Thanks for reply.

1) In my case, table ZACGT03 has 4 key fields

MANDT Client

JOBID SVF JOBID

PROGRAMID ABAP Program Name

OUTPUTFLG Processing division(doesn't use)

Now i want to fetch SVF JOBID,FORM,OUTFILEPATH fields from this table.

So i have no other go, except to use only PROGRAMID to fetch JOBID and FORM and file path.

So how to avoid this error in this case?

2)In form using, LIKE and TYPE both are used for fields.

How to find out LIKE should be replaced with TYPE?

I would like to know is this potential error to be corrected or not? because looks like this erro

REgards

Read only

0 Likes
1,182

Hi ,

use all 4 key fields in where condition

where

MANDT = mandt

JOBID = jobid

PROGRAMID = sy-repid

outputflg = outputflg

and use "#EC CALLED

like below after dot .

FORM F_OUTPUT_SVF

USING

LI_CSVFILEHEADER_IN LIKE I_CSVFILEHEADER

LI_CSVFILEDATA_IN LIKE I_CSVFILEDATA

L_LNAME TYPE RSPOLNAME

L_PMODE TYPE CHAR1

CHANGING

L_RC TYPE CHAR1

L_STATUS LIKE EXTCMDEXEX-STATUS

L_R_FILENAME TYPE STRING. ""#EC CALLED

regards

Deepak.

Edited by: Deepak Dhamat on Aug 24, 2011 12:40 PM

Read only

Former Member
0 Likes
1,182

thanks