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

reports

Former Member
0 Likes
996

The current report Yxxxxx currently displays the output, but the documents cannot be drilled from the report.

I must Change the Yxxxxx report particularly 2 fields Purchase Order - EBELN

Acc. Document – BELNR to allow for drill down capabilities to the SAP document numbers.

can anyone suggest me a way.

Thanks in advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
956

Hi,

questions??

1) Is it an ALV report?

2) When you click on the EBELN do you want to go to ME23N..

THanks,

Naren

7 REPLIES 7
Read only

Former Member
0 Likes
957

Hi,

questions??

1) Is it an ALV report?

2) When you click on the EBELN do you want to go to ME23N..

THanks,

Naren

Read only

Former Member
0 Likes
956

yes it is an alv report and it must go to a built in transaction.

Read only

0 Likes
956

Have a look at ALV demo program BALVSD11.

Rob

Read only

Former Member
0 Likes
956

to a customer created transaction and the T.code displays

company code ,posting date,plant,pur group,vendor,mat,cost center,cost element,po,period........

Read only

Former Member
0 Likes
956

Hi,

Check this example..It will display the PO and there is hotspot in the PO numbers..If you press it, it will go the transaction ME23N with the PO number..

TYPE-POOLS: slis.

DATA: gt_fieldcat TYPE slis_t_fieldcat_alv.

DATA: BEGIN OF wa_ekko,

ebeln like ekko-ebeln,

ekorg like ekko-ekorg,

ekgrp like ekko-ekgrp,

END OF wa_ekko.

DATA: v_repid TYPE syrepid.

v_repid = sy-repid.

DATA it_ekko LIKE STANDARD TABLE OF wa_ekko WITH HEADER LINE.

SELECT *

FROM ekko

INTO CORRESPONDING FIELDS OF TABLE it_ekko.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

i_program_name = v_repid

i_internal_tabname = 'WA_EKKO'

i_inclname = v_repid

CHANGING

ct_fieldcat = gt_fieldcat.

  • have hotspot for a PO.

DATA: s_fieldcat LIKE LINE OF gt_fieldcat.

s_fieldcat-hotspot = 'X'.

MODIFY gt_fieldcat FROM s_fieldcat TRANSPORTING hotspot

WHERE fieldname = 'EBELN'.

  • Pass the program.

v_repid = sy-repid.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

i_callback_program = v_repid

it_fieldcat = gt_fieldcat

i_callback_user_command = 'USER_COMMAND'

TABLES

t_outtab = it_ekko.

----


  • FORM display_detail *

----


  • ........ *

----


  • --> UCOMM *

  • --> SELFIELD *

----


FORM user_command USING ucomm LIKE sy-ucomm

selfield TYPE slis_selfield.

IF ucomm = '&IC1'.

READ TABLE it_ekko INDEX selfield-tabindex.

IF sy-subrc = 0.

SET PARAMETER ID 'BES' FIELD it_ekko-ebeln.

CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.

ENDIF.

ENDIF.

ENDFORM.

Thanks,

Naren

Read only

Former Member
0 Likes
956

Hi Nagini,

Basically you need to do two things.

1. set hotspot to fields EBELN and BELNR, in the fieldcatalog internal table.

2. Call corresponding transactions, when the user clicks on these hotspot fields.

if you fieldcatalog internal table's name is it_fieldcatalog, you can use the following logic to set the hotspot.

read table it_fieldcatalog into ws_fieldcatalog where fieldname = 'EBELN'   "
ws_fieldcatalog-hotspot = 'X'.
modify it_fieldcatalog from ws_fieldcatalog transporting hotspot.
* do the same for 'BELNR' also.

Now, in the user_command call back form, you need to include the logic to track the hotspot click, and then call the corrresponding transactions.

if ucomm = '&IC1'.

hope this helps.
    read table [alv_table] index selfield-tabindex.
    if sy-subrc = 0.
        set parameter id 'BES' field alv_table-ebeln.
        call transaction 'ME23N' and skip first screen.
    endif.
endif.

Hope this helps.

Sajan.

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
956

Hi,

Check this for sample programs.

http://www.geocities.com/mpioud/Abap_programs.html