‎2007 Jul 24 5:43 AM
Hi i have a field awamt-pa0183
when i am using this filed in READ TABLE using all the fields from table pa0183 the system is showing this field awamt is not in my table .
This field AWAMT is currency field with length 9
I unable to under stand the error
with regards
anandp
‎2007 Jul 24 6:30 AM
How u have declared the field AWAMT ...
what is the error u r getting
‎2007 Jul 24 5:46 AM
Anand,
Read table is used to read the records from the internal table whereas a select statement is used to fetch the records from standard table to internal table.
Check whether using the READ statement on internal table or not.
K.Kiran.
‎2007 Jul 24 6:00 AM
Hi Kiran
here i retrived data from pa0183 into itab1.
then i passed the same data to itab2.
form itab1 i delected the duplicate records
now i am loop itab2 where i have all the records and reading the same with all fields from itab1.
here if the conditions does not satisfies i have to pass the data into itab3.
Actually the aim is to delete duplicate record from data base here i have duplicates in itab3.
Here my client has done some mistake when they running bdc they uploaded the file more than once, which created duplicates.
And the problem which i told u is, AWAMT
the system is showing error at this field .
with regards
anandp
‎2007 Jul 24 6:30 AM
How u have declared the field AWAMT ...
what is the error u r getting
‎2007 Jul 24 6:33 AM
hi
awamt like pa0183-awamt.
when i am using read statemtn the system is saying this field is not in pa0183
with regards
anandp
‎2007 Jul 24 6:39 AM
Something like this u have to give...
READ table itab with key awamt = '10'.
Coz awamt is not the key field in the table.
‎2007 Jul 24 6:39 AM
Hi Anand,
Can you paste your code, and tell where the error is coming.
Regards,
Atish
‎2007 Jul 24 6:44 AM
Report Z0183_DEL
no standard page heading line-size 255.
tables: pa0183.
data: int_pa0183 like pa0183 occurs 0 with header line.
data: begin of int_pa0183_d occurs 0,
mandt like pa0183-mandt,
pernr like pa0183-pernr,
subty like pa0183-subty,
objps like pa0183-objps,
sprps like pa0183-sprps,
endda like pa0183-endda,
begda like pa0183-begda,
seqnr like pa0183-seqnr,
aedtm like pa0183-aedtm,
uname like pa0183-uname,
histo like pa0183-histo,
itxex like pa0183-itxex,
refex like pa0183-refex,
ordex like pa0183-ordex,
itbld like pa0183-itbld,
preas like pa0183-preas,
flag1 like pa0183-flag1,
flag2 like pa0183-flag2,
flag3 like pa0183-flag3,
flag4 like pa0183-flag4,
rese1 like pa0183-rese1,
rese2 like pa0183-rese2,
grpvl like pa0183-grpvl,
awdtp like pa0183-awdtp,
awcur like pa0183-awcur,
awamt like pa0183-awamt,
awamt(10),
payrl like pa0183-payrl,
paydt like pa0183-paydt,
aprdt like pa0183-aprdt,
zzsuggestion like pa0183-zzsuggestion,
zzsubawd like pa0183-zzsubawd,
zzsprtawd like pa0183-zzsprtawd,
zzawdpt like pa0183-zzawdpt,
end of int_pa0183_d.
DATA : "int_pa0183_d like int_pa0183 occurs 0 with header line,
wa_pa0183 like int_pa0183 occurs 0 with header line.
SELECT-OPTIONS: S_PERNR FOR PA0183-PERNR.
start-of-selection.
select * from pa0183 into table int_pa0183
WHERE PERNR IN S_PERNR.
BREAK ANANDK.
sort int_pa0183 by pernr begda endda awdtp seqnr.
loop at int_pa0183.
MOVE-CORRESPONDING int_pa0183 to int_pa0183_d.
append int_pa0183_d.
endloop.
delete adjacent duplicates from int_pa0183 comparing PERNR SUBTY OBJPS SPRPS ENDDA BEGDA "SEQNR UNAME
AEDTM HISTO ITXEX REFEX ORDEX ITBLD
PREAS FLAG1 FLAG2 FLAG3 FLAG4 RESE1
RESE2 GRPVL AWDTP AWCUR AWAMT PAYRL
PAYDT APRDT
ZZSUGGESTION ZZSUBAWD ZZSPRTAWD
ZZAWDPT.
loop at int_pa0183_d.
read table int_pa0183 with table key mandt = int_pa0183_d-mandt
pernr = int_pa0183_d-pernr
subty = int_pa0183_d-subty
objps = int_pa0183_d-objps
sprps = int_pa0183_d-sprps
endda = int_pa0183_d-endda
begda = int_pa0183_d-begda
seqnr = int_pa0183_d-seqnr
aedtm = int_pa0183_d-aedtm
uname = int_pa0183_d-uname
histo = int_pa0183_d-histo
itxex = int_pa0183_d-itxex
refex = int_pa0183_d-refex
ordex = int_pa0183_d-ordex
itbld = int_pa0183_d-itbld
preas = int_pa0183_d-preas
flag1 = int_pa0183_d-flag1
flag2 = int_pa0183_d-flag2
flag3 = int_pa0183_d-flag3
flag4 = int_pa0183_d-flag4
rese1 = int_pa0183_d-rese1
rese2 = int_pa0183_d-rese2
grpvl = int_pa0183_d-grpvl
awdtp = int_pa0183_d-awdtp
awcur = int_pa0183_d-awcur
awamt = int_pa0183_d-AWAMT
payrl = int_pa0183_d-payrl
paydt = int_pa0183_d-paydt
aprdt = int_pa0183_d-aprdt
zzsuggestion = int_pa0183_d-zzsuggestion
zzsubawd = int_pa0183_d-zzsubawd
zzsprtawd = int_pa0183_d-zzsprtawd
zzawdpt = int_pa0183_d-zzawdpt.
if sy-subrc ne 0.
move-corresponding int_pa0183_d to wa_pa0183.
append wa_pa0183.
endif.
endloop.
loop at wa_pa0183.
write:/ wa_pa0183-pernr, 15 wa_pa0183-begda,
30 wa_pa0183-endda, 45 wa_pa0183-awdtp,
52 wa_pa0183-seqnr.
endloop.
‎2007 Jul 24 7:11 AM
HERE THE SYSTEM IS SAYING 'the component 'AWAMT' is not contained in table int_pa0183 or the key is not statically declared
with regards
anand
‎2007 Jul 24 7:15 AM
Hi Anand,
Just remove <b>table</b> words from READ
read table int_pa0183 with <b>table</b> key mandt = int_pa0183_d-mandt
Regards,
Atish