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

sales performance report

Former Member
0 Likes
534

hi everyone,

please provide solution for the following functional specification:

The primary task is the creation of the requested shipping performance report. This report should perform the following functions:

Select all sales orders for a given date range and other criteria (see Inputs section below).

For each sales order, capture the request date (this is the requested ship date on the sales order header, visible via transaction VA01). This request date should be the basis for the sales order date range selection above.

Read all line items for each sales order. Determine if all line items have been fully shipped (i.e. the full quantity on each line has been transferred with a post goods issue document).

If all items have been fully shipped, calculate the completion date as the latest post goods issue date.

Data for this report will be pulled exclusively from the R/3 system. This data selection can optionally be restricted by various select-options on the selection screen. The selection screen should contain select-options for the following fields:

Sales order number

Sold-to customer

Ship-to customer

Ship-to land

Profit center

Material number

Order created by

Sales order type

Market segment

Requested ship date

can anybody help me with the folloeing issue

hi everyone,

please provide solution for the following functional specification:

The primary task is the creation of the requested shipping performance report. This report should perform the following functions:

Select all sales orders for a given date range and other criteria (see Inputs section below).

For each sales order, capture the request date (this is the requested ship date on the sales order header, visible via transaction VA01). This request date should be the basis for the sales order date range selection above.

Read all line items for each sales order. Determine if all line items have been fully shipped (i.e. the full quantity on each line has been transferred with a post goods issue document).

If all items have been fully shipped, calculate the completion date as the latest post goods issue date.

Data for this report will be pulled exclusively from the R/3 system. This data selection can optionally be restricted by various select-options on the selection screen. The selection screen should contain select-options for the following fields:

Sales order number

Sold-to customer

Ship-to customer

Ship-to land

Profit center

Material number

Order created by

Sales order type

Market segment

Requested ship date

can anybody help me with the folloeing issue

2 REPLIES 2
Read only

Former Member
0 Likes
510

hi,

i don't have exact program for u r spec. for similar program i am forwarding you, check weather upto what extent it is useful for you, feel free to come back if you any query.

Shipping Location - Plant VBAP-WERKS

Order Number VBAK-VBELN

Order Amount VBAP-NETWR

Order Base quantity VBEP-LMENG

Scheduled Ship Date VBEP-EDATU

Customer Name KNA1-NAME1

Customer City KNA1-ORT01

Customer State KNA1-REGIO

Customer Country KNA1-LAND1

Material VBAP-MATNR

Material Description VBAP-ARKTX

REPORT ZDOR1 .

                    • Tables declaration ****************************

tables : vbak,

vbap,

vbep,

vbfa,

kna1,

vbpa.

                      • variable Declaration ********************

data : int type f,

int1 type f,

s type f value '0.574'.

data : x type i,

y type i.

                                  • Internal table declaration ***************

data : begin of itab occurs 0,

vbeln like vbak-vbeln,

kunnr like vbak-kunnr,

werks like vbap-werks,

netwr like vbap-netwr,

matnr like vbap-matnr,

arktx like vbap-arktx,

lmeng like vbep-lmeng,

edatu like vbep-edatu,

name1 like kna1-name1,

ort01 like kna1-ort01,

regio like kna1-regio,

land1 like kna1-land1,

erdat like vbfa-erdat,

avg type f,

end of itab.

                            • Selection Screen **************************

selection-screen : begin of block blk1 with frame title text-001.

select-options :

s_vbeln for vbak-vbeln,

s_vkorg for vbak-vkorg,

s_kunnr for vbak-kunnr,

s_werks for vbap-werks,

s_auart for vbak-auart.

parameters :

fdate like sy-datum obligatory,

tdate like sy-datum default sy-datum obligatory.

selection-screen : end of block blk1.

selection-screen : begin of block blk2 with frame no intervals.

parameters : p_excel as checkbox,

p_title as checkbox.

selection-screen : end of block blk2.

                                                • Event Processing **********************

initialization.

