Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ALV Report (Classes)

Former Member
0 Likes
476

Hi,

I had developed an ALV report using classes CL_GUI_CUSTOM_CONTAINER

and CL_GUI_ALV_GRID.

After displaying the output I didn't find buttons like BACK,EXIT,..etc on ALV output.

Therefore I forcly use /n for exit.

Can anyone suggest me where I went wrong.

Regards,

Ratna

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
451

Hi,

You have developed a screen to display ALV reports. While developing custom screens, you'll have to use SET PF-STATUS 'XXX' to create BACK and EXIT.

Just adding wouldn't suffice, but you'll also have to code it after capturing the function code of the buttons in the PAI.

e.g. If you're providing EXIT as the function code, you've to code it this way.

CASE SY-UCOMM.
  WHEN 'EXIT'. LEAVE PROGRAM
ENDCASE.

3 REPLIES 3
Read only

Former Member
0 Likes
451

Hi,

You have to create a GUI STATUS in SE41 for that program and use SET PF-STATUS to display the GUI status..

Then handle the function code in your PAI...

Check the following programs

BCALV_EDIT_01

BCALV_EDIT_02

BCALV_EDIT_03

BCALV_EDIT_04

BCALV_FULLSCREEN_GRID_EDIT

BCALV_GRID_EDIT

BCALV_TEST_GRID_EDIT_01

BCALV_TEST_GRID_EDITABLE

Thanks,

Naren

Read only

Former Member
0 Likes
451

Hi Ratna ,

When you implement an ALV using classes you call a screen , so the default menu provided is not available.

So what you need to do is create a new menu and attache it to your screen in the PBO module. i.e. in the PBO module use the command SET PF-STATUS'<MENU>'.

Similarly you will have to write code in PAI to make the program react to user action on the menu.

Regards

Arun

Read only

Former Member
0 Likes
452

Hi,

You have developed a screen to display ALV reports. While developing custom screens, you'll have to use SET PF-STATUS 'XXX' to create BACK and EXIT.

Just adding wouldn't suffice, but you'll also have to code it after capturing the function code of the buttons in the PAI.

e.g. If you're providing EXIT as the function code, you've to code it this way.

CASE SY-UCOMM.
  WHEN 'EXIT'. LEAVE PROGRAM
ENDCASE.