Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

User Exit for VF02

Hello aLL

I want to check the header text in TCode VF02, if the header text is blank and user want to save then it should not allow the user to do so and throw the error message.

I have checked the user exit .EXIT_SAPLV60B_001. But its not fullfilling my purpose.

Also i have checked the prgm : RV60AFZZ in that FORM USEREXIT_NUMBER_RANGE USING US_RANGE_INTERN i have written my logic there as :

DATA : V_NAME like THEAD-TDNAME." Text Name

DATA : I_LINE TYPE STANDARD TABLE OF TLINE WITH HEADER LINE.

DATA : l_flag.

V_NAME = VBRK-VBELN.

CALL FUNCTION 'READ_TEXT'

EXPORTING

  • CLIENT = SY-MANDT

id = '0002'

language = 'E'

name = v_name

object = 'vbbk'

  • ARCHIVE_HANDLE = 0

  • LOCAL_CAT = ' '

  • IMPORTING

  • HEADER =

tables

lines = i_line

EXCEPTIONS

ID = 1

LANGUAGE = 2

NAME = 3

NOT_FOUND = 4

OBJECT = 5

REFERENCE_CHECK = 6

WRONG_ACCESS_TO_ARCHIVE = 7

OTHERS = 8

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

IF sy-subrc = 0.

LOOP AT i_line.

IF i_line-tdline IS NOT INITIAL.

l_flag = 'X'.

ENDIF.

ENDLOOP.

IF l_flag IS INITIAL.

MESSAGE e014(zsd).

ENDIF.

ENDIF.

But this is not getting triggered when i execute VF02.

Can anybody pls help me.

Awaiting for quick response.

Points are awarded .

Thanks

PrAvEsH

Not what you were looking for? View more on this topic or Ask a question