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: 

implementing user exit

Former Member
0 Kudos

Hi Abappers,

I am trying to implement a customer defined validation in the user exit EXIT_SAPFP50M_002 in PA30 transaction. I want to display a particular error message, if the particular wage type is entered in the second screen(2010), but after displaying the error, the screen fields get greyed out. i want to enable the user to edit the fields after the error message has appeared. How should i do this? please suggest me a solution.

Regards

Naren.

9 REPLIES 9

Former Member
0 Kudos

Hi,

Try using a information message.

Regards,

Senthil

0 Kudos

Hi senthil,

The requirements is that the user is not supposed to save the entry if the entry is wrong,that is the reason for using error rather than status of info message.Can you please help me with this?

Regards

Narendiran Rathinavelu

0 Kudos

Hi,

In user-exit, the control doesn't come back to your screen when you throw a std error message. So, you have to call a pop-up screen and displayed the error message in the pop-up. That way, the control comes back to my screen.

Also try this,

INSTEAD OF

MESSAGE EXXX(XX).

USE.

MESSAGE SXXX(XX) DISPLAY LIKE 'E'.

FCODE = 'ENT1'.

Regards,

Senthil

Message was edited by: senthil kumar

0 Kudos

Hi senthil

can you show me an example?

Regards

Narendiran Rathinavelu

0 Kudos

Hi,

i am implementing this exit inside a function module, is it possible to use chain endchain in this case?

Regards

Narendiran Rathinavelu

0 Kudos

Hi senthil,

What does fcode correspond to here?

Regards

Narndiran Rathinavelu

0 Kudos

Ok good,

Use this in your flow logic,

field <screen field name> module <module name> .

and place the code and error message with the module .

this will enable to field for entering new values.

process after input.

field <fieldname> module <module>.

module user_command_0100.

In an include of the main program.

************************************************************************

  • Module <module> INPUT

************************************************************************

module <module> input.

  • Insert the error message here!

endmodule.

0 Kudos

Hi Senthil,

I am writing my validation code inside a Z include(ZXPADU02) inside the function module EXIT_SAPFP50M_002 which is an user exit provided by SAP in the transaction PA30(Maintain HR Data) , I tried using

SXXX(XX) display like 'E'.

fcode = 'ENT1'

intead of

but i dont understand what fcode corresponds to here?

Secondly i dont think i can implement

chain.

endchain.

structure here since, i am inside a function module.

Please suggest me a solution.

Regards

Narendiran

Former Member
0 Kudos

Hi Narendiran,

In order to prevent the screen fields from being greyed out, use the chain...endchain construct. Inside the CHAIN..ENDCHAIN construct, mention the names of the fields as under to prevent the greying of the same.

CHAIN.

FIELD MARA-MATNR.

FIELD MARA-MATKL.

.

.

ENDCHAIN.

Regards,

Chetan.

PS: Reward Points if you find the answer useful..