Application Development 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: 

ALV report

Former Member
0 Kudos

Hi.....

I have a requirement ...

where i need to generate an ALV report and upon the selection of the particular PO or Material number or vendor number I need to go for the particular transaction of the number in display mode.

and I wanna know how this can be done in an ALV report.

I know that it has to be done by using events.

If anyone have code for this please send me at

vamshi.sreerangam@gmail.com

or send me the hint where to write the code in the report

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Check this sample report..By double clicking on the report will take you to the ME23N transaction for that Po..


TYPE-POOLS: slis.

DATA: gt_fieldcat TYPE slis_t_fieldcat_alv.
DATA: BEGIN OF wa_ekko,
ebeln like ekko-ebeln,
ekorg like ekko-ekorg,
ekgrp like ekko-ekgrp,
END OF wa_ekko.

DATA: v_repid TYPE syrepid.
v_repid = sy-repid.

DATA it_ekko LIKE STANDARD TABLE OF wa_ekko WITH HEADER LINE.

SELECT * UP TO 100 ROWS
FROM ekko
INTO CORRESPONDING FIELDS OF TABLE it_ekko.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
     EXPORTING
          i_program_name     = v_repid
          i_internal_tabname = 'WA_EKKO'
          i_inclname         = v_repid
     CHANGING
          ct_fieldcat        = gt_fieldcat.


* have hotspot for a PO.
DATA: s_fieldcat LIKE LINE OF gt_fieldcat.
s_fieldcat-hotspot = 'X'.

MODIFY gt_fieldcat FROM s_fieldcat TRANSPORTING hotspot
       WHERE fieldname = 'EBELN'.

* Pass the program.
v_repid = sy-repid.


CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
     EXPORTING
          i_callback_program      = v_repid
          it_fieldcat             = gt_fieldcat
          i_callback_user_command = 'USER_COMMAND'
     TABLES
          t_outtab                = it_ekko.


*---------------------------------------------------------------------*
*       FORM display_detail                                           *
*---------------------------------------------------------------------*
*       ........                                                      *
*---------------------------------------------------------------------*
*  -->  UCOMM                                                         *
*  -->  SELFIELD                                                      *
*---------------------------------------------------------------------*
FORM user_command USING ucomm LIKE sy-ucomm
selfield TYPE slis_selfield.

  IF ucomm = '&IC1' AND selfield-fieldname = 'EBELN'.

    READ TABLE it_ekko INDEX selfield-tabindex.

    IF sy-subrc = 0.
      SET PARAMETER ID 'BES' FIELD it_ekko-ebeln.
      CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
    ENDIF.

  ENDIF.

ENDFORM.

Thanks

Naren

7 REPLIES 7

Former Member
0 Kudos

Hi,

as you know this is done by events. when you click on a PO or Material no. or vendor no. you have to call that transaction in display mode.

use this code. This code should be written after the alv is dispalyed and dont forget to pass the parameter

i_callback_user_command = 'USER_COMMAND'

like this.

<b>form user_command using ucomm like sy-ucomm

rs_selfield type slis_selfield.

read table it_output index rs_selfield-tabindex.

if rs_selfield-fieldname = 'SOQTY'.

set parameter id 'AUN' field it_output-kdauf.

call transaction 'VA03' and skip first screen.

endif.</b>

<i>Reward points, if useful.</i>

Regards,

Dhanunjaya Reddy

Message was edited by:

Dhanunjaya Reddy

Former Member
0 Kudos

Hi,

Alv is only used for report output.

Once u get the data into internal table u can design layout .

For that FM used are

REUSE_ALV_VARIANT_ALL_MAINTAIN: Maintain all display variants for one object.

REUSE_ALV_VARIANT_DEFAULT_GET: Read default layout (description only, w/o field catalog).

REUSE_ALV_VARIANT_EXISTENCE: Checks whether a display variant exists.

REUSE_ALV_VARIANT_F4: Display variant selection dialog box.

REUSE_ALV_VARIANT_MAINTAIN: Definition of a layout outside the list context.

