‎2009 Jun 29 6:31 PM
Hello people,
I have a function that receives a table as a parameter.
I need to check if each enter in this table exists in table in database. If it exists, I need to mark "X" in the last column in this table. Liek this:
SELECT WERKS MATKL 'X'
INTO CORRESPONDING FIELDS OF TABLE T_LISTA
FROM yswerks_matkl
FOR ALL ENTRIES IN T_LISTA
WHERE WERKS = T_LISTA-WERKS
AND MATKL = T_LISTA-WERKS.
Is it possible?
Thanks a lot!
‎2009 Jun 29 6:47 PM
HI,
No it is not possible.
You can take other table to save the data instead of same table. In which you get only records exists in database.
SELECT WERKS MATKL
INTO CORRESPONDING FIELDS OF TABLE T_LISTA_TEMP "--> Take new internal table
FROM yswerks_matkl
FOR ALL ENTRIES IN T_LISTA
WHERE WERKS = T_LISTA-WERKS
AND MATKL = T_LISTA-WERKS.
‎2009 Jun 29 6:47 PM
HI,
No it is not possible.
You can take other table to save the data instead of same table. In which you get only records exists in database.
SELECT WERKS MATKL
INTO CORRESPONDING FIELDS OF TABLE T_LISTA_TEMP "--> Take new internal table
FROM yswerks_matkl
FOR ALL ENTRIES IN T_LISTA
WHERE WERKS = T_LISTA-WERKS
AND MATKL = T_LISTA-WERKS.