Application Development 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: 

ALV

Former Member
0 Kudos

Hi,

In my program iam getting the follwing error. plz let me know.

Error is Field "ST_FIELDCAT_CALPOS" is unknown. It is neither in one of thespecified tables nor defined by a "DATA" statement . . . . . .

REPORT ZAC_TAB31.

TYPE-POOLS SLIS.

TYPES:

BEGIN OF TY_VBAK,

VBELN TYPE VBAK-VBELN,

AUDAT TYPE VBAK-AUDAT,

AUART TYPE VBAK-AUART,

NETWR TYPE VBAK-NETWR,

KUNNR TYPE VBAK-KUNNR,

END OF TY_VBAK.

DATA:

ST_VBAK TYPE TY_VBAK,

IT_VBAK TYPE TABLE OF TY_VBAK.

DATA:

IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,

ST_FIELDCAT TYPE LINE OF SLIS_T_FIELDCAT_ALV.

SELECT-OPTIONS:

SKUNNR FOR ST_VBAK-KUNNR.

START-OF-SELECTION.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = 'ZAC_TAB31'

IT_FIELDCAT = 'SLIS_T_FIELDCAT_ALV'.

ST_FIELDCAT_CALPOS = '1'.

ST_FIELDCAT_TABLENAME = 'ST_VBAK'.

ST_FIELDCAT_FIELDNAME = 'VBELN'.

ST_FIELDCAT_KEY = 'X'.

ST_FIELDCAT_HOTSPOT = 'X'.

ST_FIELDCAT_SELTEXT_L = 'SALES DOCUMENT NUMBER'.

ST_FIELDCAT_SELTEXT_M = 'SALES DOC NO'.

ST_FIELDCAT_SELTEXT_S = 'ORDER NO'.

APPEND ST_FIELDCAT INTO IT_FIELDCAT.

TABLES

T_OUTTAB = IT_VBAK.

  • EXCEPTIONS

  • PROGRAM_ERROR = 1

  • OTHERS = 2

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

SELECT VBELN AUDAT AUART NETWR KUNNR

FROM VBAK INTO TABLE IT_VBAK

WHERE KUNNR IN SKUNNR.

Error is Field "ST_FIELDCAT_CALPOS" is unknown. It is neither in one of thespecified tables nor defined by a "DATA" statement . . . . . . . . . .

rams s

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hI,

I had kept ST_FIELDCAT_CAL_POS. Still it is giving the same error.

11 REPLIES 11

Former Member
0 Kudos

Hi ram,

it shud be col_pos not calpos. hope this will solve ur problem.

rewad if helpful.

Regards

Azad.

Former Member
0 Kudos

Use ST_FIELDCAT-CALPOS instead of ST_FIELDCAT_CALPOS

Reward if useful

Former Member
0 Kudos

hi..

put as <b>CAL_POS</b>

REPORT ZAC_TAB31.

TYPE-POOLS SLIS.

TYPES:

BEGIN OF TY_VBAK,

VBELN TYPE VBAK-VBELN,

AUDAT TYPE VBAK-AUDAT,

AUART TYPE VBAK-AUART,

NETWR TYPE VBAK-NETWR,

KUNNR TYPE VBAK-KUNNR,

END OF TY_VBAK.

DATA:

ST_VBAK TYPE TY_VBAK,

IT_VBAK TYPE TABLE OF TY_VBAK.

DATA:

IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,

ST_FIELDCAT TYPE LINE OF SLIS_T_FIELDCAT_ALV.

SELECT-OPTIONS:

SKUNNR FOR ST_VBAK-KUNNR.

START-OF-SELECTION.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = 'ZAC_TAB31'

IT_FIELDCAT = 'SLIS_T_FIELDCAT_ALV'.

ST_FIELDCAT_

= '1'.

ST_FIELDCAT_TABLENAME = 'ST_VBAK'.

ST_FIELDCAT_FIELDNAME = 'VBELN'.

ST_FIELDCAT_KEY = 'X'.

ST_FIELDCAT_HOTSPOT = 'X'.

ST_FIELDCAT_SELTEXT_L = 'SALES DOCUMENT NUMBER'.

ST_FIELDCAT_SELTEXT_M = 'SALES DOC NO'.

ST_FIELDCAT_SELTEXT_S = 'ORDER NO'.

APPEND ST_FIELDCAT INTO IT_FIELDCAT.

TABLES

