Skip to Content

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

dump error GETWA_NOT_ASSIGNED while using set_table_for_first_display

hi gurus.,

this is my code.,

**&----


*

*& Report ZERUM_EMP_TIMS

*&

*&----


*

*&

*&

*&----


*

REPORT ZERUM_EMP_TIMS.

TABLES: ZERNUM_TSHT_ID .

TYPES: BEGIN OF IT_TYPES.

TYPES: TSHT_ID TYPE ZERNUM_TSHT_ID,

    • INCLUDE TYPE ZERNUM_TSHT_ID,*

    • EMPID TYPE ZERNUM_TSHT_ID-EMPID,*

ENAM TYPE ZEMAST-ENAM,

    • TDATE TYPE ZERNUM_TSHT_ID-TDATE,*

    • PJCOD TYPE ZERNUM_TSHT_ID-PJCOD,*

PJNAM TYPE ZPROJDTL-PJNAM,

    • REFTY TYPE ZERNUM_TSHT_ID-REFTY,*

    • REFMD TYPE ZERNUM_TSHT_ID-REFMD,*

    • ACTCD TYPE ZERNUM_TSHT_ID-ACTCD,*

ACTVY TYPE ZERNUM_ACTVY_MAS-ACTVY,

    • HURWK TYPE ZERNUM_TSHT_ID-HURWK,*

    • REMAK TYPE ZERNUM_TSHT_ID-REMAK,*

END OF IT_TYPES.

DATA: OK_CODE LIKE SY-UCOMM,

    • IT_TSHT_ID TYPE TABLE OF IT_TYPES,"ZERNUM_TSHT_ID,*

IT_TSHT_ID TYPE IT_TYPES OCCURS 0 WITH HEADER LINE ,

G_CONTAINER TYPE SCRFNAME VALUE 'SCR_100_CONTAINER',

GRID TYPE REF TO CL_GUI_ALV_GRID,

G_CUSTOM_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER.

*DATA: BEGIN OF IT_TSHT_ID OCCURS 0,

    • INCLUDE TYPE ZERNUM_TSHT_ID,*

    • INDEX TYPE I,*

    • END OF IT_TSHT_ID .*

DATA : GS_LAYOUT TYPE LVC_S_LAYO,

IT_TOOLBAR TYPE UI_FUNCTIONS,

GT_FIELDCAT TYPE LVC_T_FCAT WITH HEADER LINE,

IT_SORT TYPE LVC_T_SORT.

SELECTION-SCREEN BEGIN OF BLOCK BLK WITH FRAME TITLE TEXT-001.

PARAMETERS PA_EMPID LIKE ZERNUM_TSHT_ID-EMPID MATCHCODE OBJECT ZSH_EID OBLIGATORY.

SELECT-OPTIONS SO_TDATE FOR ZERNUM_TSHT_ID-TDATE.

SELECTION-SCREEN END OF BLOCK BLK.

START-OF-SELECTION.

PERFORM GET_DATA.

CALL SCREEN 100.

*&----


*

*& Module INITIALIZE_ALV OUTPUT

*&----


*

    • text*

*----


*

MODULE INITIALIZE_ALV OUTPUT.

