on 2012 Apr 16 3:06 PM
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
66 | |
10 | |
10 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.