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: 

To Change Parameter Labels in Selection Screen At Runtime

Former Member
0 Kudos

Hi All,

I had a need to change the parameter labels which were like p_bukrs, p_ktogr and p_file to Company Code, Acct Determination ans Upload File respectively.

I found a solution which I thought would be worthwhile to share.

In the INITIALIZATION event,

please proceed as follows:

DATA: cocd LIKE tabfield-lfieldname,

acc_det LIKE tabfield-lfieldname,

filename LIKE tabfield-lfieldname.

cocd = 'T001-BUKRS'.

acc_det = 'T095A-KTOGR'

filename = 'rlgrap-filename'(001).

PARAMETERS: p_bukrs LIKE (cocd),

p_ktogr LIKE (acdec),

p_file LIKE (filename).

Let us dissect p_bukrs LIKE (cocd).

This makes the name of the reference field p_bukrs be specified as the contents of field 'cocd' at runtime.

Parameter p_bukrs will appear on the SELECTION SCREEN with the Technical Attributes of T001-BUKRS. The Text of p_bukrs will be taken from the text of T001-BUKRS from the ABAP dictionary.

Now, considering filename = 'rlgrap-filename'(001).

We have provided 'filename' with a SELECTION TEXT.

Hence the system will display that text only on the SELECTION SCREEN, even if it is a database field.

Note: The parameters will always be created as character strings with length 132.

Reward If This was found to be of help!

Edited by: prosenjit chaudhuri on Jan 29, 2008 11:42 AM

Edited by: prosenjit chaudhuri on Jan 30, 2008 7:38 AM

2 REPLIES 2

Former Member
0 Kudos

in the prg

goto> text elements->selection texts.

in selection texts u can type as u like

that text will appear in ur selection screen

Madhavi

0 Kudos

Hi Madhavi,

You are absolutely right. However, in this alternative F1 and F4 helps can be inherited into the parameter field from the database fields. This cannot be done by Selection Texts only.