2 problems when dealing with ALV grid control

Development (ABAP Development WorkBench, ABAP/4 programming)

Moderators: Snowy, thx4allthefish, YuriT, Gothmog

Post Reply
kkktank
Posts: 13
Joined: Mon May 26, 2008 8:29 am

2 problems when dealing with ALV grid control

Post by kkktank » Sun Oct 05, 2008 10:50 pm

I added an instance of CL_GUI_ALV_GRID (in container CL_GUI_CUSTOM_CONTAINER) into an screen.

1. how can I modify the application toolbar in the area? no STATUS can I found in the area.

2. how can I add a box in the alv grid control output? I can add it in alv like this:

Code: Select all

ST_LAYOUT-BOX_FIELDNAME = 'BOX'.    "ST_LAYOUT TYPE SLIS_LAYOUT_ALV
But in the alv grid control this method didn't work.

Code: Select all

ST_LAYOUT-BOX_FNAME = 'BOX'.      "ST_LAYOUT TYPE LVC_S_LAYO

kkktank
Posts: 13
Joined: Mon May 26, 2008 8:29 am

Re: 2 problems when dealing with ALV grid control

Post by kkktank » Mon Oct 06, 2008 2:16 am

the first problem was solved by

Code: Select all

  LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_DETAIL.
  APPEND LS_EXCLUDE TO PT_EXCLUDE.
and

Code: Select all

  CLEAR LS_TOOLBAR.
  MOVE 'ADD' TO LS_TOOLBAR-FUNCTION.
  MOVE ICON_INSERT_ROW TO LS_TOOLBAR-ICON.
  MOVE 'New entry' TO LS_TOOLBAR-QUICKINFO.
  MOVE 'New entry' TO LS_TOOLBAR-TEXT.
  MOVE '' TO LS_TOOLBAR-DISABLED.
  APPEND LS_TOOLBAR TO I_OBJECT->MT_TOOLBAR.
The seconde problem was solved by adding:

Code: Select all

ST_LAYOUT-SEL_MODE = 'A'.
unlikely the ALV, only one BOX_FIELDNAME = 'FIELD_NAME' is already OK.

Post Reply