Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
Read only

Error while coding

Former Member
0 Likes
604

Hi iam a starter in ABAP and i got a small error while coding that is

PARAMETERS:

  ABAP  AS CHECKBOX.

  SELECTION-SCREEN COMMENT 5(4) text-010.

  SELECTION-SCREEN END OF LINE.

  SELECTION-SCREEN BEGIN OF LINE.

  PARAMETERS:

  MM AS CHECKBOX.

  SELECTION-SCREEN COMMENT 5(4) text-011.

  SELECTION-SCREEN END OF LINE.

  selection-screen end of block nam1.

if ABAP = 'X'.

WRITE ' YOU ARE ELIGIBLE CONSULTANT'.

ENDIF.

in the above code my requirement is when i check the abap the following msg must be showed in the output screen but its not showing..

please help me if anyone knows how to do it. thank you.

And this is the part of the code if anyone want to see whole code it is attached with this thread.

1 ACCEPTED SOLUTION
Read only

deependra_shekhawat3
Contributor
0 Likes
579

Hi Arvind,

Try below code , when you press enter or execute after check box ABAP you will get message.

SELECTION-SCREEN BEGIN OF BLOCK nam1.

PARAMETERS: abap  AS CHECKBOX.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN COMMENT 5(4) text-010.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS:

mm AS CHECKBOX.

SELECTION-SCREEN COMMENT 5(4) text-011.



SELECTION-SCREEN END OF LINE.



SELECTION-SCREEN END OF BLOCK nam1.



at selection-screen on abap.

IF abap = 'X'.

  MESSAGE ' YOU ARE ELIGIBLE CONSULTANT' TYPE 'I'.

ENDIF.

Thanks

Deependra

3 REPLIES 3
Read only

arivazhagan_sivasamy
Active Contributor
0 Likes
579

Hi Aravind,

Comment following code and execute.

  SELECTION-SCREEN COMMENT 5(4) text-010.

  SELECTION-SCREEN END OF LINE.

  SELECTION-SCREEN BEGIN OF LINE.


SELECTION-SCREEN COMMENT 5(4) text-011.

  SELECTION-SCREEN END OF LINE.

  selection-screen end of block nam1.



Now you can able to see the output.

Arivazhagan S

Read only

0 Likes
579

Welcome to the world of ABAP

List Processing screen ( Write Statement ) will be triggered after START-OF-SELECTION screen event.

Below code will display message on checkbox selection


tables sscrfields .

selection-screen begin of line.

parameters: abap  as checkbox user-command u_abap.

selection-screen comment 5(4) text-010.

selection-screen end of line.

selection-screen begin of line.

parameters: mm as checkbox user-command u_mm.

selection-screen comment 5(4) text-011.

selection-screen end of line.

at selection-screen.

case sscrfields-ucomm.  

when 'U_ABAP'.    

message ' YOU ARE ELIGIBLE CONSULTANT' type 'S'.   

when 'U_MM'.    

message ' YOU ARE MM CONSULTANT' type 'S'.

endcase.

Read only

deependra_shekhawat3
Contributor
0 Likes
580

Hi Arvind,

Try below code , when you press enter or execute after check box ABAP you will get message.

SELECTION-SCREEN BEGIN OF BLOCK nam1.

PARAMETERS: abap  AS CHECKBOX.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN COMMENT 5(4) text-010.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS:

mm AS CHECKBOX.

SELECTION-SCREEN COMMENT 5(4) text-011.



SELECTION-SCREEN END OF LINE.



SELECTION-SCREEN END OF BLOCK nam1.



at selection-screen on abap.

IF abap = 'X'.

  MESSAGE ' YOU ARE ELIGIBLE CONSULTANT' TYPE 'I'.

ENDIF.

Thanks

Deependra