‎2005 Oct 19 5:41 PM
Hi folks
Please help for this.
I am going to genarate a report, in that report basic list contains the Sales Order no.s, if I click on a sales order no, I want to show VA01 in the next screen for selected Sales order No.
Regards
Praveen
‎2005 Oct 19 6:18 PM
REPORT znktest .
DATA: sales_order LIKE vbak-vbeln,
name(40).
START-OF-SELECTION.
sales_order = 491.
name = 'Test'.
WRITE: / sales_order, name.
HIDE: sales_order.
AT LINE-SELECTION.
CHECK NOT sales_order IS INITIAL.
CALL TRANSACTION 'VA02'.
‎2005 Oct 19 5:50 PM
Jus put the follwoing code in at line selection event.
************************************************************************
At Line-Selection *
************************************************************************
AT LINE-SELECTION.
*---Calling of corresponding transactions based on selected field.
PERFORM f_gr_ir_details.
&----
*& Form f_GR_IR_details
&----
Subroutine to call corresponding transactions based on at line
selection criteria
----
FORM f_gr_ir_details.
*---Getting the field name and value of the double clicked field.
GET CURSOR FIELD v_fdname VALUE v_inval.
*---Condense the field name to remove the gaps.
CONDENSE v_fdname NO-GAPS.
*---Function Module to convert EBELN and BELNR to their standard format
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = v_inval
IMPORTING
output = v_outval.
*----Call transaction ME23N if EBELN is chosen.
IF v_fdname = 'ITAB-VBELN'. " should be in caps
SET PARAMETER ID 'AUN' FIELD v_outval.
CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
ELSE.
*---If any field other than PO number , IR and GR doc Number is chosen
*---for further display , pop a message
MESSAGE i014 WITH 'No navigation possible for the selected field'(i02).
ENDIF.
ENDFORM. " f_GR_IR_details
&----
‎2005 Oct 19 5:51 PM
Here is one way of doing it, you can also use hotspots.
report zrich_0002 no standard page heading.
data: ivbak type table of vbak with header line.
data : cursor_field(30),
field_value(30) .
select-options: s_vbeln for ivbak-vbeln.
start-of-selection.
select * into corresponding fields of table ivbak
from vbak
where vbeln in s_vbeln.
loop at ivbak.
write:/ ivbak-vbeln.
endloop.
at line-selection.
get cursor field cursor_field value field_value.
case cursor_field.
when 'IVBAK-VBELN'.
set parameter id 'AUN' field field_value.
call transaction 'VA03' and skip first screen..
endcase.
Regards,
Rich Heilman
‎2005 Oct 19 5:53 PM
Here is an example of using hotspots to achieve your requirement.
report zrich_0002 no standard page heading.
data: ivbak type table of vbak with header line.
data : cursor_field(30),
field_value(30) .
select-options: s_vbeln for ivbak-vbeln.
start-of-selection.
select * into corresponding fields of table ivbak
from vbak
where vbeln in s_vbeln.
loop at ivbak.
format hotspot on.
write:/ ivbak-vbeln.
hide ivbak-vbeln.
format hotspot off.
endloop.
at line-selection.
set parameter id 'AUN' field ivbak-vbeln.
call transaction 'VA03' and skip first screen.
Regards,
Rich Heilman
‎2005 Oct 19 6:18 PM
REPORT znktest .
DATA: sales_order LIKE vbak-vbeln,
name(40).
START-OF-SELECTION.
sales_order = 491.
name = 'Test'.
WRITE: / sales_order, name.
HIDE: sales_order.
AT LINE-SELECTION.
CHECK NOT sales_order IS INITIAL.
CALL TRANSACTION 'VA02'.
‎2005 Oct 19 8:50 PM
‎2005 Oct 28 8:35 PM
HI Rich
Your answers are pretty good. But we need to point the rating for their answers. So blindly i cheked Kishor's answer. Sorry for the mistake.
Regards
Praveen
‎2005 Oct 28 8:44 PM