Application Development 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: 

CODING FOR CHECK BOX

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

8 REPLIES 8

Former Member
0 Kudos

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

0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

Thanks alot naren problem solved..

I really appreciate u r valuable time

SIRI

Former Member
0 Kudos

Glad to help )

Regards

Naren