REUSE_ALV_VARIANT_SAVE: Save ALV Variant.

REUSE_ALV_VARIANT_SELECT: Select a layout variant.

REUSE_ALV_GRID_DISPLAY: Output of a simple list (single-line).

REUSE_ALV_GRID_LAYOUT_INFO_GET: Read current ALV grid information.

REUSE_ALV_GRID_LAYOUT_INFO_SET: Set current ALV list information.

Assign points if useful.

Former Member
0 Kudos

Hi,

Check this sample report..By double clicking on the report will take you to the ME23N transaction for that Po..


TYPE-POOLS: slis.

DATA: gt_fieldcat TYPE slis_t_fieldcat_alv.
DATA: BEGIN OF wa_ekko,
ebeln like ekko-ebeln,
ekorg like ekko-ekorg,
ekgrp like ekko-ekgrp,
END OF wa_ekko.

DATA: v_repid TYPE syrepid.
v_repid = sy-repid.

DATA it_ekko LIKE STANDARD TABLE OF wa_ekko WITH HEADER LINE.

SELECT * UP TO 100 ROWS
FROM ekko
INTO CORRESPONDING FIELDS OF TABLE it_ekko.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
     EXPORTING
          i_program_name     = v_repid
          i_internal_tabname = 'WA_EKKO'
          i_inclname         = v_repid
     CHANGING
          ct_fieldcat        = gt_fieldcat.


* have hotspot for a PO.
DATA: s_fieldcat LIKE LINE OF gt_fieldcat.
s_fieldcat-hotspot = 'X'.

MODIFY gt_fieldcat FROM s_fieldcat TRANSPORTING hotspot
       WHERE fieldname = 'EBELN'.

* Pass the program.
v_repid = sy-repid.


CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
     EXPORTING
          i_callback_program      = v_repid
          it_fieldcat             = gt_fieldcat
          i_callback_user_command = 'USER_COMMAND'
     TABLES
          t_outtab                = it_ekko.


*---------------------------------------------------------------------*
*       FORM display_detail                                           *
*---------------------------------------------------------------------*
*       ........                                                      *
*---------------------------------------------------------------------*
*  -->  UCOMM                                                         *
*  -->  SELFIELD                                                      *
*---------------------------------------------------------------------*
FORM user_command USING ucomm LIKE sy-ucomm
selfield TYPE slis_selfield.

  IF ucomm = '&IC1' AND selfield-fieldname = 'EBELN'.

    READ TABLE it_ekko INDEX selfield-tabindex.

    IF sy-subrc = 0.
      SET PARAMETER ID 'BES' FIELD it_ekko-ebeln.
      CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
    ENDIF.

  ENDIF.

ENDFORM.

Thanks

Naren

Former Member
0 Kudos

Hi

You can USER Command for the interactive list generation after displaying the basic list

Simple ALV report

http://www.sapgenie.com/abap/controls/alvgrid.htm

http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox

ALV

1. Please give me general info on ALV.

http://www.sapfans.com/forums/viewtopic.php?t=58286

http://www.sapfans.com/forums/viewtopic.php?t=76490

http://www.sapfans.com/forums/viewtopic.php?t=20591

http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.

2. How do I program double click in ALV?

http://www.sapfans.com/forums/viewtopic.php?t=11601

http://www.sapfans.com/forums/viewtopic.php?t=23010

Check the program in the following link:

http://sap-img.com/abap/display-secondary-list-using-alv-grid.htm

3. How do I add subtotals (I have problem to add them)...

http://www.sapfans.com/forums/viewtopic.php?t=20386

http://www.sapfans.com/forums/viewtopic.php?t=85191

http://www.sapfans.com/forums/viewtopic.php?t=88401

http://www.sapfans.com/forums/viewtopic.php?t=17335

http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_basic.htm

4. How to add list heading like top-of-page in ABAP lists?

http://www.sapfans.com/forums/viewtopic.php?t=58775

http://www.sapfans.com/forums/viewtopic.php?t=60550

