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 id not working

Former Member
0 Likes
3,079

Hi,

I am calling a Transaction from an ALV REPORT ,i wanted to set the material number in that transaction, i checked using f1 help and found the parameter id as 'MAT' .

But when i am calling the transaction,the material number is not being displayed,is there any other way to set the material no on the transaction....

My code:

READ TABLE alv_stb INDEX i_selfield-tabindex.

IF sy-subrc = 0.

SET PARAMETER ID 'MAT' FIELD alv_stb-idnrk.

CALL TRANSACTION 'TCODE' .

ENDIF.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,342

Hi,

The code written is OK and fine. You can see below some sample code:

SET PARAMETER ID 'AGN' FIELD lv_vbeln.

CALL TRANSACTION 'VA23' AND SKIP FIRST SCREEN.

may be try adding the AND SKIP FIRST SCREEN and test it. This should work.

Regards,

JLN

4 REPLIES 4
Read only

Former Member
0 Likes
1,342

Hi,

This can happen when the set and get parameter options of that std screen is not selected.........

check the program name of ur TCODE(use se93) if its a report(starts with R) u can use SUBMIT statement along with parameters and select-options...........

submit RV13A004 WITH SELECTION-TABLE rspar

Effect

If you specify this addition, parameters and selection criteria on the selection screen are supplied from an internal table rspar. You must specify an internal table with the row type RSPARAMS for rspar. The structured data type RSPARAMS is defined in the ABAP Dictionary and has the following components, all of which are data type CHAR:

SELNAME (length 8),

KIND (length 1),

SIGN (length 1),

OPTION (length 2),

LOW (length 45),

HIGH (length 45).

To supply parameters and selection criteria for the selection screen with specific values, the lines in the internal table rspar must contain the following values:

SELNAME must contain the name of a parameter or selection criterion for the selection screen in block capitals

KIND must contain the type of selection screen component (P for parameters, S for selection criteria)

SIGN, OPTION, LOW, and HIGH must contain the values specified for the selection table columns that have the same names as the selection criteria; in the case of parameters, the value must be specified in LOW and all other components are ignored.

If the name of a selection criterion is repeated in rspar, this defines a selection table containing several lines and passes it on to the selection criterion. If parameter names occur several times, the last value is passed on to the parameter.

The contents of the parameters or selection tables for the current program can be entered in the table by the function module RS_REFRESH_FROM_SELECTOPTIONS.

Notes

In contrast to selection tables, the data types of the components LOW and HIGH in table rspar are always of type CHAR and are converted to the type of the parameter or selection criterion during transfer, if necessary.

When entering values, you must ensure that these are entered in the internal format of the ABAP values, and not in the output format of the screen display.

Cheers,

Will.

Read only

Former Member
0 Likes
1,343

Hi,

The code written is OK and fine. You can see below some sample code:

SET PARAMETER ID 'AGN' FIELD lv_vbeln.

CALL TRANSACTION 'VA23' AND SKIP FIRST SCREEN.

may be try adding the AND SKIP FIRST SCREEN and test it. This should work.

Regards,

JLN

Read only

Former Member
0 Likes
1,342

Hi

Have you check field alv_stb-idnrk for values?

Check if it is having value or not

Regards

Shiva

Read only

Former Member
0 Likes
1,342

Hi,

If you are using MM03 tr.code, then your code is correct.

i.e., the parameter id you have used is correct. If you are using some other TR.code then recheck ur parameter id.

Let us know which Transaction code u r using?