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 on ALV grid with container

Former Member
0 Likes
1,539

Hi,

I need to SET PARAMETER ID to acess the transaction CJ40, in an ALV grid program with screen container for the ALV.

I'm using a method handle_double_click to select a line and pass the value to the parameter ID like this:

METHOD handle_double_click.

DATA: l_project TYPE prps-pspnr.

READ TABLE it_out INDEX e_row-index INTO wa_out.

CHECK sy-subrc = 0.

WRITE wa_out-pspnr TO l_project.

SET PARAMETER ID 'PRD' FIELD l_project.

CALL TRANSACTION 'CJ40' AND SKIP FIRST SCREEN.

CLEAR wa_out-pspnr.

ENDMETHOD. "handle_double_click

But this doesn't work. No value at all is passed to the transaction.

What is missing?

Thanks in advance,

Rui

1 ACCEPTED SOLUTION
Read only

naimesh_patel
Active Contributor
0 Likes
858

Parameter ID PSP is attached to the Project Definition field.


SET PARAMETER ID 'PSP' FIELD l_project.
CALL TRANSACTION 'CJ40' AND SKIP FIRST SCREEN.

Regards,

Naimesh Patel

Hi,

I need to SET PARAMETER ID to acess the transaction CJ40, in an ALV grid program with screen container for the ALV.

I'm using a method handle_double_click to select a line and pass the value to the parameter ID like this:

METHOD handle_double_click.

DATA: l_project TYPE prps-pspnr.

READ TABLE it_out INDEX e_row-index INTO wa_out.

CHECK sy-subrc = 0.

WRITE wa_out-pspnr TO l_project.

SET PARAMETER ID 'PRD' FIELD l_project.

CALL TRANSACTION 'CJ40' AND SKIP FIRST SCREEN.

CLEAR wa_out-pspnr.

ENDMETHOD. "handle_double_click

But this doesn't work. No value at all is passed to the transaction.

What is missing?

Thanks in advance,

Rui

2 REPLIES 2
Read only

naimesh_patel
Active Contributor
0 Likes
859

Parameter ID PSP is attached to the Project Definition field.


SET PARAMETER ID 'PSP' FIELD l_project.
CALL TRANSACTION 'CJ40' AND SKIP FIRST SCREEN.

Regards,

Naimesh Patel

Read only

0 Likes
858

It´s working!!

Thanks Naimesh Patel.

Best regards,

Rui