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

Reg. ABAP program

Former Member
0 Likes
273

Go to se38.

The program is just a example...

tables: qamr.

data: prueflos, mittelwert, pruefbemkt.

select querry....

O/p will come:

For ex:

prueflos PRUEFBEMKT MITTELWERT

40000000764 R 9.2

40000000764 Y 7.5

40000000764 B 4.8

40000000764 Y 3.4

40000000764 R 9.0

Now I want it in this format....

PRUEFBEMKT

prueflos R Y B K

40000000764 9.2 - - -

40000000764 - 7.5 - -

40000000764 - - 4.8 -

40000000764 - 3.4 - -

40000000764 9.0 - - -

Can anyone help me in this.....

1 REPLY 1
Read only

Former Member
0 Likes
247

Hi Varun,

Just go through the following code :

       loop at itab.
         write : /(5) itab-prueflos.
         case itab-PRUEFBEMKT.
           when 'R'.
             write : (15) itab-MITTELWERT, (20) '-', (25) '-', (30) '-'.
           when 'Y'.
             write : (15) '-', (20) itab-MITTELWERT, (25) '-', (30) '-'.
           when 'B'.
             write : (15) '-', (20) '-', (25) itab-MITTELWERT, (30) '-'.
           when 'K'.
             write : (15) '-', (20) '-', (25) '-', (30) itab-MITTELWERT.
         endcase.
       endloop.

Here,

itab

is the internal table which contains all the data.

Hope this is of some help to you.

Regards

Anil Madhavan

Regards

Anil Madhavan