http://www.sapfans.com/forums/viewtopic.php?t=16629

5. How to print page number / total number of pages X/XX in ALV?

http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)

6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.

http://www.sapfans.com/forums/viewtopic.php?t=64320

http://www.sapfans.com/forums/viewtopic.php?t=44477

7. How can I set the cell color in ALV?

http://www.sapfans.com/forums/viewtopic.php?t=52107

8. How do I print a logo/graphics in ALV?

http://www.sapfans.com/forums/viewtopic.php?t=81149

http://www.sapfans.com/forums/viewtopic.php?t=35498

http://www.sapfans.com/forums/viewtopic.php?t=5013

9. How do I create and use input-enabled fields in ALV?

http://www.sapfans.com/forums/viewtopic.php?t=84933

http://www.sapfans.com/forums/viewtopic.php?t=69878

10. How can I use ALV for reports that are going to be run in background?

http://www.sapfans.com/forums/viewtopic.php?t=83243

http://www.sapfans.com/forums/viewtopic.php?t=19224

11. How can I display an icon in ALV? (Common requirement is traffic light icon).

http://www.sapfans.com/forums/viewtopic.php?t=79424

http://www.sapfans.com/forums/viewtopic.php?t=24512

12. How can I display a checkbox in ALV?

http://www.sapfans.com/forums/viewtopic.php?t=88376

http://www.sapfans.com/forums/viewtopic.php?t=40968

http://www.sapfans.com/forums/viewtopic.php?t=6919

13. Top-of-page in ALV

14. ALV Group Heading

http://www.sap-img.com/fu037.htm

How to add list heading like top-of-page in ABAP lists?

http://www.sapfans.com/forums/viewtopic.php?t=58775

http://www.sapfans.com/forums/viewtopic.php?t=60550

http://www.sapfans.com/forums/viewtopic.php?t=16629

15. ALV output to PDF conversion

It has an example code for PDF Conversion.

http://www.erpgenie.com/abap/code/abap51.htm

Go thru these programs they may help u to try on some hands on

ALV Demo program

BCALV_DEMO_HTML

BCALV_FULLSCREEN_DEMO ALV Demo: Fullscreen Mode

BCALV_FULLSCREEN_DEMO_CLASSIC ALV demo: Fullscreen mode

BCALV_GRID_DEMO Simple ALV Control Call Demo Program

BCALV_TREE_DEMO Demo for ALV tree control

BCALV_TREE_SIMPLE_DEMO

BC_ALV_DEMO_HTML_D0100

Sample code:

report yh645_secndry_alv.

type-pools: slis.

data: fieldcat type slis_t_fieldcat_alv,

fieldcat_ln like line of fieldcat,

fs_layout type slis_layout_alv,

t_layoout like standard table

of fs_layout.

data: begin of fs_spfli,

carrid type spfli-carrid,

connid type spfli-connid,

countryfr type spfli-countryfr,

cityfrom type spfli-cityfrom,

airpfrom type spfli-airpfrom,

countryto type spfli-countryto,

cityto type spfli-cityto,

airpto type spfli-airpto,

fltime type spfli-fltime,

deptime type spfli-deptime,

arrtime type spfli-arrtime,

distance type spfli-distance,

distid type spfli-distid,

fltype type spfli-fltype,

period type spfli-period,

checkbox,

color(3),

end of fs_spfli.

data:

begin of fs_table,

carrid type spfli-carrid,

connid type spfli-connid,

end of fs_table.

data: begin of fs_sflight,

check,

color(3).

include type sflight.

data:end of fs_sflight.

data:

begin of fs_table1,

carrid type sflight-carrid,

connid type sflight-connid,

fldate type sflight-fldate,

end of fs_table1.

data:

t_spfli like standard table

of fs_spfli.

data:

t_table like standard table

of fs_table.

data:

t_table1 like standard table

of fs_table1.

data:

t_sflight like standard table

of fs_sflight.

data:

t_sbook like standard table

of sbook.

