‎2008 Aug 23 10:54 AM
dear experts,
if i use offset operation in select query , syntactically giving
me a warning message.
how to avoid warning message
without using another internal table populated with only jtab+0(10).
ex:
select field1 field2
into table itab
from ztable1
for all entries in jtab
where field = jtab+0(10).
thanks in advance.
‎2008 Aug 23 11:03 AM
Ramesh,
Ignore the warning message.
But i amazed to see your query:
for all entries in jtab
where field = jtab+0(10)."--->>>can we use offset for internal table?if yes than please provide a source documentation from where you got this info.
Amit.
‎2008 Aug 23 11:26 AM
hi amit, here's the query
SELECT vbeln "Billing Document number
waerk "SD Document Currency
FROM vbrk
INTO TABLE fp_gi_vbrk
FOR ALL ENTRIES IN fp_gi_bsid
WHERE vbeln = fp_gi_bsid-zuonr+0(10)
AND fkart IN s_fkart.
‎2008 Aug 23 11:31 AM
Ramesh,
WHERE vbeln = fp_gi_bsid-zuonr+0(10)First collect fp_gi_bsid-zuonr+0(10) value in another temp field than use select query like:
SELECT vbeln "Billing Document number
waerk "SD Document Currency
FROM vbrk
INTO TABLE fp_gi_vbrk
FOR ALL ENTRIES IN fp_gi_bsid
WHERE vbeln = fp_gi_bsid-temp"-->>Look here
AND fkart IN s_fkart.Amit.
‎2008 Aug 23 11:34 AM
‎2008 Aug 23 11:37 AM
You have to use the LIKE operator in your where Clause. Do an F1 on LIKE & you will get the idea..
Ignore my response.. when using FOR ALL ENTRIES, the fields should match, you cannot use the OFFset like you are trying..
~Suresh
Edited by: Suresh Datti on Aug 23, 2008 12:40 PM
‎2008 Aug 23 11:46 AM
Ramesh,
friend ,
that's what i have mentioned in my thread????
Am not using another itab am just using another temp variable which i think you must use else i have no idea!
Amit.
‎2008 Aug 23 11:53 AM
amit,
variable can be used only to hold a single value,
if multiple values then ?
Edited by: ramesh kalvakota on Aug 23, 2008 12:54 PM
‎2008 Aug 23 12:01 PM
Ramesh,
Did you read my second last post carefully or Are you pulling my leg?
SELECT vbeln "Billing Document number
waerk "SD Document Currency
FROM vbrk
INTO TABLE fp_gi_vbrk
FOR ALL ENTRIES IN fp_gi_bsid
WHERE vbeln = fp_gi_bsid-temp"-->>Look here(It is not a variable its a field of internal table fp_gi_bsid )
AND fkart IN s_fkart.I hope now you understood.
Amit.
‎2008 Aug 23 12:10 PM
amit,
you mean to say that once i get values in fp_gi_bsid,
then loop this fp_gi_bsid and fill temp field with
zuonr+0(10) value, then use fp_gi_bsid-temp .
thanks in advance.
‎2008 Aug 23 12:12 PM
‎2008 Aug 23 12:16 PM
friend amit,
thanks for spending your precious time for answering
the thread.
‎2008 Aug 23 12:19 PM
friend amit,
thanks for spending your precious time for answering
the thread.Welcome.
PS:dont forget to close your thread once it answered.
Enjoy cheers
‎2008 Aug 23 11:13 AM
No need to populate another internal table...
when populating jtab from database select ur field twice
structure for jtab..
types: begin of ty_jtab,
.....
field type ...
field1 type char10,
.....
end of ty_jtab.
populate the field twice..
select ...
field
field
......
into table jtab
........
Now u can use the field field1 in the next select
select field1 field2
into table itab
from ztable1
for all entries in jtab
where field = jtab-field1.