DATA: ET_TOOLBAR_EXCLUDING TYPE UI_FUNCTIONS .

    • SELECT * FROM ZERNUM_TSHT_ID INTO TSHT_ID WHERE CARRID = 'LH'.*

    • CLEAR ET_TOOLBAR_EXCLUDING.*

    • APPEND CL_GUI_ALV_GRID=>MC_FC_SORT_ASC TO ET_TOOLBAR_EXCLUDING .*

    • APPEND CL_GUI_ALV_GRID=>MC_FC_SORT_DSC TO ET_TOOLBAR_EXCLUDING.*

    • APPEND CL_GUI_ALV_GRID=>MC_FC_SUBTOT TO ET_TOOLBAR_EXCLUDING.*

    • APPEND CL_GUI_ALV_GRID=>MC_FC_SUM TO ET_TOOLBAR_EXCLUDING.*

    • APPEND CL_GUI_ALV_GRID=>MC_FC_VIEWS TO ET_TOOLBAR_EXCLUDING.*

    • APPEND CL_GUI_ALV_GRID=>MC_FC_FILTER TO ET_TOOLBAR_EXCLUDING .*

    • APPEND CL_GUI_ALV_GRID=>MC_FC_GRAPH TO ET_TOOLBAR_EXCLUDING.*

    • APPEND CL_GUI_ALV_GRID=>MC_FC_INFO TO ET_TOOLBAR_EXCLUDING.*

    • APPEND CL_GUI_ALV_GRID=>MC_FC_FIND TO ET_TOOLBAR_EXCLUDING.*

    • APPEND CL_GUI_ALV_GRID=>MC_FC_DETAIL TO ET_TOOLBAR_EXCLUDING.*

    • APPEND CL_GUI_ALV_GRID=>MC_FC_DESELECT_ALL TO ET_TOOLBAR_EXCLUDING.*

    • APPEND CL_GUI_ALV_GRID=>MC_FC_EXCL_ALL TO ET_TOOLBAR_EXCLUDING.*

IF G_CUSTOM_CONTAINER IS INITIAL.

CREATE OBJECT G_CUSTOM_CONTAINER

EXPORTING

CONTAINER_NAME = 'SCR_100_CONTAINER'.

CREATE OBJECT GRID

EXPORTING

I_PARENT = G_CUSTOM_CONTAINER.

ENDIF.

GS_LAYOUT-GRID_TITLE = 'Employee Status Report'(100).

PERFORM MASK_COLUMNS TABLES GT_FIELDCAT.

CALL METHOD GRID->SET_TABLE_FOR_FIRST_DISPLAY

EXPORTING

    • I_STRUCTURE_NAME = 'IT_TYPES'*

    • I_SAVE = 'A'*

IT_TOOLBAR_EXCLUDING = ET_TOOLBAR_EXCLUDING

IS_LAYOUT = GS_LAYOUT

CHANGING

IT_FIELDCATALOG = GT_FIELDCAT[]

IT_OUTTAB = IT_TSHT_ID[].

ENDMODULE. " INITIALIZE_ALV OUTPUT

*&----


*

*& Form MASK_COLUMNS

*&----


*

    • text*

*----


*

    • -->P_GT_FIELDCAT text*

*----


*

FORM MASK_COLUMNS TABLES P_GT_FIELDCAT TYPE LVC_T_FCAT.

CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'

EXPORTING

I_STRUCTURE_NAME = 'ZERNUM_TSHT_ID'

CHANGING

CT_FIELDCAT = P_GT_FIELDCAT[].

CLEAR P_GT_FIELDCAT.

P_GT_FIELDCAT-COL_POS = 12 .

    • P_GT_FIELDCAT-TABNAME = 'ZEMAST'.*

P_GT_FIELDCAT-FIELDNAME = 'ENAM'.

P_GT_FIELDCAT-OUTPUTLEN = 10.

P_GT_FIELDCAT-SCRTEXT_S = 'EMP NAME'. "#EC NOTEXT

P_GT_FIELDCAT-SCRTEXT_M = 'EMPLOYEE NAME'.

P_GT_FIELDCAT-SCRTEXT_L = 'EMPLOYEE NAME'.

P_GT_FIELDCAT-DATATYPE = 'CHAR'.

P_GT_FIELDCAT-EMPHASIZE = ''.

APPEND P_GT_FIELDCAT.

CLEAR P_GT_FIELDCAT.

P_GT_FIELDCAT-COL_POS = 13 .

    • P_GT_FIELDCAT-TABNAME = 'ZPROJDTL'.*

P_GT_FIELDCAT-FIELDNAME = 'PJNAM'.

