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: 

Call TC PA20 with a defualt infotype

MariaJoãoRocha
Contributor
0 Kudos

Hi SDN

How can I call TC PA20 (call transaction PA20 and skip first screen) by pressing a button on a z report, with default infotype? For pernr is the Id 'PER' but for the infotype (using F1 / F9) i can see the parameter Id!

Thanks.

Regards,

Maria Jioão Rocha

1 ACCEPTED SOLUTION

BGarcia
Active Contributor

Hi Maria João,

Can you check if funcion module HR_MASTERDATA_DIALOG suits your scenario, instead calling transaction PA20?

There you can indicate the personal number, the infotype, the sub-infotype, the activity and a flag to skip the selection screen.

Something like this:

P_PERNR: 00021098 (personal number)

P_INFTY: 0000 (infotype)

P_SUBTY:

P_ACTIVITY: DIS (DIS for display mode, MOD for modification, INS for insert)

P_SKIP: X (skip selection screen)

If not, analyse the function module code. It will tell you how to make the 'CALL TRANSACTION' statement.

Kind regards,

Garcia

Edited by: Bruno Garcia on Jun 2, 2010 4:32 PM

4 REPLIES 4

BGarcia
Active Contributor

Hi Maria João,

Can you check if funcion module HR_MASTERDATA_DIALOG suits your scenario, instead calling transaction PA20?

There you can indicate the personal number, the infotype, the sub-infotype, the activity and a flag to skip the selection screen.

Something like this:

P_PERNR: 00021098 (personal number)

P_INFTY: 0000 (infotype)

P_SUBTY:

P_ACTIVITY: DIS (DIS for display mode, MOD for modification, INS for insert)

P_SKIP: X (skip selection screen)

If not, analyse the function module code. It will tell you how to make the 'CALL TRANSACTION' statement.

Kind regards,

Garcia

Edited by: Bruno Garcia on Jun 2, 2010 4:32 PM

0 Kudos

Hello,
Thank you. That was so helpful.


METHOD display_pa20 .

CONSTANTS
lc_display TYPE hrbc_pernr-activity VALUE 'DIS' .

IF ( data IS INITIAL ) .
RETURN .
ENDIF .

CALL FUNCTION 'HR_MASTERDATA_DIALOG'
EXPORTING
p_pernr = data-pernr
p_infty = data-type
* p_subty =
p_activity = lc_display
p_skip = abap_on.

ENDMETHOD .

MariaJoãoRocha
Contributor
0 Kudos

Hi,

Problema solved.

I saw the function code and there it is the id parameters that i need.

SET PARAMETER ID 'PER' FIELD P_PERNR.

SET PARAMETER ID 'ITP' FIELD P_INFTY.

SET PARAMETER ID 'FCD' FIELD P_ACTIVITY.

Thanks. (obrigada!)

Regards,

Maria João Rocha

0 Kudos

De nada

Kind regards,

Garcia