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

input validation on selection-screen...

Former Member
0 Likes
663

Hi Experts,

in my report i ve selection-screen like, GL account, comp code, and posting. i.e,

SELECTION-SCREEN BEGIN OF BLOCK blk.

SELECT-OPTIONS: so_racct FOR glt0-racct,

so_bukrs FOR glt0-bukrs NO INTERVALS NO-EXTENSION.

PARAMETERS: p_date LIKE sy-datum.

SELECTION-SCREEN END OF BLOCK blk.

i ve done validation like this,

AT SELECTION-SCREEN ON SO_RACCT.

IF SO_RACCT-LOW IS INITIAL.

MESSAGE E000(ZGLM). " Enter at least one GL account number.

ELSEIF GLT0-RACCT = SO_RACCT AND BSEG-ALTKT = SO_RACCT.

IF SY-SUBRC <> 0.

MESSAGE E001(ZGLM). " ACCOUNT number is not found

ENDIF.

ENDIF.

then selecting data like

SELECT * FROM GLT0 INTO

CORRESPONDING FIELDS OF

TABLE gt_data WHERE

racct IN so_racct AND

bukrs IN so_bukrs AND ryear = l_len.

DELETE ADJACENT DUPLICATES FROM gt_data.

then am selecting data based on GL account(RACCT), company code(bukrs) and posting date( p_date ).

till now it is working well. but now want, they want to print all GL accounts based on comp code anf posting data . i.e if i don'r give GLaccount as inpit shoul

4 REPLIES 4
Read only

JozsefSzikszai
Active Contributor
0 Likes
540

hi Sudharsan,

you have to comment the AT SELECTION-SCREEN part. After that it will run OK.

hope this helps

ec

Read only

0 Likes
540

Hi Eric, Thanks for ur quickl replay,

i have comment as u told , but it is continusly executing, its not printing anything,

what to do?

Regards,

sudharsan.

Read only

0 Likes
540

hi,

this means that I did not understand you... My understanding was that you want to seelct all data from GLT0 if no G/L account is provided on selection screen, right?

ec

Read only

Former Member
0 Likes
540

Hi

just write the code under AT SELCTION_SCREEN like this

SELECT * FROM GLT0 INTO

CORRESPONDING FIELDS OF

TABLE gt_data WHERE

racct IN so_racct AND

bukrs IN so_bukrs AND ryear = l_len.

it will validate the screen

<b>Reward if usefull</b>