Skip to Content
0
Former Member
Jul 12, 2007 at 03:26 PM

Hi I Need Perfect Out Put For This Clasical Report Plz

11 Views

REPORT YSALES_REPORT_SATISH no standard page heading

line-size 400

line-count 40(5).

  • TABLES

Tables : vbak, "Sales Document Header Level1

vbap, "Sales Document Header level1

kna1. " General data in customer Master

  • Internal Tabel For T_VBAP.

DATA : Begin of t_vbap occurs 0,

matnr like vbap-matnr,

posnr like vbap-posnr,

vbeln like vbap-vbeln,

arktx like vbap-arktx,

kwmeng like vbap-kwmeng,

cmkua like vbap-cmkua,

end of t_vbap.

  • Internal Tabel For T_TAB.

DATA : Begin of t_tab occurs 0,

kunnr like vbak-kunnr,

vbeln like vbak-vbeln,

audat like vbak-audat,

netwr like vbak-netwr,

vkorg like vbak-vkorg,

name1 like KNA1-name1,

land1 like KNA1-land1,

end of t_tab.

  • Internal Tabel For T_FINAL.

DATA : Begin of t_final occurs 0,

kunnr like vbak-kunnr,

vbeln like vbak-vbeln,

audat like vbak-audat,

netwr like vbak-netwr,

vkorg like vbak-vkorg,

matnr like vbap-matnr,

posnr like vbap-posnr,

arktx like vbap-arktx,

kwmeng like vbap-kwmeng,

cmkua like vbap-cmkua,

name1 like KNA1-name1,

ladn1 like KNA1-land1,

end of t_final.

*SELECTION SCREEN

selection-screen begin of block b1 with frame title text-b03.

parameters : P_kunnr like vbak-kunnr.

select-options : S_vbeln for vbak-vbeln,

S_audat for vbak-audat.

SELECTION-SCREEN END OF BLOCK B1.

*START-OF-SELECTION.

start-of-selection.

select matnr posnr vbeln arktx kwmeng cmkua from vbap

into table t_vbap

where vbeln in S_vbeln .

select single kunnr vbeln audat netwr vkorg from vbak

into t_tab

where vbeln in S_vbeln.

select single name1 land1 from kna1

into (t_tab-name1,t_tab-land1)

where kunnr = p_kunnr.

end-of-selection.

  • Loop At T_VBAP.

loop at t_vbap.

read table t_tab with key vbeln = t_vbap-vbeln.

  • MOVE-CORRESPONDING ITAB_VBAK to ITAB_FINAL.

move :

t_tab-vbeln to t_final-vbeln,

t_tab-kunnr to t_final-kunnr,

t_tab-audat to t_final-audat,

t_tab-vkorg to t_final-vkorg,

t_tab-netwr to t_final-netwr.

  • t_tab-name1 to t_final-name1,

  • t_tab-land1 to t_final-land1.

append t_final.

clear t_final.

endloop.

  • Loop At t_final.

loop at t_final.

write : /1 sy-vline, 2 t_final-vbeln color 4,

20 sy-vline, 21 t_final-posnr color 5,

40 sy-vline, 41 t_final-matnr color 2,

60 sy-vline, 61 t_final-arktx color 1,

80 sy-vline, 81 t_final-kwmeng color 7,

100 sy-vline, 101 t_final-cmkua color 3,

120 sy-vline, 121 t_final-kunnr color 6,

140 sy-vline, 141 t_final-audat color 2,

160 sy-vline, 161 t_final-netwr color 6,

180 sy-vline, 181 t_final-vkorg color 1,

210 sy-vline, 211 t_final-name1 color 7,

230 sy-vline, 231 t_final-ladn1 color 5,

250 sy-vline.

endloop.

uline /1(250).

*TOP-OF-PAGE

top-of-page.

uline /50(24).

write : /50 sy-vline , 52 'SALES ORDER DETAILS' COLOR 6,

74 SY-VLINE.

ULINE /50(24).

ULINE /1(250).

write : /1 SY-VLINE, 2 'SALES DOC NO',

20 SY-VLINE, 21 'SALES DOC ITEM',

40 SY-VLINE,41 'MATERIAL NO',

60 SY-VLINE, 61 'SHORT SALES TEXT',

80 SY-VLINE, 81 'CUMM ORDER SALES',

100 SY-VLINE, 101 'REQ DEVL DATE',

120 SY-VLINE, 121 'CUSTOMER NO',

140 SY-VLINE, 141 'DOC DATE' ,

160 SY-VLINE, 161 'NET VALUE SALES',

180 SY-VLINE, 181 'SALES ORG',

210 SY-VLINE, 211 'CUSTOMER NAME',

230 SY-VLINE, 231 'CUSTOMER CONTY' ,

250 SY-VLINE.

ULINE /1(250).