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

Read profile parameter in ABAP

Former Member
0 Likes
1,968

How could I read out a profile parameter such as zcsa/installed_languages in ABAP?

Is the a function I could use?

regards HT

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,195

Here is one way...

REPORT  zrich_0001.

types: begin of tpar,
       status type sy-index,
       name(60) type c,
       user_wert(60) type c,
       default_wert(60) type c,
       end of tpar.

data: par_usub type table of tpar with HEADER LINE.
data: par_sub  type table of tpar  with header line.

call 'C_SAPGALLPARAM' id 'PAR_USUB' field par_usub-*sys*
                      id 'PAR_SUB'  field par_sub-*sys*.

read table par_usub with key name = 'zcsa/installed_languages'.
if sy-subrc = 0.
  write:/ par_usub-name(30), par_usub-user_wert(20),
          par_usub-default_wert(20).
endif.

REgards,

Rich Heilman

How could I read out a profile parameter such as zcsa/installed_languages in ABAP?

Is the a function I could use?

regards HT

2 REPLIES 2
Read only

naimesh_patel
Active Contributor
0 Likes
1,195

You can check in the funciton group SPFL.

FM PFL_GET_PARAMETER_VALUES might be helpful.

Table TPFYPROPTY will store all the parameters.

Reards,

Naimesh Patel

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,196

Here is one way...

REPORT  zrich_0001.

types: begin of tpar,
       status type sy-index,
       name(60) type c,
       user_wert(60) type c,
       default_wert(60) type c,
       end of tpar.

data: par_usub type table of tpar with HEADER LINE.
data: par_sub  type table of tpar  with header line.

call 'C_SAPGALLPARAM' id 'PAR_USUB' field par_usub-*sys*
                      id 'PAR_SUB'  field par_sub-*sys*.

read table par_usub with key name = 'zcsa/installed_languages'.
if sy-subrc = 0.
  write:/ par_usub-name(30), par_usub-user_wert(20),
          par_usub-default_wert(20).
endif.

REgards,

Rich Heilman