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: 

SAVE and BACK Buttons in ALV

Former Member
0 Kudos
154

Hi

How to activate SAVE and BACK Buttons in ALV output..??

1 ACCEPTED SOLUTION

former_member188685
Active Contributor
0 Kudos
61

Hi,

Copy the PF status from some standard program using SE41.

here is one such..<b>SAPLKKBL</b>, PF status <b>STANDARD_FULLSCREEN</b>

Go to SE41, give the program, and pfstatus.

now click on copy button, give your program , and pfstaus .copy it and activate it.

now use it in your program..

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
    EXPORTING
      I_CALLBACK_PROGRAM = V_REPID
     <b> I_CALLBACK_PF_STATUS_SET = 'PFSTAT'.</b>



FORM PFSTAT USING P_EXTAB TYPE SLIS_T_EXTAB.
 
*- Pf status
  <b>SET PF-STATUS 'PFSTAT'</b>. "this is we copied
                          "it is having all you want     
ENDFORM.   

Regards

vijay

3 REPLIES 3

Former Member
0 Kudos
61

Hello Pavan,

Copy the standard PF status STANDARD_FULLSCREEN in to Z status and add the two buttons in SE41.

Pass the events table to the ALV FM after filling it like below

DATA: IT_EVENTS TYPE SLIS_T_EVENT,

WA_EVENTS LIKE LINE OF IT_EVENTS.

REFRESH: IT_EVENTS.

CLEAR: WA_EVENTS,IT_EVENTS.

WA_EVENTS-NAME = 'PF_STATUS_SET'.

WA_EVENTS-FORM = 'STATUS'.

APPEND WA_EVENTS TO IT_EVENTS .

FORM STATUS USING RT_EXTAB TYPE SLIS_T_EXTAB.

SET PF-STATUS 'STANDARD' EXCLUDING RT_EXTAB.

ENDFORM.

If useful reward.

Vasanth

former_member223537
Active Contributor
0 Kudos
61

Hi Pavan,

Use SET PF-STATUS `ZNEW`.

Double click on ZNEW, then enter the description for pf-status. Now open the Menu bar and enter text SAVE above the SAVE ICON. Simalarly enter text BACK above BACK ICON.

Activate the PF-STATUS.

In the program, handle the OKCODE, USER-COMMAND.

AT USER-COMMAND.

WHEN `BACK`.

Leave to screen 0.

WHEN `SAVE`.

logic to save the data.

Best regards,

Prashant

former_member188685
Active Contributor
0 Kudos
62

Hi,

Copy the PF status from some standard program using SE41.

here is one such..<b>SAPLKKBL</b>, PF status <b>STANDARD_FULLSCREEN</b>

Go to SE41, give the program, and pfstatus.

now click on copy button, give your program , and pfstaus .copy it and activate it.

now use it in your program..

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
    EXPORTING
      I_CALLBACK_PROGRAM = V_REPID
     <b> I_CALLBACK_PF_STATUS_SET = 'PFSTAT'.</b>



FORM PFSTAT USING P_EXTAB TYPE SLIS_T_EXTAB.
 
*- Pf status
  <b>SET PF-STATUS 'PFSTAT'</b>. "this is we copied
                          "it is having all you want     
ENDFORM.   

Regards

vijay