cancel
Showing results for 
Search instead for 
Did you mean: 

call a routine in a dynamic action.

Tarun
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Experts,

i want to write a routine in which i can give the error msg while saving the infotype 0002 incase the given condition is not fulfilled.

Can you tell me where i can write this routine and how to call it in a dynamic action.

i hav written other types of dynamic actions before but never called any routine before

Plz give me the detailed info regarding writing a routine.

regards

TS

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Check these links

Former Member
0 Kudos

Hello TS,

You can do that using F in Indicator for step but iam not sure whether it will return an error message. We have user exits for this which might solve your issue. We have userexit PBAS0001 and in this EXIT_SAPFP50M_002 Function module, we need to write the code which ever you want to do.

For Calling FORM in Dynamic actions.

P - Check conditions

I - Maintain infotype record

W - Set default values when creating a new record

V - Reference to another step

F - Call routine

M - Send mail

Say you have a program ZTEST. In this you need to write the form that needs to be called in dynamic action and say for ex:form_test.

You can fill only structure RP50D values, because these values you can get it back to dynamic action. ypu can check for examples in dynamic actions it self which have 'F' indicator step.

Regards,

Kiran I

Tarun
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Kiran,

Thanks for the reply.

As per my requirement, i want an error msg in case the difference between the date of birth and date of joining is less than 18years. and i want this error msg while saving the date of birth in infotype 0002.

we can pick the date of birth from the hiring action's start date.

Can you help me with the code?

regards

TS

Former Member
0 Kudos

Hello,

DO you want this error message when ever user saves the IT0002 or only at hiring.

If it is every time then we need to find the hiring date and check.

For this we need to check whether any project in smod is created for this user exit.

I can give you an idea,

1) In SMOD create a project, and assign enhancement PBAS0001.

2) Select the components function module exits EXIT_SAPFP50M_002.

3) Double click on the Include zxp....

4) if alerady exits then check is there any code for IT0002.

In this include we need to write the coding.

Regards,

Kiran I