P_GT_FIELDCAT-OUTPUTLEN = 10.

P_GT_FIELDCAT-SCRTEXT_S = 'EMP NAME'. "#EC NOTEXT

P_GT_FIELDCAT-SCRTEXT_M = 'EMPLOYEE NAME'.

P_GT_FIELDCAT-SCRTEXT_L = 'EMPLOYEE NAME'.

P_GT_FIELDCAT-DATATYPE = 'CHAR'.

P_GT_FIELDCAT-EMPHASIZE = ''.

APPEND P_GT_FIELDCAT.

CLEAR P_GT_FIELDCAT.

P_GT_FIELDCAT-COL_POS = 14 .

    • P_GT_FIELDCAT-TABNAME = 'ZERNUM_ACTVY_MAS'.*

P_GT_FIELDCAT-FIELDNAME = 'ACTVY'.

P_GT_FIELDCAT-OUTPUTLEN = 10.

P_GT_FIELDCAT-SCRTEXT_S = 'EMP NAME'. "#EC NOTEXT

P_GT_FIELDCAT-SCRTEXT_M = 'EMPLOYEE NAME'.

P_GT_FIELDCAT-SCRTEXT_L = 'EMPLOYEE NAME'.

P_GT_FIELDCAT-DATATYPE = 'CHAR'.

P_GT_FIELDCAT-EMPHASIZE = ''.

APPEND P_GT_FIELDCAT.

LOOP AT P_GT_FIELDCAT.

P_GT_FIELDCAT-NO_OUT = 'X'.

MODIFY P_GT_FIELDCAT.

ENDLOOP.

LOOP AT P_GT_FIELDCAT.

IF P_GT_FIELDCAT-FIELDNAME = 'EMPID'

OR P_GT_FIELDCAT-FIELDNAME = 'TDATE'

OR P_GT_FIELDCAT-FIELDNAME = 'PJCOD'

OR P_GT_FIELDCAT-FIELDNAME = 'REFTY'

OR P_GT_FIELDCAT-FIELDNAME = 'REFMD'

OR P_GT_FIELDCAT-FIELDNAME = 'ACTCD'

OR P_GT_FIELDCAT-FIELDNAME = 'HURWK'

OR P_GT_FIELDCAT-FIELDNAME = 'REMAK'

OR P_GT_FIELDCAT-FIELDNAME = 'ENAM'.

P_GT_FIELDCAT-KEY_SEL = ''.

P_GT_FIELDCAT-NO_OUT = ''.

P_GT_FIELDCAT-COLDDICTXT = 'L'.

MODIFY P_GT_FIELDCAT.

ENDIF.

ENDLOOP.

ENDFORM. " MASK_COLUMNS

*&----


*

*& Form GET_DATA

*&----


*

    • text*

*----


*

    • --> p1 text*

    • <-- p2 text*

*----


*

FORM GET_DATA .

*SELECT * INTO CORRESPONDING FIELDS OF TABLE IT_TSHT_ID FROM ZERNUM_TSHT_ID*

WHERE EMPID = PA_EMPID

AND TDATE IN SO_TDATE.

IF SY-SUBRC NE 0 .

MESSAGE S000(ZERUM_MSG) WITH 'No records found' .

EXIT.

ENDIF.

ENDFORM. " GET_DATA

*&----


*

*& Module STATUS_0100 OUTPUT

*&----


*

    • text*

*----


*

MODULE STATUS_0100 OUTPUT.

SET PF-STATUS 'MENU'.

    • SET TITLEBAR 'xxx'.*

ENDMODULE. " STATUS_0100 OUTPUT

*&----


*

*& Module EXIT INPUT

*&----


*

    • text*

*----


*

MODULE EXIT INPUT.

LEAVE PROGRAM.

ENDMODULE. " EXIT INPUT

while excuting this i am getting dump error GETWA_NOT_ASSIGNED ...plz tell me how to rectify this .. its urgent

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