data t_layout type slis_layout_alv.

select *

into corresponding fields of table t_spfli

from spfli.

perform start_list_viewer.

perform get_spfli_details.

&----


*& Form SUB1

&----


  • text

----


  • -->RT_EXTAB text

----


form sub1 using rt_extab type slis_t_extab.

data: flight type slis_extab.

flight-fcode = 'SFLIGHT'.

append flight to rt_extab.

set pf-status 'SFLIGHT'. " EXCLUDING RT_EXTAB.

endform. "SUB1

&----


*& Form START_LIST_VIEWER

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


form start_list_viewer .

data: pgm like sy-repid.

pgm = sy-repid.

fs_layout-box_fieldname = 'CHECKBOX'.

fs_layout-info_fieldname = 'COLOR'.

call function 'REUSE_ALV_LIST_DISPLAY'

exporting

i_callback_program = pgm

i_callback_pf_status_set = 'SUB1'

i_callback_user_command = 'USER_COMMAND'

i_structure_name = 'SPFLI'

is_layout = fs_layout

tables

t_outtab = t_spfli

exceptions

program_error = 1

others = 2.

if sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

endif.

endform. " START_LIST_VIEWER

*******Process Call Back Events (Begin)**************************

form user_command using ucomm like sy-ucomm

selfield type slis_selfield.

case ucomm.

when 'SFLIGHT'.

selfield-refresh = 'X'.

perform get_spfli_details.

select *

from sflight

into corresponding fields of table t_sflight

for all entries in t_table

where carrid eq t_table-carrid

and connid eq t_table-connid.

perform display_sflight.

when 'SBOOK'.

selfield-refresh = 'X'.

perform get_sflight_details.

select *

from sbook

into corresponding fields of table t_sbook

for all entries in t_table1

where carrid eq t_table1-carrid

and connid eq t_table1-connid

and fldate eq t_table1-fldate.

perform display_sbook.

endcase.

endform. "USER_COMMAND

&----


*& Form SUB2

&----


  • text

----


  • -->RT_EXTAB text

----


form sub2 using rt_extab type slis_t_extab.

data: flight type slis_extab.

flight-fcode = 'SBOOK'.

append flight to rt_extab.

set pf-status 'SBOOK'. " EXCLUDING RT_EXTAB.

endform. "SUB2

&----


*& Form DISPLAY_SFLIGHT

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


form display_sflight .

data: pgm like sy-repid.

pgm = sy-repid.

clear t_layout.

fs_layout-box_fieldname = 'CHECK'.

fs_layout-info_fieldname = 'COLOR'.

call function 'REUSE_ALV_LIST_DISPLAY'

exporting

i_callback_program = pgm

i_callback_pf_status_set = 'SUB2'

i_callback_user_command = 'USER_COMMAND'

i_structure_name = 'SFLIGHT'

is_layout = fs_layout

tables

t_outtab = t_sflight

exceptions

program_error = 1

others = 2.

if sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

endif.

endform. " DISPLAY_SFLIGHT

&----


*& Form GET_SPFLI_DETAILS

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


form get_spfli_details .

loop at t_spfli into fs_spfli.

if fs_spfli-checkbox = 'X'.

fs_spfli-color = 'C51'.

fs_spfli-checkbox = '1'.

fs_table-carrid = fs_spfli-carrid.

fs_table-connid = fs_spfli-connid.

append fs_table to t_table.

modify t_spfli from fs_spfli.

endif.

endloop.

endform. " GET_SFLIGHT_DETAILS

&----


*& Form GET_SFLIGHT_DETAILS

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


form get_sflight_details .

loop at t_sflight into fs_sflight.

if fs_sflight-check = 'X'.

fs_sflight-color = 'C71'.

fs_sflight-check = '1'.

fs_table1-carrid = fs_sflight-carrid.

fs_table1-connid = fs_sflight-connid.

fs_table1-fldate = fs_sflight-fldate.

append fs_table1 to t_table1.

modify t_sflight from fs_sflight.

endif.

