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

What is parameter id and default component in data element? Help!

gopalkrishna_baliga
Participant
0 Likes
9,049

Hi experts,

In the further characteristics, What is parameter id and default component name in data element? what are they used for?

Example: S_CARR_ID.

Thanks

Gopal

Hi experts,

In the further characteristics, What is parameter id and default component name in data element? what are they used for?

Example: S_CARR_ID.

Thanks

Gopal

5 REPLIES 5
Read only

Former Member
0 Likes
3,919

Hi,

Parameter ID :- Is used for assigning value to field.

Suppose u call a transaction in u porgram.

and u want to assign some value to field before executing the transaction.

if the field has parameter id u can assign value to field before calling the transaction.

that is it take the default value from the memmory.

and u set value in the memmory using parameter id.

<b>----


GET PARAMETER -


</b>

Basic form 3

GET PARAMETER ID pid FIELD f.

In some cases, the syntax rules that apply to Unicode programs are different than those for non-Unicode programs. See ABAP Unicode - Other Changes

Effect

First, the value stored under the key pid is transferred from the local SAP memory into the field f. If this key is not available in the local SAP memory, the value stored under the same key pid is transferred from the global user-related SAP memory to the field f.

A parameter ID can have up to 20 characters. You can find an overview of the keys (parameters) used in the SAP system description or the appropriate function in the ABAP Workbench.

The Return Code is set as follows:

SY-SUBRC = 0: A value was read from SAP memory. SY-SUBRC = 4: No value was found in SAP memory under the specified key.

Notes

The global user-related SAP memory is available to each user for the entire duration of a terminal session. For this reason, set values are retained when you leave a program.

You should not use SAP memory for temporary storage because a user's parallel sessions use the same global memory.

Example

Read the program name from SAP memory:

DATA : REPID LIKE SY-REPID.

GET PARAMETER ID 'RID' FIELD REPID.

<b>----


SET PARAMETER -


</b>SET PARAMETER ID pid FIELD f.

In some cases, the syntax rules that apply to Unicode programs are different than those for non-Unicode programs. See ABAP Unicode - Other Changes

Effect

Writes the contents of the field f to the global user-specific SAP memory and the local transaction-specific SAP memory under the ID pid. Any existing values under the same ID are overwritten.

Parameter IDs can be up to 20 characters long. They cannot consist entirely of spaces. The SAP system description contains an overview of parameter IDs. You can also produce a list using the ABAP Workbench.

Notes

The global, user-specific SAP memory is available to a user for the duration of a single terminal session. Values written to it are retained even when the user exits a program.

Do not use SAP memory as a temporary storage area, since parallel sessions belonging to the same user all use the same memory area.

Only store data of the types C, N, D, and T, as well as structures that consist of these types, in the SAP Memory.

You can create new parameter IDs using the ABAP Workbench.

Parameter IDs may have a namespace prefix.

Example

DATA REPID like sy-repid VALUE 'RSPFPAR'.

SET PARAMETER ID 'RID' FIELD REPID.

Message was edited by: Manoj Gupta

Read only

Former Member
0 Likes
3,919
<b>Parameter Id</b>.

Parameter Id's are objects that are stored in SAP 
memory. By specifying a parameter id, a default value 
can automatically be provided so that when a screen is 
displayed it is already populated by that value. The 
parameter id entered in this field associates the data 
element with that parameter ID.

<b>Default Component Name</b>.

This field is used within BAPI's and can be used to 
assign a meaningful english (or german....) name to your 
data element.

<b>Change Document.</b>

If this field is checked, then should a table field that 
is typed as this data element change, changelog entries 
are generated. You are responsible for designing the change log object that handles these.

<b>Search Help.</b>

By using these fields, you can define a search help for 
use by your users when entering data. More about these 
later.

<b>Reward points and close the thread.</b>

Read only

RichHeilman
Developer Advocate
Developer Advocate
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
3,919

From ABAP Dictionary Help.

<i>

