Skip to Content
-4

MODULE POOL

i have a code in module pool tab1 tab2 tab3

IF SY-UCOMM = 'YES2'. tab2


amnt required ...........
YNFA-BUD_AMT = YNFA-AMT_REQ. budget no yes < pushbtns>
ELSEIF SY-UCOMM = 'NO2'. amnt ..............
CLEAR YNFA-BUD_AMT.
ELSEIF SY-UCOMM = 'JUSTY'.
CALL SCREEN 1009.

ENDIF.

when i click on yes i gets me the same value but when i click on no it not gets clear

on the screen when i click on NO pushbutton it not gets clear but while am debugging this it works perfect

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Mar 30, 2017 at 01:16 PM

    Hi Ankit,

    Please could you elaborate it more ?

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 30, 2017 at 01:12 PM

    First, remove all your code from the module pool and replace it with a parameterised procedure call which takes the function code as a parameter.

    (SAP Help states: The relevant ABAP program must implement the dialog modules and may have a 
    structure like the one below. Because dialog module have no local data, we 
    recommend to handle the actual processing within procedures that you call 
    depending on the function code. )

    then make your code more readable using a CASE statement.

    Lastly, check your screen definition.

    At the bottom of the list of fields there will be a row with a type of 'OK'. If this does not have a field name in it, put the name of a global field in there (one of the few cases I won't complain about using globals).

    Define the field in you top include and then pass that instead of sy-ucomm to the procedurre you have created and reference the parameter in your code

    Rich

    Add comment
    10|10000 characters needed characters exceeded