12-22-2008 10:48 AM
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
12-22-2008 10:53 AM
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.
12-22-2008 10:53 AM
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.
12-22-2008 11:03 AM
Hi Avinash,
Continue st not allowed that place and it is allowed only inside LOOPs.
Regards,
Karthik
12-22-2008 12:43 PM
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
12-22-2008 12:57 PM