Application Development 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: 

How to disable the custom push button in Classic ALV

Former Member
0 Kudos

Hi All,

Iam Using Classic Alv (with out classes).I have a created a push button.now at run time i want to make it dynamic .

iam using REUSE_ALV_GRID_DISPLAY

for ex.

i have some records in my out put.

i have a push button "INSERT"

For first time when i clicked it will be inserted.

Now if i run the report for the same inputs as top,i will get the records.But the "INSERT" push button should be disable.IS that Possible ??

If yes kindly send me the solution.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

It will work. Keep going.

Regs,

Venkat

6 REPLIES 6

Vinod_Chandran
Active Contributor
0 Kudos

Hi,

Use the parameter IT_EXCLUDING. Fill the function code of the button you want to disable and pass to REUSE_ALV_GRID_DISPLAY.

Thanks

Vinod

Former Member
0 Kudos

Hi,

Here is the piece of code for your understanding...

FORM f4200_pf_status_set USING i_extab TYPE slis_t_extab.

REFRESH i_extab.

PERFORM f4210_exclude_fcodes CHANGING i_extab.( This form is mentioned below ).

SET PF-STATUS 'STANDARD' OF PROGRAM '(Program name)' EXCLUDING i_extab.( This line of code will excude the function u don't want)

ENDFORM.

FORM f4210_exclude_fcodes USING i_extab TYPE slis_t_extab.

DATA: ws_fcode TYPE slis_extab.

CLEAR ws_fcode.

ws_fcode = '&EB9'.

APPEND ws_fcode TO i_extab.

ws_fcode = '&ABC'.

APPEND ws_fcode TO i_extab.

ws_fcode = '&NFO'.

APPEND ws_fcode TO i_extab.

ws_fcode = '&LFO'.

APPEND ws_fcode TO i_extab.

ENDFORM. " f4210_exclude_fcodes

I hope this clarifies. Revert for any queries.

Cheers,

Venkat

0 Kudos

Hai venkat,

But should pass some thing to the field

"it_exclude" of function module(REUSE_ALV_GRID_DISPLAY)

if yes what i have to pass as per ur code.

kindly send me the solution

regards

kiran

Former Member
0 Kudos

Hi,

Add this perform also,

In the below function only u r calling the "perform f4200".

&----


*& Form f4000_events_init

&----


FORM f4000_events_init CHANGING i_events TYPE slis_t_event.

DATA: line_event TYPE slis_alv_event.

CLEAR line_event.

line_event-name = 'TOP_OF_PAGE'.

line_event-form = 'F4100_TOP_OF_PAGE'.

APPEND line_event TO i_events.

CLEAR line_event.

line_event-name = 'PF_STATUS_SET'.

line_event-form = 'F4200_PF_STATUS_SET'.( Refer this form in my prev mesg)

APPEND line_event TO i_events.

ENDFORM.

At last pass this table "i_events" to "it_events" in the function 'REUSE_ALV_GRID_DISPLAY'.

Cheers,

Venkat

0 Kudos

hi venkat,

will this work conditonally.as i mentioned above if the records are inserted then i should get the out put with "INSERT"push button disabled.

kiran,

Former Member
0 Kudos

Hi,

It will work. Keep going.

Regs,

Venkat