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

Classical report

Former Member
0 Likes
480

Dear all,

input matnr & vkorg & kunnr .

i have an internal table content

matnr maktx kunnr value

1 a 10 20

1 a 20 30

1 a 30 40

1 a 40 50

2 b 10 15

at the maximum kunnr have 5 values only

i want to know how to design the output like below

matnr maktx kunnr1 value kunnr2 value kunnr3 value

10 20 30

1 a 20 30 40

2 b 10 15

<b>note : is it possible in alv also if so how.</b>

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
460

Hi Balaji ,

If this is the format in which you want the output , then you will have to create an internal table with the structure same as the output you want and then pass this to the ALV or print it in the classical report.

Do revert back in case of any further queries.

Regards

Arun

4 REPLIES 4
Read only

Former Member
0 Likes
461

Hi Balaji ,

If this is the format in which you want the output , then you will have to create an internal table with the structure same as the output you want and then pass this to the ALV or print it in the classical report.

Do revert back in case of any further queries.

Regards

Arun

Read only

Former Member
0 Likes
460

hi,

tell me exactly in which format u want the output..so that i can try ..

Read only

Former Member
0 Likes
460

Balaji,

Take one more final internal table which is having records like your structure.

at last move all the records to final internal table.

Pl.s mark if useful

Read only

Former Member
0 Likes
460

ITAB1[] = ITAB[].

SUPPOSE ITEMP CONTAINS THE FINAL DATA.

LOOP AT ITAB.

LOOP AT ITAB1 WHERE MATNR = ITAB-MATNR.

IF SY-TABIX = 1.

ITABTEMP-KUNNR1 = ITAB1-KUNNR.

ITABTEMP-VALUE1 = ITAB1-VALUE.

ELSEIF SY-TABIX = 2.

ITABTEMP-KUNNR1 = ITAB1-KUNNR.

ITABTEMP-VALUE1 = ITAB1-VALUE.

ELSEIF <UPTO SY-TABIX = 5>

ENDIF.

AT LAST.

APPEND ITABTEMP.

ENDAT.

ENDLOOP.

ENDLOOP.

REGARDS

SHIBA DUTTA