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

SELECTION TABLE PASSING VALUES

Former Member
0 Likes
752

I want to pass multiple values with submit statuement. Here I m passing a selection table but I also want to pass one more value.

SUBMIT zxx_xxx USING SELECTION-SCREEN 0501

WITH S_CUST IN gt_customer_range

Is there anyother way to pass an addition value along with this selection table

.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
721

hi,

u can use like this

First declare with range iof like this it_rangemtart LIKE RANGE OF mara-mtart,

Then pass the values as shown below

*Material number

IF FL_MATNR IS NOT INITIAL AND FL_MATNR1 IS INITIAL.

CLEAR : wa_matnr,

it_rangematnr.

wa_matnr-sign = 'I'.

wa_matnr-option = 'EQ'.

wa_matnr-low = fl_matnr.

APPEND wa_matnr TO it_rangematnr.

ELSEIF fl_matnr IS NOT INITIAL AND

fl_matnr1 IS NOT INITIAL.

CLEAR : wa_matnr,

it_rangematnr.

wa_matnr-sign = 'I'.

wa_matnr-option = 'BT'.

wa_matnr-low = fl_matnr.

wa_matnr-high = fl_matnr1.

APPEND wa_matnr TO it_rangematnr.

ENDIF.

*Material decription

CLEAR : wa_maktx,

it_rangematkx.

wa_maktx-sign = 'I'.

wa_maktx-low = fl_makt1.

wa_maktx-high = fl_makt2.

IF fl_makt1 IS NOT INITIAL

AND fl_makt2 IS NOT INITIAL.

wa_maktx-option = 'BT'.

APPEND wa_maktx TO it_rangematkx.

ELSEIF fl_makt1 IS NOT INITIAL

AND fl_makt2 IS INITIAL.

wa_maktx-option = 'EQ'.

APPEND wa_maktx TO it_rangematkx.

ENDIF.

SUBMIT zlabmaterial

WITH s_mtart IN it_rangemtart

WITH s_matkl IN it_rangematkl

WITH s_matnr IN it_rangematnr

WITH s_maktx IN it_rangematkx

WITH p_print EQ fl_out

WITH p_copie EQ fl_copy

AND RETURN.

5 REPLIES 5
Read only

Former Member
0 Likes
721

Hi,

Yes you can pass. Just populate one more value, as you did it for one value.

Hope it helps you.

Kindly set to resolve if it helps you.

Regards

Abhii...

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
721

Hello,

Read this SAP [documentation|http://help.sap.com/saphelp_nw70/helpdata/EN/9f/dba51a35c111d1829f0000e829fbfe/content.htm], do an F1 on SUBMIT & solve your problem.

Good Luck,

Suhas

Read only

deepak_dhamat
Active Contributor
0 Likes
721

Hi ,

like this

SUBMIT zxx_xxx USING SELECTION-SCREEN 0501

WITH S_CUST IN gt_customer_range with s_ebeln = p_ord EXPORTING LIST TO MEMORY AND RETURN .

add one more with and paramenter

Regards

Deepak

Read only

former_member209217
Active Contributor
0 Likes
721

Yes you can append multiple values to S_CUST.

Just you can populate sign option,low,high parameters and append the same to s_cust.

Regards,

Lakshman.

Read only

Former Member
0 Likes
722

hi,

u can use like this

First declare with range iof like this it_rangemtart LIKE RANGE OF mara-mtart,

Then pass the values as shown below

*Material number

IF FL_MATNR IS NOT INITIAL AND FL_MATNR1 IS INITIAL.

CLEAR : wa_matnr,

it_rangematnr.

wa_matnr-sign = 'I'.

wa_matnr-option = 'EQ'.

wa_matnr-low = fl_matnr.

APPEND wa_matnr TO it_rangematnr.

ELSEIF fl_matnr IS NOT INITIAL AND

fl_matnr1 IS NOT INITIAL.

CLEAR : wa_matnr,

it_rangematnr.

wa_matnr-sign = 'I'.

wa_matnr-option = 'BT'.

wa_matnr-low = fl_matnr.

wa_matnr-high = fl_matnr1.

APPEND wa_matnr TO it_rangematnr.

ENDIF.

*Material decription

CLEAR : wa_maktx,

it_rangematkx.

wa_maktx-sign = 'I'.

wa_maktx-low = fl_makt1.

wa_maktx-high = fl_makt2.

IF fl_makt1 IS NOT INITIAL

AND fl_makt2 IS NOT INITIAL.

wa_maktx-option = 'BT'.

APPEND wa_maktx TO it_rangematkx.

ELSEIF fl_makt1 IS NOT INITIAL

AND fl_makt2 IS INITIAL.

wa_maktx-option = 'EQ'.

APPEND wa_maktx TO it_rangematkx.

ENDIF.

SUBMIT zlabmaterial

WITH s_mtart IN it_rangemtart

WITH s_matkl IN it_rangematkl

WITH s_matnr IN it_rangematnr

WITH s_maktx IN it_rangematkx

WITH p_print EQ fl_out

WITH p_copie EQ fl_copy

AND RETURN.