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: 

User Exit for VF02 (Change Billing Document)

Former Member
0 Kudos

In transaction VF02, when i go to maintain the header text, if i do not maintain the header text , then at the time of saving the document i want to fire the exit so that the header text is always maintained. How do i do it for Header text.

2 REPLIES 2

Former Member
0 Kudos

Hi!

Use the program: RV60AFZZ

FORM USEREXIT_NUMBER_RANGE USING US_RANGE_INTERN.
if sy-tcode = 'VF02' and   "Invoice change transaction ?
   sy-ucomm = 'SICH'.   "Save operation ?

* here you have to use READ_TEXT fm with 
* object: VBBK
* ID: 0001 (maybe other if the text is in an another object)
* language: sy-langu
* name: vbrk-vbeln

* if the text does not exists, then create an message with SE91 (with name ZSD_ERROR) 
* and then use the statement:
MESSAGE E001(ZSD_ERROR).   "this will prevent saving

endif.
endif.
ENDFORM.

Regards

Tamá

0 Kudos

I tried to put debugger at this point of code but when i run vf02 and go to save , it does not go into the debugger. So may be the code is also not executed.Please suggest how to solve .