<b>Assign a parameter ID:</b> A field can be filled with default values from SAP memory using a parameter ID. A screen field is only filled automatically with the value stored under the parameter ID of the data element if this was explicitly permitted in the Screen Painter.

For example, if a user only has authorization for company code 001, this company code can be stored in memory under the corresponding parameter ID at the beginning of a transaction. Fields referring to the data element for the company code are then automatically filled with the value 001 in all subsequent screen templates. In this case, the corresponding parameter ID must be only entered in the data element for the company code.

<b>Assign a default component name:</b> You can store a proposal for the name of the table fields or structure components that refer to a data element. If possible, use an English-language default name. Always use this default name for components in BAPI structures (structures with a fixed interface). This results in a more unified assignment of field and component names.

</i>

http://help.sap.com/saphelp_470/helpdata/en/90/8d7307b1af11d194f600a0c929b3c3/frameset.htm

Regards,

Rich Heilman

Read only

Former Member
0 Likes
3,919

hi gopal,

the process to create a data element:

In the initial screen of the ABAP Dictionary, select object type Data type, enter the data element name and choose Create.

A dialog box appears.

Select the data element and choose .

The maintenance screen for data elements appears.

Enter an explanatory short text in the field Short text.

The short text appears as title in the F1 help for all the screen fields referring to this data element.

On the Data type tab page, define the data type, number of places and possibly the number of decimal places of the data element. You can define these attributes by specifying a domain or by direct type entry.

If the data element should have the type attributes of a domain, you only have to select Domain and enter the domain name in the corresponding field. You can also define a new domain and create it by navigating to the domain maintenance screen by double-clicking (see Creating Domains).

If you want to enter the type attributes directly, select Direct type entry. Entries are now possible in the fields Data type, Number of places and Decimal places.

If the data element should describe a reference type, choose Reference type and then Referenced type. Enter the name of the referenced type. This can be the name of a class or of an interface, a generic reference to ANY, OBJECT or DATA or a reference to a type defined in the Dictionary. If you want the reference type to be a predefined Dictionary type, select Reference to a predefined type. Enter the type, the number of places and possibly the decimal places.

On the Field label tab page you can maintain text information (short, medium, and long field labels and the title) for the data element.

You can use this text information in input templates to represent fields that refer to this data element.

Save the data element.

You are asked to assign the data element a development class.

Choose .

Result

The data element is activated. You can find information about the activation flow in the activation log, which you can display with Utilities ® Activation log. If errors occurred when activating the data element, the activation log is automatically displayed.

Other Options

Create documentation: With Documentation, create a text that describes the contents of the data element. This text is displayed for the F1 help in all screen fields that refer to this data element. You should therefore only leave out this step if the data element does not appear on a screen. In this case you should set the documentation status appropriately.

Assign a search help: You can assign the data element a search help. This search help is offered on all the screen fields referring to this data element when the input help (F4 help) is called (see Attaching Search Helps to Data Elements). To assign the search help, you must specify its Name in the data element maintenance screen and an export parameter of the search help in the Parameter field.

Assign a parameter ID: A field can be filled with default values from SAP memory using a parameter ID. A screen field is only filled automatically with the value stored under the parameter ID of the data element if this was explicitly permitted in the Screen Painter.

For example, if a user only has authorization for company code 001, this company code can be stored in memory under the corresponding parameter ID at the beginning of a transaction. Fields referring to the data element for the company code are then automatically filled with the value 001 in all subsequent screen templates. In this case, the corresponding parameter ID must be only entered in the data element for the company code.

Assign a default component name: You can store a proposal for the name of the table fields or structure components that refer to a data element. If possible, use an English-language default name. Always use this default name for components in BAPI structures (structures with a fixed interface). This results in a more unified assignment of field and component names.

Mark data element as relevant for change documents: The data of a business-oriented object is often distributed on several tables. To be able to trace changes to this business object, these tables can be combined in a Change document object. Function modules that can be integrated in the corresponding application programs and that log the changes are generated from such a change document object. Changed field contents are only logged if the Change document flag is set for the data element of the field.

reward if helpful.

regards,

keerthi.