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

Show same field two times using a single internal table

former_member308418
Participant
0 Likes
933

Hi Gurus,

Good day,

I am preparing an ALV report. In this I need to show both customer & vendor information for same company code (ex: 0001).

Both customer name and vendor names field is NAME1 but tables are different.

DATA : BEGIN OF IT_FINAL OCCURS 0,

BUKRS TYPE BSEG-BUKRS,

LIFNR TYPE LFA1-LIFNR,

NAME1 TYPE LFA1-NAME1,

HKONT TYPE BSEG-HKONT,

BELNR TYPE BSEG-BELNR,

BUDAT TYPE BSAK-BUDAT,

DMBTR TYPE BSEG-DMBTR,

WAERS TYPE BKPF-WAERS,

KUNNR TYPE KNA1-KUNNR,

NAME2 TYPE KNA1-NAME1,

BUKRS1 TYPE BSEG-BUKRS,

HKONT1 TYPE BSEG-HKONT,

BELNR1 TYPE BSEG-BELNR,

BUDAT1 TYPE BSAK-BUDAT,

DMBTR1 TYPE BSEG-DMBTR,

WAERS1 TYPE BKPF-WAERS,

END OF IT_FINAL.

When vendors data are showing in the report, customer data are not coming.

Please tell me how can I do this.

Thanks,

Tripod.

5 REPLIES 5
Read only

faisalatsap
Active Contributor
0 Likes
892

Hi, Tripod

are you talking about the Select Query Please be more clear with your Question.

Best Regards,

Faisal

Read only

0 Likes
892

Hi,

Tell me is it possible to use same fields for both customer and vendor in same ALV report in the same grid?

If possible then how.

Thanks,

Tripod.

Read only

0 Likes
892

Yes it is possible.

In your case, if its not coming then wee need to look at the way u r populating ur final internal table.

So please explain the process u hv followed so that we may help u further.

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
892

Just declare two fields in internal table say NAME1(customer), NAME2(Vendor).

Refer both to the dictionary types.

While selecting the query use aliases like

select name1 from kna1

select name1 as name2 from lfa1.

Hope you got it.

Read only

former_member308418
Participant
0 Likes
892

Hi All,

Thanks a lot. My problem has been solved.