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 a screen of transaction PR05 from a Zprogram

Former Member
0 Kudos

hello people

I am creating a program that does the same thing PR05 transaction, but for various employees, rather than just the PR05 makes for one. My idea is to create the first screen with the selection data and when you select a row, call screen which is also called when it is done the same thing in PR05.

Is it possible to call a screen and pass it the parameters? If yes, how to know which parameters to pass and how.

Thank you all.

1 ACCEPTED SOLUTION

edgar_nagasaki
Contributor
0 Kudos

Hi Pedro,

Yes, once you have personnel number selected you could call PR05 from your code doing as following:

SET PARAMETER ID 'PER' FIELD your_per_number. "here you pass personnel number

CALL TRANSACTION 'PR05'.                                     

Regards,

Edgar

5 REPLIES 5

edgar_nagasaki
Contributor
0 Kudos

Hi Pedro,

Yes, once you have personnel number selected you could call PR05 from your code doing as following:

SET PARAMETER ID 'PER' FIELD your_per_number. "here you pass personnel number

CALL TRANSACTION 'PR05'.                                     

Regards,

Edgar

0 Kudos

In time, transaction parameter ID was caught from here:

0 Kudos

Hi Edgar

What I REALLY want is when you select a row in my program, make the same thing that makes the PR05 when you select a row.

0 Kudos

Hi Pedro,

If I've properly understood, you want PR05 subsequent screen to be shown, right?

If yes, try the addition SKIP FIRST SCREEN.

Edgar

raymond_giuseppi
Active Contributor
0 Kudos

If there is more than some parameter id required to display the PR05 screen or if transaction does not allow to skip first screen (*), then try to build a small BDC which execute PR05 with your selected/calculated data, the BDC execution should not end at end of data provided


ls_options-dismode = abap_true.

ls_options-nobiend = abap_true.

CALL TRANSACTION 'PR05' USING lt_bdcdata OPTION FROM ls_options.

Else, you could have just use


SET PARAMETER ID 'PER' FIELD lv_pernr.

CALL TRANSACTION 'PR05' AND SKIP FIRST SCREEN.

Regards,

Raymond

(*) Alas. "the dynpro number must not be specified as a static next dynpro". Look at first screen dynpro of PR05, SAPMP56T / 1000, next screen is also 1000, so forget second option...