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: 

'BACK' and 'EXIT' button getting disabled after Custom code for TMG Event gets triggered.

Former Member
0 Kudos

Hello Fellow SCNers ,

I have coded a TMG Event code for Event 05 ( Create New Entries ) in a Maintenance View , it is getting triggered while saving .

I have coded an ERROR message inside it .

But the Issue is that as soon as the error message gets triggered its disabling Standard Buttons of 'BACK' and 'EXIT'.

Can any workaround be suggested to make them enable.

Thanks ,

Sijin.

1 ACCEPTED SOLUTION

ipravir
Active Contributor
0 Kudos

Hi Sijin,

TMG is a Module Pool program, so if error message is triggering for any of the fields, it should be based on the Field. if not then all screen will be disable.

Use .

Field FIELD_NAME Moduel MOD_VALIDATION.

or can use,

CHAIN.

END CHAIN.

to validate Multiple Fields.

Reagrds.

Praveer.

4 REPLIES 4

Former Member
0 Kudos

You cannot raise Error message in that event.

You should prevent the saving using the below code :


"Prevent saving

MESSAGE 'Cant save' TYPE 'S' DISPLAY LIKE 'E'.

vim_abort_saving = 'X'

EXIT.

ipravir
Active Contributor
0 Kudos

Hi Sijin,

TMG is a Module Pool program, so if error message is triggering for any of the fields, it should be based on the Field. if not then all screen will be disable.

Use .

Field FIELD_NAME Moduel MOD_VALIDATION.

or can use,

CHAIN.

END CHAIN.

to validate Multiple Fields.

Reagrds.

Praveer.

Former Member
0 Kudos

I would try both of these solutions.

But I would like to stick with Adithya's suggestion.

Reason being I don't want to mess up the Generated Standard Module Pool code.

Thanks both of you for valuable suggestions.

Former Member
0 Kudos

While answering this ,

http://scn.sap.com/thread/3682936

I got the solution for mine also