‎2009 Aug 29 11:06 AM
Hii
i Have developed a smartform for QM..In tht if the result field doesnt have any value printed..then the whole line item shouldnot be printed...i have treid many select statements but not getting desired output..
smartform has 3 columns Test,Specification,Result..Test and Specification data is taken from QAMV table and result data is taken from QAMR table.and input is taken as prueflos field from QALS table.
so for few inputs the result field wont be printing in tht case the whole line item which has test and specification data should also be not printed....
fields used ra
TEST---- QAMV-KURZTEXT
Specification------QAMV-TOLERANZUN,TOLERANZOB
Result------QAMR-MITTELWERT
kindly help me how the select statement shld be written for the above smartform....
‎2009 Aug 29 11:20 AM
if you have problem in select statement then add
where result NE result_init " define this result_init of type QAMR-MITTELWERT.
if you have problem in smartform printing that line then
for that line add result NE result_init
‎2009 Aug 29 11:12 AM
‎2009 Aug 29 11:27 AM
‎2009 Aug 29 11:36 AM
Hi ,
Please put a flag at the final population table for the result table, if this flag is 'X' then send the values as it is to the smartform, elseif dont send the data to the final result table ....means if the result table is initial, delete the rest of the contents from the internal tables in the previous one with a key parameter.
Regards,
Venkat
‎2009 Aug 29 11:45 AM
@ venkat
i didnt use any final table for values..here is the code which i wrote in initialization screen of smartform
SELECT prueflos ktextmat charg losmenge mengeneinh gueltigab from qals into table t_qals where prueflos eq prueflos1
SELECT prueflos MERKNR
kurztext MASSEINHSW sollWert auswmenge1 toleranzun toleranzob STELLEN TOLUNNI TOLOBNI katab1
from qamv into table T_QAMV for all entries in t_qals where prueflos eq t_qals-prueflos.
SELECT prueflos VBEWERTUNG from qaVE into table t_qaVE where prueflos eq prueflos1.
SELECT prueflos MERKNR MBEWERTG mittelwert from qamr into table t_qamr where prueflos eq prueflos1 and where result NE result_init .
select single * from qals into corresponding fields of itab where prueflos = prueflos1.
select single * from mch1 into corresponding fields of jtab where charg = itab-charg.
kindly help me how to correct the above code....
‎2009 Aug 29 11:52 AM
Hi Venkat,
please do like this, loop at the internal tables......and read another internal table with the specified table field value...if the value is initial.....delete it from the internal table already filled from the select statement.
Regads,
venkat.
‎2009 Aug 29 11:20 AM
if you have problem in select statement then add
where result NE result_init " define this result_init of type QAMR-MITTELWERT.
if you have problem in smartform printing that line then
for that line add result NE result_init
‎2009 Aug 29 11:36 AM
@ soumya
i declared where result NE result_init in select statemnt and result_init of type qamr-mittelwert in global data but getting a error message as "result is not a valid comparison operator".
‎2009 Aug 29 11:38 AM
Hi venkat,
as far as i understood, u want that, if from the three column, if the result column is blank then that particular raw should not appear.
You must be writing that values in smartform in loop, so in loop put condition in condition tab like 'result NE initial'.this will surely solve your problem. If it don't works then debug ur form and see what value is coming in result.... it may be possible that instead of initial it contains 0. if so put condition like result NE 0 in loop condition tab.
‎2009 Aug 29 11:38 AM
Hi,
U can do it as Soumyaprakash had written. Or u can do after selection data , delete the recoreds which has QAMR-MITTELWERT = space.