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

SET Parameter not working

Former Member
0 Likes
1,684

Hi Experts,

I am stuck with a problem.

I have created two Z transactions using the same screen.

Now, I am using the Field MARA-MATNR on my screen as an input field in both the transactions. The MARA-MATNR has parameter ID 'MAT' associated with it by default.

Now,in my first transaction, I have created in my toolbar a button having function type as 'Exit command'.

When I click on that button I move on to the second Z transaction created by me.

The problem here is that the Parameter that must have been set for Material entered on the first screen, doesnt gets passed to my second transaction.

What might be the reason for it.

Helpful answers will be surely rewarded.

Regards,

Himanshu

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,319

When using LEAVE TO TRANSACTION, the current call sequence is exited completely. .

When calling the transaction, the ABAP program to which the transaction code is linked is loaded into a new internal session. All previous internal sessions are deleted from the stack. At the same time, the ABAP memory is deleted, which means that <b>EXPORT FROM MEMORY or IMPORT TO MEMORY do not transfer data when using LEAVE TO TRANSACTION.</b>

and also SET/GET PARAMETERS

So Use CALL TRANSACTION instead

8 REPLIES 8
Read only

Former Member
0 Likes
1,319

Hi Himanshu,

Did you use SET in first and GET param in the second screen..

If so It should work properly..

Please tell exactly where r u getting a problem..

regards,

nazeer

Read only

0 Likes
1,319

Hi Nazeer,

I am using a single screen with two transactions associated with it.

Each transaction shows some of the fields on the screen.

MARA-MATNR is a common input field being used by both the transactions.

Now, if the Parameter gets set in the first transaction, it shud definitely be displayed in the second transaction.

Here I wud like to tell that I am using LEAVE TO TRANSACTION 'XYZ' to switch between the transactions.

Hope I am able to clarify my problem.

Regards,

Himanshu

Read only

former_member632991
Active Contributor
0 Likes
1,319

Hi,

U have to set the parameter id in the program ,it has default id 'MAT' but write the code for it.

Set parameter id 'MAT' field l_matnr.

Regards,

Sonika

Read only

0 Likes
1,319

Hi Sonika, I have done that already.

Regards,

Himanshu

Read only

0 Likes
1,319

Is ur problem solved??

Read only

Former Member
0 Likes
1,319

<b>have you attached the function type 'E' with pushbutton attached with 'exit command'??</b>

Read only

Former Member
0 Likes
1,320

When using LEAVE TO TRANSACTION, the current call sequence is exited completely. .

When calling the transaction, the ABAP program to which the transaction code is linked is loaded into a new internal session. All previous internal sessions are deleted from the stack. At the same time, the ABAP memory is deleted, which means that <b>EXPORT FROM MEMORY or IMPORT TO MEMORY do not transfer data when using LEAVE TO TRANSACTION.</b>

and also SET/GET PARAMETERS

So Use CALL TRANSACTION instead

Read only

Former Member
0 Likes
1,319

Hi All,

Thanks a lot for ur replies.

Actually it was a basic mistake that I made.

I forgot to check the SET parameter and GET parameter checkboxes on my screens.

By this means u need not write even a single SET/GET parameter statement in ur code.

A very basic and silly mistake. hehehe.

Anyways thanks a lot 4 ur time.

Regards,

Himanshu