‎2007 May 16 6:30 PM
Hi
I need help in interactive ALV Repot. When i executed the report, it is displaying the material Doc number ,material etc in grid layout.
my requirement is , when i double click on material Document number , it has to show the sales order number, salesorder item and Delivery number. Same thing is required for when i click on material also.
please help me in this.
regards,
Ram
‎2007 May 16 6:39 PM
Hi
see the sample code for one field double clicking
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
DATA: index TYPE i,
w_disp_head LIKE LINE OF t_disp_head,
w_door LIKE likp-lgtor.
CASE r_ucomm.
WHEN 'PICK'. " Double click line
IF ( rs_selfield-fieldname = 'MBLNR' or
rs_selfield-fieldname = 'MATNR' ).
Read data table, using index of row user clicked on
Read the internal table in which these fields are there.
take that records corresponding EBELn and EBELP fields for that MATNR or MBLNR fields
READ TABLE t_disp_tab INTO wa_item_tab INDEX
rs_selfield-tabindex.
fetch the sales order no and item data from EKKN table by passing the PO no and PO item
<wa_item_tab-ebeln and wa_item_tab-ebelp>
display the data using an internal table or in another ALV.
endcase.
endform..
Reward points if useful
Regards
Anji
‎2007 May 16 6:35 PM
‎2007 May 16 6:39 PM
Hi
see the sample code for one field double clicking
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
DATA: index TYPE i,
w_disp_head LIKE LINE OF t_disp_head,
w_door LIKE likp-lgtor.
CASE r_ucomm.
WHEN 'PICK'. " Double click line
IF ( rs_selfield-fieldname = 'MBLNR' or
rs_selfield-fieldname = 'MATNR' ).
Read data table, using index of row user clicked on
Read the internal table in which these fields are there.
take that records corresponding EBELn and EBELP fields for that MATNR or MBLNR fields
READ TABLE t_disp_tab INTO wa_item_tab INDEX
rs_selfield-tabindex.
fetch the sales order no and item data from EKKN table by passing the PO no and PO item
<wa_item_tab-ebeln and wa_item_tab-ebelp>
display the data using an internal table or in another ALV.
endcase.
endform..
Reward points if useful
Regards
Anji