Skip to Content
author's profile photo Former Member
Former Member

CV02N, BEFORE_SAVE, DRAD empty ?

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jun 29, 2011 at 02: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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.