Skip to Content
0
Former Member
Jul 24, 2007 at 06:11 AM

ALV

26 Views

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