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

Intractive report

Former Member
0 Likes
577

HI,

I have displying the one report. now i can double click on the

output list , it's going to aniother screen trascation FB02.

Please give the any inputs..

HI,

I have displying the one report. now i can double click on the

output list , it's going to aniother screen trascation FB02.

Please give the any inputs..

3 REPLIES 3
Read only

Former Member
0 Likes
549

HI,

write the code like this.


AT LINE-SELECTION.

set parameter id 'BLN' field belnr.
set parameter id 'BUK' field bukrs.
set parameter id 'GJR' field gjahr.
call transaction 'FB02' and skip first screen.

rgds,

bharat.

Read only

Former Member
0 Likes
549

Hi,

Why you are going for FB02 (Document Change), i think it shoud be FB03.

PLease refer the sample code below:


FORM f_user_command_real_fx USING iv_ucomm LIKE sy-ucomm
                  it_selfield TYPE slis_selfield.


  DATA:    BEGIN OF lt_buztab OCCURS 30,
             bukrs   LIKE bseg-bukrs,    " Co Code
             belnr   LIKE bseg-belnr,    " Doc No
             gjahr   LIKE bseg-gjahr,    " fiscal Year
             buzei   LIKE bseg-buzei,    " Line item
             koart   LIKE bseg-koart,    " Kontoart
             umskz   LIKE bseg-umskz,    " SHB-Kennzeichen
             bschl   LIKE bseg-bschl,    " Posting key
             bstat   LIKE bkpf-bstat,    " Buchungsstatus
             mwart   LIKE bseg-mwart,    " Steuerart,
             mwskz   LIKE skb1-mwskz,    " Steuerkategorie,
             flaen(1) TYPE c,            " X = Posten geaendert
           END   OF lt_buztab.

*to hold the line item for the doc
  DATA:lv_buztab_line LIKE sy-tabix.   		

*each time refresh the table for new doc drill down
  REFRESH lt_buztab.

*determine the current line
  READ TABLE gt_final_real_fx INDEX it_selfield-tabindex.

  IF sy-subrc = 0.
*append the data for drill down to line item
    lv_buztab_line = gt_final_real_fx-buzei.
    lt_buztab-buzei = gt_final_real_fx-buzei.
    lt_buztab-bukrs = gt_final_real_fx-zz_bukrs.
    lt_buztab-gjahr = gt_final_real_fx-gjahr.
    lt_buztab-belnr = gt_final_real_fx-zz_belnr.
    APPEND lt_buztab.

  ELSE.

    MESSAGE e004.

  ENDIF.
*message if no line exists
  IF lv_buztab_line IS INITIAL.

    MESSAGE e004.

  ENDIF.
*call the dialog to drill down for line item instead of overview
  CALL DIALOG 'RF_ZEILEN_ANZEIGE'	
    EXPORTING
      buztab       FROM  lt_buztab
      buztab_line  FROM  lv_buztab_line
      tcode        FROM  'FB03'
*          x_commit
    IMPORTING
      buztab       TO    lt_buztab.
*          x_commit.

Thanks,

Sriram Ponna.

Read only

former_member386202
Active Contributor
0 Likes
549

Hi,

Refer this code

*--Local Variables

DATA : lv_belnr TYPE belnr_d,

lv_bukrs TYPE bukrs,

lv_gjahr TYPE gjahr.

IF sel_field-fieldname EQ 'BELNR'.

READ TABLE it_bsis INTO wa_bsis WITH KEY belnr = sel_field-value.

IF sy-subrc EQ 0.

lv_belnr = wa_bsis-belnr.

lv_bukrs = wa_bsis-bukrs.

lv_gjahr = wa_bsis-gjahr.

ENDIF.

CASE u_com.

WHEN '&IC1'.

SELECT SINGLE belnr

bukrs

gjahr

FROM bsis

INTO (lv_belnr,lv_bukrs,lv_gjahr)

WHERE belnr EQ lv_belnr

AND bukrs EQ lv_bukrs

AND gjahr EQ lv_gjahr.

IF sy-subrc EQ 0.

SET PARAMETER ID : 'BLN' FIELD lv_belnr,

'BUK' FIELD lv_bukrs,

'GJR' FIELD lv_gjahr.

CALL TRANSACTION 'FB03' AND SKIP FIRST SCREEN.

ENDIF.

ENDCASE.

ENDIF.

Regards,

Prashant