endloop.

endform. " GET_SFLIGHT_DETAILS

&----


*& Form DISPLAY_SBOOK

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


form display_sbook .

data: pgm like sy-repid.

pgm = sy-repid.

call function 'REUSE_ALV_LIST_DISPLAY'

exporting

i_callback_program = pgm

i_structure_name = 'SBOOK'

tables

t_outtab = t_sbook

exceptions

program_error = 1

others = 2.

if sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

endif.

endform. " DISPLAY_SBOOK

Regards

Anji

Former Member
0 Kudos

hi vamshi,

to move from alv report to a corresponding transcation, you will have to use a hotspot.

put a hotspot like :

write:

/2 it_out-f_ebeln color 5 hotspot on,

and then use :

at line-selection.

set parameter id 'BES' field it_out-f_ebeln.

call transaction 'ME22'.

this might help you.

reward if useful..

paruchuri_nagesh
Active Contributor
0 Kudos

hi execute this report

&----


*& Report ZPRG8 *

*& *

&----


*& *

*& *

&----


REPORT ZPRG8 .

TABLES: LFA1, EKKO, EKPO.

SELECT-OPTIONS: S_LIFNR FOR LFA1-LIFNR.

DATA: BEGIN OF ITAB OCCURS 0,

LIFNR LIKE LFA1-LIFNR,

NAME1 LIKE LFA1-NAME1,

END OF ITAB.

DATA: BEGIN OF JTAB OCCURS 0,

EBELN LIKE EKKO-EBELN,

AEDAT LIKE EKKO-AEDAT,

END OF JTAB.

DATA: BEGIN OF KTAB OCCURS 0,

EBELP LIKE EKPO-EBELP,

MATNR LIKE EKPO-MATNR,

END OF KTAB.

TYPE-POOLS:SLIS.

DATA: REPID LIKE SY-REPID,

F_LFA11 TYPE SLIS_T_FIELDCAT_ALV,

F_LFA1 TYPE SLIS_FIELDCAT_ALV,

F_EKKO1 TYPE SLIS_T_FIELDCAT_ALV,

F_EKKO TYPE SLIS_FIELDCAT_ALV,

F_EKPO1 TYPE SLIS_T_FIELDCAT_ALV,

F_EKPO TYPE SLIS_FIELDCAT_ALV,

I_EVENTS TYPE SLIS_T_EVENT,

S_EVENTS TYPE SLIS_ALV_EVENT.

REPID = SY-REPID.

PERFORM COL_HEAD.

START-OF-SELECTION.

SELECT LIFNR NAME1 FROM LFA1 INTO TABLE ITAB WHERE LIFNR IN S_LIFNR.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

  • I_INTERFACE_CHECK = ' '

  • I_BYPASSING_BUFFER =

  • I_BUFFER_ACTIVE = ' '

I_CALLBACK_PROGRAM = sy-repid

  • I_CALLBACK_PF_STATUS_SET = ' '

  • I_CALLBACK_USER_COMMAND = ' '

  • I_STRUCTURE_NAME =

  • IS_LAYOUT =

IT_FIELDCAT = F_LFA11

  • IT_EXCLUDING =

  • IT_SPECIAL_GROUPS =

  • IT_SORT =

  • IT_FILTER =

  • IS_SEL_HIDE =

  • I_DEFAULT = 'X'

  • I_SAVE = ' '

  • IS_VARIANT =

IT_EVENTS = I_EVENTS

  • IT_EVENT_EXIT =

  • IS_PRINT =

  • IS_REPREP_ID =

  • I_SCREEN_START_COLUMN = 0

  • I_SCREEN_START_LINE = 0

  • I_SCREEN_END_COLUMN = 0

  • I_SCREEN_END_LINE = 0

  • IMPORTING

  • E_EXIT_CAUSED_BY_CALLER =

  • ES_EXIT_CAUSED_BY_USER =

TABLES

T_OUTTAB = ITAB

EXCEPTIONS

PROGRAM_ERROR = 1