T_OUTTAB = IT_VBAK.

  • EXCEPTIONS

  • PROGRAM_ERROR = 1

  • OTHERS = 2

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

SELECT VBELN AUDAT AUART NETWR KUNNR

FROM VBAK INTO TABLE IT_VBAK

WHERE KUNNR IN SKUNNR.

<b>Reward points if useful</b>

Regards

Ashu

Former Member
0 Kudos

HI,

do like this.

TYPE-POOLS SLIS.

TYPES:

BEGIN OF TY_VBAK,

VBELN TYPE VBAK-VBELN,

AUDAT TYPE VBAK-AUDAT,

AUART TYPE VBAK-AUART,

NETWR TYPE VBAK-NETWR,

KUNNR TYPE VBAK-KUNNR,

END OF TY_VBAK.

DATA:

ST_VBAK TYPE TY_VBAK,

IT_VBAK TYPE TABLE OF TY_VBAK.

DATA:

IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,

ST_FIELDCAT TYPE LINE OF SLIS_T_FIELDCAT_ALV.

SELECT-OPTIONS:

SKUNNR FOR ST_VBAK-KUNNR.

<b>ST_FIELDCAT-COL_POS = 1.

ST_FIELDCAT-FIELDNAME = 'VBELN'.

ST_FIELDCAT-KEY = 'X'.

ST_FIELDCAT-HOTSPOT = 'X'.

ST_FIELDCAT-SELTEXT_M = 'SALES DOC NO'.

APPEND ST_FIELDCAT TO IT_FIELDCAT.

ST_FIELDCAT-COL_POS = 2.

ST_FIELDCAT-FIELDNAME = 'AUDAT'.

ST_FIELDCAT-SELTEXT_M = 'DOCC. DATE'.

APPEND ST_FIELDCAT TO IT_FIELDCAT.

ST_FIELDCAT-COL_POS = 3.

ST_FIELDCAT-FIELDNAME = 'AUART'.

ST_FIELDCAT-SELTEXT_M = 'SALES DOC TYP'.

APPEND ST_FIELDCAT TO IT_FIELDCAT.

ST_FIELDCAT-COL_POS = 4.

ST_FIELDCAT-FIELDNAME = 'NETWR'.

ST_FIELDCAT-SELTEXT_M = 'DOC.CURRENCY'.

APPEND ST_FIELDCAT TO IT_FIELDCAT.

ST_FIELDCAT-COL_POS = 5.

ST_FIELDCAT-FIELDNAME = 'KUNNR'.

ST_FIELDCAT-SELTEXT_M = 'CUSTOMER NO'.

APPEND ST_FIELDCAT TO IT_FIELDCAT.</b>

START-OF-SELECTION.

<b>SELECT VBELN AUDAT AUART NETWR KUNNR

FROM VBAK INTO TABLE IT_VBAK

WHERE KUNNR IN SKUNNR.</b>

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = 'ZAC_TAB31'

<b>IT_FIELDCAT = IT_FIELDCAT</b>

TABLES

T_OUTTAB = IT_VBAK.

rgds,

bharat.

Former Member
0 Kudos

not ST_FIELDCAT_CALPOS

ST_FIELDCAT<b>-</b>CALPOS

Former Member
0 Kudos

hI,

I had kept ST_FIELDCAT_CAL_POS. Still it is giving the same error.

0 Kudos

hi..

put as CAL_POS

REPORT ZAC_TAB31.

TYPE-POOLS SLIS.

TYPES:

BEGIN OF TY_VBAK,

VBELN TYPE VBAK-VBELN,

AUDAT TYPE VBAK-AUDAT,

AUART TYPE VBAK-AUART,

NETWR TYPE VBAK-NETWR,

KUNNR TYPE VBAK-KUNNR,

END OF TY_VBAK.

DATA:

ST_VBAK TYPE TY_VBAK,

IT_VBAK TYPE TABLE OF TY_VBAK.

DATA:

IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,

ST_FIELDCAT TYPE LINE OF SLIS_T_FIELDCAT_ALV.

SELECT-OPTIONS:

SKUNNR FOR ST_VBAK-KUNNR.

START-OF-SELECTION.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = 'ZAC_TAB31'

IT_FIELDCAT = 'SLIS_T_FIELDCAT_ALV'.

<b>ST_FIELDCAT-COL_POS = '1'.

ST_FIELDCAT-TABLENAME = 'ST_VBAK'.

