Quantcast
Channel: SCN: Message List - ABAP Development
Viewing all articles
Browse latest Browse all 10425

Re: What is wrong with these statements

$
0
0

Blue,

 

Whenever you declare an event block such as INITIALIZATION, START-OF-SELECTION, or AT SELECTION-SCREEN [ON...] you are ending the previous event block.  The compiler expects all IF and LOOP statements to have their corresponding END statements when a new event block is defined.

 

In your case, you could just remove the IF-ELSE-ENDIF block and things will work fine.

 

AT SELECTION-SCREEN ON VALUE-REQUEST FOR SERVER.
     PERFORM GET_VALUE_FILENAME USING 'SERVER' SERVER.


AT SELECTION-SCREEN ON VALUE-REQUEST FOR LOCAL.
     PERFORM GET_VALUE_FILENAME USING 'LOCAL' LOCAL.

 

 

If you want to disable the value-help for local when SERVER is 'X' and vice versa, you could add this to your code:

 

 

AT SELECTION-SCREEN ON VALUE-REQUEST FOR SERVER.

      CHECK server = 'X'.

      PERFORM GET_VALUE_FILENAME USING 'SERVER' SERVER.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR LOCAL.

     CHECK server = space.

     PERFORM GET_VALUE_FILENAME USING 'LOCAL' LOCAL.

If the logical expression in the CHECK statement evaluates to false, the event block will be exited before the subroutine can be called.

Best,

  Eric


Viewing all articles
Browse latest Browse all 10425

Trending Articles