Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to get object link (material) at saving document in transaction CV01N?

frazer
Participant
0 Kudos
592

Example: CV01N

Reiter / Slider -> Objektverknüpfungen / Objectlinks

linking a material.

We have an Enhancement where we would send an Email with Subject ( documentnumber and materialnumber)

There we Use method add additional classes:

IF_EX_DOCUMENT_MAIN01~ADD_ADDITIONAL_CLASSES

But the problem is that at this time we dont have access to the linked material because it is before the save.

How can i get access to the linked material (from buffer?). Does someone know a function module or solution.

Because we need to use the add_additional_classes methode and no other from this userexit.

3 REPLIES 3

turkaj
Active Participant
0 Kudos
532

Hi Frank,

You can try the BAdI DOCUMENT_OBJ. If you have the necessary data, you can store it, for example, as public attributes in the BAdI class and later call it directly in your target method IF_EX_DOCUMENT_MAIN01~ADD_ADDITIONAL_CLASSES.

<DOCUMENT_OBJ>=><mat_values>

This is just an example and you can of course do it differently if you have the values you need.

Regards
Jim

0 Kudos
532

I tried this but it dont works for my case. I need a function moule like CLFM_GET_INTERNAL_TABLES which gets the classification data from buffer before it is saved. But i need such a function module which gets me the linked objects before saving.

turkaj
Active Participant
0 Kudos
532

The BADI IF_EX_DOCUMENT_OBJ2 contains the method LINKS_UPDATE. This is called as soon as the assignment changes. The following function module is called in the processing routine CV140_SELECT_DRAD_DOCUMENTS.

There are also the following function modules:

  • CV111_DRAD_GET NOTRANSL: DVS: Objektverknüpfungen aus Buffer lesen
  • CV111_DRAW_GET NOTRANSL: DVS: Dokumentdaten aus Buffer lesen
  • CV115_DOC_SAVE_BUFFER NOTRANSL: DVS: Dokument speichern (interne Puffer)
  • CV200_DB_DRAD_CHANGE_SELECT NOTRANSL: DVS: Letze Änderungen der Objektverknüpfungen lesen