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

Interactive Reports

Former Member
0 Likes
759

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
699

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'.

7 REPLIES 7
Read only

Former Member
0 Likes
699

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

&----


Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
699

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

Read only

0 Likes
699

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

Read only

Former Member
0 Likes
700

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'.

Read only

0 Likes
699

Did kishore's reply really solve your problem?

Regards,

Rich Heilman

Read only

0 Likes
699

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

Read only

0 Likes
699

No problem there. I was just wondering if there was something that I missed. I assume that you got it working?

Regards,

Rich Heilman