‎2010 Mar 17 11:02 AM
Hi,
As per below code I want to pick the data into table gi_qmma from qmma where PSTER is not equal to blank foe that i have writen the below code but still the data is coming in GI_QMMA when the PSTER is blank.
what changes required in below code i dont want to pick data is PSTER is blank.
CODE ****************
select QMNUM MANUM MNGRP MNCOD MATXT PSTER FROM QMMA INTO TABLE GI_QMMA for all entries in GI_QMEL
WHERE QMNUM = GI_QMEL-QMNUM
AND MNGRP EQ 'VISIT'
AND MNCOD EQ 'ENVI'
AND PSTER NE ' '.
IF SY-SUBRC EQ 0.
SORT GI_QMMA ASCENDING BY PSTER.
******************************END OF BLOCK********
REGARDS,
ZAFAR
‎2010 Mar 17 11:06 AM
hi
Try the Possible Ways:
select QMNUM MANUM MNGRP MNCOD MATXT PSTER FROM QMMA INTO TABLE GI_QMMA for all entries in GI_QMEL
WHERE QMNUM = GI_QMEL-QMNUM
AND MNGRP EQ 'VISIT'
AND MNCOD EQ 'ENVI'
AND PSTER NE SPACE.
AND PSTER (Use Not Qual symbol here) SPACE.
Please check it in table PSTER is a date field
Edited by: dharma raj on Mar 17, 2010 4:54 PM
‎2010 Mar 17 11:07 AM
‎2010 Mar 17 11:15 AM
Hi,
I have check according to given code PSTER NE SPACE but still it is picking the data from the table.
regards,
zafar
‎2010 Mar 17 11:25 AM
Hi,
I am not very familiar with this field PSTER. What data type is it? And are you sure the table contents for that field is space and there is nothing else present at the end of the field??
Regards,
Mani
‎2010 Mar 17 11:28 AM
Hi,
The data type of PSTER is PSTERMA and it is in table QMMA.
regards,
zafar
‎2010 Mar 17 11:33 AM
hi
Check this internal table data in debug mode GI_QMEL
AND PSTER (Use Not Qual symbol here) SPACE.
Check your table (QMMA)entry.
‎2010 Mar 17 11:37 AM
Zafar,
My instance of SAP is SCM APO and not ECC, so it does not contain the table you mentioned. My question was to ascertain if it is a character type of or a quantity type like numbers.
Regards,
Mani
‎2010 Mar 17 11:13 AM
Hi
Hope below change could solve your problem.
CODE ****************
select QMNUM MANUM MNGRP MNCOD MATXT PSTER FROM QMMA INTO TABLE GI_QMMA for all entries in GI_QMEL
WHERE QMNUM = GI_QMEL-QMNUM
AND MNGRP EQ 'VISIT'
AND MNCOD EQ 'ENVI'
AND PSTER NE SPACE.
IF SY-SUBRC EQ 0.
SORT GI_QMMA ASCENDING BY PSTER.
******************************END OF BLOCK********
‎2010 Mar 17 11:50 AM
PSTER is of type DATS. I'll leave it to you to find out the initial value for date fields (It's not space).
Thomas
‎2010 Mar 17 11:53 AM
Thomas,
Thanks for the input.
Zafar,
This is where i was getting to, you are looking for a incorrect condition that is causing the problem. Once you replace space with the right condition, your query will work as required. I think you can figure out that initial value.
Thanks
Mani
‎2010 Mar 17 12:04 PM
Dear Mani,
I have try with 1: PSTER NE ' '.
and 2: PSTER NE SPACE.
but both are not working in my case.
regards,
zafar
‎2010 Mar 17 12:09 PM
‎2010 Mar 18 6:05 AM