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

Disabled ToolBar Buttons

herzelhaimharel_gilor
Participant
0 Likes
330

Hi Folks ,

how can i eanble/disable a toolbar button insted of using exclude table ?

Hi Folks ,

how can i eanble/disable a toolbar button insted of using exclude table ?

1 REPLY 1
Read only

anversha_s
Active Contributor
0 Likes
299

hi,

chk this sample.

REPORT z_test_interactive NO STANDARD PAGE HEADING.

DATA: BEGIN OF it_one OCCURS 0,

vbeln LIKE vbak-vbeln,

erdat LIKE vbak-erdat,

END OF it_one.

DATA: BEGIN OF it_two OCCURS 0,

vbeln LIKE vbak-vbeln,

posnr LIKE vbap-posnr,

END OF it_two.

DATA: BEGIN OF it_code OCCURS 0,

okcode LIKE sy-ucomm,

END OF it_code.

DATA: fld(20), val(10).

START-OF-SELECTION.

SET PF-STATUS 'STATUS'.

SELECT vbeln

erdat

FROM vbak

UP TO 100 ROWS

INTO TABLE it_one.

IF sy-subrc = 0.

SORT it_one BY vbeln.

SELECT vbeln

posnr

FROM vbap

INTO TABLE it_two

FOR ALL ENTRIES IN it_one

WHERE vbeln = it_one-vbeln.

ENDIF.

LOOP AT it_one.

WRITE:/(10) it_one-vbeln,

(10) it_one-erdat.

ENDLOOP.

AT LINE-SELECTION.

IF sy-lsind = 1.

it_code-okcode = 'FCODE1'.

APPEND it_code.

CLEAR it_code.

it_code-okcode = 'FCODE2'.

APPEND it_code.

CLEAR it_code.

SET PF-STATUS 'STATUS' EXCLUDING IT_CODE. GET CURSOR FIELD fld VALUE val.

IF fld = 'IT_ONE-VBELN'.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = val

IMPORTING

output = val.

LOOP AT it_two WHERE vbeln = val.

WRITE:/ it_two-vbeln,

it_two-posnr.

ENDLOOP.

ENDIF.

ENDIF.

AT USER-COMMAND.

CASE sy-ucomm.

WHEN 'BACK1' OR 'CANC1' OR 'EXIT1'.

IF sy-lsind = 2.

SET PF-STATUS 'STATUS' .

SET USER-COMMAND 'BACK'. "this is the trick to go back to first list

ENDIF.

IF sy-lsind = 1.

LEAVE TO SCREEN 0.

ENDIF.

ENDCASE.

rgds

anver

pls mark hlpful answers