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: 

checkbox in the ABAP query selection screen

Former Member
0 Kudos

Hi experts,

The reqiurement is to add checkbox(parameter name: EX_ZE_ST) to the selection screen of the query and if its checked then the records with the quantity = 0, should not be displayed in the output.

I added a check box and now my issue is, how to suppress displaying the record having quantity = 0.

that quantity field is a custom added field and in sq02 i selected that quantity( Z_HANDQTY) field and gone into the code for the same and wrote below code...

the total generated table view for this query is : marav

if EX_ZE_ST = 'X' and Z_HANDQTY = 0.

break-point.

clear: marav, Z_MATDESC, Z_MATGRPDESC, Z_TAXIND,

Z_TAXTYPE, MARD, MARD-LGPBE, Z_PREVMATNR,

Z_CSTTOTAL, Z_CSTUNIT, Z_VSTOCK.

FREE MEMORY ID 'AQLISTDATA'.

endif.

But still i could see a blank line in the output if that record has quantity( Z_HANDQTY) = 0.

Thanks in advance...

Karthik

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi,

Try this wa y...

if EX_ZE_ST = 'X' and Z_HANDQTY = 0.

break-point.

clear: marav, Z_MATDESC, Z_MATGRPDESC, Z_TAXIND,

Z_TAXTYPE, MARD, MARD-LGPBE, Z_PREVMATNR,

Z_CSTTOTAL, Z_CSTUNIT, Z_VSTOCK.

FREE MEMORY ID 'AQLISTDATA'.

Continue.

endif.

4 REPLIES 4

Former Member
0 Kudos

hi,

Try this wa y...

if EX_ZE_ST = 'X' and Z_HANDQTY = 0.

break-point.

clear: marav, Z_MATDESC, Z_MATGRPDESC, Z_TAXIND,

Z_TAXTYPE, MARD, MARD-LGPBE, Z_PREVMATNR,

Z_CSTTOTAL, Z_CSTUNIT, Z_VSTOCK.

FREE MEMORY ID 'AQLISTDATA'.

Continue.

endif.

0 Kudos

Hi Avinash,

Continue st not allowed that place and it is allowed only inside LOOPs.

Regards,

Karthik

0 Kudos

Hi Karthikeyan,

Use check statement for the Zhandqty field. It will work for sure.

Sample Code :

ztest = sy-dbcnt.

break-point.

check ztest = 1.

the above code will display only the first record with ztest = 1.

Regards

Hemanth

0 Kudos

Thanks Hemanth..

Your suggestion fixed my issue..

regards,

Karthik