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: 

How to use call transaction 'XD03' in alv.

Former Member
0 Kudos

Hi Experts ,

Below i m write code to call transaction xd03 but it not call the transacation.

<Garbled code removed>

Moderator Message: Please continue with your previous thread. Current thread locked.

Edited by: Suhas Saha on Nov 25, 2011 5:04 PM

4 REPLIES 4

Former Member
0 Kudos

Hi

I've just answered to your issue and I know that solution works fine....but you've closed the post as unswered.

Now I believe the problem is on how you transfere the data to ALV fm....but it's not possible to read your code

Max

0 Kudos

see what's my problem is that i retrive value from kna1 and vbak table on common column of kunnr in alv grid format.

i get the output in alv grid format.after that i want when user click on kunnr column it call transaction xd03. i am write down u r code but it not callin the transaction.so please writ simple code which call the transaction.

please this assisnment is very important to me.

0 Kudos

Uhm

Here it's your calling:

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' 
  EXPORTING 
    i_callback_program = gv_repid 
    i_grid_title = gv_title 
    is_layout    = gv_layout 
    it_fieldcat = gt_fielcat[] 
*it_special_groups = gd_tabgroup 
* IT_EVENTS = GT_XEVENTS 
    i_save = 'X' 
* is_variant = z_template 
    TABLES
      t_outtab = gt_final 
    EXCEPTIONS 
      program_error = 1 
      OTHERS = 2. 

You don't indicate which is the routine for the user_command

You can do it in 2 ways:

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' 
  EXPORTING 
    i_callback_program = gv_repid 
    I_CALLBACK_USER_COMMAND  = 'USER_COMMAND'  "<.------- FORM the USER_COMMAND
    i_grid_title = gv_title 
    is_layout    = gv_layout 
    it_fieldcat = gt_fielcat[] 
*it_special_groups = gd_tabgroup 
* IT_EVENTS = GT_XEVENTS 
    i_save = 'X' 
* is_variant = z_template 
    TABLES
      t_outtab = gt_final 
    EXCEPTIONS 
      program_error = 1 
      OTHERS = 2. 

Or you indicate in the GT_XEVENTS table

  LS_EVENT-NAMES = 'USER_COMMAND'.
  LS_EVENT-FORM  = 'USER_COMMAND'. "<.------- FORM the USER_COMMAND
  APPEND LS_EVENT TO  GT_XEVENTS.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' 
  EXPORTING 
    i_callback_program = gv_repid 
    i_grid_title = gv_title 
    is_layout    = gv_layout 
    it_fieldcat = gt_fielcat[] 
*it_special_groups = gd_tabgroup 
    IT_EVENTS = GT_XEVENTS 
    i_save = 'X' 
* is_variant = z_template 
    TABLES
      t_outtab = gt_final 
    EXCEPTIONS 
      program_error = 1 
      OTHERS = 2. 

Max

0 Kudos

I've just wrote a sample in previuos answer

Have you tried it?

Max