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

Report

Former Member
0 Likes
1,000

hi gurus,

Can anyone tell me how to display the billing document directly from the report,

I mean in report if i click the particular billing document number it should display the billing document of that number

thanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
969

Hi King,

You have to use the interactive event at line-selection to go to the billing doc from the basic list:

first HIDE the field 'IT_REPORT-VBELN'.

see the piece of code. (at Line-selection)

form line_sel.

data: lv_field(20),

lv_value(10).

get cursor field lv_field value lv_value.

if lv_field = 'IT_REPORT-VBELN'.

if not lv_value is initial.

set parameter id 'AUN' field 'IT_REPORT-VBELN'.

call transaction 'VF03' and skip first screen.

endif.

endif.

endform.

Regards,

Azhar

12 REPLIES 12
Read only

Former Member
0 Likes
969

hi,

You need the interactive list functionality.

If it is a classical list, use the at line-selection and use a call transaction. Pass the values to the parameter ids and you can view the billing document.

Does this help you.

Regards

Subramanian

Read only

0 Likes
969

yeah i have done tht

i called call transaction its display first screen vf03

but i want to display the second screen directly

its showing me the first screen asking the billing document number but i want to skip the first screen

Read only

0 Likes
969

Hi,

Check that u have set the parameter id for right field..that is if ur field is z_vbeln then u hv set the parameter id for taht field

SET PARAMETER ID 'AUN' FIELD RS_SELFIELD-VALUE.

and then skip the first screen

Reward pt. if useful.

Regards,

Sonika

Read only

former_member632991
Active Contributor
0 Likes
969

Hi,

Use the interactive report functionality.

In the at line-selection event, check the field name that u have selected and then write the code.

SET PARAMETER ID 'AUN' FIELD RS_SELFIELD-VALUE.

CALL TRANSACTION 'VF02' AND SKIP FIRST SCREEN.

Regards,

Sonika

Read only

Former Member
0 Likes
969

Hi,

You have to use the interactive event at line-selection to go to the billing doc from the basic list:

first HIDE the field 'IT_REPORT-VBELN'.

see the piece of code. (at Line-selection)

form line_sel.

data: lv_field(20),

lv_value(10).

get cursor field lv_field value lv_value.

if lv_field = 'IT_REPORT-VBELN'.

if not lv_value is initial.

set parameter id 'AUN' field 'IT_REPORT-VBELN'.

call transaction 'VF03' and skip first screen.

endif.

endif.

endform.

reward points if useful

regards,

Anji

Message was edited by:

Anji Reddy Vangala

Read only

0 Likes
969

whats this in your coding it_report its internal table or field

thanks

Read only

0 Likes
969

Hi,

it_field is table and it_field -filed is that field.

Regards,

Sonika

Read only

0 Likes
969

HI,

Its an internal table containing that field.

Hide command will hold the defined field values which can be used in At line selection or User command events.

Suppose you use: HIDE f.

The contents of 'f' related to the current output line are stored. If this line is selected, f is filled automatically with the stored value.

The selection can be made using:

AT LINE-SELECTION

AT PFx

AT USER-COMMAND

READ LINE

You do not have to output the field with WRITE in order to be able to store its value.

Normally, this command is useful when we need to catch a value .

Reward points if its usefull

Regards,

Ramya.R

Read only

Former Member
0 Likes
969

Hi,

check this example this will help u.

REPORT ZBHREP3 LINE-COUNT 15(1) LINE-SIZE 75.

TABLES: SFLIGHT,ZEMP.

DATA VAR LIKE SFLIGHT-CONNID.

DATA ITAB LIKE SFLIGHT OCCURS 0 WITH HEADER LINE.

PARAMETERS NAME TYPE ZEMP-NAME DEFAULT 'BHARAT'.

WRITE: 25 NAME COLOR 6.

SELECT-OPTIONS CARRID1 FOR SFLIGHT-CARRID.

SET PF-STATUS 'MENU'.

SET TITLEBAR 'TIT'.

FORMAT HOTSPOT ON.

WRITE:/10 'AIRLINE CODE',25 'CONNECTION ID',40 'FLIGHT DATE'.

SELECT * FROM SFLIGHT WHERE CARRID IN CARRID1.

WRITE:/10 SFLIGHT-CARRID,25 SFLIGHT-CONNID,40 SFLIGHT-FLDATE.

  • HIDE SFLIGHT-CONNID.

