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 create range table from the excel file data

Former Member
0 Likes
2,146

Hi all,

I have a requirement like submitting the report program.

Scenario:

I have the data of werks and matnr in the internal table after uploading the file using gui_upload FM.

Now I want to pass the value of WERKS and MATNR to the selection screen of MD74 from the internal table. Code I have used is:

LOOP AT gt_file INTO gs_file.
SUBMIT rm60rr20 VIA SELECTION-SCREEN
WITH werks = gs_file-werks
WITH matnr = gs_file-matnr
WITH date1 = sy-datum
WITH testflag = ' '.
ENDLOOP.

But now the problem is I want to pass all the MATNR values of single werks at once. Can you please help how to pass the values of matnr from internal table as the select options of next screen at once for single plant.

1 ACCEPTED SOLUTION
Read only

TMSingh_SAP
Participant
1,972

Hi Sahana,

Check use of AT End of statemnet.

Sort the loop table based on matnr and wekrs.Please collect all matnr in range table of matnr and at the end of werks, u can call submit program for all matnr and a single werks(pls check syntax for SUBMIT).

Thanks,

Mohan

Hi all,

I have a requirement like submitting the report program.

Scenario:

I have the data of werks and matnr in the internal table after uploading the file using gui_upload FM.

Now I want to pass the value of WERKS and MATNR to the selection screen of MD74 from the internal table. Code I have used is:

LOOP AT gt_file INTO gs_file.
SUBMIT rm60rr20 VIA SELECTION-SCREEN
WITH werks = gs_file-werks
WITH matnr = gs_file-matnr
WITH date1 = sy-datum
WITH testflag = ' '.
ENDLOOP.

But now the problem is I want to pass all the MATNR values of single werks at once. Can you please help how to pass the values of matnr from internal table as the select options of next screen at once for single plant.

9 REPLIES 9
Read only

Muthu_raja
Active Participant
1,972

Hi Sahana,

The below thread might help you..

submit statement and populating select option

~MR

Read only

0 Likes
1,972

Thank you sir, I used same submit statement as u suggested

Read only

TMSingh_SAP
Participant
1,973

Hi Sahana,

Check use of AT End of statemnet.

Sort the loop table based on matnr and wekrs.Please collect all matnr in range table of matnr and at the end of werks, u can call submit program for all matnr and a single werks(pls check syntax for SUBMIT).

Thanks,

Mohan

Read only

0 Likes
1,972

Thank You Mohan sir. I used the same technique and it is working now.

Read only

0 Likes
1,972

What if I am calling transaction code, meanwhile should pass the input values, but it is Type M program?

Read only

matt
Active Contributor
1,972

If you're in 7.4 or above, don't use AT. Use GROUP BY.

Read only

0 Likes
1,972

okay, Thank you

Read only

0 Likes
1,972

Okay Thank you

Read only

0 Likes
1,972

Now I am supposed to pass all the records of plants and materials together with unique plant and material values. I tried using the syntax where two times selection table is used, kindly share your knowledge on how to pass all the unique plants and the corresponding materials using the submit statement.