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

Multi Input in CALL TRANSACTION

Former Member
0 Likes
3,030

hi all,

i want to run sap standard program by using call transcation.

and i want to give multi input in set parameter field.

i used ranges but after run,,, output showing for all materials,

pls not me hw to give multi input in Call Transcation.

RANGES: l_matnr for mara-matnr.

parameters: p_matnr like mara-matnr,

p_werks like marc-werks.

data: i_mara LIKE mara occurs 0 with header line.

select * from mara

into CORRESPONDING fields of table i_mara

where bmatn = p_matnr.

loop at i_mara.

move i_mara-matnr to l_matnr-low.

l_matnr-sign = 'I'.

l_matnr-option = 'EQ'.

append l_matnr.

clear l_matnr.

endloop.

SET PARAMETER ID 'MAT' FIELD l_MATNR.

SET PARAMETER ID 'WRK' FIELD p_werks.

CALL TRANSACTION 'ME1M' AND SKIP FIRST SCREEN.

Commit work and wait.

Best Regards

USman

Edited by: Usman Sheriff on Nov 21, 2008 2:35 PM

hi all,

i want to run sap standard program by using call transcation.

and i want to give multi input in set parameter field.

i used ranges but after run,,, output showing for all materials,

pls not me hw to give multi input in Call Transcation.

RANGES: l_matnr for mara-matnr.

parameters: p_matnr like mara-matnr,

p_werks like marc-werks.

data: i_mara LIKE mara occurs 0 with header line.

select * from mara

into CORRESPONDING fields of table i_mara

where bmatn = p_matnr.

loop at i_mara.

move i_mara-matnr to l_matnr-low.

l_matnr-sign = 'I'.

l_matnr-option = 'EQ'.

append l_matnr.

clear l_matnr.

endloop.

SET PARAMETER ID 'MAT' FIELD l_MATNR.

SET PARAMETER ID 'WRK' FIELD p_werks.

CALL TRANSACTION 'ME1M' AND SKIP FIRST SCREEN.

Commit work and wait.

Best Regards

USman

Edited by: Usman Sheriff on Nov 21, 2008 2:35 PM

6 REPLIES 6
Read only

Former Member
0 Likes
1,562

HI,

you cannot set the range in parameter id instead you call the call transaction in loop itself.

RANGES: l_matnr for mara-matnr.

parameters: p_matnr like mara-matnr,

p_werks like marc-werks.

data: i_mara LIKE mara occurs 0 with header line.

select * from mara

into CORRESPONDING fields of table i_mara

where bmatn = p_matnr.

loop at i_mara.

move i_mara-matnr to l_matnr-low.

l_matnr-sign = 'I'.

l_matnr-option = 'EQ'.

SET PARAMETER ID 'MAT' FIELD l_MATNR.

SET PARAMETER ID 'WRK' FIELD l_werks.

CALL TRANSACTION 'ME1M' AND SKIP FIRST SCREEN.

append l_matnr.

clear l_matnr.

endloop.

Read only

Former Member
0 Likes
1,562

hi,

thanks for ur replay.

user need to get output at one time for all selected gven material not by one by one,

have any other option to get this by call trans.

Regards

usman

Read only

Former Member
0 Likes
1,562

hi,

thanks for ur replay.

user need to get output at one time for all selected gven material not by one by one,

have any other option to get this by call trans.

Regards

usman

Read only

Former Member
0 Likes
1,562

You can pass multiple values using SUBMIT statement. Refer to SAP help.

Eg: SUBMIT report1 USING SELECTION-SCREEN '1100'

WITH SELECTION-TABLE rspar_tab

WITH selcrit2 BETWEEN 'H' AND 'K'

WITH selcrit2 IN range_tab

AND RETURN.

Regards

Sam

Read only

Former Member
0 Likes
1,562

Hi.

Try the code:

RANGES: l_matnr for mara-matnr.

parameters: p_matnr like mara-matnr,

p_werks like marc-werks.

data: i_mara LIKE mara occurs 0 with header line.

select * from mara

into CORRESPONDING fields of table i_mara

where bmatn = p_matnr.

loop at i_mara.

move i_mara-matnr to l_matnr-low.

l_matnr-sign = 'I'.

l_matnr-option = 'EQ'.

append l_matnr.

clear l_matnr.

endloop.

*SET PARAMETER ID 'MAT' FIELD l_MATNR.

*SET PARAMETER ID 'WRK' FIELD p_werks.

*CALL TRANSACTION 'ME1M' AND SKIP FIRST SCREEN.

*modify ->

SUBMIT rm06im00 AND RETURN WITH if_matnr IN i_matnr

WITH i_werks eq p_werks.

Read only

Former Member
0 Likes
1,562

Hi Usman,

instead of calling the TRANSACTION.

get the program name and use SUBMIT PROGRAM here you can pass the ranges provide the input screen of the called program contains a select option.

regards

Ramchander Rao.k