cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

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

0 Likes
View Entire Topic
Former Member

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