cancel
Showing results for 
Search instead for 
Did you mean: 

Need to Filter Record at START routine

pavneet_rana
Active Participant
0 Kudos

Hi to all,

Please can any one tell me logic to right a START ROUTINE at TRANSFORMATION to filter record.

example : i need to filter record based on field HKONT at START ROUTINE.

data: wa_source like line of SOURCE_PACKAGE.

loop at SOURCE_PACKAGE into wa_source.

if wa_source-HKONT = '00003417 ' OR wa_source-HKONT = '00003417'

OR wa_source-HKONT = '00003418'.

Modify SOURCE_PACKAGE from wa_source.

else.

Delete SOURCE_PACKAGE index sy-tabix .

endif.

endloop.

But i am not getting proper result .

I shall be thankful to you for this.

Regards

Pavneet Rana

Edited by: pavneet rana on Jan 11, 2011 12:42 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You want records to be deleted only or to be modified also??

pavneet_rana
Active Participant
0 Kudos

Thanks for reply to all,

I need the record to be deleted form SOURCE_PACKAGE.

which dont match to HKONT = 00003417 and 000034172 and 0000341.

I shall be thankful to you for this.

Regards

Pavneet Rana

Former Member
0 Kudos

DELETE SOURCE_PACKAGE where HKONT NE '00003417 ' AND

HKONT NE '000034172' AND

HKONT NE '0000341'.

--- Thanks...

Answers (2)

Answers (2)

esjewett
Active Contributor
0 Kudos

Why don't you use a filter in the DTP? Unless there is some other context, it seems strange to do this in a transformation routine when the functionality is well supported in the normal DTP filter.

Ethan

former_member209702
Active Participant
0 Kudos

Hi,

You can use following code:

DELETE SOURCE_PACKAGE where HKONT = '00003417 ' OR HKONT = '00003417' OR HKONT = '00003418'.

Regards,

Geetanjali