Skip to Content
author's profile photo Former Member
Former Member

Filtering Internal Table

Hi All,

I have to filter the records from Final table T_OUTPUT based on the selection criteria, need to delete record sin T_OUTPUT if the PO number is not in T_TEMP and T_TEMP is not initial. Similarly delete records if the PO number is not in T_TEMP1 and T_TEMP1 is not initial and delete records if the PO number is not in T_TEMP2 and T_TEMP2 is not initial.

Can any one provide logic for this..

thanks in advance

Khan

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2007 at 01:32 PM

    Hi,

    This is somthing like this :

    loop at T_OUTPUT
    ...
    clear t_temp.
    read table t_temp with key po = t_ouptut-po
      if sy-subrc ne 0.
        delete t_output.
        modify t_output.
      endif.
    
    ...
    endloop.
     

    Hope this helps,

    Erwan

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 30, 2007 at 01:32 PM

    2 ways.

    1) Loop at the table T_OUTPUT.

    read table t_temp with key as PO number

    if no record is found then delete the entry from T_OUTPUT

    continue

    read table t_temp1 with key as PO number

    if no record is found then delete the entry from T_OUTPUT

    continue

    read table t_temp2 with key as PO number

    if no record is found then delete the entry from T_OUTPUT

    endloop.

    2) Preapare a RANGE for PO numbers in T_TEMP, T_TEMP1,T_TEMP2

    then use statement

    DELETE T_OUPUT WHERE NOT PO IN RANGE.

    Regards,

    Abhishek

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.