ENDSELECT.

*END-OF-PAGE.

END-OF-PAGE.

WRITE:/64 'P.NO:',SY-PAGNO.

*TOP-OF-PAGE.

TOP-OF-PAGE.

WRITE:/ 'THIS IS MY FIRST REPORTS PROGRAM.'.

*START-OF-SELECTION.

START-OF-SELECTION.

DO 5 TIMES.

WRITE:/ SY-INDEX.

ENDDO.

*THESE 3 STATEMENTS ARE FOR THE END-OF-PAGE CONTENTS IN LAST PAGE.

DATA M TYPE I.

M = SY-LINCT - SY-LINNO - 1.

SKIP M.

*AT LINE-SELECTION.

AT LINE-SELECTION.

CASE SY-LSIND.

WHEN '1'.

READ LINE SY-LILLI FIELD VALUE SFLIGHT-CONNID INTO VAR.

SELECT * FROM SFLIGHT INTO CORRESPONDING FIELDS OF ITAB WHERE

CONNID = VAR.

WRITE:/ ITAB-CARRID,ITAB-PLANETYPE,ITAB-PAYMENTSUM.

ENDSELECT.

WRITE:/ VAR.

  • SELECT * FROM SFLIGHT INTO CORRESPONDING FIELDS OF ITAB *WHERE

  • CONNID = SFLIGHT-CONNID.

  • WRITE:/ ITAB-CARRID,ITAB-PLANETYPE,ITAB-PAYMENTSUM.

  • ENDSELECT.

  • WRITE:/ SFLIGHT-CONNID.

WHEN '2'.

WRITE:/ SY-LILLI.

WHEN '3'.

WRITE 😕 'BHARAT'.

ENDCASE.

regards,

bharat.

Read only

Former Member
0 Likes
969

hi,

If want to hide the screen use process before output. I mean "at line selection output" . It will set the screen attributes dynamically.

If you want to show the billing document by clicking bill document no very well you can use interactive report.

AT LINE-SELECTION.

IF SY-LSIND = 1.

GET CURSOR FIELD FLDNAM VALUE FLDVAL.

IF FLDNAM = 'T_VBAK-VBELN'.

PERFORM GET_SALES.

ELSEIF FLDNAM = 'T_VBAK-KUNNR'.

PERFORM GET_CUSTOMER.

ENDIF.

ENDIF.

here fldval and fldnam are varialbles declared.

use hide statement so that it will get the billing docu no and display the records accordingly

FORM GET_SALES.

SELECT VBELN KUNNR ERDAT

FROM VBAK

INTO TABLE T_VBAK

WHERE VBELN IN S_VBELN AND KUNNR IN S_KUNNR.

LOOP AT T_VBAK.

FORMAT COLOR COL_KEY.

FORMAT COLOR OFF.

HIDE T_VBAK-VBELN.

HIDE T_VBAK-KUNNR.

WRITE: /19 T_VBAK-VBELN COLOR 2 HOTSPOT ON,

32 T_VBAK-KUNNR COLOR 4 HOTSPOT ON,47 T_VBAK-ERDAT.

ENDLOOP.

ENDFORM. " GET_HEADER.

HOPE THE SAMPLE CODE WILL HELP U.

REGARDS,

RAMYA.R

Read only

Former Member
0 Likes
969

Hi,

First you develop a interactive report. I am giving the sample code.

pls execute and check it.

DATA: vbeln TYPE vbrk-vbeln.

START-OF-SELECTION.

SELECT VBELN FROM VBRK INTO vbeln.

write: / vbeln.

HIDE: vbeln.

ENDSELECT.

AT LINE-SELECTION.

SET PARAMETER ID: 'VF' FIELD vbeln.

call TRANSACTION 'VF03' AND SKIP FIRST SCREEN.

Read only

Former Member
0 Likes
970

Hi King,

You have to use the interactive event at line-selection to go to the billing doc from the basic list:

first HIDE the field 'IT_REPORT-VBELN'.

see the piece of code. (at Line-selection)

form line_sel.

data: lv_field(20),

lv_value(10).

get cursor field lv_field value lv_value.

if lv_field = 'IT_REPORT-VBELN'.

if not lv_value is initial.

set parameter id 'AUN' field 'IT_REPORT-VBELN'.

call transaction 'VF03' and skip first screen.

endif.

endif.

endform.

Regards,

Azhar