Skip to Content
0
Former Member
Apr 19, 2011 at 02:52 AM

please try to find out error in this program

25 Views

Hi abapers,

when i execute this report , i got the error. please anybody find the error "Runtime Errors GETWA_NOT_ASSIGNED"

Short text

Field symbol has not yet been assigned." this error i got..

please help me..

REPORT  ZBLOCKED_ALV_CLS.

*Data Objects to avoid tables work area.
DATA: V_KUNNR TYPE KNA1-KUNNR,
      V_LIFNR TYPE LFA1-LIFNR.

*Logiv to maintain frist block.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
  SELECT-OPTIONS: CUSTOMER FOR V_KUNNR.
SELECTION-SCREEN END OF BLOCK B1.

SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
  SELECT-OPTIONS: VENDOR FOR V_LIFNR.
SELECTION-SCREEN END OF BLOCK B2.

TYPES: BEGIN OF TY_VBAK,
       VBELN TYPE VBELN_VA,
       ERDAT TYPE ERDAT,
       END OF TY_VBAK.

TYPES: BEGIN OF TY_EKKO,
       EBELN TYPE EBELN,
       AEDAT TYPE ERDAT,
       END OF TY_EKKO.

DATA: WA_VBAK TYPE TY_VBAK,
      WA_EKKO TYPE TY_EKKO,
      I_VBAK TYPE STANDARD TABLE OF TY_VBAK,
      I_EKKO TYPE STANDARD TABLE OF TY_EKKO.

TYPE-POOLS: SLIS.

DATA: REPID TYPE SY-REPID.

DATA: LAYOUT TYPE SLIS_LAYOUT_ALV,
      FCAT TYPE SLIS_FIELDCAT_ALV,
  F_VBAK LIKE STANDARD TABLE OF FCAT,
  F_EKKO LIKE STANDARD TABLE OF FCAT,
  I_EVENTS TYPE SLIS_T_EVENT.

START-OF-SELECTION.
REPID = SY-REPID.
* REPID TYPE SY-REPID.
PERFORM: GET_DATA,
         COL_HEAD.

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
  EXPORTING
    I_CALLBACK_PROGRAM             = SY-REPID.

          .
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
  EXPORTING
    IS_LAYOUT                        = LAYOUT
    IT_FIELDCAT                      = F_VBAK
    I_TABNAME                        = 'I_VBAK'
    IT_EVENTS                        = I_EVENTS
*   IT_SORT                          =
*   I_TEXT                           = ' '
  TABLES
    T_OUTTAB                         = I_VBAK
* EXCEPTIONS
*   PROGRAM_ERROR                    = 1
*   MAXIMUM_OF_APPENDS_REACHED       = 2
*   OTHERS                           = 3
          .

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
  EXPORTING
    IS_LAYOUT                        = LAYOUT
    IT_FIELDCAT                      = F_EKKO
    I_TABNAME                        = 'I_EKKO'
    IT_EVENTS                        = I_EVENTS
*   IT_SORT                          =
*   I_TEXT                           = ' '
  TABLES
    T_OUTTAB                         = I_EKKO
* EXCEPTIONS
*   PROGRAM_ERROR                    = 1
*   MAXIMUM_OF_APPENDS_REACHED       = 2
*   OTHERS                           = 3
          .


CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'.

*&---------------------------------------------------------------------*
*&      Form  GET_DATA
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
FORM GET_DATA .

SELECT VBELN ERDAT FROM VBAK INTO TABLE I_VBAK WHERE KUNNR IN CUSTOMER.

  SELECT EBELN AEDAT FROM EKKO INTO TABLE I_EKKO WHERE LIFNR IN VENDOR.

ENDFORM.                    " GET_DATA
*&---------------------------------------------------------------------*
*&      Form  COL_HEAD
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
FORM COL_HEAD .

PERFORM BUILD_CAT USING:
      'VBELN' 'VBAK' 'VBELN' 'I_VBAK' 'SD',
      'ERDAT' 'VBAK' 'ERDAT' 'I_VBAK' 'SD',
      'EBELN' 'EKKO' 'EBELN' 'I_EKKO' 'MM',
      'AEDAT' 'EKKO' 'AEDAT' 'I_EKKO' 'MM'.

ENDFORM.                    " COL_HEAD
*&---------------------------------------------------------------------*
*&      Form  BUILD_CAT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_0238   text
*      -->P_0239   text
*      -->P_0240   text
*      -->P_0241   text
*      -->P_0242   text
*----------------------------------------------------------------------*
FORM BUILD_CAT  USING    VALUE(P_0238)
                         VALUE(P_0239)
                         VALUE(P_0240)
                         VALUE(P_0241)
                         VALUE(P_0242).
  CLEAR FCAT.
  IF P_0242 = 'SD'.
    FCAT-REF_FIELDNAME = P_0238.
    FCAT-REF_TABNAME = P_0239.
    FCAT-FIELDNAME = P_0240.
    FCAT-TABNAME = P_0241.
    APPEND FCAT TO F_VBAK.
 ENDIF.

 IF P_0242 = 'MM'.
    FCAT-REF_FIELDNAME = P_0238.
    FCAT-REF_TABNAME = P_0239.
    FCAT-FIELDNAME = P_0240.
    FCAT-TABNAME = P_0241.
    APPEND FCAT TO F_VBAK.
 ENDIF.

ENDFORM.                    " BUILD_CAT

Thanks,

Vinay.

Edited by: abapvinay on Apr 19, 2011 4:56 AM