cancel
Showing results for 
Search instead for 
Did you mean: 

Help with this start routine

Former Member
0 Kudos

Hi

I am going to write a start routine where I am going to delete all records where the Nav.attributes of certain infoobject has values =1,2,3,4,5,6.This nav.attribute is not there in source or target infoprovider but only present as attribute on this infoobject.

My idea is to read master data of this infoobject into internal table.Then compare the infoobject value present in the record to infoobject value in this internal table and if there is a match,then I will check if the navigational attribute value of that infobject has value 1,2,3,4,5,6.If YES,then we delete the record .

How can I write this in ABAP.I tried but I failed.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

former_member210253
Contributor
0 Kudos

Hi Hayward,

1.In the start routine, create one internal table with two  fields , infoobject and navigational attribute.

2.Create wa

3.By using SELECT , fetch the records from master data table and fill this internal table.

      SELECT IOBJ  NAVATTR

      FROM /BIC/....(MD TABLE)

      INTO TABLE ITAB FOR ALL ENTRIES IN SOURCE_PACKAGE

       WHERE IOBJ = SOURCE_PACKAGE-IOBJ

            AND NAVATTR BETWEEN 1 AND 6.

    NOTE: Here we are fetching  IOBJ records only those are having  NAVATTR values BETWEEN 1 AND 6 ONLY. So by comparing these IOBJ values  with source_package IOBJ we can able to delete in the source _package.

    

4.keep LOOP AT SOURCE_PACKAGE

          READ TABLE ITAB INTO WA WITH KEY IOBJ = SOURCE_PACKAGE-IOBJ.

          if sy-subrc = 0.

             DELETE SOURCE_PACKAGE WHERE  IOBJ  = WA-IOBJ.

         ENDIF.

    END LOOP.

This is the logic, it may works, try it.

Regards,

Babu.

Answers (0)