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

how to pass value to select-option parameter using SET PARAMETER Command

Former Member
0 Likes
4,356

Hi,

Am passing values to selection-screen fields in report RV13A004 ( used in VK11, VK12 and VK13). using below statement but material number is select-option in this report. am able to pass MATERIAL FROM using SET PARAMETER ID, can i know how to pass values MATERIAL TO range in select-options fields using SET PARAMETER Command ??

  • Passing values to parameter id

set parameter id 'VKS' field kschl.

set parameter id 'VKO' field vkorg.

set parameter id 'VTW' field vtweg.

set parameter id 'KDA' field erdat.

set parameter id 'MAT' field matnr_from.

  • Change condition price.

call transaction 'VK12' and skip first screen.

Thanks in advance.

Regards,

Balamurugan.

10 REPLIES 10
Read only

Former Member
0 Likes
2,265

Hi,

instead of using set parameters and dden call transaction use this..........

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

0 Likes
2,265

Hi Will,

Thanks for your prompt response. IF you execute the report RV13A004 in se38, u will not get any output. if you are using VK11, VK12, VK13, this report will be called, then if you execute , you will get ouput as ' list of material condition price ' in table control.

i tried submit, it doesn't shows output of the report.

Thanks,

Balamurugan.

Read only

0 Likes
2,265

Hi,

did u try like dis.

data ztab type table of RSPARAMS with header line.

ztab-SELNAME = 'F001'.

ztab-KIND = 'P'.

ztab-LOW = '20'.

append ztab.

ztab-SELNAME = 'F002'.

ztab-KIND = 'P'.

ztab-LOW = '0000020'.

append ztab.

ztab-SELNAME = 'F003'.

ztab-KIND = 'S'.

ztab-SIGN = 'I'.

ztab-OPTION = 'BT'.

ztab-LOW = '100000000000000001'.

ztab-HIGH = '100000000000000010'.

append ztab.

ztab-SELNAME = 'SEL_DATE'.

ztab-KIND = 'P'.

ztab-LOW = '20071012'.

append ztab.

submit RV13A004 WITH SELECTION-TABLE ztab.

Read only

0 Likes
2,265

what s de condition type ull give?

Read only

0 Likes
2,265

Hi Will,

I tried with some logic, but it passing values to report, am not getting any output.

Can you execute the report in SE38, you will not any output.

try once.

Samething is happening during SUBMIT report, we are not getting any output . But if you execute report from VK11, VK12 and VK13, you will get output..

Because of this reason, am using SET PARAMETER logic. but am unable pass value to MATERIAL TO range.

i want to pass value to MATNR TO value.

Regards,

Balamurugan.

Read only

0 Likes
2,265

what s de condition type?

bcoz the report called changes with cond type........

dats y v r getting no data when executed in SE38.

Edited by: Will smith on Jan 21, 2008 5:46 AM

Read only

0 Likes
2,265

Hi Will,

Am using custom condition type ZPR5.

Could you please tell, how to pass value to select-option TO RANGE field value by using SET PARAMETER.

Regards,

Balamurugan.

Read only

0 Likes
2,265

hi,

after entering ur Condtype type /h and enter ........in debugging mode place a break-point for submit syntax........

and execute....

itll stop at submit (repot name)

now u got de report name for dat cond type....

now in ur report

submit rp name with sel..........as discussed above....

u can see dat in std sap dey r using submit and not call transaction.....................

Read only

Former Member
0 Likes
2,265

Hi,

Your Question is not very clear.As per my understanding you wnat to pass material numbers

whcih are in select option and you are trying to pass low value only(matnr_from)

If i am correct do like below

1. set parameter id 'MAT' field s_matnr-low.

call transaction 'VK12' and skip first screen.

2. If you want one by one matnr.

set parameter id 'VKS' field kschl.

set parameter id 'VKO' field vkorg.

set parameter id 'VTW' field vtweg.

set parameter id 'KDA' field erdat.

LOOP AT s_matnr-low.

call transaction 'VK12' and skip first screen.

ENDLOOP.

Don't forget to reward if useful.....

Read only

Former Member
0 Likes
2,265

Try to pass data using CALL transaction...using bdcdata... statement with BDC for 1st screen only.

Filling the select option with values can be complex.

Execute it in E mode. Logically it should stop after the 1st screen. Not tried yet. But this can be an option.