2011 Mar 11 7:09 AM
Hi,
Background.
1. I have created document via CV01N, attached a file to it and linked an object to it.
2. I wanted to modify the document via CV02N.
I'm working with BADI DOCUMENT_MAIN01. Have implemented method BEFORE_SAVE where I need to perform a few checks(whether a filename is attached and an object is linked).
The problem is that in BEFORE_SAVE the table with linked objects ( DRAD ) is empty, but the object itself is linked to the document because it is visible on the linked objects tab. The thing is, when I create a document - BEFORE_SAVE method works ok, DRAD is populated. But when I try to edit it afterwards, DRAD is empty unless I open the linked objects tabstrip before saving.
Long story short.
1. CV01N -> attach file, link an object -> SAVE -> BEFORE_SAVE: DRAD is populated
2. CV02N -> SAVE -> BEFORE_SAVE: DRAD is empty
3. CV02N -> open linked objects tabstrip -> SAVE -> BEFORE_SAVE: DRAD is populated
Couldn't find a note to fix this behavior, any clues ?
Thanks,
Bart
Hi,
Background.
1. I have created document via CV01N, attached a file to it and linked an object to it.
2. I wanted to modify the document via CV02N.
I'm working with BADI DOCUMENT_MAIN01. Have implemented method BEFORE_SAVE where I need to perform a few checks(whether a filename is attached and an object is linked).
The problem is that in BEFORE_SAVE the table with linked objects ( DRAD ) is empty, but the object itself is linked to the document because it is visible on the linked objects tab. The thing is, when I create a document - BEFORE_SAVE method works ok, DRAD is populated. But when I try to edit it afterwards, DRAD is empty unless I open the linked objects tabstrip before saving.
Long story short.
1. CV01N -> attach file, link an object -> SAVE -> BEFORE_SAVE: DRAD is populated
2. CV02N -> SAVE -> BEFORE_SAVE: DRAD is empty
3. CV02N -> open linked objects tabstrip -> SAVE -> BEFORE_SAVE: DRAD is populated
Couldn't find a note to fix this behavior, any clues ?
Thanks,
Bart
2011 Jun 29 3:55 PM
Hello Bartosz.
I faced the same problem and found the reason.
Note 396960 - BADIS notes on the use of BADIS:
Problem:
If in method BEFORE_SAVE in Badi DOCUMENT_MAIN01 the object links should be read from table DRAD, then this does not contain any data. The object links were not displayed before.
Solution:
Due to the performance the object links are only read in the transaction when being called. By using function module cv110_doc_data_get the system can be forced to read the data of table DRAD via parameter PF_READ_DRAD.
I hope this will be useful.
2011 Sep 22 8:53 AM
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |