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: 

hi regarding set parameter

Former Member
0 Kudos

hi all

HEN 'KUNAG'.

SELECT SINGLE vkorg vtweg spart

INTO (vbak-vkorg, vbak-vtweg, vbak-spart)

FROM vbak

WHERE vbeln EQ itb_table_alv-vbelv.

IF sy-subrc NE 0.

CLEAR vbak.

ENDIF.

SET PARAMETER ID 'BUK' FIELD space.

SET PARAMETER ID 'VKO' FIELD vbak-vkorg.

SET PARAMETER ID 'VTW' FIELD vbak-vtweg.

SET PARAMETER ID 'SPA' FIELD vbak-spart.

SET PARAMETER ID 'KUN' FIELD itb_table_alv-kunag.

CALL TRANSACTION 'XD03' AND SKIP FIRST SCREEN.

what is the use of SET PARAMETER ID HERE what it does ?

use of SET PARAMETER ID NORMALLY..

THANKS FOR ALL IN ADVANCE

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

It is the Memory ID see the memory concepts for this

SAP memory is a memory area to which all main sessions within a SAPgui have access. You can use SAP memory either to pass data from one program to another within a session, or to pass data from one session to another. Application programs that use SAP memory must do so using SPA/GPA parameters (also known as SET/GET parameters). These parameters can be set either for a particular user or for a particular program using the SET PARAMETER statement. Other ABAP programs can then retrieve the set parameters using the GET PARAMETER statement. The most frequent use of SPA/GPA parameters is to fill input fields on screens

SAP global memory retains field value through out session.

set parameter id 'MAT' field v_matnr.

get parameter id 'MAT' field v_matnr.

They are stored in table TPARA.

ABAP memory is a memory area that all ABAP programs within the same internal session can access using the EXPORT and IMPORT statements. Data within this area remains intact during a whole sequence of program calls. To pass data

to a program which you are calling, the data needs to be placed in ABAP memory before the call is made. The internal session of the called program then replaces that of the calling program. The program called can then read from the ABAP memory. If control is then returned to the program which made the initial call, the same process operates in reverse.

ABAP memory is temporary and values are retained in same LUW.

export itab to memory id 'TEST'.

import itab from memory Id 'TEST'.

Here itab should be declared of same type and length.

http://www.sap-img.com/abap/difference-between-sap-and-abap-memory.htm

ABAP Memmory & SAP Memmory

http://www.sap-img.com/abap/difference-between-sap-and-abap-memory.htm

http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm

Regards

Anji

7 REPLIES 7

Former Member
0 Kudos

Hi

It is the Memory ID see the memory concepts for this

SAP memory is a memory area to which all main sessions within a SAPgui have access. You can use SAP memory either to pass data from one program to another within a session, or to pass data from one session to another. Application programs that use SAP memory must do so using SPA/GPA parameters (also known as SET/GET parameters). These parameters can be set either for a particular user or for a particular program using the SET PARAMETER statement. Other ABAP programs can then retrieve the set parameters using the GET PARAMETER statement. The most frequent use of SPA/GPA parameters is to fill input fields on screens

SAP global memory retains field value through out session.

set parameter id 'MAT' field v_matnr.

get parameter id 'MAT' field v_matnr.

They are stored in table TPARA.

ABAP memory is a memory area that all ABAP programs within the same internal session can access using the EXPORT and IMPORT statements. Data within this area remains intact during a whole sequence of program calls. To pass data

to a program which you are calling, the data needs to be placed in ABAP memory before the call is made. The internal session of the called program then replaces that of the calling program. The program called can then read from the ABAP memory. If control is then returned to the program which made the initial call, the same process operates in reverse.

ABAP memory is temporary and values are retained in same LUW.

export itab to memory id 'TEST'.

import itab from memory Id 'TEST'.

Here itab should be declared of same type and length.

http://www.sap-img.com/abap/difference-between-sap-and-abap-memory.htm

ABAP Memmory & SAP Memmory

