‎2007 Oct 05 8:52 AM
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
‎2007 Oct 05 9:00 AM
hi Sudharsan,
you have to comment the AT SELECTION-SCREEN part. After that it will run OK.
hope this helps
ec
‎2007 Oct 05 9:35 AM
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.
‎2007 Oct 05 11:52 AM
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
‎2007 Oct 05 9:07 AM
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>