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: 

Badi/Exit after closing original in DMS

naresh_bammidi
Contributor
0 Kudos

Hello All,

I came across a requirement that need to display a popup when closing the original after doing changes.

SAP standard behavior: If we click on change original button,original( For eg: Word document) will open to edit ,but CV02N will jump back to the search results.If we open the document again in CV02n,document info record will be unlocked as below

To Avoid this , i need to display a popup ('Document is changed,do you want to Check-in')as soon as original is closed.

To identify BADI in se24 i put a break point and executed the CV02N .

But after closing the original ,break point is not getting triggered.

If some one came across the same requirement earlier,please help me out.

Thanks

Naresh Bammidi

1 ACCEPTED SOLUTION

naresh_bammidi
Contributor
0 Kudos

Hello All,

Below is my requirement,

My requirement is when i change original and closing the original( eg: Word doc ) then this popup should display.

We found one standard include in sap system LCV150TOP which is having the code to display the popup.

We have put the break point and closed the document.But it is not triggering.

Above requirement is impemented in other country.Below is the functionality.

DIR screen :

After click on change original ,Word document is opening

Edited the document and closed it,one popup is coming as below

Above popup is coming because of the include lcv150top.

To achieve this above functionality do we need to implement any SAP Note?


Please suggest me .

Thanks

Naresh


20 REPLIES 20

rahul_mb
Active Participant
0 Kudos

Hi Naresh,

Once you press the 'Change Original' button, SAP opens the document in the corresponding application and exits the transaction CV02N. So after that, when you are making changes to the document or saving it, there is no interaction with the SAP system. That means there no ABAP code running in background. So there won't be any BAdI/Exits available while closing the document or saving it.

I think its better to have a discussion with the customer and try to find out some other work around.

Regards,

Rahul MB

0 Kudos

Yes Rahul , I tried to find out BADIs by keeping break point in se24.When i close the original no break point is triggering.

Am using BADI DOCUMENT_MAIN02 to call the to display popup.

But it is displaying popup when i click on change original button,Not on closing the document.Is there any other alternative?

Thanks

sachin_yadav3
Active Participant
0 Kudos

Hi Naresh,

You could look for some implicit enhancement.

Thanks

Sachin

0 Kudos

Hello Sachin,

I need the Popup when i close the Original document.At which point i can search for implicit enhancement?

Thanks

Naresh Bammidi

0 Kudos

In which method you implemented your code, did you place any filter like user command. Add code in Badi "DOCUMENT_MAIN02",  Method "D101_BEFORE_PAI", with filter on SY-UCOMM = 'BACK". So that it will trigger only when you click back button.

Thanks & Regards

Bala Krishna

0 Kudos

Hello Krishna,

I need popup when i close the original( For eg: microsof word document ) ,not on closing the dir.

Am not able to identify which badi is triggering after closing the original.

Thanks

Narehsh

0 Kudos

How is the MS word getting opened? I mean is it opened in SAP or separately?

0 Kudos

it is opening separately.

0 Kudos

This requirement has been implemented in other system.Now i got the access to that system.

How can i check weather any enhancement is implemented or not?

Thanks

Naresh Bammidi

0 Kudos

Is that working in other system? Check any Implementation exists for "DOCUMENT_MAIN02".

Thanks & Regards

Bala Krishna

0 Kudos

Yes it's working in this system,

How to check implementaions for BADI DOCUMENT_MAIN02?

0 Kudos

SE18 Tcode

Give Badi name :- Document_main02

Menu Enhanement Implementation> Display

It will list out all the implementation for that Badi.

Or in other system, activate Pop up debugger, after the pop up received, so that you can get the place where it is implemented.

0 Kudos

Hi Krishana,

When i debug the code i could find that it is calling one include lcv150top(Standard include).This include is having a local class and method.What i understood is we need to call the above code from some where else or it requires any configuration.

Please let me know if you get any idea.

naresh_bammidi
Contributor
0 Kudos

Hello All,

Below is my requirement,

My requirement is when i change original and closing the original( eg: Word doc ) then this popup should display.

We found one standard include in sap system LCV150TOP which is having the code to display the popup.

We have put the break point and closed the document.But it is not triggering.

Above requirement is impemented in other country.Below is the functionality.

DIR screen :

After click on change original ,Word document is opening

Edited the document and closed it,one popup is coming as below

Above popup is coming because of the include lcv150top.

To achieve this above functionality do we need to implement any SAP Note?


Please suggest me .

Thanks

Naresh


0 Kudos

Hi,

You don't need to implement any Badi, just see that in opened document is it allowing any thing to change.

1) Open the document in changed mode, type any any characters.

2) Close the word document, a pop up will asking to save document, click on No. Then you will receive the pop up.

I tried in my system without any badi implementations but the issue is sometime its coming and some it is not coming. Some times i noticed that when i open the document twice it is displaying.

As per the code it has to trigger when ever we close the word document, the logic will check if the data is changed in the word document, then only it will display the pop up.

Thanks & Regards

Bala Krishna

0 Kudos

Krishna,

Have you implemented any sap note to get the popup? Why because in my system it is not displaying any popup.Any customizing settings required for that?

Thanks

Naresh Bammidi

0 Kudos

No, I did not implemented any SAP note, only customization is that the document needs to set opened as Outplace. i.e, when ever a document is opened, it has to open in another window.

Just place the break point at the first statement of the Include which you mentioned, the pop up will trigger only when the has_changed = '1'.

Try to open the same document twice and click on close.

Thanks & Regards

Bala Krishna

0 Kudos

Krishna,

In My system when i open the original ,it is going back to the initial screen of CV02N.So my functional did a customization to stay back to the DIR screen.

As you said i opened the original twice,but could not see any popup.Break point is also not getting triggered in the include LCV150TOP.

This include is getting triggered in other system where the functionality is working fine.

Can you please tell me the tcode for customizing to open the original in separate window?That would be very helpful if you can drop the screen shot.

Being not a Functional consultant couldn't come to a conclusion,

Thanks

Naresh Bammidi

0 Kudos

Hi,

Just check the SPRO configuration once again, I am giving you directly the Maintainance view name instead of the SPRO path.

1) In View :- V_TDWX_1

Verify whether for Application 'WRD' what is set for Application path for '2'(CHANGE).

Set to %SAP-OFFICE-INTEGRATION.OUTPLACE%

2) In View V_DMS_OI

An entry is maintained for the Document Type which you are trying.

Keep break point on the read statement in the Method CLOSE_CONTROL_EVENT on top include.

Thanks & Regards

Bala Krishna

0 Kudos

Thanks a lot Krishna,

Issue is resolved by above mentioned configuration.

Thanks again