Skip to Content
0
Former Member
Dec 15, 2010 at 09:02 AM

Problem with READ Statement in the field routine of the Transformation

127 Views

Hi,

I have problem with read statement with binary search in the field routine of the transformation.

read statement is working well when i was checked in the debugging mode, it's not working properly for the bulk load in the background. below are the steps i have implemented in my requirement.

1. I selected the record from the lookuo DSO into one internal table for all entried in source_packeage.

2.i have read same internal table in the field routine for each source_package entry and i am setting the flag for that field .

Code in the start routine

select source accno end_dt acctp from zcam_o11

into table it_zcam

for all entries in source_package

where source = source_package-source

and accno = source_package-accno.

if sy-subrc = 0.

delete it_zcam where acctp <> 3.

delete it_zcam where end_dt initial.

sort it_zcam by surce accno.

endif.

field routine code:

*********************

read table it_zcam with key source = source_package-source

accno = source_package-accno

binary search

transportin no fields.

if sy-subrc = 0.

RESULT = 'Y'.

else.

RESULT = 'N'.

endif.

this piece of code exist in the other model there its working fine.when comes to my code it's not working properly, but when i debug the transformation it's working fine for those accno.

the problem is when i do full load the code is not working properly and populating the wrong value in the RESULT field.

this field i am using in the report filter.

please let me know if anybody has the soluton or reason for this strage behaviour.

thanks,

Rahim.