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

alv

Former Member
0 Likes
326

need to write a report that will list customers and vendors using ALV. can someone help me out

2 REPLIES 2
Read only

Former Member
0 Likes
303

Hi,

Check this example to display the customer..For vendor you can use the table LFA1..

TYPE-POOLS: slis.

DATA: gt_fieldcat TYPE slis_t_fieldcat_alv.

DATA: BEGIN OF wa_kna1,

kunnr like kna1-kunnr,

name1 like kna1-name1,

END OF wa_kna1.

DATA: v_repid TYPE syrepid.

v_repid = sy-repid.

DATA it_kna1 LIKE STANDARD TABLE OF wa_kna1 WITH HEADER LINE.

SELECT * UP TO 100 ROWS

FROM kna1

INTO CORRESPONDING FIELDS OF TABLE it_kna1.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

i_program_name = v_repid

i_internal_tabname = 'WA_KNA1'

i_inclname = v_repid

CHANGING

ct_fieldcat = gt_fieldcat.

  • Pass the program.

v_repid = sy-repid.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

i_callback_program = v_repid

it_fieldcat = gt_fieldcat

TABLES

t_outtab = it_kna1.

THanks

Naren

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
303

With which part? The ALV part? or the retrieving of the customers/vendor data?

Regards,

Rich HEilman