Skip to Content

Copying Object Links for new Document Versions with BAPI

Hello,

I am creating new document revisions with BAPI_DOCUMENT_CREATENEWVRS2 in ECC 6.0 called from TIBCO Business Works via PTC Windchill. I would like a particular document type (purchase specification) to always update links for a particular object type (material), but not for another type (Purchase Order Item).

Currently, under DC10 (Define Object Types>Define Object Links>Object Link) "When New Version" is set to to "blank", or "Selection by User" for both object types.

If I set this to "1", "Copy Link Automatically" for the Material and "0", "Ignore Link" for the Purchase Order Item, and then pass "*" "Copy Object Links" field in the BAPI, will this work as I have described above?

I will need to involve a consultant to test, and have researched to this point, so I am hoping for confirmation from an experienced user prior to testing.

Thanks,

Casey

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Nov 20, 2017 at 10:03 PM

    As a followup, the changes described above have been made in our SAP system and tested.

    It does not seem that these settings are respected in the processing of the BAPI.

    Using a value of "*" for "COPYOBJECTLINKS", "OBJECTTYPE" copies all links, versus leaving it blank, which copies no links, without regard to the change in the noted settings.

    I'll update if I find a good way to drive the desired behavior.

    Thanks,

    Casey

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 20, 2017 at 11:14 PM

    For anyone else having this issue, the "COPYOBJECTLINKS" table field is "OBJECTTYPE", and you can pass the save values that are defined in DC10, e.g., only "MARA" to only copy links to the material but not the PO.

    My error was in thinking that it was ALL, NONE, or specific links to specific objects.

    A review of the table definition identified the single field of ten characters and that led me to the correct usage.

    Hope this helps someone else.

    Sincerely,

    Casey

    Add comment
    10|10000 characters needed characters exceeded