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

Just another Syntax Error

Former Member
0 Likes
661

This is the dump description

Error in the ABAP Application Program

The current ABAP program "RMCX0010" had to be terminated because it has

come across a statement that unfortunately cannot be executed.

The following syntax error occurred in program "SAPFMCVF " in include "FMCV2710

" in

line 14:

"Field "ZZLIS001-SPTAG" is unknown. It is neither in one of the specifi"

"ed tables nor defined by a "DATA" statement. ."

and here is the part of the code where the error is

FORM MCV2_710.

*

TABLES: S711.

RANGES: L_FECHAS FOR SY-DATUM.

*

REFRESH L_FECHAS.

L_FECHAS-SIGN = 'I'.

L_FECHAS-OPTION = 'BT'.

CONCATENATE ZZLIS001-SPTAG(6) '01' INTO L_FECHAS-LOW.

L_FECHAS-HIGH = ZZLIS001-SPTAG.

IF ZZLIS001-SPTAG+6(2) <> '01'.

L_FECHAS-HIGH = ZZLIS001-SPTAG - 1.

ENDIF.

APPEND L_FECHAS.

What do you think is the error?

3 REPLIES 3
Read only

Former Member
0 Likes
557

Your subroutine doesn't know about ZZLIS001-SPTAG which is declared in main program.Pass them to form

Check this link to know how to pass tables and fields:

http://help.sap.com/saphelp_nw70/helpdata/en/9f/db979035c111d1829f0000e829fbfe/content.htm

Read only

Former Member
0 Likes
557

Hi,

try passing the table to the subroutine.

code

perform MCV2_710 tables ZZLIS001.

FORM MCV2_710 using ZZLIS001 type any table.
TABLES: S711.
RANGES: L_FECHAS FOR SY-DATUM.
*
REFRESH L_FECHAS.
L_FECHAS-SIGN = 'I'.
L_FECHAS-OPTION = 'BT'.
CONCATENATE ZZLIS001-SPTAG(6) '01' INTO L_FECHAS-LOW.
L_FECHAS-HIGH = ZZLIS001-SPTAG.
IF ZZLIS001-SPTAG+6(2) '01'.
L_FECHAS-HIGH = ZZLIS001-SPTAG - 1.
ENDIF.
APPEND L_FECHAS.
endform.

hope this works!!!

thanks

ravi

Read only

Former Member
0 Likes
557

Hi ur form statement is not awrae of this .

ZZLIS001-SPTAG ,

so pass this in the perform and accept in form.

form name using ZZLIS001 type any table.

Regrds