Application Development and Automation 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: 
Read only

Drill down report

Former Member
0 Likes
904

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.

8 REPLIES 8
Read only

dani_mn
Active Contributor
0 Likes
873

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.

Read only

Former Member
0 Likes
873

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.

Read only

Former Member
0 Likes
873

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

Read only

0 Likes
873

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.

Read only

Former Member
0 Likes
873

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

Read only

0 Likes
873

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.

Read only

Former Member
0 Likes
873

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.

Read only

0 Likes
873

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.