Skip to Content
0
Former Member
Mar 15, 2007 at 05:14 PM

module pool

12 Views

I have two screen fields

1). SCR-MACCT 2). SKB1-WAERS

IF SCR-MACCT value is in range table r_zgfld,

then SKB1-WAERS field should be enabled with F1help pop up and this F1 pop up should only shows up when it first becomes available for user entry.

Below is my code :

module currency_visibility output.

  • Main account - SCR-MACCT is in range table

IF SCR-MACCT IN r_zgfld[].

CHECK sy-subrc = 0.

LOOP AT SCREEN.

IF ( screen-name = 'SKB1-WAERS' ) .

screen-input = '1'.

flag_f1popup = flag_f1popup + 1.

MODIFY SCREEN .

ENDIF.

IF flag_f1popup = '1'

AND SKB1-WAERS IS INITIAL.

  • Providing F1 help to 'Currency' field.

CALL FUNCTION 'HELP_OBJECT_SHOW_FOR_FIELD'

EXPORTING

  • DOKLANGU = SY-LANGU

  • DOKTITLE = ' '

  • CALLED_BY_TCODE =

  • CALLED_BY_PROGRAM =

  • CALLED_BY_DYNP =

CALLED_FOR_TAB = 'SKB1'

CALLED_FOR_FIELD = 'WAERS'

  • CALLED_FOR_TAB_FLD_BTCH_INPUT =

  • CALLED_BY_CUAPROG =

  • CALLED_BY_CUASTAT =

  • MERGE_DZ_IF_AVAILABLE =

  • MEMORYID =

  • EXPLICIT_MEMORYID = ' '

  • TABLES

  • LINKS =

  • EXCLUDEFUN =

EXCEPTIONS

OBJECT_NOT_FOUND = 1

SAPSCRIPT_ERROR = 2

OTHERS = 3

.

IF sy-subrc <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDIF.

ENDLOOP.

ENDIF. " IF SCR-MACCT IN r_zgfld[]

endmodule. " currency_visibility OUTPUT