Application Development and Automation 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: 
Read only

Can PID (Parameter ID) be set as a default by TCODE or Role Level

Former Member
0 Likes
2,358

Hi, Any one has any idea if PID (Parameter ID) and its value can be set as a default at TCODE or at Role Level?

Thanks in advance.

Syd.

Addendum:

Re: Can PID (Parameter ID) be set as a default by TCODE or Role Level

Posted: Oct 17, 2006 9:38 AM Reply E-mail this post

Thanks for the reply, you have mentioned try creating a Transaction variant or a Transaction parameter.

Here is my question?

1. Can we set a default Parameter ID at TCODE level so, if any user execute a transaction who has access to execute it, he will have Parameter id and its value as a default?

2. Can PID be set as a default for SAP TCODE or Custom TCODE, or can be done for both, if it can be done then, How?

3. Can PID be set as a default for a particular Role or profile?

Message was edited by: Syed Alam

Message was edited by: Syed Alam

8 REPLIES 8
Read only

Former Member
0 Likes
1,686

If you want to have a default for a certain tcode, try creating

a transaction variant or a transaction parameter - you can set default

values and even prevent your users from changing those defaults.

Setting PIDs can either be done by users themselves - SU3 - or you

can set them up for users in SU01 or in mass via SU10.

Read only

0 Likes
1,686

Thanks for the reply, you have mentioned try creating a Transaction variant or a Transaction parameter.

Here is my question?

1. Can we set a default Parameter ID at TCODE level so, if any user execute a transaction who has access to execute it, he will have Parameter id and its value as a default?

2. Can PID be set as a default for SAP TCODE or Custom TCODE, or can be done for both, if it can be done then, How?

Read only

0 Likes
1,686

I would use a transaction variant when I want a certain default

to be set for all the users who are using it. PIDs are also not available

for all fields on tcodes. So depending upon what your requirement is,

you might either use a transaction variant with defaulted values or PIDs or

a combination of both since PIDs will work with transaction variants as well.

Go to tcode SHD0 to create transaction variants.

Read only

0 Likes
1,686

Parameter ID's have nothing to do with roles or authorizations (except the user's ability to set their own).

In a SAP transaction which gets or sets a user PID value, SAP has decided that this transaction code should use a parameter which the user is able to determine themselves. You can challenge these decisions by opening a Support note with SAP...

In a custom transaction you can code anything (this is a general statement which also holds true for parameters). If you want to use PID's then go to SE38 -> Utilities -> ABAP Keyword Documentation and take a look at how to use the abap statements "get parameter" and "set parameter" which are designed for use PIDs.

I would think that if you want to set a parameter on behalf of the user and not have them change it, then you are better off hardcoding the parameter into the abap once or reading a customizable table at that point, than maintaining it for all the users as a PID.

Read only

0 Likes
1,686

An after-thought: For SAP transactions there are also user exits at various points. You could try to use an appropriate one to set the PID you want for the user running the transaction before the standard coding reads the PID.

Read only

0 Likes
1,686

Yes, but IMHO - creating a transaction variant with default values

is easier than coding a user exit. Also, you can use SU10 for mass

change on user ids for PIDs.

Read only

0 Likes
1,686

Hi JC,

Yes, I agree.

A small disclaimer however is that we dont know which transaction is being refered to.

Creating a transaction variant with the parameter set for it could enable the use to navigate further and back again and in doing so "shed" the screen which the transaction (initially with variant parameter and skip screen) originally gave them.

Using a user-exit to set the parameter can in some cases be closer to the functionality (irrespective of how the user gets there) and be more reliable. But in this case an adventurous user will be likely to trick it anyway if they want to.

If the decision is made to use PIDs in the coding, then it is a decision that the user can influence the value (in my view). If coding makes insecure use of PIDs, then it is a design error in the coding.

Cheers,

Julius

Read only

Former Member
0 Likes
1,686

hi syed,

GOTo <b>SE80</b>->

click on <b>EDIT OBJECT</b> appears on the application tool bar,then on the coming popup->

choose the tab <b>MORE</b>-> here select the radio button-> <b>SET/GET PARAMETER ID</b> -> give your parameter id and say create.

Cheers

Alfred

Reward points for helpful answers.