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

get parameter

Former Member
0 Likes
1,489

Guy's look at the below code,in my system i am getting

value as 0110, i just want to know to which field

this parameter id belong's too.

note:-this code i got after debugging standard transcation

ko01, and that i tested in report ztest6.can anybody help

me,it's urgent

REPORT ZTEST6.

data: cac_kokrs like coas-kokrs,

get parameter id 'CAC' field cac_kokrs.

WRITE CAC_KOKRS.

9 REPLIES 9
Read only

Former Member
0 Likes
1,356

sorry for change , i just want to know ,how these

field is getting populated ,it's urgent

Read only

Former Member
0 Likes
1,356

This parameter id belongs to field KOKRS - Controlling Area. See data element KOKRS.

It transfers the value stored under the key CAC from the global user-related SAP memory to the field specified.

Using SET Parameter id we can set the value and it can be retrieved using get parameter id.

Message was edited by: Ashish Gundawar

Read only

Former Member
0 Likes
1,356

Go to SE16, enter table name TPARA, give the value CAC for PARAMID and execute. You will get the answer 'Controlling Area'.

Read only

0 Likes
1,356

THANKS FOR REPLYING SO SOON,QUESTION IS HOW THESE

FIELD IS GETTING POPULATED AUTOMATICALLY.FOR

YOUR INFORMATION ,U CAN GO TO KO01 TRANSCATION ,ENVIRONEMNT>SET CO area,when you press

that,some value will get populted automatically,

i want that to be empty

Read only

Former Member
0 Likes
1,356

In the program somewhere there will be a SET PARAMETER ID statement.

Read only

Former Member
0 Likes
1,356

Hi Sanju,

If you go to COAS view,you will find the field KOKRS,just double click on the dataelement.Now go to the <b>'</b><b>Further Characteristics'</b> tab,there you will find the parameter id as CAC.

Read only

0 Likes
1,356

None of these replies answered your original question, even though it appears you found your answer?

Read only

former_member184495
Active Contributor
0 Likes
1,356

hi,

this 'get parameter' is used when you are refering a field of some transaction.

so just check which transaction you are calling after this 'get parameter' statement,

then go to that transaction and press F1/ technical settings and see which field carry the name 'CAC'.

hope this was helpful, award if it was worth

cheers,

Aditya.

Read only

hymavathi_oruganti
Active Contributor
0 Likes
1,356

REPORT ZTEST6.

data: cac_kokrs like coas-kokrs,

<b>get parameter id 'CAC' field cac_kokrs.</b>WRITE CAC_KOKRS.

parameter ID <b>'CAC' is checked in SAP MEMORY</b> and if it is there, it is assigned to cac_kokrs.

The parameter id will be <b>unique for</b> a particular field in

<b>SAP MEMORY.</b>

U CAN ALSO USE

<b>SET parameter id 'CAC' field cac_kokrs.</b> ABOVE.

BUT THE DIFFERENCE BETWEEN THE TWO IS AS FOLLOWS:

<u><b>get parameter id</b></u>

DATA: para TYPE tpara-paramid VALUE 'RID',

prog TYPE sy-repid.

<b>GET PARAMETER ID para FIELD prog.</b>

IF sy-subrc <> 0.

MESSAGE 'Parameter not found' TYPE 'I'.

ENDIF.

1.in the above syntax para is a variable for which parameter id is assigned.

2. get parameter id returns sy-subrc.

<u><b>

set parametr id</b></u>

SET PARAMETER ID: 'CAR' FIELD carrier,

'CON' FIELD connection.

1. the parameter id 'CAR' is static , u cant use variables.

Message was edited by: Hymavathi Oruganti