ST_FIELDCAT-FIELDNAME = 'VBELN'.

ST_FIELDCAT-KEY = 'X'.

ST_FIELDCAT-HOTSPOT = 'X'.

ST_FIELDCAT-SELTEXT_L = 'SALES DOCUMENT NUMBER'.

ST_FIELDCAT-SELTEXT_M = 'SALES DOC NO'.

ST_FIELDCAT-SELTEXT_S = 'ORDER NO'.

APPEND ST-FIELDCAT INTO IT_FIELDCAT.</b>

TABLES

T_OUTTAB = IT_VBAK.

  • EXCEPTIONS

  • PROGRAM_ERROR = 1

  • OTHERS = 2

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

SELECT VBELN AUDAT AUART NETWR KUNNR

FROM VBAK INTO TABLE IT_VBAK

WHERE KUNNR IN SKUNNR.

Reward points if useful

Regards

Ashu

0 Kudos

hI.

REPORT ZAC_TAB31.

TYPE-POOLS SLIS.

TYPES:

BEGIN OF TY_VBAK,

VBELN TYPE VBAK-VBELN,

AUDAT TYPE VBAK-AUDAT,

AUART TYPE VBAK-AUART,

NETWR TYPE VBAK-NETWR,

KUNNR TYPE VBAK-KUNNR,

END OF TY_VBAK.

DATA:

ST_VBAK TYPE TY_VBAK,

IT_VBAK TYPE TABLE OF TY_VBAK.

DATA:

IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,

ST_FIELDCAT TYPE LINE OF SLIS_T_FIELDCAT_ALV.

SELECT-OPTIONS:

SKUNNR FOR ST_VBAK-KUNNR.

START-OF-SELECTION.

ST_FIELDCAT-COL_POS = '1'.

ST_FIELDCAT-TABNAME = 'ST_VBAK'.

ST_FIELDCAT-FIELDNAME = 'VBELN'.

ST_FIELDCAT-KEY = 'X'.

ST_FIELDCAT-HOTSPOT = 'X'.

ST_FIELDCAT-SELTEXT_L = 'SALES DOCUMENT NUMBER'.

ST_FIELDCAT-SELTEXT_M = 'SALES DOC NO'.

ST_FIELDCAT-SELTEXT_S = 'ORDER NO'.

APPEND ST_FIELDCAT TO IT_FIELDCAT.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = 'ZAC_TAB31'

IT_FIELDCAT = 'SLIS_T_FIELDCAT_ALV'.

TABLES

<b>T_OUTTAB = IT_VBAK.</b>

EXCEPTIONS

PROGRAM_ERROR = 1

OTHERS = 2

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

SELECT VBELN AUDAT AUART NETWR KUNNR

FROM VBAK INTO TABLE IT_VBAK

WHERE KUNNR IN SKUNNR.

Iam getting the error that (in bold letters) "." expected after "T_OUTTAB".

Thanks

0 Kudos

hi..

<b>dont keep full stop(.) after T_OUTTAB = IT_VBAK</b>

REPORT ZAC_TAB31.

TYPE-POOLS SLIS.

TYPES:

BEGIN OF TY_VBAK,

VBELN TYPE VBAK-VBELN,

AUDAT TYPE VBAK-AUDAT,

AUART TYPE VBAK-AUART,

NETWR TYPE VBAK-NETWR,

KUNNR TYPE VBAK-KUNNR,

END OF TY_VBAK.

DATA:

ST_VBAK TYPE TY_VBAK,

IT_VBAK TYPE TABLE OF TY_VBAK.

DATA:

IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,

ST_FIELDCAT TYPE LINE OF SLIS_T_FIELDCAT_ALV.

SELECT-OPTIONS:

SKUNNR FOR ST_VBAK-KUNNR.

START-OF-SELECTION.

ST_FIELDCAT-COL_POS = '1'.

ST_FIELDCAT-TABNAME = 'ST_VBAK'.

ST_FIELDCAT-FIELDNAME = 'VBELN'.

ST_FIELDCAT-KEY = 'X'.

ST_FIELDCAT-HOTSPOT = 'X'.

ST_FIELDCAT-SELTEXT_L = 'SALES DOCUMENT NUMBER'.

ST_FIELDCAT-SELTEXT_M = 'SALES DOC NO'.

ST_FIELDCAT-SELTEXT_S = 'ORDER NO'.

