Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

REPORT

This is lalitha .

this is my select statement for delivery block .

TYPE-POOLS: SLIS .

TABLES: VBAK,

TVLST,

TVFST,

VBUK .

*********DATA TYPE********

TYPES: BEGIN OF TY_HOLD,

VBELN TYPE VBAK-VBELN,

ERDAT TYPE VBAK-ERDAT,

KUNNR TYPE VBAK-KUNNR,

LIFSP TYPE tvlst-lifsp,

FAKSK TYPE tvfst-faksp,

vtext type tvlst-vtext,

CMGST TYPE VBUK-CMGST,

END OF TY_HOLD .

**************WORK AREA**

DATA: W_HOLD TYPE TY_HOLD .

DATA: T_HOLD TYPE TY_HOLD OCCURS 1 WITH header line.

DATA: FLAG TYPE I VALUE 1 .

*********SELECTION SCREEN*****

SELECT-OPTIONS: S_ORDER FOR VBAK-VBELN,

S_CDATE FOR VBAK-ERDAT,

S_CUSTNO FOR VBAK-KUNNR .

******EXTRACTING DATA*********

SELECT * FROM VBAK

INTO CORRESPONDING FIELDS OF TABLE t_hold

WHERE VBELN IN S_ORDER

AND ERDAT IN S_CDATE

AND KUNNR IN S_CUSTNO .

IF NOT t_hold IS INITIAL .

SELECT * FROM VBUK

INTO CORRESPONDING FIELDS OF TABLE T_HOLD

FOR ALL ENTRIES IN T_HOLD

WHERE VBELN = t_hold-vbeln.

LOOP AT T_HOLD .

READ TABLE T_HOLD WITH KEY VBELN = T_HOLD-VBELN .

IF sy-subrc = 0 .

ENDIF .

IF T_HOLD-CMGST = 'B' OR

T_HOLD-CMGST = 'C' .

T_HOLD-CMGST = 'YES' .

FLAG = 'X' .

ENDIF .

ENDLOOP .

ENDIF .

IF t_hold-lifsp NE SPACE .

SELECT SINGLE VTEXT FROM TVLST

INTO T_HOLD

WHERE LIFSP = T_HOLD-LIFSP .

FLAG = 'X' .

T_HOLD-DELVBLOCK = VTEXT1 .

ENDIF .

IF T_HOLD-FAKSK NE SPACE .

SELECT SINGLE VTEXT FROM TVLST

INTO VTEXT1

WHERE FAKSK = T_HOLD-FAKSK .

FLAG = 'X' .

T_HOLD-BILLING BLOCK = VTEXT1 .

ENDIF .

IF FLAG = 'X' .

APPEND T_HOLD .

CLEAR T_FINAL .

ENDIF .

ENDLOOP .

I am getting an error - field vtext1 is unknown. It is neither in one of the specified table not defined by a data statement .

Former Member
Not what you were looking for? View more on this topic or Ask a question