12-23-2013 2:22 PM
HI ,
internal table I_edidc declare as unique key DOC_NUM while select the value from the edidc table on basis of status ,msgtyp,direct ,sndprt.sndprn ,updat, updtim,cretim,credat giving the duplicate entry dump some time .ANY suggestion
12-23-2013 2:27 PM
Hi.
Check on tcode SE16 the table edidc and do the same selection as your program, check the result and compare.
Regards
Miguel
12-31-2013 10:55 AM
Status of idoc is changes from 51 to 53 will it is causing the issue
12-23-2013 3:29 PM
12-31-2013 10:56 AM
SELECT docnum status direct rcvpor rcvprt rcvprn mescod mesfct sndpor
sndprt sndprn credat cretim mestyp idoctp cimtyp upddat updtim
FROM edidc INTO TABLE i_edidc
WHERE status IN s_status
AND mestyp EQ g_msgtyp
AND direct EQ l_direct
AND sndprt IN s_sndprt
AND sndprn IN s_sndprn
AND credat IN s_credat
AND cretim IN s_cretim
AND upddat IN s_upddat
AND updtim IN s_updtim.
in this select statement i am getting dump any idea
12-31-2013 11:13 AM
Please paste the data deceleration part for internal table I_EDIDC as well as exact Dump message which you are getting.
I think there may be structure conflict i.e. the field sequence which you have written in select should be same as internal table structure.
Also check the internal table I_EDIDC should get refresh before selection.
Cheers,
Prakash
12-31-2013 11:41 AM
Hi Prakash ,
thanks for your replying internal table is refreshed i checked it during the debugging time and this issue not occurs frequently .I think the reason is when the idoc status changes from 51 to 53 it is picking up 51 entry and the same time it status changes to 53 it again tries to pick the same idoc with status 53 .Please correct me if i am wrong and please give your valuable suggestion .Below is the code
SELECT docnum status direct rcvpor rcvprt rcvprn mescod mesfct sndpor
sndprt sndprn credat cretim mestyp idoctp cimtyp upddat updtim
FROM edidc INTO TABLE i_edidc
WHERE status IN s_status
AND mestyp EQ g_msgtyp
AND direct EQ l_direct
AND sndprt IN s_sndprt
AND sndprn IN s_sndprn
AND credat IN s_credat
AND cretim IN s_cretim
AND upddat IN s_upddat
AND updtim IN s_updtim.
12-31-2013 11:48 AM
Please confirm the IDOC status get changed during the execution of this select query ?
Also yes your analysis is correct.
Thanks,
Prakash
12-31-2013 12:16 PM
Hi Rohit ,
You are getting dumb because you are using ranges .To many values in ranges cause dumb due to database exception .
12-31-2013 12:31 PM
in this query i need to select all the idoc with all status so i used the range can you please suggest the other approach for the same .
12-31-2013 12:37 PM
Try to remove the UNIQUE KEY option in internal table definition, SELECT/SORT BY upddat updtim DESCENDING and DELETE DUPLICATE RECORDS comparing only DOCUNUM.
Regards;
Raymond
12-31-2013 12:40 PM
Hi Rohit,
If Range table contains huge entry then it will cause dump.
Just Share the DUMP message which you are getting here.
Also to reduce range in selection query , just select data based on few range tables and after the selection filter the entries from internal table.
Like: DELETE ITAB where FIED1 NOT IN S_RANGE.
Or you can loop on selected entries and filter the values:
Loop at ITAB into WA.
if WA-FIELD1 IN S_RANGE.
APPEND WA to ITAB1.
ENDIF.
Endloop.
Also please declare your internal table as TYPE STANDARD TABLE OF in place of SORT / Unique key.
Cheers,
Prakash
12-31-2013 12:46 PM
HI Prakash ,
The error is occur due to duplicate entry occurs while select statement it not the time out error or other .
Thanks for replys
12-31-2013 12:55 PM
Yes Rohit , EDIDC have only one key field , I dont thing range tables will fetch duplicate IDOC numbers.
Thanks
Prakash