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

Looping At NEW

Former Member
0 Likes
583

Dear experts,

i have two internal tables

table 1

PONo    Matnr    

00001    xyz

00002    xyz

00003    abc

table 2

PONumber     PRNUMB       Matnr

00001              100001        XYZ

00001              100002        XYZ

00001              100003        abc

00002              555555        XYZ

00003              888888        abc

I have one final table and i need to fill that final table as below

PO       Matnr    PRNO

00001    xyz      100001

                         100002

             abc       100003

00002    xyz        555555

00003    abc        888888

please give me some idea how to fill this final table . with the help of above two tables

Moderator message : Requirement dumping not allowed, show the work you have already done, discussion locked.

Message was edited by: Vinod Kumar

Dear experts,

i have two internal tables

table 1

PONo    Matnr    

00001    xyz

00002    xyz

00003    abc

table 2

PONumber     PRNUMB       Matnr

00001              100001        XYZ

00001              100002        XYZ

00001              100003        abc

00002              555555        XYZ

00003              888888        abc

I have one final table and i need to fill that final table as below

PO       Matnr    PRNO

00001    xyz      100001

                         100002

             abc       100003

00002    xyz        555555

00003    abc        888888

please give me some idea how to fill this final table . with the help of above two tables

Moderator message : Requirement dumping not allowed, show the work you have already done, discussion locked.

Message was edited by: Vinod Kumar

2 REPLIES 2
Read only

0 Likes
500

Hi,

     You already have the data in your second internal table. Sort that internal table by three fields.

Thanks,

Sridhar S.

Read only

Former Member
0 Likes
500

Hi..

Check the following example.

AT NEW.*If a group of lines of a particular column have same value, it can be displayed at the beginning only once using the control level statement

At New <column name>.

The columns to the left of <column name> are also considered by the 'At New' condition.

Say internal table contents are as follows:

Carrid              connid

AA                  0017                385                  349

AA                  0017                386                  432

AB                   0017                345                 254

AB                  0016                243                  423

"At New Connid."    Works as follows:

Carrid              connid

   AA                  0017             

                                               385                  349

                                               386                 432

   AB                   0017             345                 254

   AB                   0016             243                  423  

Ex:

           

  -->The output is displayed as follows:

 

 

Thanks

Sravanthi