Skip to Content
0
Former Member
Feb 16, 2007 at 03:23 AM

Reg: how to change the programm Urgent

21 Views

HI Gurus,

I created this programm. i want to add follwing fields in following programm :

&----


*& Report Z2GFR_TEST798 *

*& *

&----


*& *

*& *

&----


REPORT Z2GFR_TEST798 NO STANDARD PAGE HEADING.

tables: bkpf.

DATA: BEGIN OF itab OCCURS 0,

bukrs TYPE bkpf-bukrs,

belnr TYPE bkpf-belnr,

gjahr TYPE bkpf-gjahr,

END OF itab.

DATA: wa TYPE SRGBTBREL,

bdate TYPE bkpf-budat,

btime TYPE sy-uzeit,

tzone TYPE ttzz-tzone value 'UTC+1'.

data: g_instance like SRGBTBREL-INSTID_A.

SELECT-OPTIONS: bukrs FOR bkpf-bukrs OBLIGATORY,

belnr FOR bkpf-belnr OBLIGATORY,

gjahr FOR bkpf-gjahr OBLIGATORY DEFAULT sy-datum(4).

*

START-OF-SELECTION.

SELECT bukrs belnr gjahr FROM bkpf INTO TABLE itab

WHERE bukrs IN bukrs

AND belnr IN belnr

AND gjahr IN gjahr.

IF sy-subrc <> 0.

MESSAGE e001(00) WITH 'no data found!'.

ENDIF.

LOOP AT itab.

CLEAR wa.

  • SELECT SINGLE * FROM sgoshist INTO wa

  • WHERE objkey = itab

  • AND objtype = 'BKPF'.

concatenate itab-bukrs itab-belnr itab-gjahr into g_instance.

select single * from SRGBTBREL into wa

where INSTID_A = g_instance.

FORMAT COLOR 4 ON.

WRITE : / itab-bukrs, itab-belnr, itab-gjahr.

HIDE itab.

FORMAT COLOR 2 ON.

IF sy-subrc = 0.

CONVERT TIME STAMP wa-UTCTIME

TIME ZONE tzone

INTO DATE bdate TIME btime.

WRITE : 'Contains Attachment', bdate, btime.

ELSE.

FORMAT INTENSIFIED OFF.

WRITE: 'no attachment' .

FORMAT INTENSIFIED ON.

ENDIF.

ENDLOOP.

TOP-OF-PAGE.

FORMAT COLOR 1 ON.

WRITE: /'Comp', 'Doc-number', 'Year', 'user ',

'att.-date', ' time'.

ULINE.

FORMAT COLOR 1 OFF.

AT LINE-SELECTION.

SET PARAMETER ID 'BUK' FIELD itab-bukrs.

SET PARAMETER ID 'BLN' FIELD itab-belnr.

SET PARAMETER ID 'GJR' FIELD itab-gjahr.

CALL TRANSACTION 'FB03' AND SKIP FIRST SCREEN.

user needs following fields:

<b><u>Screen</u></b>

Screen Heading

Company Code:

Fiscal Year:

Document No:

Report:

Doc Date:

Doc No:

amount:

Status

User Name:

Doc Type:

Doc Size

How to do it plz help me

regards

JK Rao