Skip to Content
avatar image
Former Member

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 .

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Oct 09, 2007 at 06:51 PM

    That's because you haven't declared it. Maybe you want VTEXT.

    Rob

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 09, 2007 at 06:57 PM

    Add

    Data : vtext1 type tvlst-vtext.

    in your code at the data declaration part.

    Regards

    Aneesh.

    PS : Try closing all those earlier threads. There are a lot of open threads on your name. Awards points to all the useful answers in those threads and close them.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 10, 2007 at 04:08 AM

    declare this

    data: vtext1 type tvlst-vtext.

    add dis n itll work

    Add comment
    10|10000 characters needed characters exceeded