A 调用标准事务码
*&---------------------------------------------------------------------*
*& Report ZLXF24
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT zlxf24.
TABLES : ekko .
DATA: BEGIN OF gs_out,
ebeln LIKE ekpo-ebeln,
matnr LIKE ekpo-matnr,
END OF gs_out .
DATA: gt_out LIKE TABLE OF gs_out .
DATA: gt_fieldcat TYPE TABLE OF slis_fieldcat_alv.
DATA: gs_fieldcat TYPE slis_fieldcat_alv.
DATA: gs_layout TYPE slis_layout_alv .
SELECT-OPTIONS : s_ebeln FOR ekko-ebeln .
SELECT ebeln matnr
INTO TABLE gt_out
FROM ekpo
WHERE ebeln IN s_ebeln .
DEFINE append_field.
gs_fieldcat-fieldname = &1.
gs_fieldcat-seltext_l = &2.
APPEND gs_fieldcat TO gt_fieldcat.
CLEAR: gs_fieldcat.
END-OF-D