Application Development and Automation 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: 
Read only

CV02N, BEFORE_SAVE, DRAD empty ?

Former Member
0 Likes
1,329

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

2 REPLIES 2
Read only

Former Member
0 Likes
893

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.

Read only

0 Likes
893

Hi,

A bit late response, thanks for input.

Cheers,

Bart