fdate = tdate - 365.

  • s_vkorg-sign = 'I'.

  • s_vkorg-option = 'EQ'.

  • s_vkorg-low = '2022'.

  • append s_vkorg.

  • s_vkorg-low = '2024'.

  • append s_vkorg.

  • s_vkorg-low = '2114'.y

  • append s_vkorg.

  • s_auart-sign = 'I'.

  • s_auart-option = 'EQ'.

  • s_auart-low = 'OR'.

  • append s_auart.

  • s_auart-low = 'TA'.

  • append s_auart.

  • s_auart-low = 'ZXD'.

  • append s_auart.

  • s_auart-low = 'KB'.

  • append s_auart.

  • s_auart-low = 'KE'.

  • append s_auart.

*

                            • disply the report header *************************

top-of-page.

if p_title = ' '.

write : /001 ' report:', sy-repid,

115 ' Date :', sy-datum.

write : /001 ' System :',sy-sysid(3),sy-mandt,

115 'page :',sy-pagno.

skip.

write 😕 'From date :', fdate, 'To Date :', tdate.

Uline.

skip.

endif.

if p_excel = ' '.

write : /1 text-002,

10 text-003,

20 text-004,

40 text-005,

60 text-006,

80 text-007,

115 text-008,

130 text-009,

140 text-010,

145 text-011,

160 text-012,

200 text-013,

220 text-014.

Uline.

else.

write : /1 text-002,

10 text-003,

20 text-004,

40 text-005,

60 text-006,

80 text-007,

115 text-008,

130 text-009,

140 text-010,

145 text-011,

160 text-012,

200 text-013,

220 text-014.

Uline.

endif.

                                                • Start-of-selection **********************

start-of-selection.

if p_excel = ' '.

new-page line-size 132 line-count 65.

else.

new-page line-size 260 line-count 999999.

endif.

perform get_sales_data.

perform get_output_data.

                                                      • get_sales_data *************************

form get_sales_data.

select vbak~vbeln

vbak~kunnr

vbap~werks

vbap~netwr

vbap~matnr

vbap~arktx

into table itab

from vbak as vbak inner join vbap as vbap

on vbakvbeln = vbapvbeln

where vbak~vbeln in s_vbeln

and vbak~vkorg in s_vkorg

and vbak~kunnr in s_kunnr

and vbak~auart in s_auart

and vbap~werks in s_werks

and vbak~erdat between fdate and tdate.

loop at itab.

select single edatu lmeng from vbep into (itab-edatu,itab-lmeng)

where vbeln = itab-vbeln.

select single name1 ort01 regio land1 from kna1 into

(itab-name1,itab-ort01,itab-regio,itab-land1)

where kunnr = itab-kunnr.

select single erdat from vbfa into itab-erdat

where vbeln = itab-vbeln

and vbtyp_n = 'R'

and vbtyp_v = 'C'.

modify itab.

endloop.

loop at itab.

move itab-netwr to x.

move itab-lmeng to y.

if ( y <> 0 ).

int = x / y.

int1 = int * s.

move int1 to itab-avg.

else.

move 0 to itab-avg.

endif.

move x to itab-netwr.

move y to itab-lmeng.

modify itab.

endloop.

endform. "get_sales_data

                                                  • get_output_data ***********************

form get_output_data.

loop at itab.

if P_excel = ''.

write : /(4) itab-werks under text-002,

itab-vbeln under text-003,

itab-netwr under text-004,

itab-lmeng under text-005,

itab-edatu under text-006,

itab-name1 under text-007,

itab-ort01 under text-008,

itab-regio under text-009,

itab-land1 under text-010,

itab-arktx under text-011,

itab-matnr under text-012,

itab-avg under text-013,

itab-erdat under text-014.

else.

write : / itab-werks under text-002,

itab-vbeln under text-003,

itab-netwr under text-004,

itab-lmeng under text-005,

itab-edatu under text-006,

itab-name1 under text-007,

itab-ort01 under text-008,

itab-regio under text-009,

itab-land1 under text-010,

itab-arktx under text-011,

itab-matnr under text-012,

itab-avg under text-013,

itab-erdat under text-014.

endif.

at end of vbeln.

sum.

write : / itab-werks under text-002,

itab-netwr under text-004,

itab-lmeng under text-005.

skip.

endat.

endloop.

endform. "get_output_data

regards,

pavan

<b>

Reward points if it is useful</b>

Read only

0 Likes
510

hi pavan,

thanks for ur reply, but this program is not displaying any output except the system no, program name and the date. so send the proper one.

thanks,

prashanth.