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: 

Initiating P0000-MASSG when in PA40

Former Member
0 Kudos

Hi,

We would like to initiate MASSG on Hiring Action through PA40, on first screen of infotype 0000. Changing the field via PRELP/INNNN and ZXPADU01 doesn't work, a lot of other possibilities yield no succes either - either no effect, or simply to late in the flow. It seems that IPSYST is the only place to change things, but this structure doesn't include field MASSG, only MASSN and some other fields.

Is there any way to do this?

BR

Kim

1 ACCEPTED SOLUTION

antoine_foucault
Active Contributor
0 Kudos

How about

SET PARAMETER ID 'MASSG' FIELD (value) in BEFORE_OUTPUT method of badi ZCL_IM_20HR_INFTY_0000?

Hope it helps,

Regards.

12 REPLIES 12

Former Member
0 Kudos

Hi

Defaulting MASSG in Hiring action case arises when there is only one action reason for hiring action type.

You can maintain the same in table V_T530.

~~~ Ganesh Kumar K.

0 Kudos

Yes, this is the case - we have an Action which has only one Reason, and we want this to be defaulted. But when performing PA40 with this Action, the Reason is not defaulted. In SM30 V_T530 I can see that this Action has only this one Reason, and F4 on the field on IT0000 only shows this one Reason. The field is set as being mandatory.

Do we have to activate this functionality "Only one Reason for Action, make it default" anywhere?

BR

Kim

0 Kudos

alternatively, if you have only one reason, you can always customize this reason to a blank key.

this way, the reason is always defaulted automatically without coding.

Regards,

Luk

0 Kudos

Hi,

I already tried the dynamic assignment of PSPAR-MASSG via debug, changing (SAPFP50M)PSPAR-MASSG, but the system doesn't use my value. Changing (SAPFP50M)PSPAR-MASSN actually works though, this overrides the Action set by PA40.

Making space a valid value so that this is the default value wouldn't work, I believe - if the field is obligatory, space is not a valid value. Anyway, my customer wants the Reason for Action to contain letters, blank is not an option I'm afraid, and making the field not obligatory would not correspond with the needs for other the Actions.

BR

Kim

s0004895470
Active Participant
0 Kudos

Hi Kim,

You'll need to update the PSPAR variable.

However, reaching this structure from the user exit requires the use of a dynamic assign of the variable pspar of the calling programm to a field symbol.

Best regards,

Luk

Former Member
0 Kudos

Hi

Not sure it is the best solution but you can try this...

Keep MASSG as not mandatory field, fill MASSG value in user exit ZXPADU02 (for the specific action type) and through an error message for all the action types if MASSG is initial.

~~~Ganesh Kumar K.

0 Kudos

Hi,

Yes, it could be done that way - but it would be too late in the flow The meaning is to make it easier for the user, but if the Reason is not filled with the one possible value from the beginning, then many users will still select it manually.

BR

Kim

antoine_foucault
Active Contributor
0 Kudos

How about

SET PARAMETER ID 'MASSG' FIELD (value) in BEFORE_OUTPUT method of badi ZCL_IM_20HR_INFTY_0000?

Hope it helps,

Regards.

0 Kudos

Hi Antoine,

This new badi sounds promising.

How do you implement this badi ( I am functional, and I need to guide our technical guy!)?

Merci!

Benoit

0 Kudos

It is work very well. Thanks

I implemented the BADI HRPAD00INFTY and SET PARAMETER ID 'MASSG' FIELD (value) in BEFORE_OUTPUT method.

Former Member
0 Kudos

Hmm, that actually seems to do the trick! I was a bit nervous about it messing with the users own data parameters, but this doesn't seem to be the case.

Thanks to all for the help!

Former Member
0 Kudos

Hmm, that actually seems to do the trick! I was a bit nervous about it messing with the users own data parameters, but this doesn't seem to be the case.

Thanks to all for the help!

BR

Kim