Whts the corresponding BW report for AP Liability Reconciliation report?
HI All,
Whts the corresponding BW report for AP Liability Reconciliation report?
R/3 report is: S_ALR_87012082 u2013 provides vendor balances that make this up.
Whts the BW report for validating the R/3 data.
Please Reply.
Thansk in Advance.
Hi,
Yes, I was getting partial results. I got rid of it by unchecking the the options in the 'SQL' tab in the Universe parameters.
Thanks for the help.
Regards,
Alok.
Similar Messages
-
How to find out the corresponding planning area for a given infosource?
Hi,
We are in the process of implementing BW-APO in our project.
We have got couple of standard BI infosources and now the task is to identify the corresponding planning area for a given infosource..
Let' say for 0APO_DP_ORDERANALYTICS_1
what is the planning area?
Any help is appreciatable!!!
Regards,
Swapna.GHi Swapna.
You are at risk of putting the cart before the horse here. As Sujay asks, it is important to understand whether you are using the standard provided planning areas. Even then there are a number of different planning areas that may be deployed depending upon the required planning functionality. There then may be the case where standard planning areas are not being used (this is very often the case) which means that your InfoSources might only be good as a template.
All this makes your question virtually impossible to answer.
Maybe if you gave some background as to the status of your project we could help more.
From your question it looks as if you are working on APO-BW outbound (i.e., reporting after the planning has taken place) which would suggest that the design and build of APO-BW inbound and the planning functionality has taken place. Is this the case?
If so, then you need to touch base with your APO technical guys to understand the design of the planning areas and whether your standard 0APO_* InfoSources are suitable.
If not, I suggest you are working back to front and you should be focussing on the APO-BW inbound required to support the planning requirements.
Regards, Mark. -
Please any one provide crystal report for Location wise sales report with GP
Please any one provide crystal report for Location wise sales report with GP.Please its urgent
A report writer tool like Crystal reports is not available due to the cost involved in its licenses.Do you think that Oracle Reports is free then? It's $$$$.
You can download and test it for free, but if you want to use it in production you have to buy a license. -
Question regarding the date in MARC for a daily movement report
Hi,
I have a requirement, where i need to create a report, based on the selection screen parameters for <u>purchasing group</u> and <u>date</u> (the default is 1 minus the current date.)
The report is used to view the daily movement, relating to the selected purchasing group and date.
Where and how do i find entries for that specific date? What tables and field or fields do i use?
Points will be rewarded and all help will be greatly appreciated.
Thank You,
JohnSee the below example code :
REPORT ZQA_MOVEMENT_ANALYSIS no standard page heading.
*>>> ELEMENTS COPIED FROM REPORT BALVHT01 .
ALV
TYPE-POOLS: SLIS.
Includes
INCLUDE .
tables: mkpf, mseg, marc, mara, makt, mard.
DATA =============================================================== *
DATA: G_BOXNAM TYPE SLIS_FIELDNAME VALUE 'BOX',
G_EXPANDNAME TYPE SLIS_FIELDNAME VALUE 'EXPAND',
P_F2CODE LIKE SY-UCOMM VALUE '&ETA',
P_LIGNAM TYPE SLIS_FIELDNAME VALUE 'LIGHTS',
G_SAVE(1) TYPE C,
G_TABNAME_HEADER TYPE SLIS_TABNAME,
G_TABNAME_ITEM TYPE SLIS_TABNAME,
g_default(1) type c,
G_EXIT(1) TYPE C,
GX_VARIANT LIKE DISVARIANT,
G_VARIANT LIKE DISVARIANT.
CONSTANTS:
GC_FORMNAME_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE',
GC_FORMNAME_ITEM_EXPAND TYPE SLIS_FORMNAME VALUE 'ITEM_EXPAND',
GC_FORMNAME_user_command type slis_formname value slis_ev_user_command.
DATA: GT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
GS_LAYOUT TYPE SLIS_LAYOUT_ALV,
GS_KEYINFO TYPE SLIS_KEYINFO_ALV,
GT_SORT TYPE SLIS_T_SORTINFO_ALV,
GT_SP_GROUP TYPE SLIS_T_SP_GROUP_ALV,
GT_EVENTS TYPE SLIS_T_EVENT.
DATA: G_REPID LIKE SY-REPID.
DATA: GT_LIST_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.
data: begin of i_movement occurs 0,
matnr like mseg-matnr,
bwart like mseg-bwart,
budat like mkpf-budat,
mblnr like mseg-mblnr,
gjahr like mseg-gjahr,
shkzg like mseg-shkzg,
menge like mseg-menge,
meins like mseg-meins,
end of i_movement.
data: begin of i_mat occurs 0,
matnr like mara-matnr,
maktx like makt-maktx,
labst like mard-labst,
meins like mara-meins,
end of i_mat.
data: begin of i_output occurs 0.
include structure ZFD_MOVEMENT_ANALYSIS.
data: end of i_output.
data i_popuptext like popuptext occurs 2 with header line.
data: v_matnr like mara-matnr.
data: x_movement like i_movement.
SELECTION-SCREEN --------------------------------------------------- *
SELECTION-SCREEN BEGIN OF BLOCK period WITH FRAME TITLE text-001.
select-options: so_budat for mkpf-budat obligatory no-extension.
SELECTION-SCREEN END OF BLOCK period.
SELECTION-SCREEN BEGIN OF BLOCK org WITH FRAME TITLE text-002.
parameters: p_werks like marc-werks obligatory default '1000',
p_lgort like mard-lgort obligatory default '1000'.
select-options: so_matnr for mseg-matnr,
so_dept for marc-zzdept,
so_kostl for mseg-kostl,
so_ekgrp for marc-ekgrp.
SELECTION-SCREEN END OF BLOCK org.
SELECTION-SCREEN SKIP 1.
Variant
SELECTION-SCREEN BEGIN OF BLOCK 0 WITH FRAME TITLE TEXT-P01.
PARAMETERS: P_VARI LIKE DISVARIANT-VARIANT.
SELECTION-SCREEN END OF BLOCK 0.
INITITALIZATION ==================================================== *
INITIALIZATION.
G_REPID = SY-REPID.
G_TABNAME_ITEM = 'I_OUTPUT'.
define keyinfo
CLEAR GS_KEYINFO.
GS_KEYINFO-ITEM01 = 'MATNR'.
PERFORM E01_FIELDCAT_INIT USING GT_FIELDCAT[].
PERFORM E03_EVENTTAB_BUILD USING GT_EVENTS[].
PERFORM E04_COMMENT_BUILD USING GT_LIST_TOP_OF_PAGE[].
PERFORM E06_T_SORT_BUILD USING GT_SORT[].
PERFORM E07_SP_GROUP_BUILD USING GT_SP_GROUP[].
Set Options: save variants userspecific or general
G_SAVE = 'A'.
PERFORM VARIANT_INIT.
Get default variant
GX_VARIANT = G_VARIANT.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
I_SAVE = G_SAVE
CHANGING
CS_VARIANT = GX_VARIANT
EXCEPTIONS
NOT_FOUND = 2.
IF SY-SUBRC = 0.
P_VARI = GX_VARIANT-VARIANT.
ENDIF.
AT SELECTION-SCREEN ================================================ *
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_VARI.
PERFORM F4_FOR_VARIANT.
PAI
AT SELECTION-SCREEN.
PERFORM PAI_OF_SELECTION_SCREEN.
START-OF-SELECTION ================================================= *
start-of-selection.
perform check_background_processing.
PERFORM E05_LAYOUT_BUILD USING GS_LAYOUT. "wg. Parameters
perform get_data.
perform build_report.
perform write_report.
AT LINE SELECTION ================================================== *
at line-selection.
if sy-lsind = 1.
format intensified off.
if not i_output-matnr is initial.
v_matnr = i_output-matnr.
loop at i_movement where matnr = i_output-matnr.
write: / i_movement-mblnr hotspot on,
i_movement-bwart,
i_movement-budat,
i_movement-shkzg.
if i_movement-shkzg = 'H'.
format color col_negative.
else.
format color col_positive.
endif.
write: i_movement-menge,
i_movement-meins.
format color off.
hide: i_movement-mblnr, i_movement-gjahr.
endloop.
clear i_movement.
endif.
elseif sy-lsind = 2.
set parameter id 'MBN' field i_movement-mblnr.
set parameter id 'MJA' field i_movement-gjahr.
call transaction 'MB03' and skip first screen.
endif.
==================================================================== *
top-of-page.
perform top_of_page.
top-of-page during line-selection.
read table i_mat with key matnr = i_output-matnr.
write: i_output-matnr,
i_mat-maktx,
so_budat-low, ' to ', so_budat-high.
uline.
clear: i_mat, i_output.
*& Form write_report
text
--> p1 text
<-- p2 text
FORM write_report.
Call ABAP/4 List Viewer
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = g_repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_STRUCTURE_NAME =
IS_LAYOUT = gs_layout
IT_FIELDCAT = gt_fieldcat[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS = gt_sp_group[]
IT_SORT = gt_sort[]
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = g_save
IS_VARIANT = g_variant
IT_EVENTS = gt_events[]
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = i_output
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " write_report
*& Form get_data
text
--> p1 text
<-- p2 text
FORM get_data.
if so_dept[] is initial and
so_matnr[] is initial and
so_kostl[] is initial and
so_ekgrp[] is initial.
i_popuptext-text = 'Please choose a department, material number,'.
append i_popuptext.
i_popuptext-text = 'cost center or purchasing group'.
append i_popuptext.
CALL FUNCTION 'DD_POPUP_WITH_INFOTEXT'
EXPORTING
TITEL = 'Please Note'
START_COLUMN = 1
START_ROW = 1
END_COLUMN = 5
END_ROW = 3
INFOFLAG = ' '
IMPORTING
ANSWER =
TABLES
LINES = i_popuptext.
Stop execution until user enters a purch group or dept.
stop.
endif.
get all materials matching selection criteria - exclude finished
materials
select kmatnr kmaktx labst meins
from ( ( ( marc as c inner join makt as k
on cmatnr = kmatnr ) INNER JOIN mard as d
on cmatnr = dmatnr ) INNER JOIN mara as a
on cmatnr = amatnr )
into table i_mat
where c~matnr in so_matnr and
c~ekgrp in so_ekgrp and
c~zzdept in so_dept and
c~werks = p_werks and
d~werks = p_werks and
k~spras = 'E' and
d~lgort = p_lgort
order by k~matnr.
if sy-subrc = 0.
read table so_budat index 1.
loop at i_mat.
get all material movements for all materials identified since
start date on date interval selected by user
select matnr bwart budat bmblnr bgjahr shkzg menge meins
appending table i_movement
from ( mseg as b INNER JOIN mkpf as a
ON bmblnr = amblnr AND
bmjahr = amjahr )
where b~matnr = i_mat-matnr and
a~budat >= so_budat-low.
endloop.
endif.
ENDFORM. " get_data
*& Form build_report
text
--> p1 text
<-- p2 text
FORM build_report.
data: x_movement like i_movement,
v_processed_inv like mseg-menge.
sort i_movement by matnr ascending
budat descending.
loop at i_movement.
if movement after end of period specified, use movement to work
backwards to inventory at end of selected period end date
if i_movement-budat > so_budat-high.
if i_movement-shkzg = 'H'.
add i_movement-menge to i_output-ending_inv.
else.
subtract i_movement-menge from i_output-ending_inv.
endif.
endif.
compute inventory at beginning of period
if i_movement-shkzg = 'H'.
add i_movement-menge to i_output-begin_inv.
else.
subtract i_movement-menge from i_output-begin_inv.
endif.
if movement in the time period specified, summarize movements by
type
if i_movement-budat >= so_budat-low and
i_movement-budat <= so_budat-high.
if i_movement-bwart+0(1) = '1'.
if i_movement-shkzg = 'S'.
add i_movement-menge to i_output-purchased_inv.
else.
subtract i_movement-menge from i_output-purchased_inv.
endif.
elseif i_movement-bwart+0(1) = '2'.
if i_movement-shkzg = 'S'.
add i_movement-menge to i_output-transferred_inv.
else.
subtract i_movement-menge from i_output-transferred_inv.
endif.
elseif i_movement-bwart+0(1) = '4'.
if i_movement-shkzg = 'S'.
add i_movement-menge to i_output-transferred_inv.
else.
subtract i_movement-menge from i_output-transferred_inv.
endif.
elseif i_movement-bwart+0(2) = '55'.
if i_movement-shkzg = 'S'.
add i_movement-menge to i_output-scrapped_inv.
else.
subtract i_movement-menge from i_output-scrapped_inv.
endif.
elseif i_movement-bwart+0(1) = '6'.
if i_movement-shkzg = 'S'.
add i_movement-menge to i_output-sold_inv.
else.
subtract i_movement-menge from i_output-sold_inv.
endif.
elseif i_movement-bwart+0(1) = '7'.
if i_movement-shkzg = 'S'.
add i_movement-menge to i_output-cycled_inv.
else.
subtract i_movement-menge from i_output-cycled_inv.
endif.
elseif i_movement-bwart+0(2) = '96'.
if i_movement-shkzg = 'S'.
add i_movement-menge to i_output-recovered_inv.
else.
subtract i_movement-menge from i_output-recovered_inv.
endif.
else.
if i_movement-shkzg = 'S'.
add i_movement-menge to i_output-other.
else.
subtract i_movement-menge from i_output-other.
endif.
endif.
endif.
Summarize data for material number and add to output list
x_movement = i_movement.
at end of matnr.
clear i_mat.
read table i_mat with key matnr = i_movement-matnr.
i_output-maktx = i_mat-maktx.
inventory at end of period = current inventory + changes since end
of period
add i_mat-labst to i_output-ending_inv.
inventory at begin of period = ending inventory + changes in
interval
add i_mat-labst to i_output-begin_inv.
build percentages for types of movements in period - the only
reason this data needs to be stored rather than computed on the
fly is for sorting of data
v_processed_inv = ( i_output-begin_inv - i_output-ending_inv )
+ i_output-purchased_inv.
if v_processed_inv <> 0.
i_output-percent_sold =
( i_output-sold_inv / v_processed_inv ) * 100 * -1.
i_output-percent_scrapped =
( i_output-scrapped_inv / v_processed_inv ) * 100 * -1.
i_output-percent_transferred =
( i_output-transferred_inv / v_processed_inv ) * 100 * -1.
i_output-percent_cycled =
( i_output-cycled_inv / v_processed_inv ) * 100 * -1.
i_output-percent_recov =
( i_output-recovered_inv / v_processed_inv ) * 100 * -1.
i_output-other =
( i_output-other / v_processed_inv ) * 100 * -1.
endif.
record material number
move i_movement-matnr to i_output-matnr.
i_output-meins = x_movement-meins.
append i_output.
clear i_output.
endat.
endloop.
clear i_movement.
ENDFORM. " build_report
FORM E01_FIELDCAT_INIT *
--> E01_LT_FIELDCAT *
FORM E01_FIELDCAT_INIT USING E01_LT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
DATA: LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME =
I_INTERNAL_TABNAME = G_TABNAME_ITEM
I_STRUCTURE_NAME = 'ZFD_MOVEMENT_ANALYSIS'
I_CLIENT_NEVER_DISPLAY = 'X'
I_BYPASSING_BUFFER = 'X'
CHANGING
CT_FIELDCAT = E01_LT_FIELDCAT[].
ENDFORM.
FORM E03_EVENTTAB_BUILD *
--> E03_LT_EVENTS *
FORM E03_EVENTTAB_BUILD USING E03_LT_EVENTS TYPE SLIS_T_EVENT.
DATA: LS_EVENT TYPE SLIS_ALV_EVENT.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 1
IMPORTING
ET_EVENTS = E03_LT_EVENTS.
tell program which form to call for top of page event
READ TABLE E03_LT_EVENTS WITH KEY NAME = SLIS_EV_TOP_OF_PAGE
INTO LS_EVENT.
IF SY-SUBRC = 0.
MOVE GC_FORMNAME_TOP_OF_PAGE TO LS_EVENT-FORM.
APPEND LS_EVENT TO E03_LT_EVENTS.
ENDIF.
tell program which form to call for item expand event
READ TABLE E03_LT_EVENTS WITH KEY NAME = slis_ev_item_data_expand
INTO LS_EVENT.
IF SY-SUBRC = 0.
MOVE GC_FORMNAME_ITEM_EXPAND TO LS_EVENT-FORM.
APPEND LS_EVENT TO E03_LT_EVENTS.
ENDIF.
ENDFORM.
FORM E04_COMMENT_BUILD *
--> E04_LT_TOP_OF_PAGE *
FORM E04_COMMENT_BUILD USING E04_LT_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.
DATA: LS_LINE TYPE SLIS_LISTHEADER.
Listenüberschrift: Typ H
CLEAR LS_LINE.
LS_LINE-TYP = 'H'.
LS_LINE-KEY: not used for this type
write sy-datum to LS_LINE-INFO.
APPEND LS_LINE TO E04_LT_TOP_OF_PAGE.
CLEAR LS_LINE.
LS_LINE-TYP = 'H'.
LS_LINE-KEY: not used for this type
LS_LINE-INFO = 'FreshDirect Product Reorder Report'.
APPEND LS_LINE TO E04_LT_TOP_OF_PAGE.
Kopfinfo: Typ S
CLEAR LS_LINE.
LS_LINE-TYP = 'S'.
LS_LINE-KEY = TEXT-050.
LS_LINE-INFO = TEXT-010.
APPEND LS_LINE TO E04_LT_TOP_OF_PAGE.
LS_LINE-KEY = TEXT-051.
APPEND LS_LINE TO E04_LT_TOP_OF_PAGE.
Aktionsinfo: Typ A
CLEAR LS_LINE.
LS_LINE-TYP = 'A'.
LS_LINE-KEY: not used for this type
LS_LINE-INFO = TEXT-002.
APPEND LS_LINE TO E04_LT_TOP_OF_PAGE.
ENDFORM.
FORM E05_LAYOUT_BUILD *
<-> E05_LS_LAYOUT *
FORM E05_LAYOUT_BUILD USING E05_LS_LAYOUT TYPE SLIS_LAYOUT_ALV.
E05_LS_LAYOUT-F2CODE = P_F2CODE.
E05_LS_LAYOUT-ZEBRA = 'X'.
E05_LS_LAYOUT-colwidth_optimize = 'X'.
ENDFORM.
FORM E06_T_SORT_BUILD *
--> E06_LT_SORT *
FORM E06_T_SORT_BUILD USING E06_LT_SORT TYPE SLIS_T_SORTINFO_ALV.
DATA: LS_SORT TYPE SLIS_SORTINFO_ALV.
CLEAR LS_SORT.
LS_SORT-FIELDNAME = 'MATNR'.
LS_SORT-TABNAME = G_TABNAME_ITEM.
LS_SORT-SPOS = 1.
LS_SORT-UP = 'X'.
APPEND LS_SORT TO E06_LT_SORT.
ENDFORM.
FORM E07_SP_GROUP_BUILD *
--> E07_LT_SP_GROUP *
FORM E07_SP_GROUP_BUILD USING E07_LT_SP_GROUP TYPE SLIS_T_SP_GROUP_ALV.
DATA: LS_SP_GROUP TYPE SLIS_SP_GROUP_ALV.
CLEAR LS_SP_GROUP.
LS_SP_GROUP-SP_GROUP = 'A'.
LS_SP_GROUP-TEXT = TEXT-005.
APPEND LS_SP_GROUP TO E07_LT_SP_GROUP.
ENDFORM.
FORM TOP_OF_PAGE *
FORM TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.
data v_repid like sy-repid.
write: / sy-datum, sy-uzeit,
100 'FreshDirect Material Movement Type Analysis Report'.
show parameters chosen on selection screen in header
v_repid = sy-repid.
CALL FUNCTION 'Z_WRITE_SELECTION_SCREEN'
EXPORTING
REPID = v_repid
EXCEPTIONS
REPORT_NOT_FOUND = 1
OTHERS = 2.
write column headings
format color col_heading.
write: /(18) 'Material #',
(40) 'Description',
(16) ' Beginning Inv.',
(16) ' Purchased',
(16) ' Available Inv.',
(16) ' Ending Inv.',
(16) ' Processed Inv.',
(25) ' Sold',
(25) ' Scrapped',
(25) ' Transferred',
(25) ' Cycle Counted',
(25) ' Other'.
format color off.
uline /1(278).
ENDFORM.
FORM F4_FOR_VARIANT *
FORM F4_FOR_VARIANT.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
IS_VARIANT = G_VARIANT
I_SAVE = G_SAVE
I_TABNAME_HEADER = G_TABNAME_HEADER
I_TABNAME_ITEM = G_TABNAME_ITEM
it_default_fieldcat =
IMPORTING
E_EXIT = G_EXIT
ES_VARIANT = GX_VARIANT
EXCEPTIONS
NOT_FOUND = 2.
IF SY-SUBRC = 2.
MESSAGE ID SY-MSGID TYPE 'S' NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
IF G_EXIT = SPACE.
P_VARI = GX_VARIANT-VARIANT.
ENDIF.
ENDIF.
ENDFORM.
*& Form PAI_OF_SELECTION_SCREEN
text
FORM PAI_OF_SELECTION_SCREEN.
IF NOT P_VARI IS INITIAL.
MOVE G_VARIANT TO GX_VARIANT.
MOVE P_VARI TO GX_VARIANT-VARIANT.
CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
EXPORTING
I_SAVE = G_SAVE
CHANGING
CS_VARIANT = GX_VARIANT.
G_VARIANT = GX_VARIANT.
ELSE.
PERFORM VARIANT_INIT.
ENDIF.
ENDFORM. " PAI_OF_SELECTION_SCREEN
*& Form VARIANT_INIT
text
--> p1 text
<-- p2 text
FORM VARIANT_INIT.
CLEAR G_VARIANT.
G_VARIANT-REPORT = G_REPID.
ENDFORM. " VARIANT_INIT
INCLUDE ZQA_UTILITY_INCLUDE.
***INCLUDE ZQA_UTILITY_INCLUDE .
*& Form display_popup_message
text
--> p1 text
<-- p2 text
form display_popup_message using x_text1
x_text2.
data: int_popuptext like popuptext occurs 2 with header line.
int_popuptext-text = x_text1.
append int_popuptext.
int_popuptext-text = x_text2.
append int_popuptext.
call function 'DD_POPUP_WITH_INFOTEXT'
exporting
titel = 'Please Note'
start_column = 1
start_row = 1
end_column = 5
end_row = 3
tables
lines = int_popuptext.
endform. " display_popup_message
*& Form upload_data_file
text
-->P_int_INPUTDATA text
form upload_data_file tables x_inputdata
using x_filename like rlgrap-filename.
clear x_inputdata.
refresh x_inputdata.
file on UNIX app server
if x_filename+0(1) = '/'.
open dataset x_filename for input.
if sy-subrc <> 0.
perform display_popup_message using 'Error opening file'
x_filename.
stop.
else.
do.
read dataset x_filename into x_inputdata.
if sy-subrc <> 0.
exit.
endif.
append x_inputdata.
clear x_inputdata.
enddo.
endif.
close dataset x_filename.
else.
file on local PC of GUI
call function 'UPLOAD'
exporting
filename = x_filename
filetype = 'ASC'
tables
data_tab = x_inputdata
exceptions
conversion_error = 1
invalid_table_width = 2
invalid_type = 3
no_batch = 4
unknown_error = 5
guint_refuse_filetransfer = 6
others = 7
if sy-subrc <> 0.
perform display_popup_message using 'Error opening file'
x_filename.
stop.
endif.
endif.
endform. " upload_data_file
*& Form check_background_processing
text
--> p1 text
<-- p2 text
form check_background_processing.
endform. " check_background_processing
Reward Points if it is helpful
Thanks
Seshu -
Modifying the Standard search process for variables in BI reports
Hi Gurus,
I am encountering the following issue while executing a report.This is related to the text of a characteristic value of an InfoObject.
In the variables screen, the F4 search help for a variable is currently case-sensitive. To be more specific, when the user gives the description "East Wind" , the F4 search help returns a value. But when the search is performed using "EAST WIND" or "east wind" or " east* ", no results are returned.
I observed a How To Document for resolving this issue in BW 3.X version. It calls for the insertion of a form routine in Function Module RSD_CHA_BUILD_QUERY. But this function Module is replaced in BI 7.0 version.
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/48cfaa90-0201-0010-cebb-8ee0a29e0fc7
Request you to let me know the replacement Function Module or other ways to resolve the issue.
Regards,
Balaji
Edited by: Balaji Vijay on Apr 24, 2009 4:42 PMHi all,
The solution is provided by the OSS Note 1269398 - Case insensitive search in input help (F4).
Regards,
Balaji -
Standard report for period end stock report
Hi all,
My client is looking for a SAP standard report for material.Their req is as follows.
Open Bal (Stock)
Add: Purchase/Production
Less: Sales/Consumption
Closing Bal(Stock)
I have sugegested them MC.9,MB51,etc....but they are not satified.
They are not willing to go for a 'Z' report too....
Can any one suggest me whether their is any function module or bapi or badi thro' which i can fullfill my clients req. or any other better alternative like report painter,set,etc which suit my requirement.
(can you please let me know from table i can get these datas......just for knowledge purpose)
hope that anybody will guide me...
We are in 6.0 version
God Bless
RegardsTry Standard Report MB5B once.
Regards,
Ashok -
Standard reports for cash and fundflow reports?
Hi,
i need a requirement to maintain reports for cash and funds flow statements?Actually relevant to these reports i use to maintain customize only but coming to fundflow and cash flow there is much complications to do that.
so is there any standard reports to maintain fundflow and cash flow reports which is relevant to FI-CO
Thanks in Advance
vassHi
You have Cash flow statement based on 0FIGL_VC1
http://help.sap.com/saphelp_nw70/helpdata/EN/7d/6cfa40ee14f26fe10000000a1550b0/frameset.htm
You also have Cash flow statement based on 0BCS_C10, but not sure it does suits to your requirement.
http://help.sap.com/saphelp_nw70/helpdata/EN/39/09503e50a9054be10000000a114084/frameset.htm
Hope it helps -
How to track the corresponding CWIP and Asset after settlement in reports
Dear gurus,
We are trying to develop a single report which would have commitments, actual costs, Auc amounts and Final Asset postings w.r.t a project or WBS element.
What is the table where we can find AuC amount and CWIP number for given WBS elements. Similarly where can we find the Final Asset number corresponding to the WBS element.
Is there any way we can work around the settlement rules.. Is there any table where the settlement rules are saved??
Pls guide..
Thank you
KAPPrafulla wrote:
we are mentaining few envs where all the envs get refreshed from the same baseload.But due to some reasons in a particular QA env after some time of the db refresh due to some test script execution or from the application, some data are getting deleted .Is there any method to trace the time and the content of the change and send an alert automatically without using trigger, I mean is there any audit method so that we can enble and check and also send the alert.And if possible ,Can any one let me know the details how to send mail from Oracle.
Code instrumentation?
As for e-mail - come on! This forum is littered with questions and answers about sending e-mail from Oracle. How about using the search button? -
Re: Need Help in Report for "Leave Liability"
Hi ,
My requirement is to develop a Leave liability report with below fields , can any one help how to go a head
Personnel no.
Opening balance of the current year
Leave utilized for the first quarter
Leaves allotted for the first quarter
Opening balance for the second quarter
Leave utilized for the second quarter
Leaves allotted for the second quarter
Opening balance for the third quarter
Leave utilized for the third quarter
Leaves allotted for the third quarter
Closing balance as on 31Dec
Leaves to be encased
Thanks in advance.hi check the table pa2001 ,pa2002 ,pa2006 ,pa2013 for the ..
regards,
venkat. -
How to use the field of 'FM for Determining Address' in report RSWUWFML2?
Dear gurus,
In the selection screen of report RSWUWFML2, there is a field named 'FM for Determining Address' . How to use it? Is it for sending e-mail to specific e-mail addresses?
Regards
DavidI will test soon. Thanks to all involved.
-
Report for outstanding invoice/ collections report
How could we get a report on all the outstanding invoice for a customer based on regions. i.e
One customer is serviced across the US. the client needs to get a report on all outstanding invoices based on regions. Any suggestions??You can specialize T-Code VF05 using info provided in OSS note 350068
From a previous post of yours it sounds like the client wants no special code. This note provides an example for the VA05 transaction, but it applies to VF05 as well.
The only issue on a client "sell" point is that it does require append table fields, and ABAP code to create the interface to pass the appended values. it is pretty basic code though, and works great because you can go out and get all kinds of data to enhance the VA05 VF05 transactions.
Once complete you can add / sort the columns ala standard ALV report funcitons
Bill -
Crystal reports for Eclipse vs Crystal reports Developer Edition
hi guys,
what is the difference between CR4E and CR Developer edition in the context of using it in a J2ee application?
As far i know the below are the differences
1.CR4E has a better JRC than the JRC that comes with the CR Developer
2. CR4E is free and CR Developer is not for free
3. CR Developer has a better UI for Report desigining whereas CR4E doesnt have . It is possible to get a trial version of CRDeveloper to design and use the JRC of CR4E to execute the report from a J2EE application
is there is something that CR developer has which CR4E doesnt have when it comes to integrating with an J2EE application
Thanks,
PremPlease contact our sales departments to discuss differences and options to download trial versions etc.
http://www.businessobjects.com/company/contact_us/
U.S. and Canada
For sales inquiries in the U.S. and Canada, please call +1 866 681 3435 between 7 a.m. and 5 p.m. Pacific time, Monday to Friday u2013 or contact us using our email form. -
Crystal Reports for VS2010 versus Crystal Reports 2011
I'm not exactly new to CR, however, I have been away from it for a while and am now being tasked to work with this product again. Alot has changed in that period of time. I'm currently using Visual Studio 2010 and I have learned that Crystal Reports is no longer integrated within Visual Studio but available from SAP as a free download as Crystal Reports 2010 and will essentially be a plug in to the Visual Studio 2010 development environment once installed.
In my effort to find a sample database as well as any additional documentation related to Crystal Reports 2010, I'm finding and/or seeing a lot of information related to Crystal Reports 2011 and little or nothing related to Crystal Reporst 2010.
1. Is CR2011 a seperate, stand-alone product versus CR2010, which is now a seperate download and plug in product to VS2010?
2. Are there any sample databases, sample reports, sample .NET code available for CR2010?
3. Do I have it all wrong and CR2010 is really CR2011 and SAP is just trying to confuse everybody?
MarlonHi Marlon,
1. Is CR2011 a seperate, stand-alone product versus CR2010, which is now a seperate download and plug in product to VS2010?
CR 2011 is the Full standalone Report Designer, no SDK with it. The CR for VS 2010 is the plugin that was shipped within the VS .NET as an included plug-in , you just have to install it separately with VS 2010. The complimentary SDK is in CR for VS 2010 which has the matching CR 2011 report Designer.
2. Are there any sample databases, sample reports, sample .NET code available for CR2010?
No, but you can use the ones from our download page: These are for[ CR XI R2|https://smpdl.sap-ag.de/~sapidp/012002523100005852352008E/cr_xi_xtreme_rep_smpl_en.zip] and is based on the old reports that you are familiar with.
For sample code see this [page|http://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsSDKSampleApplications], lots of them available.
RAS is the new Report Designer RCAPI SDK and you can find the help for the SDK from the same page you downloaded the installer.
3. Do I have it all wrong and CR2010 is really CR2011 and SAP is just trying to confuse everybody?
We are trying to confuse everyone... just kidding. It's the way the latest builds are released. CR 2011 has no SDK and CR for VS 2010 is the SDK for CR 2011.
You'll also notice that CR for VS 2010 is version 13 and CR 2011 is version 14 which matches Business Objects Enterprise Version 4.0
Thanks
Don -
1099 Misc reporting for US in SAP Standard report not containing any value
HI All,
In my current clients requirement is to get the SAP Standard reprort for 1099 Misc reporting for US
1) Accordingly i have done configuration for Withholding tax for US with tax type FE
2) There are 14 WHT Tax codes under FE , like 01 = Rent , 02 = royalty, 03 = other income etc.
3) Assigned Tax type with Co. Code
4) Activated WHT tax at Co. code
5) Created WHT country US
And also assign WHT tax type FE and respective tax code to vendors in Accounting info in Vendor Master
Posted couple of vendor invoices and made payment for those also
Then after this when i run the SAP Standard report for 1099 Misc reporting for US , then the output contains with no data.. but only contains vedor names and WHT tax code which i have assigned..
I think i have missed some configuration may be . Can any one let me know the detail step by step config and process how to get proper out put in 1099 Misc reporting for US in Standard reporting..
Regards,
SandipHello auroar,
I followed the path that you provided and that lead me to this part of the tree: Define File Format for Withholding Tax Reporting...This is where I found the information that I needed.
Thank you very much.
-Patrick
Edited by: Patrick Smith on Oct 22, 2009 8:41 PM -
Functional Spec for VENDOR AGE ANALYSIS report
Hi experts
I need to develope a VENDOR AGE ANALYSIS REPORT. But due to some reason i cant be able to get the Functional Specification for that object. So could you please help me by sending the above mention functional Specification.
thanks and regadrs
Pratikgot the following from sdn thread:
This is the sample report for vendor aging:
Std reports Tcodes are:
customer : s_alr_87012178
vendor : s_alr_87012084
Custom designed:
REPORT zfi_customer_ageing
NO STANDARD PAGE HEADING
LINE-COUNT 58
line-size 168
MESSAGE-ID zh_msg.
D A T A B A S E T A B L E S D E C L A R A T I O N
TABLES: kna1, " Customer Master (General)
t001, " Company Codes
rfpdo.
I N T E R N A L T A B L E S D E C L A R A T I O N S *
Internal Table for Customer Open Items Data
DATA: BEGIN OF int_bsid OCCURS 0,
kunnr LIKE bsid-kunnr, " Customer Number
name1 LIKE kna1-name1, " Customer Name
shkzg LIKE bsid-shkzg, " Dr/Cr Indicator
belnr LIKE bsid-belnr, " Document Number
xblnr LIKE bsid-xblnr, " Ref Doc No
blart LIKE bsid-blart, " Document Type
zfbdt LIKE bsid-zfbdt, " Base Line Date
zbd1t LIKE bsid-zbd1t, " Due date1
zbd2t LIKE bsid-zbd2t, " Due Date2
zbd3t LIKE bsid-zbd3t, " Due Date3
waers LIKE bsid-waers, " Currency
dmbtr LIKE bsid-dmbtr, " Amount in Local Curr
END OF int_bsid.
Internal Table for Amounts Sum Up Data
DATA: BEGIN OF int_final OCCURS 0,
kunnr LIKE bsid-kunnr, " Customer Number
name1 LIKE kna1-name1, " Customer Name
total1 LIKE bsid-dmbtr, " Amount in Local Curr
total2 LIKE bsid-dmbtr, " Amount in Local Curr
total3 LIKE bsid-dmbtr, " Amount in Local Curr
total4 LIKE bsid-dmbtr, " Amount in Local Curr
total5 LIKE bsid-dmbtr, " Amount in Local Curr
total6 LIKE bsid-dmbtr, " Amount in Local Curr
total LIKE bsid-dmbtr, " Amount in Local Curr
END OF int_final.
D A T A D E C L A R A T I O N S
DATA : v_flag, " Flag
v_gtotal1 LIKE bsid-dmbtr, " Amount Totals
v_gtotal2 LIKE bsid-dmbtr, " Amount Totals
v_gtotal3 LIKE bsid-dmbtr, " Amount Totals
v_gtotal4 LIKE bsid-dmbtr, " Amount Totals
v_gtotal5 LIKE bsid-dmbtr, " Amount Totals
v_gtotal6 LIKE bsid-dmbtr, " Amount Totals
v_gtotal LIKE bsid-dmbtr, " Amount Totals
v_subtotal1 LIKE bsid-dmbtr, " Amount Totals
v_subtotal2 LIKE bsid-dmbtr, " Amount Totals
v_subtotal3 LIKE bsid-dmbtr, " Amount Totals
v_subtotal4 LIKE bsid-dmbtr, " Amount Totals
v_subtotal5 LIKE bsid-dmbtr, " Amount Totals
v_subtotal6 LIKE bsid-dmbtr, " Amount Totals
v_subtotal LIKE bsid-dmbtr, " Amount Totals
v_date LIKE bsid-zfbdt, " Due Date
v_tage1(4), " Age 30 days
v_tage2(4), " Age 60 days
v_tage3(4), " Age 90 days
v_fir(15), " Column Text1
v_sec(15), " Column Text2
v_thir(15), " Column Text3
v_four(17), " Column Text4
v_fidd(4), " Days field1
v_sedd(4), " Days field2
v_thdd(4), " Days field3
v_fodd(4), " Days field4
v_str TYPE SY-LISEL, " String
v_str1(11), " String
v_tage(3), " String
v_date1(10). " Date field
R A N G E D E C L A R A T I O N S
RANGES: r_date1 FOR bsid-zfbdt, " Date Range 1
r_date2 FOR bsid-zfbdt, " Date Range 2
r_date3 FOR bsid-zfbdt, " Date Range 3
r_date4 FOR bsid-zfbdt. " Date Range 4
S E L E C T I O N S C R E E N *
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_kunnr FOR kna1-kunnr. "Customer account
PARAMETERS: p_bukrs LIKE t001-bukrs. "Co. Code
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS: p_allgst LIKE rfpdo-allgstid OBLIGATORY DEFAULT sy-datum.
"Open items at key date
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
PARAMETERS: p_tage1 LIKE rfpdo1-allgfael DEFAULT '30',
p_tage2 LIKE rfpdo1-allgfael DEFAULT '60',
p_tage3 LIKE rfpdo1-allgfael DEFAULT '90',
p_tage4 LIKE rfpdo1-allgfael DEFAULT '120'.
SELECTION-SCREEN END OF BLOCK b3.
A T S E L E C T I O N S C R E E N *
AT SELECTION-SCREEN.
Validate the screen fields
PERFORM validate_flds.
S T A R T O F S E L E C T I O N *
START-OF-SELECTION.
Fetch main data
PERFORM fetch_data.
T O P O F P A G E
Header
TOP-OF-PAGE.
PERFORM header.
E N D O F P A G E
Footer
END-OF-PAGE.
ULINE.
T O P O F P A G E D U R I N G L I N E S E L E C T I O N *
Top of Page in Secondary List
TOP-OF-PAGE DURING LINE-SELECTION.
PERFORM header1.
A T L I N E S E L E C T I O N *
AT LINE-SELECTION.
Perform Line Selections
PERFORM line_selection.
E N D O F S E L E C T I O N
END-OF-SELECTION.
List generation
PERFORM basic_list.
*& Form validate_flds
Validation of Selection Screen fields
FORM validate_flds .
Validate Customer Code
CLEAR kna1-kunnr.
SELECT kunnr UP TO 1 ROWS
INTO kna1-kunnr
FROM kna1
WHERE kunnr IN s_kunnr AND
spras = sy-langu.
ENDSELECT.
IF sy-subrc 0.
MESSAGE e000 WITH 'Invalid Customer Code range'(023).
ENDIF.
Validate Company Code
CLEAR t001-bukrs.
SELECT bukrs UP TO 1 ROWS
INTO t001-bukrs
FROM t001
WHERE bukrs = p_bukrs AND
spras = sy-langu.
ENDSELECT.
IF sy-subrc 0.
MESSAGE e021. " Invalid Company Code range
ENDIF.
IF ( p_tage1 > p_tage2 ) OR ( p_tage1 > p_tage3 ) OR
( p_tage1 > p_tage4 ).
MESSAGE e999 WITH 'Column 1 greater'(004)
'than Column# 2 or 3 or 4'(005).
ENDIF.
*column 2
IF ( p_tage2 > p_tage3 ) OR ( p_tage1 > p_tage4 ).
MESSAGE e999 WITH 'Column 2 greater'(006)
'than Column# 3 or 4'(007).
ENDIF.
*column3
IF ( p_tage3 > p_tage4 ).
MESSAGE e999 WITH 'Column 3 greater'(008)
'than Column#4'(009).
ENDIF.
ENDFORM. " validate_flds
*& Form fetch_data
Fetching Data from Database Tables
FORM fetch_data .
Date Range Population
r_date1-sign = 'I'.
r_date1-option = 'BT'.
r_date1-low = p_allgst.
r_date1-high = r_date1-low + p_tage1.
APPEND r_date1.
r_date2-sign = 'I'.
r_date2-option = 'BT'.
r_date2-low = r_date1-high + 1.
r_date2-high = r_date1-low + p_tage2.
APPEND r_date2.
r_date3-sign = 'I'.
r_date3-option = 'BT'.
r_date3-low = r_date2-high + 1.
r_date3-high = r_date1-low + p_tage3.
APPEND r_date3.
r_date4-sign = 'I'.
r_date4-option = 'BT'.
r_date4-low = r_date3-high + 1.
r_date4-high = r_date1-low + p_tage4.
APPEND r_date4.
Select the Customer Open Items data from bsid
SELECT l~kunnr
l1~name1
b~waers
b~dmbtr
b~zfbdt
b~zbd1t
b~zbd2t
b~zbd3t
b~belnr
b~xblnr
b~shkzg
b~blart
INTO CORRESPONDING FIELDS OF TABLE int_bsid
FROM knb1 AS l INNER JOIN kna1 AS l1
ON lkunnr = l1kunnr
INNER JOIN bsid AS b
ON lkunnr = bkunnr AND
lbukrs = bbukrs
WHERE l~kunnr IN s_kunnr AND
l~bukrs = p_bukrs and
b~zfbdt le p_allgst.
IF SY-SUBRC 0.
MESSAGE i000 WITH 'No Data found'(027).
ENDIF.
Removing the date limit to get the due items in the past
DELETE int_bsid WHERE
( blart NE 'RE' AND blart NE 'KR' ) OR
shkzg NE 'H'.
SORT int_bsid BY kunnr.
ENDFORM. " fetch_data
*& Form header
Display the Report Columns
FORM header .
v_tage1 = p_tage1 + 1.
v_tage2 = p_tage2 + 1.
v_tage3 = p_tage3 + 1.
v_fidd = p_tage1.
v_sedd = p_tage2.
v_thdd = p_tage3.
v_fodd = p_tage4.
MOVE v_fodd0(4) TO v_fodd1(3).
v_fodd+0(1) = space.
CONCATENATE '1 to'(010) v_fidd INTO v_fir.
CONCATENATE v_tage1 ' to '(011) v_sedd INTO v_sec.
CONCATENATE v_tage2 ' to '(011) v_thdd INTO v_thir.
CONCATENATE v_tage3 ' to '(011) space v_fodd INTO v_four.
Standard header
clear: v_date1, v_str, v_str1, v_tage.
write p_allgst to v_date1.
Move p_tage4 to v_tage.
concatenate '>' v_tage text-025 into v_str1.
concatenate
'Summary of Ageing Analysis for Customer Open Invoices as on'(013)
v_date1 into v_str separated by space.
CALL FUNCTION 'Z_STANDARD_HEADER'
EXPORTING
title1 = 'Saudi International Petrochemical Company'(012)
title2 = v_str.
FORMAT COLOR OFF.
WRITE : /1(168) sy-uline.
FORMAT COLOR 1 INTENSIFIED.
WRITE :/1 sy-vline, 13 sy-vline, 49 sy-vline,
50(101) 'Invoices Due For(In Days)'(014) CENTERED,
151 sy-vline, 168 sy-vline .
WRITE :/1 sy-vline, 2(11) 'Customer#'(015) CENTERED,
13 sy-vline ,14(35) 'Customer Name'(016) CENTERED,
49 sy-vline,
50(101) sy-uline,151 sy-vline,
152(16) 'Total'(017) CENTERED,
168 sy-vline.
WRITE : /1 sy-vline,13 sy-vline, 49 sy-vline,
50(16) v_fir CENTERED, 66 sy-vline,
67(16) v_sec CENTERED, 83 sy-vline,
84(16) v_thir CENTERED, 100 sy-vline,
101(16) v_four CENTERED, 117 sy-vline,
118(16) v_str1 centered, 134 sy-vline,
135(16) 'Already Overdue'(018) CENTERED,151 sy-vline,
168 sy-vline.
FORMAT COLOR OFF.
WRITE : /1(168) sy-uline.
ENDFORM. " header
*& Form basic_list
Display the Basic List
FORM basic_list .
NEW-PAGE LINE-SIZE 168.
LOOP AT int_bsid.
CLEAR v_date.
IF int_bsid-zbd3t ' '.
v_date = int_bsid-zfbdt + int_bsid-zbd3t.
ELSE.
IF int_bsid-zbd2t ' '.
v_date = int_bsid-zfbdt + int_bsid-zbd2t.
ELSE.
v_date = int_bsid-zfbdt + int_bsid-zbd1t.
ENDIF.
ENDIF.
IF int_bsid-zbd1t = ' '.
v_date = int_bsid-zfbdt.
ENDIF.
IF v_date IN r_date1.
int_final-total1 = int_final-total1 + int_bsid-dmbtr.
ELSEIF v_date IN r_date2.
int_final-total2 = int_final-total2 + int_bsid-dmbtr.
ELSEIF v_date IN r_date3.
int_final-total3 = int_final-total3 + int_bsid-dmbtr.
ELSEIF v_date IN r_date4.
int_final-total4 = int_final-total4 + int_bsid-dmbtr.
ELSEif v_date > r_date4-high.
int_final-total5 = int_final-total5 + int_bsid-dmbtr.
ELSEif v_date < p_allgst.
int_final-total6 = int_final-total6 + int_bsid-dmbtr.
ENDIF.
AT END OF kunnr.
v_flag = 1.
ENDAT.
IF v_flag = 1.
int_final-kunnr = int_bsid-kunnr.
int_final-name1 = int_bsid-name1.
int_final-total = int_final-total1 + int_final-total2 +
int_final-total3 + int_final-total4 + int_final-total5 +
int_final-total6.
APPEND int_final.
v_gtotal1 = v_gtotal1 + int_final-total1.
v_gtotal2 = v_gtotal2 + int_final-total2.
v_gtotal3 = v_gtotal3 + int_final-total3.
v_gtotal4 = v_gtotal4 + int_final-total4.
v_gtotal5 = v_gtotal5 + int_final-total5.
v_gtotal6 = v_gtotal6 + int_final-total6.
v_gtotal = v_gtotal + int_final-total.
WRITE: /1 sy-vline,
2 int_final-kunnr COLOR 4 INTENSIFIED ON,
13 sy-vline,
14 int_final-name1 COLOR 4 INTENSIFIED ON,
49 sy-vline.
DATA : v_rem.
v_rem = sy-tabix MOD 2.
IF v_rem NE 0.
FORMAT COLOR 2 INTENSIFIED.
WRITE : 50 int_final-total1 CURRENCY int_bsid-waers,
66 sy-vline,
67 int_final-total2 CURRENCY int_bsid-waers,
83 sy-vline,
84 int_final-total3 CURRENCY int_bsid-waers,
100 sy-vline,
101 int_final-total4 CURRENCY int_bsid-waers,
117 sy-vline,
118 int_final-total5 CURRENCY int_bsid-waers,
134 sy-vline,
135 int_final-total6 CURRENCY int_bsid-waers,
151 sy-vline,
152 int_final-total CURRENCY int_bsid-waers,
168 sy-vline.
ELSE.
WRITE : 50 int_final-total1 CURRENCY int_bsid-waers,
66 sy-vline,
67 int_final-total2 CURRENCY int_bsid-waers,
83 sy-vline,
84 int_final-total3 CURRENCY int_bsid-waers,
100 sy-vline,
101 int_final-total4 CURRENCY int_bsid-waers,
117 sy-vline,
118 int_final-total5 CURRENCY int_bsid-waers,
134 sy-vline,
135 int_final-total6 CURRENCY int_bsid-waers,
151 sy-vline,
152 int_final-total CURRENCY int_bsid-waers,
168 sy-vline.
ENDIF.
FORMAT COLOR OFF.
HIDE int_final.
CLEAR int_final.
v_flag = 0.
ENDIF.
AT LAST.
WRITE : /1(168) sy-uline.
FORMAT COLOR 3 INTENSIFIED.
WRITE : /1 sy-vline, 2(47) 'GRAND TOTAL'(022) CENTERED,
49 sy-vline, 50 v_gtotal1 CURRENCY int_bsid-waers,
66 sy-vline, 67 v_gtotal2 CURRENCY int_bsid-waers,
83 sy-vline, 84 v_gtotal3 CURRENCY int_bsid-waers,
100 sy-vline,101 v_gtotal4 CURRENCY int_bsid-waers,
117 sy-vline,118 v_gtotal5 CURRENCY int_bsid-waers,
134 sy-vline,135 v_gtotal6 CURRENCY int_bsid-waers,
151 sy-vline,152 v_gtotal CURRENCY int_bsid-waers,
168 sy-vline.
HIDE : v_gtotal1,
v_gtotal2,
v_gtotal3,
v_gtotal4,
v_gtotal5,
v_gtotal6,
v_gtotal.
ENDAT.
FORMAT COLOR OFF.
ENDLOOP.
WRITE : /1(168) sy-uline.
ENDFORM. " basic_list
*& Form line_selection
When double clicked on the line display the seconday list
FORM line_selection .
NEW-PAGE LINE-SIZE 206.
Sy-lsind = 1.
DATA : v_rem,v_cnt LIKE sy-tabix.
v_cnt = 0.
SORT int_bsid BY belnr zfbdt.
LOOP AT int_bsid WHERE kunnr EQ int_final-kunnr.
v_rem = v_cnt MOD 2.
CLEAR v_date.
IF int_bsid-zbd3t ' '.
v_date = int_bsid-zfbdt + int_bsid-zbd3t.
ELSE.
IF int_bsid-zbd2t ' '.
v_date = int_bsid-zfbdt + int_bsid-zbd2t.
ELSE.
v_date = int_bsid-zfbdt + int_bsid-zbd1t.
ENDIF.
ENDIF.
IF int_bsid-zbd1t = ' '.
v_date = int_bsid-zfbdt.
ENDIF.
IF v_rem NE 0.
format color 2 intensified.
WRITE :/1 sy-vline, 2 int_bsid-belnr,
12 sy-vline,13 int_bsid-kunnr,
23 sy-vline,24 int_bsid-name1,
59 sy-vline,60 int_bsid-xblnr,
76 sy-vline,77 int_bsid-zfbdt,
87 sy-vline.
WRITE : 104 sy-vline,121 sy-vline,
138 sy-vline,155 sy-vline,
172 sy-vline, 189 sy-vline,
190 int_bsid-dmbtr CURRENCY int_bsid-waers,
206 sy-vline.
IF v_date IN r_date1.
v_subtotal1 = v_subtotal1 + int_bsid-dmbtr.
WRITE : 88 int_bsid-dmbtr CURRENCY int_bsid-waers.
ELSEIF v_date IN r_date2.
v_subtotal2 = v_subtotal2 + int_bsid-dmbtr.
WRITE : 105 int_bsid-dmbtr CURRENCY int_bsid-waers.
ELSEIF v_date IN r_date3.
v_subtotal3 = v_subtotal3 + int_bsid-dmbtr.
WRITE : 122 int_bsid-dmbtr CURRENCY int_bsid-waers.
ELSEIF v_date IN r_date4.
v_subtotal4 = v_subtotal4 + int_bsid-dmbtr.
WRITE : 139 int_bsid-dmbtr CURRENCY int_bsid-waers.
ELSEif v_date > r_date4-high.
v_subtotal5 = v_subtotal5 + int_bsid-dmbtr.
WRITE : 156 int_bsid-dmbtr CURRENCY int_bsid-waers.
ELSEif v_date < p_allgst.
v_subtotal6 = v_subtotal6 + int_bsid-dmbtr.
WRITE : 173 int_bsid-dmbtr CURRENCY int_bsid-waers.
ENDIF.
format color off.
ELSE.
WRITE :/1 sy-vline, 2 int_bsid-belnr,
12 sy-vline,13 int_bsid-kunnr,
23 sy-vline,24 int_bsid-name1,
59 sy-vline,60 int_bsid-xblnr,
76 sy-vline,77 int_bsid-zfbdt,
87 sy-vline.
WRITE : 104 sy-vline,121 sy-vline,
138 sy-vline,155 sy-vline,
172 sy-vline,189 sy-vline,
190 int_bsid-dmbtr CURRENCY int_bsid-waers,
206 sy-vline.
IF v_date IN r_date1.
v_subtotal1 = v_subtotal1 + int_bsid-dmbtr.
WRITE : 88 int_bsid-dmbtr CURRENCY int_bsid-waers.
ELSEIF v_date IN r_date2.
v_subtotal2 = v_subtotal2 + int_bsid-dmbtr.
WRITE : 105 int_bsid-dmbtr CURRENCY int_bsid-waers.
ELSEIF v_date IN r_date3.
v_subtotal3 = v_subtotal3 + int_bsid-dmbtr.
WRITE : 122 int_bsid-dmbtr CURRENCY int_bsid-waers.
ELSEIF v_date IN r_date4.
v_subtotal4 = v_subtotal4 + int_bsid-dmbtr.
WRITE : 139 int_bsid-dmbtr CURRENCY int_bsid-waers.
ELSEif v_date > r_date4-high.
v_subtotal5 = v_subtotal5 + int_bsid-dmbtr.
WRITE : 156 int_bsid-dmbtr CURRENCY int_bsid-waers.
ELSEif v_date < p_allgst.
v_subtotal6 = v_subtotal6 + int_bsid-dmbtr.
WRITE : 173 int_bsid-dmbtr CURRENCY int_bsid-waers.
ENDIF.
ENDIF.
FORMAT COLOR OFF.
v_cnt = v_cnt + 1.
ENDLOOP.
WRITE : /1(206) sy-uline.
v_subtotal = v_subtotal1 + v_subtotal2 + v_subtotal3
+ v_subtotal4 + v_subtotal5 + v_subtotal6.
FORMAT COLOR 3 INTENSIFIED.
WRITE : /1 sy-vline,
2(85) 'Total'(017) CENTERED CURRENCY int_bsid-waers ,
87 sy-vline,
88 v_subtotal1 CURRENCY int_bsid-waers,
104 sy-vline,
105 v_subtotal2 CURRENCY int_bsid-waers,
121 sy-vline,
122 v_subtotal3 CURRENCY int_bsid-waers,
138 sy-vline,
139 v_subtotal4 CURRENCY int_bsid-waers,
155 sy-vline,
156 v_subtotal5 CURRENCY int_bsid-waers,
172 sy-vline,
173 v_subtotal6 CURRENCY int_bsid-waers,
189 sy-vline,
190 v_subtotal CURRENCY int_bsid-waers,
206 sy-vline.
FORMAT COLOR OFF.
WRITE : /1(206) sy-uline.
CLEAR : v_subtotal,v_subtotal1,v_subtotal2,v_subtotal3,
v_subtotal4,v_subtotal5,v_gtotal1,v_gtotal2,v_gtotal3,
v_gtotal4, v_gtotal5,v_gtotal,v_subtotal6,v_gtotal6.
ENDFORM. " line_selection
*& Form header1
Secondary List Header
FORM header1 .
Standard header
clear: v_date1, v_str, v_str1, v_tage.
write p_allgst to v_date1.
Move p_tage4 to v_tage.
concatenate '>' v_tage text-025 into v_str1.
concatenate
'Details of Ageing Analysis for Customer Open Invoices as on'(024)
v_date1 into v_str separated by space.
CALL FUNCTION 'Z_STANDARD_HEADER'
EXPORTING
title1 = 'Saudi International Petrochemical Company'(012)
title2 = v_str.
FORMAT COLOR 1 intensified.
WRITE :/1(206) sy-uline.
WRITE :/1 sy-vline,12 sy-vline ,
23 sy-vline,59 sy-vline,76 sy-vline,87 sy-vline,
88(101) 'Invoices Due For(In Days)'(014) CENTERED,
189 sy-vline,206 sy-vline.
WRITE : /1 sy-vline, 2(10) 'Doc Number'(021) CENTERED,
12 sy-vline, 13(10) 'Customer#'(015) CENTERED,
23 sy-vline, 24(35) 'Customer Name'(016) CENTERED,
59 sy-vline, 60(16) 'Ref invoice#'(019) CENTERED,
76 sy-vline, 77(10) 'Inv dt'(020) CENTERED,
87 sy-vline, 88(101) sy-uline,
189 sy-vline,190(16) 'Total'(017) CENTERED,
206 sy-vline.
WRITE : /1 sy-vline, 12 sy-vline,
23 sy-vline,59 sy-vline,
76 sy-vline,87 sy-vline,
88(16) v_fir CENTERED, 104 sy-vline,
105(16) v_sec CENTERED, 121 sy-vline,
122(16) v_thir CENTERED, 138 sy-vline,
139(16) v_four CENTERED, 155 sy-vline,
156(16) v_str1 CENTERED,
172 sy-vline,
173(16) 'Already Overdue'(018) CENTERED,
189 sy-vline,
206 sy-vline.
format color off.
WRITE : /1(206) sy-uline.
ENDFORM. " header1
REPORT zfi_vendor_ageing
NO STANDARD PAGE HEADING
LINE-COUNT 58
line-size 168
MESSAGE-ID zh_msg.
Report Name : Vendor Open Items Ageing Report
Purpose : This report displays the Vendor Open Items based on
different Ageing days (Calculated by taking the Base
Line date and the days mentioned in Payment Terms)
M O D I F I C A T I O N L O G
Date | Change Number | Initials | Description
30-Aug-2004 | DTSK900**** | Anji Reddy | Initial
D A T A B A S E T A B L E S D E C L A R A T I O N
TABLES: lfa1, " Vendor Master (General)
t001, " Company Codes
rfpdo.
I N T E R N A L T A B L E S D E C L A R A T I O N S *
Internal Table for Vendor Open Items Data
DATA: BEGIN OF int_bsik OCCURS 0,
lifnr LIKE bsik-lifnr, " Vendor Number
name1 LIKE lfa1-name1, " Vendor Name
shkzg LIKE bsik-shkzg, " Dr/Cr Indicator
belnr LIKE bsik-belnr, " Document Number
xblnr LIKE bsik-xblnr, " Ref Doc No
blart LIKE bsik-blart, " Document Type
zfbdt LIKE bsik-zfbdt, " Base Line Date
zbd1t LIKE bsik-zbd1t, " Due date1
zbd2t LIKE bsik-zbd2t, " Due Date2
zbd3t LIKE bsik-zbd3t, " Due Date3
waers LIKE bsik-waers, " Currency
dmbtr LIKE bsik-dmbtr, " Amount in Local Curr
END OF int_bsik.
Internal Table for Amounts Sum Up Data
DATA: BEGIN OF int_final OCCURS 0,
lifnr LIKE bsik-lifnr, " Vendor Number
name1 LIKE lfa1-name1, " Vendor Name
total1 LIKE bsik-dmbtr, " Amount in Local Curr
total2 LIKE bsik-dmbtr, " Amount in Local Curr
total3 LIKE bsik-dmbtr, " Amount in Local Curr
total4 LIKE bsik-dmbtr, " Amount in Local Curr
total5 LIKE bsik-dmbtr, " Amount in Local Curr
total6 LIKE bsik-dmbtr, " Amount in Local Curr
total LIKE bsik-dmbtr, " Amount in Local Curr
END OF int_final.
D A T A D E C L A R A T I O N S
DATA : v_flag, " Flag
v_gtotal1 LIKE bsik-dmbtr, " Amount Totals
v_gtotal2 LIKE bsik-dmbtr, " Amount Totals
v_gtotal3 LIKE bsik-dmbtr, " Amount Totals
v_gtotal4 LIKE bsik-dmbtr, " Amount Totals
v_gtotal5 LIKE bsik-dmbtr, " Amount Totals
v_gtotal6 LIKE bsik-dmbtr, " Amount Totals
v_gtotal LIKE bsik-dmbtr, " Amount Totals
v_subtotal1 LIKE bsik-dmbtr, " Amount Totals
v_subtotal2 LIKE bsik-dmbtr, " Amount Totals
v_subtotal3 LIKE bsik-dmbtr, " Amount Totals
v_subtotal4 LIKE bsik-dmbtr, " Amount Totals
v_subtotal5 LIKE bsik-dmbtr, " Amount Totals
v_subtotal6 LIKE bsik-dmbtr, " Amount Totals
v_subtotal LIKE bsik-dmbtr, " Amount Totals
v_date LIKE bsik-zfbdt, " Due Date
v_tage1(4), " Age 30 days
v_tage2(4), " Age 60 days
v_tage3(4), " Age 90 days
v_fir(15), " Column Text1
v_sec(15), " Column Text2
v_thir(15), " Column Text3
v_four(17), " Column Text4
v_fidd(4), " Days field1
v_sedd(4), " Days field2
v_thdd(4), " Days field3
v_fodd(4), " Days field4
v_str TYPE SY-LISEL, " String
v_str1(11), " String
v_tage(3), " String
v_date1(10). " Date field
R A N G E D E C L A R A T I O N S
RANGES: r_date1 FOR bsik-zfbdt, " Date Range 1
r_date2 FOR bsik-zfbdt, " Date Range 2
r_date3 FOR bsik-zfbdt, " Date Range 3
r_date4 FOR bsik-zfbdt. " Date Range 4
S E L E C T I O N S C R E E N *
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_lifnr FOR lfa1-lifnr. "Vendor account
PARAMETERS: p_bukrs LIKE t001-bukrs. "Co. Code
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS: p_allgst LIKE rfpdo-allgstid OBLIGATORY DEFAULT sy-datum.
"Open items at key date
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
PARAMETERS: p_tage1 LIKE rfpdo1-allgfael DEFAULT '30',
p_tage2 LIKE rfpdo1-allgfael DEFAULT '60',
p_tage3 LIKE rfpdo1-allgfael DEFAULT '90',
p_tage4 LIKE rfpdo1-allgfael DEFAULT '120'.
SELECTION-SCREEN END OF BLOCK b3.
A T S E L E C T I O N S C R E E N *
AT SELECTION-SCREEN.
Validate the screen fields
PERFORM validate_flds.
S T A R T O F S E L E C T I O N *
START-OF-SELECTION.
Fetch main data
PERFORM fetch_data.
T O P O F P A G E
Header
TOP-OF-PAGE.
PERFORM header.
E N D O F P A G E
Footer
END-OF-PAGE.
ULINE.
T O P O F P A G E D U R I N G L I N E S E L E C T I O N *
Top of Page in Secondary List
TOP-OF-PAGE DURING LINE-SELECTION.
PERFORM header1.
A T L I N E S E L E C T I O N *
AT LINE-SELECTION.
Perform Line Selections
PERFORM line_selection.
E N D O F S E L E C T I O N
END-OF-SELECTION.
List generation
PERFORM basic_list.
*& Form validate_flds
Validation of Selection Screen fields
FORM validate_flds .
Validate Vendor Code
CLEAR lfa1-lifnr.
SELECT lifnr UP TO 1 ROWS
INTO lfa1-lifnr
FROM lfa1
WHERE lifnr IN s_lifnr AND
spras = sy-langu.
ENDSELECT.
IF sy-subrc 0.
MESSAGE e000 WITH 'Invalid Vendor Code range'(023).
ENDIF.
Validate Company Code
CLEAR t001-bukrs.
SELECT bukrs UP TO 1 ROWS
INTO t001-bukrs
FROM t001
WHERE bukrs = p_bukrs AND
spras = sy-langu.
ENDSELECT.
IF sy-subrc 0.
MESSAGE e021. " Invalid Company Code range
ENDIF.
IF ( p_tage1 > p_tage2 ) OR ( p_tage1 > p_tage3 ) OR
( p_tage1 > p_tage4 ).
MESSAGE e999 WITH 'Column 1 greater'(004)
'than Column# 2 or 3 or 4'(005).
ENDIF.
*column 2
IF ( p_tage2 > p_tage3 ) OR ( p_tage1 > p_tage4 ).
MESSAGE e999 WITH 'Column 2 greater'(006)
'than Column# 3 or 4'(007).
ENDIF.
*column3
IF ( p_tage3 > p_tage4 ).
MESSAGE e999 WITH 'Column 3 greater'(008)
'than Column#4'(009).
ENDIF.
ENDFORM. " validate_flds
*& Form fetch_data
Fetching Data from Database Tables
FORM fetch_data .
Date Range Population
r_date1-sign = 'I'.
r_date1-option = 'BT'.
r_date1-low = p_allgst.
r_date1-high = r_date1-low + p_tage1.
APPEND r_date1.
r_date2-sign = 'I'.
r_date2-option = 'BT'.
r_date2-low = r_date1-high + 1.
r_date2-high = r_date1-low + p_tage2.
APPEND r_date2.
r_date3-sign = 'I'.
r_date3-option = 'BT'.
r_date3-low = r_date2-high + 1.
r_date3-high = r_date1-low + p_tage3.
APPEND r_date3.
r_date4-sign = 'I'.
r_date4-option = 'BT'.
r_date4-low = r_date3-high + 1.
r_date4-high = r_date1-low + p_tage4.
APPEND r_date4.
Select the Vendor Open Items data from BSIK
SELECT l~lifnr
l1~name1
b~waers
b~dmbtr
b~zfbdt
b~zbd1t
b~zbd2t
b~zbd3t
b~belnr
b~xblnr
b~shkzg
b~blart
INTO CORRESPONDING FIELDS OF TABLE int_bsik
FROM lfb1 AS l INNER JOIN lfa1 AS l1
ON llifnr = l1lifnr
INNER JOIN bsik AS b
ON llifnr = blifnr AND
lbukrs = bbukrs
WHERE l~lifnr IN s_lifnr AND
l~bukrs = p_bukrs and
b~zfbdt le p_allgst.
IF SY-SUBRC 0.
MESSAGE i000 WITH 'No Data found'(027).
ENDIF.
Removing the date limit to get the due items in the past
DELETE int_bsik WHERE
( blart NE 'RE' AND blart NE 'KR' ) OR
shkzg NE 'H'.
SORT int_bsik BY lifnr.
ENDFORM. " fetch_data
*& Form header
Display the Report Columns
FORM header .
v_tage1 = p_tage1 + 1.
v_tage2 = p_tage2 + 1.
v_tage3 = p_tage3 + 1.
v_fidd = p_tage1.
v_sedd = p_tage2.
v_thdd = p_tage3.
v_fodd = p_tage4.
MOVE v_fodd0(4) TO v_fodd1(3).
v_fodd+0(1) = space.
CONCATENATE '1 to'(010) v_fidd INTO v_fir.
CONCATENATE v_tage1 ' to '(011) v_sedd INTO v_sec.
CONCATENATE v_tage2 ' to '(011) v_thdd INTO v_thir.
CONCATENATE v_tage3 ' to '(011) space v_fodd INTO v_four.
Standard header
clear: v_date1, v_str, v_str1, v_tage.
write p_allgst to v_date1.
Move p_tage4 to v_tage.
concatenate '>' v_tage text-025 into v_str1.
concatenate
'Summary of Ageing Analysis for Vendor Open Invoices as on'(013)
v_date1 into v_str separated by space.
CALL FUNCTION 'Z_STANDARD_HEADER'
EXPORTING
title1 = 'Saudi International Petrochemical Company'(012)
title2 = v_str.
FORMAT COLOR OFF.
WRITE : /1(168) sy-uline.
FORMAT COLOR 1 INTENSIFIED.
WRITE :/1 sy-vline, 13 sy-vline, 49 sy-vline,
50(101) 'Invoices Due For(In Days)'(014) CENTERED,
151 sy-vline, 168 sy-vline .
WRITE :/1 sy-vline, 2(11) 'Vendor#'(015) CENTERED,
13 sy-vline ,14(35) 'Vendor Name'(016) CENTERED,
49 sy-vline,
50(101) sy-uline,151 sy-vline,
152(16) 'Total'(017) CENTERED,
168 sy-vline.
WRITE : /1 sy-vline,13 sy-vline, 49 sy-vline,
50(16) v_fir CENTERED, 66 sy-vline,
67(16) v_sec CENTERED, 83 sy-vline,
84(16) v_thir CENTERED, 100 sy-vline,
101(16) v_four CENTERED, 117 sy-vline,
118(16) v_str1 centered, 134 sy-vline,
135(16) 'Already Overdue'(018) CENTERED,151 sy-vline,
168 sy-vline.
FORMAT COLOR OFF.
WRITE : /1(168) sy-uline.
ENDFORM. " header
*& Form basic_list
Display the Basic List
FORM basic_list .
NEW-PAGE LINE-SIZE 168.
LOOP AT int_bsik.
CLEAR v_date.
IF int_bsik-zbd3t ' '.
v_date = int_bsik-zfbdt + int_bsik-zbd3t.
ELSE.
IF int_bsik-zbd2t ' '.
v_date = int_bsik-zfbdt + int_bsik-zbd2t.
ELSE.
v_date = int_bsik-zfbdt + int_bsik-zbd1t.
ENDIF.
ENDIF.
IF int_bsik-zbd1t = ' '.
v_date = int_bsik-zfbdt.
ENDIF.
IF v_date IN r_date1.
int_final-total1 = int_final-total1 + int_bsik-dmbtr.
ELSEIF v_date IN r_date2.
int_final-total2 = int_final-total2 + int_bsik-dmbtr.
ELSEIF v_date IN r_date3.
int_final-total3 = int_final-total3 + int_bsik-dmbtr.
ELSEIF v_date IN r_date4.
int_final-total4 = int_final-total4 + int_bsik-dmbtr.
ELSEif v_date > r_date4-high.
int_final-total5 = int_final-total5 + int_bsik-dmbtr.
ELSEif v_date < p_allgst.
int_final-total6 = int_final-total6 + int_bsik-dmbtr.
ENDIF.
AT END OF lifnr.
v_flag = 1.
ENDAT.
IF v_flag = 1.
int_final-lifnr = int_bsik-lifnr.
int_final-name1 = int_bsik-name1.
int_final-total = int_final-total1 + int_final-total2 +
int_final-total3 + int_final-total4 + int_final-total5 +
int_final-total6.
APPEND int_final.
v_gtotal1 = v_gtotal1 + int_final-total1.
v_gtotal2 = v_gtotal2 + int_final-total2.
v_gtotal3 = v_gtotal3 + int_final-total3.
v_gtotal4 = v_gtotal4 + int_final-total4.
v_gtotal5 = v_gtotal5 + int_final-total5.
v_gtotal6 = v_gtotal6 + int_final-total6.
v_gtotal = v_gtotal + int_final-total.
WRITE: /1 sy-vline,
2 int_final-lifnr COLOR 4 INTENSIFIED ON,
13 sy-vline,
14 int_final-name1 COLOR 4 INTENSIFIED ON,
49 sy-vline.
DATA : v_rem.
v_rem = sy-tabix MOD 2.
IF v_rem NE 0.
FORMAT COLOR 2 INTENSIFIED.
WRITE : 50 int_final-total1 CURRENCY int_bsik-waers,
66 sy-vline,
67 int_final-total2 CURRENCY int_bsik-waers,
83 sy-vline,
84 int_final-total3 CURRENCY int_bsik-waers,
100 sy-vline,
101 int_final-total4 CURRENCY int_bsik-waers,
117 sy-vline,
118 int_final-total5 CURRENCY int_bsik-waers,
134 sy-vline,
135 int_final-total6 CURRENCY int_bsik-waers,
151 sy-vline,
152 int_final-total CURRENCY int_bsik-waers,
168 sy-vline.
ELSE.
WRITE : 50 int_final-total1 CURRENCY int_bsik-waers,
66 sy-vline,
67 int_final-total2 CURRENCY int_bsik-waers,
83 sy-vline,
84 int_final-total3 CURRENCY int_bsik-waers,
100 sy-vline,
101 int_final-total4 CURRENCY int_bsik-waers,
117 sy-vline,
118 int_final-total5 CURRENCY int_bsik-waers,
134 sy-vline,
135 int_final-total6 CURRENCY int_bsik-waers,
151 sy-vline,
152 int_final-total CURRENCY int_bsik-waers,
168 sy-vline.
ENDIF.
FORMAT COLOR OFF.
HIDE int_final.
CLEAR int_final.
v_flag = 0.
ENDIF.
AT LAST.
WRITE : /1(168) sy-uline.
FORMAT COLOR 3 INTENSIFIED.
WRITE : /1 sy-vline, 2(47) 'GRAND TOTAL'(022) CENTERED,
49 sy-vline, 50 v_gtotal1 CURRENCY int_bsik-waers,
66 sy-vline, 67 v_gtotal2 CURRENCY int_bsik-waers,
83 sy-vline, 84 v_gtotal3 CURRENCY int_bsik-waers,
100 sy-vline,101 v_gtotal4 CURRENCY int_bsik-waers,
117 sy-vline,118 v_gtotal5 CURRENCY int_bsik-waers,
134 sy-vline,135 v_gtotal6 CURRENCY int_bsik-waers,
151 sy-vline,152 v_gtotal CURRENCY int_bsik-waers,
168 sy-vline.
HIDE : v_gtotal1,
v_gtotal2,
v_gtotal3,
v_gtotal4,
v_gtotal5,
v_gtotal6,
v_gtotal.
ENDAT.
FORMAT COLOR OFF.
ENDLOOP.
WRITE : /1(168) sy-uline.
ENDFORM. " basic_list
*& Form line_selection
When double clicked on the line display the seconday list
FORM line_selection .
NEW-PAGE LINE-SIZE 206.
Sy-lsind = 1.
DATA : v_rem,v_cnt LIKE sy-tabix.
v_cnt = 0.
SORT int_bsik BY belnr zfbdt.
LOOP AT int_bsik WHERE lifnr EQ int_final-lifnr.
v_rem = v_cnt MOD 2.
CLEAR v_date.
IF int_bsik-zbd3t ' '.
v_date = int_bsik-zfbdt + int_bsik-zbd3t.
ELSE.
IF int_bsik-zbd2t ' '.
v_date = int_bsik-zfbdt + int_bsik-zbd2t.
ELSE.
v_date = int_bsik-zfbdt + int_bsik-zbd1t.
ENDIF.
ENDIF.
IF int_bsik-zbd1t = ' '.
v_date = int_bsik-zfbdt.
ENDIF.
IF v_rem NE 0.
format color 2 intensified.
WRITE :/1 sy-vline, 2 int_bsik-belnr,
12 sy-vline,13 int_bsik-lifnr,
23 sy-vline,24 int_bsik-name1,
59 sy-vline,60 int_bsik-xblnr,
76 sy-vline,77 int_bsik-zfbdt,
87 sy-vline.
WRITE : 104 sy-vline,121 sy-vline,
138 sy-vline,155 sy-vline,
172 sy-vline, 189 sy-vline,
190 int_bsik-dmbtr CURRENCY int_bsik-waers,
206 sy-vline.
IF v_date IN r_date1.
v_subtotal1 = v_subtotal1 + int_bsik-dmbtr.
WRITE : 88 int_bsik-dmbtr CURRENCY int_bsik-waers.
ELSEIF v_date IN r_date2.
v_subtotal2 = v_subtotal2 + int_bsik-dmbtr.
WRITE : 105 int_bsik-dmbtr CURRENCY int_bsik-waers.
ELSEIF v_date IN r_date3.
v_subtotal3 = v_subtotal3 + int_bsik-dmbtr.
WRITE : 122 int_bsik-dmbtr CURRENCY int_bsik-waers.
ELSEIF v_date IN r_date4.
v_subtotal4 = v_subtotal4 + int_bsik-dmbtr.
WRITE : 139 int_bsik-dmbtr CURRENCY int_bsik-waers.
ELSEif v_date > r_date4-high.
v_subtotal5 = v_subtotal5 + int_bsik-dmbtr.
WRITE : 156 int_bsik-dmbtr CURRENCY int_bsik-waers.
ELSEif v_date < p_allgst.
v_subtotal6 = v_subtotal6 + int_bsik-dmbtr.
WRITE : 173 int_bsik-dmbtr CURRENCY int_bsik-waers.
ENDIF.
format color off.
ELSE.
WRITE :/1 sy-vline, 2 int_bsik-belnr,
12 sy-vline,13 int_bsik-lifnr,
23 sy-vline,24 int_bsik-name1,
59 sy-vline,60 int_bsik-xblnr,
76 sy-vline,77 int_bsik-zfbdt,
87 sy-vline.
WRITE : 104 sy-vline,121 sy-vline,
138 sy-vline,155 sy-vline,
172 sy-vline,189 sy-vline,
190 int_bsik-dmbtr CURRENCY int_bsik-waers,
206 sy-vline.
IF v_date IN r_date1.
v_subtotal1 = v_subtotal1 + int_bsik-dmbtr.
WRITE : 88 int_bsik-dmbtr CURRENCY int_bsik-waers.
ELSEIF v_date IN r_date2.
v_subtotal2 = v_subtotal2 + int_bsik-dmbtr.
WRITE : 105 int_bsik-dmbtr CURRENCY int_bsik-waers.
ELSEIF v_date IN r_date3.
v_subtotal3 = v_subtotal3 + int_bsik-dmbtr.
WRITE : 122 int_bsik-dmbtr CURRENCY int_bsik-waers.
ELSEIF v_date IN r_date4.
v_subtotal4 = v_subtotal4 + int_bsik-dmbtr.
WRITE : 139 int_bsik-dmbtr CURRENCY int_bsik-waers.
ELSEif v_date > r_date4-high.
v_subtotal5 = v_subtotal5 + int_bsik-dmbtr.
WRITE : 156 int_bsik-dmbtr CURRENCY int_bsik-waers.
ELSEif v_date < p_allgst.
v_subtotal6 = v_subtotal6 + int_bsik-dmbtr.
WRITE : 173 int_bsik-dmbtr CURRENCY int_bsik-waers.
ENDIF.
ENDIF.
FORMAT COLOR OFF.
v_cnt = v_cnt + 1.
ENDLOOP.
WRITE : /1(206) sy-uline.
v_subtotal = v_subtotal1 + v_subtotal2 + v_subtotal3
+ v_subtotal4 + v_subtotal5 + v_subtotal6.
FORMAT COLOR 3 INTENSIFIED.
WRITE : /1 sy-vline,
2(85) 'Total'(017) CENTERED CURRENCY int_bsik-waers ,
87 sy-vline,
88 v_subtotal1 CURRENCY int_bsik-waers,
104 sy-vline,
105 v_subtotal2 CURRENCY int_bsik-waers,
121 sy-vline,
122 v_subtotal3 CURRENCY int_bsik-waers,
138 sy-vline,
139 v_subtotal4 CURRENCY int_bsik-waers,
155 sy-vline,
156 v_subtotal5 CURRENCY int_bsik-waers,
172 sy-vline,
173 v_subtotal6 CURRENCY int_bsik-waers,
189 sy-vline,
190 v_subtotal CURRENCY int_bsik-waers,
206 sy-vline.
FORMAT COLOR OFF.
WRITE : /1(206) sy-uline.
CLEAR : v_subtotal,v_subtotal1,v_subtotal2,v_subtotal3,
v_subtotal4,v_subtotal5,v_gtotal1,v_gtotal2,v_gtotal3,
v_gtotal4, v_gtotal5,v_gtotal,v_subtotal6,v_gtotal6.
ENDFORM. " line_selection
*& Form header1
Secondary List Header
FORM header1 .
Standard header
clear: v_date1, v_str, v_str1, v_tage.
write p_allgst to v_date1.
Move p_tage4 to v_tage.
concatenate '>' v_tage text-025 into v_str1.
concatenate
'Details of Ageing Analysis for Vendor Open Invoices as on'(024)
v_date1 into v_str separated by space.
CALL FUNCTION 'Z_STANDARD_HEADER'
EXPORTING
title1 = 'Saudi International Petrochemical Company'(012)
title2 = v_str.
FORMAT COLOR 1 intensified.
WRITE :/1(206) sy-uline.
WRITE :/1 sy-vline,12 sy-vline ,
23 sy-vline,59 sy-vline,76 sy-vline,87 sy-vline,
88(101) 'Invoices Due For(In Days)'(014) CENTERED,
189 sy-vline,206 sy-vline.
WRITE : /1 sy-vline, 2(10) 'Doc Number'(021) CENTERED,
12 sy-vline, 13(10) 'Vendor#'(015) CENTERED,
23 sy-vline, 24(35) 'Vendor Name'(016) CENTERED,
59 sy-vline, 60(16) 'Ref invoice#'(019) CENTERED,
76 sy-vline, 77(10) 'Inv dt'(020) CENTERED,
87 sy-vline, 88(101) sy-uline,
189 sy-vline,190(16) 'Total'(017) CENTERED,
206 sy-vline.
WRITE : /1 sy-vline, 12 sy-vline,
23 sy-vline,59 sy-vline,
76 sy-vline,87 sy-vline,
88(16) v_fir CENTERED, 104 sy-vline,
105(16) v_sec CENTERED, 121 sy-vline,
122(16) v_thir CENTERED, 138 sy-vline,
139(16) v_four CENTERED, 155 sy-vline,
156(16) v_str1 CENTERED,
172 sy-vline,
173(16) 'Already Overdue'(018) CENTERED,
189 sy-vline,
206 sy-vline.
format color off.
WRITE : /1(206) sy-uline.
ENDFORM. " header1
The below link will give Tables & Relations.
http://www.erpgenie.com/abap/tables.htm
http://goldenink.com/abap/files_in_sap.html
http://abap4.tripod.com/SAP_Tables.html
http://www.geocities.com/sapcircle/Relations.pdf
regards,
indranil
Maybe you are looking for
-
I need to send sm37 Spool Report Automatically to one or more user ids.
Hai Gurus, I need to send sm37 Spool Report Automatically to one or more user ids. Kindly guide me
-
Can't get rid of vertical line in Pages '08
I add a text box to a blank page and paste in or type in some text. There's a verticle line running the height of the paragraph (or single line) that I can't get rid of. Also, the text appears blue even though it's supposed to be black. When I select
-
Mute key & num lock not working on my mac pro
the mute button & num lock key on my keyboard do not do anything. I have checked everywhere and can find no control for this. the f11 & f12 button work fine. any ideas?
-
BufferedReader == reader.mark() ERROR
This is a basice i/o program. It reads data, stores it in an array and then writes a file based on a filtering system. The code: import java.io.*; import java.util.StringTokenizer; import java.util.NoSuchElementException; import java.util.ArrayList;
-
No startup without plugging in.
Hi, My Macbook has stopped starting up when not plugged in with the power cord (and shuts down if unplugged). The battery has charged up to 100% (it was around 70% when I first noticed this happening). When trying to start it lights up the little lig