03-14-2007 9:21 PM
HELLO EXPERTS,
In the selection screen i am having one check box called 'Blind', and when i execute the report i am getting the output with around 15 fields
so if the user checks this check box then i should hide the two fields in the output that is i should show only 13 fields... those fields r ( EKES-MENGE, eket-wemng )
can anyone guide me how to write the logic for it....
Thanks alot for your anticipation...
SIRI
03-14-2007 9:58 PM
Hi,
Check this..
<b>IF BLIND = ' '. " if the check box is not checked.</b>
fieldcatalog-fieldname = 'MENGE'.
fieldcatalog-seltext_m = 'QTY TO RECEIVE'.
fieldcatalog-col_pos = 14.
fieldcatalog-REF_TABNAME = 'EKES'.
fieldcatalog-REF_FIELDNAME = 'MENGE'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'WEMNG'.
fieldcatalog-seltext_m = 'QTY RECEIVED'.
fieldcatalog-col_pos = 15 .
fieldcatalog-REF_TABNAME = 'EKET'.
fieldcatalog-REF_FIELDNAME = 'WEMNG'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
<b>ENDIF.</b>
THanks,
Naren
03-14-2007 9:32 PM
Hi,
If it is ALV..
Then don't build the field catalog if the check box is checked..So that you will not get the columns in the output..
If it is normal list..
Then don't use WRITE statement to print the data..
Thanks,
Naren
Message was edited by:
Narendran Muthukumaran
03-14-2007 9:40 PM
Hi Naren,
Its alv grid report.... I didn't get u what u said. In the field catalog I should add those fields because if the user uncheck that build option and execute the report then he should see those fields if he checked that box then should disable ...
can u explian me bit clearly..
SIRI
03-14-2007 9:37 PM
Do like this:
Loop at itab.
You are printing all the 15 fields with WRITE statement here
Check if checkbox is checked
If not p_blind is initial. "Assuming p_blind is in selection screen
WRITE: <14th field>
WRITE: <15th field>
Endif.
Endloop.
Thanks,
Santosh
Message was edited by:
SKJ
03-14-2007 9:50 PM
Hi,
Check this..
IF the check box = ' '. " Blind checkbox is not set..Then show the field
Build the field catalog for the columns EKES-MENGE, eket-wemng
ELSE.
**Don't have to do anything...As the columns EKES-MENGE, eket-wemng
**should not be displayed..
ENDIF.
Thanks,
Naren
03-14-2007 9:53 PM
Naren
here is the my field catalog... for the those two fields can u tell me how to write the code for it
form build_fieldcatalog.
fieldcatalog-fieldname = 'MENGE'.
fieldcatalog-seltext_m = 'QTY TO RECEIVE'.
fieldcatalog-col_pos = 14.
fieldcatalog-REF_TABNAME = 'EKES'.
fieldcatalog-REF_FIELDNAME = 'MENGE'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'WEMNG'.
fieldcatalog-seltext_m = 'QTY RECEIVED'.
fieldcatalog-col_pos = 15 .
fieldcatalog-REF_TABNAME = 'EKET'.
fieldcatalog-REF_FIELDNAME = 'WEMNG'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
endform.
SIRI
03-14-2007 9:58 PM
Hi,
Check this..
<b>IF BLIND = ' '. " if the check box is not checked.</b>
fieldcatalog-fieldname = 'MENGE'.
fieldcatalog-seltext_m = 'QTY TO RECEIVE'.
fieldcatalog-col_pos = 14.
fieldcatalog-REF_TABNAME = 'EKES'.
fieldcatalog-REF_FIELDNAME = 'MENGE'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'WEMNG'.
fieldcatalog-seltext_m = 'QTY RECEIVED'.
fieldcatalog-col_pos = 15 .
fieldcatalog-REF_TABNAME = 'EKET'.
fieldcatalog-REF_FIELDNAME = 'WEMNG'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
<b>ENDIF.</b>
THanks,
Naren
03-14-2007 10:11 PM
Thanks alot naren problem solved..
I really appreciate u r valuable time
SIRI
03-14-2007 10:16 PM