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

Regarding SET PARAMETER ID and GET PARAMETER ID...

Former Member
0 Likes
1,356

Hello,

I am using SET PARAMETER ID in a custom check function module which gets invoked if invocie is postd.

DATA: v_event_belnr like RBKP-BELNR, " BELNR passed from event func.

v_event_GJAHR like RBKP-GJAHR.

SET PARAMETER ID 'RBN' FIELD V_EVENT_BELNR.

SET PARAMETER ID 'GJR' FIELD V_EVENT_GJAHR.

And then retirving the data using GET PARAMATER in the porgram which is submitted insisde function module.

GET PARAMETER ID 'RBN' FIELD V_EVENT_BELNR.

GET PARAMETER ID 'GJR' FIELD V_EVENT_GJAHR.

Do I need to free the data from the ID once the job is done ? If two invocie gets created simultanoruly, will this cause a problem because posting event during invocie posting will invoke same function module and the function module will try to SET parameter ID "RBN" and "GJR" for both of the invoices at same time ?

Regads,

Rajesh.

1 ACCEPTED SOLUTION
Read only

former_member194669
Active Contributor
0 Likes
876

> If two invocie gets created simultanoruly, will this cause a problem

Will not be a problem due to

SPA/GPA parameters are values that the system stores in the global, user-specific SAP memory. SAP memory allows you to pass values between programs. A user can access the values stored in the SAP memory during one terminal session for all parallel sessions.

As a best programming practice better to clear the memory

Hello,

I am using SET PARAMETER ID in a custom check function module which gets invoked if invocie is postd.

DATA: v_event_belnr like RBKP-BELNR, " BELNR passed from event func.

v_event_GJAHR like RBKP-GJAHR.

SET PARAMETER ID 'RBN' FIELD V_EVENT_BELNR.

SET PARAMETER ID 'GJR' FIELD V_EVENT_GJAHR.

And then retirving the data using GET PARAMATER in the porgram which is submitted insisde function module.

GET PARAMETER ID 'RBN' FIELD V_EVENT_BELNR.

GET PARAMETER ID 'GJR' FIELD V_EVENT_GJAHR.

Do I need to free the data from the ID once the job is done ? If two invocie gets created simultanoruly, will this cause a problem because posting event during invocie posting will invoke same function module and the function module will try to SET parameter ID "RBN" and "GJR" for both of the invoices at same time ?

Regads,

Rajesh.

3 REPLIES 3
Read only

former_member194669
Active Contributor
0 Likes
877

> If two invocie gets created simultanoruly, will this cause a problem

Will not be a problem due to

SPA/GPA parameters are values that the system stores in the global, user-specific SAP memory. SAP memory allows you to pass values between programs. A user can access the values stored in the SAP memory during one terminal session for all parallel sessions.

As a best programming practice better to clear the memory

Read only

0 Likes
876

Hi

Remember u can try to use the IMPORT/EXPORT stataments in order to use the ABAP memory instead of SAP memory.

Max

Read only

Former Member
0 Likes
876

Hi,

Follow the Standard Coding Pratices and clear any variable/memory Var, once it is used.