‎2006 Feb 27 11:10 AM
Hi!
I'm looking for an user-exit where I can check if the status of the document has been changed. Therefore I found the exit "EXIT_SAPLCV110_004" with the include "ZXCV110U04" which is triggered when a document (transaction CV02N) is saved. The problem is that there is no structure of the document provided so I cannot check the status of it! The interface if this exit is just
FUNCTION EXIT_SAPLCV110_004.
*"----
""Lokale Schnittstelle:
*" CHANGING
*" REFERENCE(PFX_OKCODE) TYPE SY-UCOMM
*"----
INCLUDE ZXCV110U04 .
ENDFUNCTION.
Is there another exit or how can I check if the status has changed for each document?
Thanks,
Konrad
‎2006 Feb 27 11:23 AM
Hi Konrad,
Use the below useexit
EXIT_SAPLCV00_001
here we have table DRAW and field DOKST (status).
based on this u can know the staus and also change the status.
Thanks
Eswar
‎2006 Feb 27 11:23 AM
Hi Konrad,
Use the below useexit
EXIT_SAPLCV00_001
here we have table DRAW and field DOKST (status).
based on this u can know the staus and also change the status.
Thanks
Eswar
‎2006 Feb 27 2:08 PM
Sounds great but the exit "EXIT_SAPLCV00_001" is not triggered when I open a document in CV02N and save it again... When is this exit triggered?
Thanks,
Konrad
‎2006 Feb 27 11:42 AM
U can try the following in the exit. However this exit is for custome screen and I hope u have developed this screen or atleast this exit is trigered in ur normal processing.
data:f1(30) value '(SAPLCV110)draw-dockt'
field-symbols:<fs1>.
assign (f1) to <fs1>.
if <fs1> = status u want to check
....
endif.
‎2006 Feb 27 2:21 PM
Can U explain this a little more detailed? I'm not quite sure what this code is supposed to do! Should I use this code in the exit I mentioned? Do I have to replace <fs1> by the status field? ...
The exit is triggered by the way!
Thanks,
Konrad
‎2006 Feb 27 2:52 PM
You can code in EXIT_SAPLCV00_001. Write your code in the program ZXCV001U01. This has DRAW structure valeus and also DRAZ Item details.
FUNCTION EXIT_SAPLCV00_001.
*"----
""Lokale Schnittstelle:
*" IMPORTING
*" VALUE(I_DRAW) LIKE DRAW STRUCTURE DRAW OPTIONAL
*" VALUE(I_OK_CODE) OPTIONAL
*" VALUE(SOURCEPATH) LIKE DRAW-FILEP OPTIONAL
*" VALUE(SOURCEFILE) LIKE DRAW-FILEP OPTIONAL
*" VALUE(TARGETPATH) LIKE DRAW-FILEP OPTIONAL
*" VALUE(TARGETFILE) LIKE DRAW-FILEP OPTIONAL
*" TABLES
*" I_INTDRAZ1 STRUCTURE DRAZ OPTIONAL
*" I_INTDRAZ2 STRUCTURE DRAZ OPTIONAL
*" EXCEPTIONS
*" ERROR
*"----
INCLUDE ZXCV001U01 .
ENDFUNCTION.
Hope this will help you to check the conditions.
‎2006 Feb 27 3:50 PM
As I already mentioned before: This exit is NOT triggered when I open and save a document. Do I have to activate this exit somewhere?
Thanks,
Konrad
‎2006 Feb 27 4:14 PM
Hi,
You need to activate this Userexit,you can do that from CMOD from where you create.Project-->Activate.You will see green colored tick marked,if the exit is activated.Put a break point in your code & check whether it is triggering this exit while saving your document.
‎2006 Feb 27 4:25 PM
Check if this is initial implementation.
For the Enhancement if you have assigned it to a new custom project using CMOD. If yes, just activate this project.
Else firsty create custom project using CMOD, assign the SAP enhancement.
Get into the user exit program. Finish coding and activate the project. After this, in debug mode you should be able to see your code getting executed.
‎2006 Mar 06 12:19 PM
Thanks!
Can you please tell me more detailed how I can assign the exit to a newly created project in CMOD? I have created a project "test1", but now I cannot find the option to assign and activate the needed exit...
Thanks,
Konrad
‎2006 Mar 06 12:34 PM
Hello,
After u have created test1 in CMOD. Press Enhancement Assignment button and enter CV110001 as enhancemnet.Save this and press component button. Here u will be able to c all the exits. Double click on the EXIT_SAPLCV110_004. it will opne the FM with ZXCV110U04 as include. Double click on this and after saveing the development class it will open u the editor screen.
Now u can put in ur code.
as for the code which I had given it is already pointing to the table field draw-dockt. what u need to do is replace the if condition with the status code which u are looking for and have the processing logic. This is offcourse based on the fact that exit is called as u have indicated.
Abhijit
‎2006 Mar 07 12:52 PM
Hi!
Some more questions:
1)
How do I know to use "CV110001" for the enhancement? I know that I need EXIT_SAPLCV110_004, but where can I find the "CV110001" for it?
2)
I need the "EXIT_SAPLCV00_001" with include "ZXCV001U01" which provides me the needed information. I found by accident that I need CV000001 as enhancement.
Problem: This enhancement is use by another project not created by me. When I check this project and the enhancement, the exit "EXIT_SAPLCV00_001" is included and there is a green light next to it. But still the exit isn't called when I save a document using CV02N!
Is there something else to check?
Thanks,
Konrad