http://www.sap-img.com/abap/difference-between-sap-and-abap-memory.htm

http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm

Regards

Anji

Former Member
0 Kudos

Hi,

SET paramater ID generally stores the values in global memory that is Sap memory not ABAP Memory, so that when we want back we can get back by get parameter id.

Assign points if useful.

former_member404244
Active Contributor
0 Kudos

Hi,

check the below link..

http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9e0435c111d1829f0000e829fbfe/content.htm

Reward if helpful.

Regards,

Nagaraj

Former Member
0 Kudos

Hi,

1. SAP memory is for cross-transaction Applications and ABAP/4 memory is transaction-specific.

2. The SAP memory, otherwise known as the global memory, is available to a user during the entire duration of a terminal session. Its contents are retained across transaction boundaries as well as external and internal sessions. The contents of the ABAP/4 memory are retained only during the lifetime of an external session. You can retain or pass data across internal sessions.

3. The SET PARAMETER and GET PARAMETER statements allow you to write to, or read from, the SAP memory. The EXPORT TO MEMORY and IMPORT FROM MEMORY statements allow you to write data to, or read data from, the ABAP memory.

External session: - when user logs on to R/3 system, the system creates a new terminal session called external session. E.g. System  Create Session.

Internal session: - created by calling a transaction (with CALL TRANSACTION), a dialog module (with CALL DIALOG) or a report (with SUBMIT or RETURN).

For External Sessions, Internal Sessions are available.

SAP Memory is a global memory area which all sessions within a

SAPgui have access to. This allows for passing data between

sessions. The SET PARAMETER ID and GET PARAMETER ID statements are

used to manipulate the SAP Memory.

SET PARAMETER ID 'MAT' field p_matnr.

GET PARAMETER ID 'MAT' field p_matnr.

hide -


to hide a field or a work area or even a internal table in a buffer area. hide statement simply hides the given. hide is generally useful in interactive reports as when u click on particular field based on that filed the next list is displayed for you. in such cases we go for hide.

get cursor----


this command also useful in interactive reports only. get cursor field is used for getting the value of field where the user has clicked. by using this field we can get the value and based on that value and by using hide statement we can display the relevant list for the user.

its also used for setting the focus on particular field in a list .

check these links,

http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9e0435c111d1829f0000e829fbfe/content.htm

http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9e0435c111d1829f0000e829fbfe/content.htm

http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/set_para.htm

Thanks,

Reward If Helpful.

paruchuri_nagesh
Active Contributor
0 Kudos

hi

SPA/GPA parameters

The SAP Memory is a user-specific memory area of the current application server, which is accessed by all main sessions of a user session at once. ABAP programs have access to SPA/GPA parameters stored in the SAP Memory (also called SET/GET parameters).

Each SPA/GPA parameter is identified by an ID of up to 20 characters. SPA/GPA parameters can either be created explicitly using the statement SET PARAMETER, or implicitly in a PAI event. They are then available to any programs and any sessions throughout the whole duration of a user session. SPA/GPA parameters are evaluated by the ABAP runtime environment. In ABAP programs, the parameters can be read using the statement GET PARAMETER.

One example of a program that uses SPA/GPA parameters is user maintenance (transaction SU01). In this transaction, on the Parameters tab page, you can enter user-specific parameters, which are then set when the user logs on to the ABAP-based SAP system, and are evaluated by other programs.

reward if u find use ful

regards

Nagesh.Paruchuri

former_member200338
Active Contributor
0 Kudos

Hi,

There may be situations where you want to goto an transction from a report and display the details to the user. for example, your report displays list of sales order which has been created today. Now when you click on each sales order, you need to display the content of the sales order.

if you goto first screen of any SAP transcation, the keyfield will always be assigned with the paramerter id. This assignment will be done at the data element level.

Once you assign the value to this parameter id, SAP will take value from this memory id into the field.

To assign the value to the field, u use the statment

SET PARAMETER ID .

Hope you understand.

Reward pints for usefull answer

Regards,

Niyaz