‎2006 Nov 13 6:37 AM
Hi All,
I have a selection screen then based on the values entered i am displaying a report in a required format. Now my requirement is when click a particular line in that report display it should display the relevant transaction screen for that particular line of information. Give me an idea how to do this preferrably with some example.]
Thanks In Advance.
‎2006 Nov 13 6:42 AM
HI,
check the following program
REPORT ztest.
DATA TEXT(20).
START-OF-SELECTION.
PERFORM WRITE_AND_HIDE USING SPACE SPACE.
AT LINE-SELECTION.
CASE TEXT.
WHEN 'List index'.
PERFORM WRITE_AND_HIDE USING 'X' SPACE.
WHEN 'User command'.
PERFORM WRITE_AND_HIDE USING SPACE 'X'.
WHEN OTHERS.
SUBTRACT 2 FROM SY-LSIND.
PERFORM WRITE_AND_HIDE USING SPACE SPACE.
ENDCASE.
CLEAR TEXT.
FORM WRITE_AND_HIDE USING P_FLAG_LSIND P_FLAG_UCOMM.
WRITE / 'SY-LSIND:'.
PERFORM WRITE_WITH_COLOR USING SY-LSIND P_FLAG_LSIND.
TEXT = 'List index'.
HIDE TEXT.
WRITE / 'SY-UCOMM:'.
PERFORM WRITE_WITH_COLOR USING SY-UCOMM P_FLAG_UCOMM.
TEXT = 'User command'.
HIDE TEXT.
IF SY-LSIND > 0.
WRITE / 'PICK here to go back one list level'.
ENDIF.
ENDFORM.
FORM WRITE_WITH_COLOR USING P_VALUE
P_FLAG_POSITIVE.
IF P_FLAG_POSITIVE = SPACE.
WRITE P_VALUE COLOR COL_NORMAL.
ELSE.
WRITE P_VALUE COLOR COL_POSITIVE.
ENDIF.
ENDFORM.
‎2006 Nov 13 6:44 AM
SET HOTSPOT ON.
Write :/'Report1'.
Write :/'Report2'.
SET HOTSPOT OFF.
at line-selection.
Then use SET PARAMETER AND GET PARAMETER to get the report name which user has clicked.
ex---
set parameter id 'RID' field progname.
call transaction 'SE38' and skip first screen.
‎2006 Nov 13 6:46 AM
i think its like this..
you have 2 provide hot-spot on say kunnr, sales order etc
at line-selection..
read that line if req and if sales order is selected
call transaction va02 to change va03 to display...
hope this is useful
kiran
‎2006 Nov 13 6:59 AM
Yes Kiran you got it but when i call the sales order display transaction i need to pass the sales order number to that and get the relavent information in the transaction screen.Like this i may need to pass date or type of customer to that called transcation and display the screens of that particular transaction. How to do it ?
Can you put the sample code for this requirement.
Thanks.
‎2006 Nov 13 6:59 AM
TRY LIKE THIS CODE.
THIS WILL SHOW THE PERTICULAR MATERIAL IS AVAILABLE FOR WHICH PLANT
TABLES : MARA, MARC.
DATA : BEGIN OF ITAB OCCURS 0,
MATNR LIKE MARA-MATNR,
MTART LIKE MARA-MTART,
END OF ITAB.
SELECT-OPTIONS : S_MATNR FOR MARA-MATNR.
SELECT MATNR MTART INTO CORRESPONDING FIELDS OF TABLE ITAB FROM MARA
WHERE MATNR IN S_MATNR.
LOOP AT ITAB.
WRITE : / ITAB-MATNR.
HIDE ITAB-MATNR.
ENDLOOP.
AT LINE-SELECTION.
SY-LSIND = SY-LSIND + 1.
SELECT WERKS INTO MARC-WERKS FROM MARC WHERE MATNR = ITAB-MATNR.
WRITE : MARC-WERKS.
ENDSELECT.
SHIBA PRASAD
‎2006 Nov 13 7:08 AM
Hi Shiba,
You are right but instead of select from the table for that material code i want call the transaction screen ,by passing the material code. So it has to show all the screen related to that material code. For this requirement how to write the code.
Thanks.
‎2006 Nov 13 10:22 AM
Hi
try is code and make changes for your requirment.. if you click the sales document number it will navigate to the transaction va03 .. where you can find the complete details of that documnent..
REPORT ZMAT_TEST.
tables vbap.
data it_vbap type table of vbap with header line.
select-options: s_vbeln for vbap-vbeln.
start-of-selection.
select * from vbap into table it_vbap where vbeln in s_vbeln.
end-of-selection.
loop at it_vbap.
write: it_vbap-vbeln hotspot on, it_vbap-matnr, it_vbap-netwr.
endloop.
at line-selection.
if sy-lsind = 1.
data: v_field like vbap-vbeln,
v_value like vbap-vbeln.
v_value = it_vbap-vbeln.
get cursor field v_field value v_value.
set parameter id 'AUN' field v_value.
call transaction 'VA03' and skip first screen.
endif.
‎2006 Nov 14 12:12 PM
Hi Kothai,
But i want to do for the transaction VK13.In that for key combination how to pass x using set parameter id statement. Can you help me on this?
Thanks.