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: 

pfstatus help

Former Member
0 Kudos

Hello Frnd

I had set pf-status for a screen excluding a standard toolbar 'SA'.

i had made a application toolbar 'A' in which i want that if i click on that

pf-status should be active including

'SA'

module STATUS_0001 output.

SET PF-STATUS 'EMPMASTER' excluding 'SA'.

endmodule. " STATUS_0001 OUTPUT

module USER_COMMAND_0001 input.

CASE SY-UCOMM.

WHEN 'A'.

perform yn_popup using 'AD' 'Do You Want To Add ?'.

if user_answer = '1'.

MESSAGE I000.

perform max_emp_no.

endif.

SET PF-STATUS 'EMPMASTER' .

endcase.

endmodule. " USER_COMMAND_0001 INPUT

put for the above code after clicking on 'A'. 'SA' toolbar is still disabled

Please tell me the solution friend

With Best Regards

Ruby

3 REPLIES 3

0 Kudos

Hi,

SET PF-STATUS will not have effect in a PAI module you have to put it in PBO module as follows.

<b>DATA: flag. *Put this in the top include.</b>

module STATUS_0001 output.

<b>if flag is initial.

SET PF-STATUS 'EMPMASTER' excluding 'SA'.

else.

SET PF-STATUS 'EMPMASTER'

endif.</b>

endmodule. " STATUS_0001 OUTPUT

module USER_COMMAND_0001 input.

CASE SY-UCOMM.

WHEN 'A'.

perform yn_popup using 'AD' 'Do You Want To Add ?'.

if user_answer = '1'.

MESSAGE I000.

perform max_emp_no.

endif.

<b>flag = 'X'.</b>

endcase.

endmodule. " USER_COMMAND_0001 INPUT

Regards,

Sesh

Former Member
0 Kudos

Hi

U need to manage it in the PBO, not in PAI, the system after excuting PAI, backs to PBO so it deactives SA again.

module STATUS_0001 output.
  if fl_SA = SPACE.
    SET PF-STATUS 'EMPMASTER' excluding 'SA'.
  else.
   SET PF-STATUS 'EMPMASTER'.
  endif.
endmodule. " STATUS_0001 OUTPUT

module USER_COMMAND_0001 input.
   CASE SY-UCOMM.
        WHEN 'A'.
            perform yn_popup using 'AD' 'Do You Want To Add ?'.
            if user_answer = '1'.
              MESSAGE I000.
              perform max_emp_no.
            endif.
            FL_SA = 'X'.
       endcase.
endmodule. " USER_COMMAND_0001 INPUT

Max

0 Kudos

Thanx

It works

With Best Regards

Ruby