Skip to Content
0
Nov 21, 2012 at 09:39 AM

Document Structure deletion.

130 Views

Hi All,


We have a Scenario of Document sturcture where-
DRW_1 having Doc structure with (BKT_1 and BKT_2)
BKT_1 has Doc structure (BKT_5 and BKT_6)

Using the out program , we want to mark "BKT_1" for Deletion for which the below points need to be taken care-

1) Remove Doc structure from BKT_1 (Remove BKT_5 and BKT_6) – Happening perfectly with CSAP_DOC_BOM_DELETE
2) Since BKT_1 is part of DRW_1 we need to get rid of that association – Removes that one single BKT_1 from DRW_1 using BAPI - bapi_document_change2 ,

please note BKT_2 is still part of DRW_1
3) bapi_document_change2 removes that one Document from DRW_1, however retains record in “STPO” table due to which we are still unable to Mark BKT_1 for Deletion


We tried using CS_SF_BOM_DELETE_FOR_ARCHIVE to mark only that specific record from “STPO” for deletion, however FM clears all the records related to the combination of STLNR and BOM Category as shown below-

Meaning CS_SF_BOM_DELETE_FOR_ARCHIVE deletes both BKT_1 and BKT_2 from DRW_1 (entries deleted from “STPO” table) instead of only removing BKT_1.

Please let us know if there is any BAPI or FM to delete one specific document from a parent Document and retain others in the list.Please note that we need something to remove from STPO.

Thanks in advance

Regards,

Pavithranad.