OTHERS = 2

.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

FORM COL_HEAD.

F_LFA1-FIELDNAME = 'LIFNR'.

*F_LFA1-TABNAME = 'ITAB'.

F_LFA1-REF_TABNAME = 'LFA1'.

F_LFA1-REF_FIELDNAME = 'LIFNR'.

APPEND F_LFA1 TO F_LFA11.

F_LFA1-FIELDNAME = 'NAME1'.

*F_LFA1-TABNAME = 'ITAB'.

F_LFA1-REF_TABNAME = 'LFA1'.

F_LFA1-REF_FIELDNAME = 'NAME1'.

APPEND F_LFA1 TO F_LFA11.

F_EKKO-FIELDNAME = 'EBELN'.

*F_EKKO-TABNAME = 'JTAB'.

F_EKKO-REF_TABNAME = 'EKKO'.

F_EKKO-REF_FIELDNAME = 'EBELN'.

APPEND F_EKKO TO F_EKKO1.

F_EKKO-FIELDNAME = 'AEDAT'.

*F_EKKO-TABNAME = 'JTAB'.

F_EKKO-REF_TABNAME = 'EKKO'.

F_EKKO-REF_FIELDNAME = 'AEDAT'.

APPEND F_EKKO TO F_EKKO1.

F_EKPO-FIELDNAME = 'EBELP'.

*F_EKPO-TABNAME = 'KTAB'.

F_EKPO-REF_TABNAME = 'EKPO'.

F_EKPO-REF_FIELDNAME = 'EBELP'.

APPEND F_EKPO TO F_EKPO1.

F_EKPO-FIELDNAME = 'MATNR'.

*F_EKPO-TABNAME = 'KTAB'.

F_EKPO-REF_TABNAME = 'EKPO'.

F_EKPO-REF_FIELDNAME = 'MATNR'.

APPEND F_EKPO TO F_EKPO1.

S_EVENTS-NAME = 'USER_COMMAND'.

S_EVENTS-FORM = 'VAL'.

APPEND S_EVENTS TO I_EVENTS.

ENDFORM.

FORM VAL USING USER_COMMAND LIKE SY-UCOMM SEL TYPE SLIS_SELFIELD.

DATA: V_LIFNR(10) TYPE N,

V_EBELN(10) TYPE N,

V_MATNR(10) TYPE C.

IF SEL-FIELDNAME = 'LIFNR'.

V_LIFNR = SEL-VALUE.

SELECT EBELN AEDAT FROM EKKO INTO TABLE JTAB WHERE LIFNR = V_LIFNR.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = REPID

IT_FIELDCAT = F_EKKO1

IT_EVENTS = I_EVENTS

TABLES

T_OUTTAB = JTAB.

ENDIF.

IF SEL-FIELDNAME = 'EBELN'.

V_EBELN = SEL-VALUE.

SELECT EBELP MATNR FROM EKPO INTO TABLE KTAB WHERE EBELN = V_EBELN.

CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'

EXPORTING

I_TITLE = 'ITEM DETAILS'

I_SCREEN_START_COLUMN = 10

I_SCREEN_START_LINE = 10

I_SCREEN_END_COLUMN = 36

I_SCREEN_END_LINE = 16

I_TABNAME = 'EKPO'

IT_FIELDCAT = F_EKPO1

I_CALLBACK_PROGRAM = REPID

  • I_CALLBACK_USER_COMMAND =

  • IS_PRIVATE =

IMPORTING

ES_SELFIELD = SEL

  • E_EXIT =

TABLES

T_OUTTAB = KTAB.

ENDIF.

IF SEL-FIELDNAME = 'MATNR'.

V_MATNR = SEL-VALUE.

SET PARAMETER ID 'MAT' FIELD V_MATNR.

CALL TRANSACTION 'MM02' AND SKIP FIRST SCREEN.

ENDIF.

ENDFORM.

regards

Nagesh.Paruchuri

0 Kudos

got through the program SAPBC404EVET_EVENTS. This is example for how to handle events.