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

logic needed

Former Member
0 Likes
648

i have report where in the selection screen i have one parameter for plant and one select-option for material..I am fetching data depending upon this plant/material combination...

Say I run the report for Gb20. The system finds 1204 Plant/Material combinations for Gb20. Instead of submitting 1 job for 1204 combinations, I would like the system to submit 5 jobs for 1204/5 combinations each. i need the logic to devide the records based on Plant/Material combinations.

6 REPLIES 6
Read only

Former Member
0 Likes
608

please give some more details

Read only

0 Likes
608

hi,

i have an internal table i_marc where i have to device the records fetched into parts based on plant/material combination..

for plant GB20 and MATERIAL A i will have a set of data into one part.

for plant GB20 and MATERIAL B i will have a set of data into one part.

and so on..

how to do this?

Read only

Former Member
0 Likes
608

I hope what you meant to say is based on material and plant selection, records should be processed for some other purpose. What is that ? On selected records you wanted to loop for 5 times. Am i right? So where is the problem? Just explain clearly.

Rama C

Read only

Former Member
0 Likes
608

Hi,

If I have usnderstood you need a internal table lt_marc with the fields matnr and werks.

And you have to replace your parameter werks to a select-options werks.

In the code you need the select :

select matnr werks from marc

into table t_marc

where werks in so_werks

and matnr in so_matnr.

If you need to show only one field for werks, you can declare your select-options using no intervals and no extensions.

Regards,

Fernando

Read only

0 Likes
608

my question was not that..in i_marc i have some records based on matnr and plant..now i have to devide those records based on plant/material combination....and then i have to do parallel processing on those records

Edited by: rakhi bose on May 22, 2008 5:55 AM

Read only

0 Likes
608

HI Rakhi Bose,

If I have understood ur problem correctly... the solution is as below

Here you require to use the internal table EVENTS.

sort the internal table by plant and material...

loop at internal table into workarea.

*define a temporary internal table for getting the part of records.

append the workarea to internaltable2.

on change of material.

  • do what u want to do.

endon.

endloop.

This is one solution to decive the records into parts.

This is as per my understanding ..

Regards,

Sreenivasulu Nallani.