APPEND ST_FIELDCAT TO IT_FIELDCAT.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = 'ZAC_TAB31'

IT_FIELDCAT = 'SLIS_T_FIELDCAT_ALV'.

TABLES

<b>T_OUTTAB = IT_VBAK</b>

EXCEPTIONS

PROGRAM_ERROR = 1

OTHERS = 2

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

SELECT VBELN AUDAT AUART NETWR KUNNR

FROM VBAK INTO TABLE IT_VBAK

WHERE KUNNR IN SKUNNR.

<b>Reward points if useful</b>

Regards

Ashu

0 Kudos

hi rama please use below code not it wont give the error which u facing...

REPORT ZAC_TAB31.

TYPE-POOLS SLIS.

TYPES:

BEGIN OF TY_VBAK,

VBELN TYPE VBAK-VBELN,

AUDAT TYPE VBAK-AUDAT,

AUART TYPE VBAK-AUART,

NETWR TYPE VBAK-NETWR,

KUNNR TYPE VBAK-KUNNR,

END OF TY_VBAK.

DATA:

ST_VBAK TYPE TY_VBAK,

IT_VBAK TYPE TABLE OF TY_VBAK.

DATA:

IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,

ST_FIELDCAT TYPE LINE OF SLIS_T_FIELDCAT_ALV.

SELECT-OPTIONS:

SKUNNR FOR ST_VBAK-KUNNR.

START-OF-SELECTION.

ST_FIELDCAT-COL_POS = '1'.

ST_FIELDCAT-TABNAME = 'ST_VBAK'.

ST_FIELDCAT-FIELDNAME = 'VBELN'.

ST_FIELDCAT-KEY = 'X'.

ST_FIELDCAT-HOTSPOT = 'X'.

ST_FIELDCAT-SELTEXT_L = 'SALES DOCUMENT NUMBER'.

ST_FIELDCAT-SELTEXT_M = 'SALES DOC NO'.

ST_FIELDCAT-SELTEXT_S = 'ORDER NO'.

APPEND ST_FIELDCAT TO IT_FIELDCAT.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = 'ZAC_TAB31'

IT_FIELDCAT = 'SLIS_T_FIELDCAT_ALV'

TABLES

T_OUTTAB = IT_VBAK

EXCEPTIONS

PROGRAM_ERROR = 1

OTHERS = 2

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

SELECT VBELN AUDAT AUART NETWR KUNNR

FROM VBAK INTO TABLE IT_VBAK

WHERE KUNNR IN SKUNNR.

thanks,

maheedhar.t

Former Member
0 Kudos

TYPE-POOLS SLIS.

TYPES:

BEGIN OF TY_VBAK,

VBELN TYPE VBAK-VBELN,

AUDAT TYPE VBAK-AUDAT,

AUART TYPE VBAK-AUART,

NETWR TYPE VBAK-NETWR,

KUNNR TYPE VBAK-KUNNR,

END OF TY_VBAK.

DATA:

ST_VBAK TYPE TY_VBAK,

IT_VBAK TYPE TABLE OF TY_VBAK.

DATA:

IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,

ST_FIELDCAT TYPE LINE OF SLIS_T_FIELDCAT_ALV.

SELECT-OPTIONS:

SKUNNR FOR ST_VBAK-KUNNR.

START-OF-SELECTION.

ST_FIELDCAT-COL_POS = '1'.

ST_FIELDCAT-TABNAME = 'ST_VBAK'.

ST_FIELDCAT-FIELDNAME = 'VBELN'.

ST_FIELDCAT-KEY = 'X'.

ST_FIELDCAT-HOTSPOT = 'X'.

ST_FIELDCAT-SELTEXT_L = 'SALES DOCUMENT NUMBER'.

ST_FIELDCAT-SELTEXT_M = 'SALES DOC NO'.

ST_FIELDCAT-SELTEXT_S = 'ORDER NO'.

APPEND ST_FIELDCAT TO IT_FIELDCAT.

SELECT VBELN AUDAT AUART NETWR KUNNR

FROM VBAK INTO TABLE IT_VBAK

WHERE KUNNR IN SKUNNR.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = 'ZAC_TAB31'

IT_FIELDCAT = 'SLIS_T_FIELDCAT_ALV'

TABLES

T_OUTTAB = IT_VBAK

EXCEPTIONS

PROGRAM_ERROR = 1

OTHERS = 2

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Copy Paste the above code, the errors are corrected.

Regards,

Pavan