Skip to Content
-4

MODULE POOL

Mar 30, 2017 at 11:06 AM

79

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

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

Hi Ankit,

Please could you elaborate it more ?

Show 1 Share
10 |10000 characters needed characters left characters exceeded

I'm also not able to understand the question or what OP is trying to achieve exactly.

0
Richard Harper Mar 30, 2017 at 01:12 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded