Application Development and Automation 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: 
Read only

problem while picking values in smartform

Former Member
0 Likes
1,173

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....

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,136

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

9 REPLIES 9
Read only

Former Member
0 Likes
1,136

Hi,

Is your problem with smartform or with select statement?

Read only

0 Likes
1,136

@ kaushik

problem is with select statement..

Read only

0 Likes
1,136

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

Read only

0 Likes
1,136

@ 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....

Read only

0 Likes
1,136

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.

Read only

Former Member
0 Likes
1,137

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

Read only

0 Likes
1,136

@ 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".

Read only

Former Member
0 Likes
1,136

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.

Read only

Former Member
0 Likes
1,136

Hi,

U can do it as Soumyaprakash had written. Or u can do after selection data , delete the recoreds which has QAMR-MITTELWERT = space.