Can somebody give me an example
Of a little application wich can get a file(.txt for example) from an url??
I m trying to use HttpConnection but my midlet doesn t work for the moment.. :(
Thx
hi
u can find working example of http connection on
www.corej2me.com
Similar Messages
-
Can somebody give some real time questions for alv report
hi guru
can somebody give some real time questions for alv report.
answers also.
regards
subhasis.hi,
The ALV is a set of function modules and classes and their methods which are added to program code. Developers can use the functionality of the ALV in creating new reports, saving time which might otherwise have been spent on report enhancement
The common features of report are column alignment, sorting, filtering, subtotals, totals etc. <b>To implement these, a lot of coding and logic is to be put. To avoid that we can use a concept called ABAP List Viewer (ALV).</b>
Using ALV, we can have three types of reports:
1. Simple Report
2. Block Report
3. Hierarchical Sequential Report
<b>Reward useful points</b>
Siva -
Can you give me an example of using blacklist from in mail settings to block unwanted mail?
I want to use serveradmin settings mail command line to set a list of domains/servers I do not want to receive emails from. Can you give me an example on how to set this in ML server?
I managed to set the domains using the command line serveradmin but it is not working. This is a list of domains I have set so far:
mail:postfix:blacklist_from:_array_index:0 = "bounces.servidordeenvio.com"
mail:postfix:blacklist_from:_array_index:1 = "reiserver50.info"
mail:postfix:blacklist_from:_array_index:2 = "vps5.central-adworks.com.br"
mail:postfix:blacklist_from:_array_index:3 = "emailTrocar.com.br"
mail:postfix:blacklist_from:_array_index:4 = "geeklemail21.com.br"
mail:postfix:blacklist_from:_array_index:5 = "produtosnotaveis.org"
But I still keep receiving emails from those domains with virus (which are intercepted by the virus filtering) and receiving alert messages from the server app suggesting me to include these domains in a blacklist.
Thanks for your help..Thank you.
I tried it out and did not work either but I finally found a way to add multiple entries. I read on the serveradmin man page that if you had multiple values you should better off use a file for input.
I did create a plain file with as many as needed entries:
mail:postfix:blacklist_from:_array_index:0 = "*@xxx.com"
mail:postfix:blacklist_from:_array_index:1 = "*@xxxx.com"
saved as blacklist then I issued the command:
sudo serveradmin settings < blacklist
This solved the setting of multiple values. I will monitor if it will really block the spam from the locations.
Thanks again for your help and interest. -
Can anyone give me an example for crm_svy_..._pai?
Hi all, I have a survey, there are several questions. After I input the answers, I click the 'CHECK' button, I will check the answers. There will be different response to my answers. If the answer is not correct, I will post an error message.
And I also need to retrieve data from tables to fill the blank.
I am a beginner for CRM survey, can anyone help me? I create a FM:crm_svy_..._pai, and code in it right? But how can I do it?
Can anyone give me an example for crm_svy_..._pai to do what I need?
Many many thanks in advance!!
Heare is an example, but I don't its function and how does it work..
read table lt_all_values into ls_value
with key answer_id = 'get_value'.
if sy-subrc = 0.
data: lt_values type crm_svy_api_string_t.
append ls_value-value to lt_values.
call method ir_survey_values->values_set
exporting
i_question_id = 'set_value'
i_answer_id = 'set_value'
it_values = lt_values.
endif.Hi Yu,
Could you tell how you solved your issue?
Regards and tx in advance,
Mon -
Can u give an detail examples or help on SQL- loader
Can u give an detail examples or help on SQL- loader
I need full details on this how to run and what are the pre requirements for this and what
Can u give an example with unix+sql loaderThe Oracle Utilities manual has a chapter on SQL*Loader Case Studies
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96652/ch10.htm#1656
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC -
Can anyone give me an example of direct, queued and unserialized delta?
hi all,
Can anyone give me an example of direct, queued and unserialized delta for fi and sd applications.
thanxs in advance
regds
harihi,
Update Methods,
a.1: (Serialized) V3 Update
b. Direct Delta
c. Queued Delta
d. Un-serialized V3 Update
Note: Before PI Release 2002.1 the only update method available was V3 Update. As of PI 2002.1 three new update methods are available because the V3 update could lead to inconsistencies under certain circumstances. As of PI 2003.1 the old V3 update will not be supported anymore.
a. Update methods: (serialized) V3
Transaction data is collected in the R/3 update tables
Data in the update tables is transferred through a periodic update process to BW Delta queue
Delta loads from BW retrieve the data from this BW Delta queue
Transaction postings lead to:
1. Records in transaction tables and in update tables
2. A periodically scheduled job transfers these postings into the BW delta queue
3. This BW Delta queue is read when a delta load is executed.
Issues:
Even though it says serialized , Correct sequence of extraction data cannot be guaranteed
V2 Update errors can lead to V3 updates never to be processed
Update methods: direct delta
Each document posting is directly transferred into the BW delta queue
Each document posting with delta extraction leads to exactly one LUW in the respective BW delta queues
Transaction postings lead to:
1. Records in transaction tables and in update tables
2. A periodically scheduled job transfers these postings into the BW delta queue
3. This BW Delta queue is read when a delta load is executed.
Pros:
Extraction is independent of V2 update
Less monitoring overhead of update data or extraction queue
Cons:
Not suitable for environments with high number of document changes
Setup and delta initialization have to be executed successfully before document postings are resumed
V1 is more heavily burdened
Update methods: queued delta
Extraction data is collected for the affected application in an extraction queue
Collective run as usual for transferring data into the BW delta queue
Transaction postings lead to:
1. Records in transaction tables and in extraction queue
2. A periodically scheduled job transfers these postings into the BW delta queue
3. This BW Delta queue is read when a delta load is executed.
Pros:
Extraction is independent of V2 update
Suitable for environments with high number of document changes
Writing to extraction queue is within V1-update: this ensures correct serialization
Downtime is reduced to running the setup
Cons:
V1 is more heavily burdened compared to V3
Administrative overhead of extraction queue
Update methods: Un-serialized V3
Extraction data for written as before into the update tables with a V3 update module
V3 collective run transfers the data to BW Delta queue
In contrast to serialized V3, the data in the updating collective run is without regard to sequence from the update tables
Transaction postings lead to:
1. Records in transaction tables and in update tables
2. A periodically scheduled job transfers these postings into the BW delta queue
3.This BW Delta queue is read when a delta load is executed.
Issues:
Only suitable for data target design for which correct sequence of changes is not important e.g. Material Movements
V2 update has to be successful
hope it helps
partha -
Can somebody give me the formula for the balance column in a check register please? I am setting the register up like the sample in iWork 09 but I seem to be missing something in the formula.
OM,
The way the checking account balance column works is to designate one cell for the starting balance, indicate income with positive figures and outgo with negative figures, summing the transactions and adding the sum to the starting figure.
The formula used, =$F$1+SUM(OFFSET(F3,3-ROW(),-1,ROW()-2)), is not too difficult to understand if you study the syntax for Offset. The author of this template didn't do us any favors because the expression could have been written more clearly, in my opinion. I'll explain how it's done in the template, and then how I would have written it. With the two approaches you may be able to see what it's all about.
$F$1 is the starting balance.
SUM requires a Range specification.
Offset provides the range specification. The syntax for Offset is as follows:
Base Cell. In this case it is F3, the cell the expression is written in.
Row Offset. In this case the author takes the current row number and subtracts the starting row from it. For the first balance the offset will be zero since the first balance is in row 3. For all the subsequent balances, the offset will be negative, meaning that the offset will point to a row above the current row.
Column Offset. In this case the column offset is 0. That means that it is pointing 1 column to the left, Column E.
Rows. This parameter sets the length of the range, in rows. Subtracting 2 from the current row number means that the range will be 1 for the first balance and will grow by 1 for each entry down the list.
Taking all this into account, the range for the Sum function will always be Column E from Row 2 to the current Row.
How I would have written the balance expression:
=F$1+SUM(OFFSET(E$3,0,0,ROW()-2))
I believe it's easier to follow.
The starting balance is still in F1, but only the row needs to be absolute - a fine point, I know.
In my expression the base cell for the Offset function is the first entry cell of the transactions, E3. The row needs to be absolute, there is no reason for the base cell to move about as it does in the author's version.
In my approach, both the row and column offsets are zero. We always start at E3.
In my approach, the number of rows in the range is the current row number minus 2, just as in the author's expression. That means we include all rows from Row 3 to the current row.
I'd be happy to answer any other questions about the specifics, but you need to be specific about what you don't get.
Jerry -
Can anyone give me an example?
I want to lucubrate M-UI ,CAN anyone give me an example just for my beginning?
What is "lucubrate M-UI ,CAN"???
CUL8er,
Nick. -
Can somebody give me an appreciation of the crp8337 owc bluetooth keypad matching the Apple bluetooth keyboard?
You can upgrade memory and the hard drive. Nothing else is user-upgradeable. All processors are soldered to the motherboard.
Maximum Memory
16 GB (Actual) 8 GB (Apple)
Memory Slots
2 - 204-pin PC3-12800 (1600 MHz) DDR3 SO-DIMM
You can see HDD and SSD options at OWC. Reliable RAM vendors are OWC, DataMem, and Crucial.com. -
Can you give me a example about JAXRPC and...
i found in the examples of coffee break the javabean is the format of return data from JAXRPC.i want to realize that the xml is the return data format.so how can i do?and please give me an example of the JAXRPC whose format of return data is xml
i found in the examples of coffee break the javabean
is the format of return data from JAXRPC.i want to
realize that the xml is the return data format.so how
can i do?and please give me an example of the JAXRPC
whose format of return data is xml All JAXRPC messages are XML. -
Can somebody give me a sample about alv oo?
hi experts ,can you give me a sample about alv using oo method,
i have tried
data GS_LAYOUT TYPE SLIS_LAYOUT_ALV.
data lt_fieldcat TYPE slis_t_fieldcat_alv.
call method alv_grid->set_table_for_first_display
exporting is_layout = gs_layout
changing it_outtab = itab_data
it_fieldcatalog = lt_fieldcat.
but the code cann't be compiled, and says "lt_fieldcat is not type-compatible with formal parameter it_fieldcatalog.",and so is the gs_layout.
can you give me a sample for using alv oo ,and use the fieldcat to set table for first display, not to use i_structure_name.
Message was edited by:
liu shaochangHi,
Please take a look at my code below. Just create a custom control in screen painter and PF-status and title as well. Hope it helps...
P.S. Please award points if it helps...
[code]
*& Report ZFI_CASH_PROOF_SHEET
*& PROGRAM TYPE : Report
*& RICEF ID : R-149
*& TITLE : ZFI_CASH_PROOF_SHEET
*& SAP Module : FI
*& CREATION DATE : 11/06/2007
*& AUTHOR : Aris Hidalgo
*& DESIGNER : Aris Hidalgo
*& DESCRIPTION :
$*********************************************************************
*$ CHANGE HISTORY
*$----
*$ DATE | T-Num | Description | Reference
| | |
$*********************************************************************
REPORT zfi_cash_proof_sheet
NO STANDARD PAGE HEADING
MESSAGE-ID zfi.
Data Dictionary Table/s *
TABLES: t012k.
CLASS lcl_event_receiver DEFINITION DEFERRED.
Global Data/s *
DATA: gt_fieldcat TYPE lvc_t_fcat,
wa_fieldcat LIKE LINE OF gt_fieldcat,
ok_code TYPE syst-ucomm,
save_ok TYPE syst-ucomm,
g_repid TYPE syst-repid,
gs_layout TYPE lvc_s_layo,
gv_container TYPE scrfname VALUE 'CUSTOM_CONTROL',
lcl_grid1 TYPE REF TO cl_gui_alv_grid,
lcl_custom_container TYPE REF TO cl_gui_custom_container,
gs_disvariant TYPE disvariant,
lcl_event_receiver TYPE REF TO lcl_event_receiver,
gt_sort TYPE lvc_t_sort,
gs_sort TYPE lvc_s_sort.
Global Structure/s *
TYPES: BEGIN OF t_output,
bukrs TYPE bsis-bukrs,
hbkid TYPE t012k-hbkid,
hktid TYPE t012k-hktid,
cash_in_bank TYPE bsis-dmbtr,
one_day TYPE bsis-dmbtr,
two_days TYPE bsis-dmbtr,
more_than_two_days TYPE bsis-dmbtr,
misc_collection TYPE bsis-dmbtr,
outs_rel_checks TYPE bsis-dmbtr,
treas_transactions TYPE bsis-dmbtr,
tot_cash_bal TYPE bsis-dmbtr,
outs_unrel_checks TYPE bsis-dmbtr,
imp_docs_due TYPE bsis-dmbtr,
est_cash_balance TYPE bsis-dmbtr,
END OF t_output.
DATA: gt_output TYPE STANDARD TABLE OF t_output,
wa_output LIKE LINE OF gt_output.
SELECTION-SCREEN *
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_bukrs FOR t012k-bukrs OBLIGATORY,
s_hbkid FOR t012k-hbkid,
s_hktid FOR t012k-hktid.
PARAMETERS: p_budat TYPE bsak-budat OBLIGATORY.
SELECTION-SCREEN END OF BLOCK b1.
*/ CLASS DEFINITION/S */
CLASS lcl_data_def DEFINITION
CLASS lcl_data_def DEFINITION ABSTRACT.
PUBLIC SECTION.
TYPES: BEGIN OF t_t012k,
bukrs TYPE t012k-bukrs,
hbkid TYPE t012k-hbkid,
hktid TYPE t012k-hktid,
hkont TYPE t012k-hkont,
END OF t_t012k.
TYPES: BEGIN OF t_bsis_bsas,
bukrs TYPE bsis-bukrs,
hkont TYPE bsis-hkont,
belnr TYPE bsis-belnr,
buzei TYPE bsis-buzei,
gjahr TYPE bsis-gjahr,
budat TYPE bsis-budat,
blart TYPE bsis-blart,
dmbtr TYPE bsis-dmbtr,
shkzg TYPE bsis-shkzg,
END OF t_bsis_bsas.
TYPES: BEGIN OF t_bsid_bsad,
bukrs TYPE bsid-bukrs,
belnr TYPE bsid-belnr,
gjahr TYPE bsid-gjahr,
blart TYPE bsid-blart,
buzei TYPE bsid-buzei,
budat TYPE bsid-budat,
dmbtr TYPE bsid-dmbtr,
shkzg TYPE bsid-shkzg,
bschl TYPE bsid-bschl,
END OF t_bsid_bsad.
TYPES: BEGIN OF t_cash_in_bank,
bukrs TYPE bsis-bukrs,
hkont TYPE bsis-hkont,
dmbtr TYPE bsis-dmbtr,
END OF t_cash_in_bank.
TYPES: BEGIN OF t_outs_trade_coll,
bukrs TYPE bsis-bukrs,
hkont TYPE bsis-hkont,
one_day TYPE bsis-dmbtr,
two_days TYPE bsis-dmbtr,
more_than_two_days TYPE bsis-dmbtr,
END OF t_outs_trade_coll.
TYPES: BEGIN OF t_zcheck_monitor,
zzbukr TYPE zcheck_monitor-zzbukr,
zhbkid TYPE zcheck_monitor-zhbkid,
zhktid TYPE zcheck_monitor-zhktid,
zubhkt TYPE zcheck_monitor-zubhkt,
zrwbtr TYPE zcheck_monitor-zrwbtr,
zrlsvd TYPE zcheck_monitor-zrlsvd,
zrlsdt TYPE zcheck_monitor-zrlsdt,
END OF t_zcheck_monitor.
TYPES: BEGIN OF t_zcheck_monitor_collect,
zzbukr TYPE zcheck_monitor-zzbukr,
zubhkt TYPE zcheck_monitor-zubhkt,
zrwbtr TYPE zcheck_monitor-zrwbtr,
END OF t_zcheck_monitor_collect.
TYPES: BEGIN OF t_company,
bukrs TYPE t001-bukrs,
butxt TYPE t001-butxt,
END OF t_company.
TYPES: BEGIN OF t_header,
bukrs TYPE t001-bukrs,
butxt TYPE t001-butxt,
hbkid TYPE t012k-hbkid,
hktid TYPE t012k-hktid,
expand(1) TYPE c,
END OF t_header.
DATA: gt_t012k TYPE HASHED TABLE OF t_t012k
WITH UNIQUE KEY bukrs hbkid hktid,
gt_bsis TYPE STANDARD TABLE OF t_bsis_bsas,
wa_bsis LIKE LINE OF gt_bsis,
gt_bsas LIKE gt_bsis,
gt_bsis_bsas LIKE gt_bsas,
gt_bsid_bsad TYPE STANDARD TABLE OF t_bsid_bsad
WITH NON-UNIQUE KEY bukrs belnr gjahr blart,
gt_bsid LIKE gt_bsid_bsad,
gt_bsad LIKE gt_bsid_bsad,
gt_bsik LIKE gt_bsid_bsad,
gt_bsak LIKE gt_bsid_bsad,
gt_cash_in_bank TYPE HASHED TABLE OF t_cash_in_bank
WITH UNIQUE KEY bukrs hkont,
gt_misc_collection LIKE gt_cash_in_bank,
wa_misc_collection LIKE LINE OF gt_misc_collection,
gt_importation_docs_due LIKE gt_cash_in_bank,
wa_importation_docs_due LIKE LINE OF gt_importation_docs_due,
wa_cash_in_bank LIKE LINE OF gt_cash_in_bank,
gt_outs_trade_coll TYPE HASHED TABLE OF t_outs_trade_coll
WITH UNIQUE KEY bukrs hkont,
wa_outs_trade_coll LIKE LINE OF gt_outs_trade_coll,
gt_zcheck_monitor TYPE STANDARD TABLE OF t_zcheck_monitor,
gt_zcheck_monitor_collect TYPE HASHED TABLE OF t_zcheck_monitor_collect
WITH UNIQUE KEY zzbukr zubhkt,
wa_zcheck_monitor_collect LIKE LINE OF gt_zcheck_monitor_collect,
gt_outs_rel_checks LIKE gt_cash_in_bank,
wa_outs_rel_checks LIKE LINE OF gt_outs_rel_checks,
gt_outs_unrel_checks LIKE gt_cash_in_bank,
wa_outs_unrel_checks LIKE LINE OF gt_outs_unrel_checks,
gt_company TYPE HASHED TABLE OF t_company
WITH UNIQUE KEY bukrs,
wa_company LIKE LINE OF gt_company,
gt_header TYPE STANDARD TABLE OF t_header,
wa_header LIKE LINE OF gt_header.
ENDCLASS. "lcl_data_def DEFINITION
CLASS lcl_get_data DEFINITION
CLASS lcl_get_data DEFINITION INHERITING FROM lcl_data_def.
PUBLIC SECTION.
METHODS: get_bank_details,
get_gl_balances,
get_cust_items,
get_vend_items,
sum_gl_accounts,
monday_routines
IMPORTING
im_date TYPE bsis-budat
im_bukrs TYPE bsis-bukrs
im_hkont TYPE bsis-hkont
im_budat TYPE bsis-budat
im_dmbtr TYPE bsis-dmbtr,
sunday_routines
IMPORTING
im_date TYPE bsis-budat
im_bukrs TYPE bsis-bukrs
im_hkont TYPE bsis-hkont
im_budat TYPE bsis-budat
im_dmbtr TYPE bsis-dmbtr,
tuesday_routines
IMPORTING
im_date TYPE bsis-budat
im_bukrs TYPE bsis-bukrs
im_hkont TYPE bsis-hkont
im_budat TYPE bsis-budat
im_dmbtr TYPE bsis-dmbtr,
other_days_routines
IMPORTING
im_date TYPE bsis-budat
im_bukrs TYPE bsis-bukrs
im_hkont TYPE bsis-hkont
im_budat TYPE bsis-budat
im_dmbtr TYPE bsis-dmbtr,
difference_in_days
IMPORTING
im_date TYPE bsis-budat
im_budat TYPE bsis-budat
EXPORTING
ex_diff TYPE vtbbewe-atage,
outs_check_released,
process_data.
PRIVATE SECTION.
CONSTANTS: lc_credit TYPE bsis-shkzg VALUE 'H',
lc_debit TYPE bsis-shkzg VALUE 'S',
lc_nt TYPE bsis-blart VALUE 'NT',
lc_nc TYPE bsis-blart VALUE 'NC',
lc_gl_zero TYPE bsis-hkont VALUE '+++++++++0',
lc_gl_one TYPE bsis-hkont VALUE '+++++++++1',
lc_gl_three TYPE bsis-hkont VALUE '+++++++++3',
lc_monday TYPE dtresr-weekday VALUE 'Monday',"#EC NOTEXT
lc_tuesday TYPE dtresr-weekday VALUE 'Tuesday',"#EC NOTEXT
lc_sunday TYPE dtresr-weekday VALUE 'Sunday'."#EC NOTEXT
CONSTANTS: lc_k3 TYPE bsik-blart VALUE 'K3',
lc_k4 TYPE bsik-blart VALUE 'K4',
lc_k5 TYPE bsik-blart VALUE 'K5',
lc_k6 TYPE bsik-blart VALUE 'K6',
lc_k7 TYPE bsik-blart VALUE 'K7',
lc_kb TYPE bsik-blart VALUE 'KB',
lc_kd TYPE bsik-blart VALUE 'KD',
lc_31 TYPE bsid-blart VALUE '31',
lc_001 TYPE bsid-buzei VALUE '001'.
DATA: lv_hkont TYPE bsis-hkont,
lr_hkont TYPE RANGE OF bsis-hkont,
wa_hkont LIKE LINE OF lr_hkont,
lr_blart TYPE RANGE OF bsik-blart,
wa_blart LIKE LINE OF lr_blart,
lv_hkont_new TYPE bsis-hkont,
lv_hkont_old TYPE bsis-hkont,
lv_date TYPE vtbbewe-atage,
lv_budat TYPE bsis-budat,
lv_day TYPE dtresr-weekday.
ENDCLASS. "lcl_get_data DEFINITION
CLASS lcl_alv_routines DEFINITION
CLASS lcl_alv_routines DEFINITION INHERITING FROM lcl_data_def.
PUBLIC SECTION.
METHODS: build_fieldcat FINAL,
sort_alv_display FINAL.
ENDCLASS. "lcl_alv_routines DEFINITION
CLASS lcl_event_receiver DEFINITION
CLASS lcl_event_receiver DEFINITION.
PUBLIC SECTION.
METHODS:
handle_data_changed FOR EVENT data_changed OF cl_gui_alv_grid
IMPORTING
er_data_changed,
handle_top_of_page FOR EVENT print_top_of_page OF cl_gui_alv_grid,
handle_top_of_list FOR EVENT print_top_of_list OF cl_gui_alv_grid.
PRIVATE SECTION.
DATA: ls_good TYPE lvc_s_modi,
lv_treas_transactions TYPE t_output-tot_cash_bal,
lv_tot_cash_bal TYPE t_output-tot_cash_bal,
lv_outs_unrel_checks TYPE t_output-outs_unrel_checks,
lv_imp_docs_due TYPE t_output-imp_docs_due,
lv_est_cash_balance TYPE t_output-est_cash_balance.
ENDCLASS. "lcl_event_receiver DEFINITION
*/ CLASS IMPLEMENTATION/S */
CLASS lcl_get_data IMPLEMENTATION
CLASS lcl_get_data IMPLEMENTATION.
METHOD get_bank_details
METHOD get_bank_details.
FIELD-SYMBOLS: <fs_t012k> LIKE LINE OF gt_t012k.
Get bank account/s and their corresponding G/L account/s
SELECT bukrs hbkid
hktid hkont
FROM t012k
INTO TABLE gt_t012k
WHERE bukrs IN s_bukrs
AND hbkid IN s_hbkid
AND hktid IN s_hktid.
IF NOT gt_t012k[] IS INITIAL.
SORT gt_t012k BY bukrs hbkid hktid hkont.
Get company name
SELECT bukrs butxt
FROM t001
INTO TABLE gt_company
FOR ALL ENTRIES IN gt_t012k
WHERE bukrs = gt_t012k-bukrs.
LOOP AT gt_t012k ASSIGNING <fs_t012k>.
wa_hkont-sign = 'I'.
wa_hkont-option = 'EQ'.
wa_hkont-low = <fs_t012k>-hkont.
SHIFT wa_hkont-low LEFT DELETING LEADING space.
APPEND wa_hkont TO lr_hkont.
CLEAR wa_hkont.
lv_hkont_new = <fs_t012k>-hkont.
IF lv_hkont_new <> lv_hkont_old.
CLEAR lv_hkont.
lv_hkont = <fs_t012k>-hkont.
DO 4 TIMES.
ADD 1 TO lv_hkont.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = lv_hkont
IMPORTING
output = lv_hkont.
wa_hkont-sign = 'I'.
wa_hkont-option = 'EQ'.
wa_hkont-low = lv_hkont.
SHIFT wa_hkont-low LEFT DELETING LEADING space.
APPEND wa_hkont TO lr_hkont.
CLEAR wa_hkont.
ENDDO.
ENDIF.
lv_hkont_old = lv_hkont_new.
ENDLOOP.
CALL METHOD me->get_gl_balances.
ENDIF.
ENDMETHOD. "get_bank_details
METHOD get_gl_balances
METHOD get_gl_balances.
Get G/L line items(Open items)
SELECT bukrs hkont belnr
buzei gjahr budat
blart dmbtr shkzg
FROM bsis
INTO TABLE gt_bsis
FOR ALL ENTRIES IN gt_t012k
WHERE bukrs = gt_t012k-bukrs
AND hkont IN lr_hkont
AND budat <= p_budat.
Get G/L line items(Cleared items)
SELECT bukrs hkont belnr
buzei gjahr budat
blart dmbtr shkzg
FROM bsas
INTO TABLE gt_bsas
FOR ALL ENTRIES IN gt_t012k
WHERE bukrs = gt_t012k-bukrs
AND hkont IN lr_hkont
AND budat <= p_budat.
APPEND LINES OF gt_bsis TO gt_bsis_bsas.
APPEND LINES OF gt_bsas TO gt_bsis_bsas.
IF NOT gt_bsis_bsas[] IS INITIAL.
CALL METHOD me->get_cust_items.
CALL METHOD me->get_vend_items.
CALL METHOD me->sum_gl_accounts.
ENDIF.
ENDMETHOD. "get_gl_balances
METHOD get_cust_items
METHOD get_cust_items.
Get customer line items(Open items)
SELECT bukrs belnr gjahr blart
buzei budat dmbtr shkzg
bschl
FROM bsid
INTO TABLE gt_bsid
FOR ALL ENTRIES IN gt_bsis_bsas
WHERE bukrs = gt_bsis_bsas-bukrs
AND gjahr = gt_bsis_bsas-gjahr
AND belnr = gt_bsis_bsas-belnr.
Get customer line items(Cleared items)
SELECT bukrs belnr gjahr blart
buzei budat dmbtr shkzg
bschl
FROM bsad
INTO TABLE gt_bsad
FOR ALL ENTRIES IN gt_bsis_bsas
WHERE bukrs = gt_bsis_bsas-bukrs
AND gjahr = gt_bsis_bsas-gjahr
AND belnr = gt_bsis_bsas-belnr.
APPEND LINES OF gt_bsid TO gt_bsid_bsad.
APPEND LINES OF gt_bsad TO gt_bsid_bsad.
ENDMETHOD. "get_cust_items
METHOD get_vend_items
METHOD get_vend_items.
Get vendor line items(Open items)
SELECT bukrs belnr gjahr blart
buzei budat dmbtr shkzg
bschl
FROM bsik
INTO TABLE gt_bsik
FOR ALL ENTRIES IN gt_bsis_bsas
WHERE bukrs = gt_bsis_bsas-bukrs
AND gjahr = gt_bsis_bsas-gjahr
AND belnr = gt_bsis_bsas-belnr.
DEFINE m_blart.
wa_blart-sign = 'I'.
wa_blart-option = 'EQ'.
wa_blart-low = &1.
append wa_blart to lr_blart.
clear wa_blart.
END-OF-DEFINITION.
m_blart lc_k3.
m_blart lc_k4.
m_blart lc_k5.
m_blart lc_k6.
m_blart lc_k7.
m_blart lc_kb.
m_blart lc_kd.
IF NOT gt_bsik[] IS INITIAL AND NOT lr_blart[] IS INITIAL.
DELETE gt_bsik WHERE blart NOT IN lr_blart[].
DELETE gt_bsik WHERE bschl <> lc_31.
ENDIF.
ENDMETHOD. "get_vend_items
METHOD sum_gl_accounts
METHOD sum_gl_accounts.
FIELD-SYMBOLS: <fs_bsis_bsas> LIKE LINE OF gt_bsis_bsas,
<fs_bsis> LIKE LINE OF gt_bsis,
<fs_bsid_bsad> LIKE LINE OF gt_bsid_bsad,
<fs_bsik> LIKE LINE OF gt_bsik,
<fs_outs_rel_checks> LIKE LINE OF gt_outs_rel_checks,
<fs_outs_unrel_checks> LIKE LINE OF gt_outs_unrel_checks.
SORT gt_bsis_bsas BY bukrs hkont belnr.
LOOP AT gt_bsis_bsas ASSIGNING <fs_bsis_bsas>.
IF <fs_bsis_bsas>-shkzg = lc_credit. "H
MULTIPLY <fs_bsis_bsas>-dmbtr BY -1.
ENDIF.
*/Routine for cash in bank
IF <fs_bsis_bsas>-hkont CP lc_gl_zero.
MOVE-CORRESPONDING <fs_bsis_bsas> TO wa_cash_in_bank.
COLLECT wa_cash_in_bank INTO gt_cash_in_bank.
CLEAR wa_cash_in_bank.
ENDIF.
*/Routine for miscellaneous collection
IF <fs_bsis_bsas>-blart = lc_nt OR
<fs_bsis_bsas>-blart = lc_nc AND
<fs_bsis_bsas>-shkzg = lc_debit AND
<fs_bsis_bsas>-hkont CP lc_gl_one.
READ TABLE gt_bsid_bsad ASSIGNING <fs_bsid_bsad> WITH TABLE KEY bukrs = <fs_bsis_bsas>-bukrs
belnr = <fs_bsis_bsas>-belnr
gjahr = <fs_bsis_bsas>-gjahr
blart = <fs_bsis_bsas>-blart.
IF sy-subrc = 0.
MOVE-CORRESPONDING <fs_bsis_bsas> TO wa_misc_collection.
COLLECT wa_misc_collection INTO gt_misc_collection.
CLEAR wa_misc_collection.
ENDIF.
ENDIF.
*/Routine for importation docs.due
IF <fs_bsis_bsas>-shkzg = lc_credit.
READ TABLE gt_bsik ASSIGNING <fs_bsik> WITH TABLE KEY bukrs = <fs_bsis_bsas>-bukrs
belnr = <fs_bsis_bsas>-belnr
gjahr = <fs_bsis_bsas>-gjahr
blart = <fs_bsis_bsas>-blart.
IF sy-subrc = 0.
MOVE-CORRESPONDING <fs_bsis_bsas> TO wa_importation_docs_due.
COLLECT wa_importation_docs_due INTO gt_importation_docs_due.
CLEAR gt_importation_docs_due.
ENDIF.
ENDIF.
ENDLOOP.
IF NOT gt_bsis[] IS INITIAL.
IF NOT gt_bsis[] IS INITIAL.
lv_budat = p_budat.
CALL FUNCTION 'DATE_TO_DAY'
EXPORTING
date = lv_budat
IMPORTING
weekday = lv_day.
LOOP AT gt_bsis ASSIGNING <fs_bsis>.
*/Routine for outstanding trade collection
IF <fs_bsis>-shkzg = lc_debit AND <fs_bsis>-blart <> lc_nt.
IF lv_day = lc_monday.
CALL METHOD me->monday_routines
EXPORTING
im_date = p_budat
im_bukrs = <fs_bsis>-bukrs
im_hkont = <fs_bsis>-hkont
im_budat = <fs_bsis>-budat
im_dmbtr = <fs_bsis>-dmbtr.
ELSEIF lv_day = lc_sunday.
CALL METHOD me->sunday_routines
EXPORTING
im_date = p_budat
im_bukrs = <fs_bsis>-bukrs
im_hkont = <fs_bsis>-hkont
im_budat = <fs_bsis>-budat
im_dmbtr = <fs_bsis>-dmbtr.
ELSEIF lv_day = lc_tuesday.
CALL METHOD me->tuesday_routines
EXPORTING
im_date = p_budat
im_bukrs = <fs_bsis>-bukrs
im_hkont = <fs_bsis>-hkont
im_budat = <fs_bsis>-budat
im_dmbtr = <fs_bsis>-dmbtr.
ELSE.
CALL METHOD me->other_days_routines
EXPORTING
im_date = p_budat
im_bukrs = <fs_bsis>-bukrs
im_hkont = <fs_bsis>-hkont
im_budat = <fs_bsis>-budat
im_dmbtr = <fs_bsis>-dmbtr.
ENDIF.
ENDIF.
*/Routine for outstanding released checks
IF <fs_bsis>-hkont CP lc_gl_three AND <fs_bsis>-shkzg = lc_debit.
MOVE-CORRESPONDING <fs_bsis> TO wa_outs_rel_checks.
COLLECT wa_outs_rel_checks INTO gt_outs_rel_checks.
CLEAR wa_outs_rel_checks.
*/Routine for outstanding unreleased checks
ELSEIF <fs_bsis>-hkont CP lc_gl_three AND <fs_bsis>-shkzg = lc_credit.
MOVE-CORRESPONDING <fs_bsis> TO wa_outs_unrel_checks.
COLLECT wa_outs_unrel_checks INTO gt_outs_unrel_checks.
CLEAR wa_outs_unrel_checks.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
*/Routine for outstanding released check/s
*/this routine will get all records from custom table zcheck_monitor
*/where status is released to vendor
CALL METHOD me->outs_check_released.
IF NOT gt_outs_rel_checks[] IS INITIAL.
Subtract debit line items from ZFE002
LOOP AT gt_outs_rel_checks ASSIGNING <fs_outs_rel_checks>.
CLEAR wa_zcheck_monitor_collect.
READ TABLE gt_zcheck_monitor_collect INTO wa_zcheck_monitor_collect
WITH TABLE KEY zzbukr = <fs_outs_rel_checks>-bukrs
zubhkt = <fs_outs_rel_checks>-hkont.
IF sy-subrc = 0.
<fs_outs_rel_checks>-dmbtr = wa_zcheck_monitor_collect-zrwbtr -
<fs_outs_rel_checks>-dmbtr.
ELSE.
<fs_outs_rel_checks>-dmbtr = 0 - <fs_outs_rel_checks>-dmbtr.
ENDIF.
ENDLOOP.
ENDIF.
IF NOT gt_outs_unrel_checks[] IS INITIAL.
Subtract ZFE002 records from credit line items
LOOP AT gt_outs_unrel_checks ASSIGNING <fs_outs_unrel_checks>.
CLEAR wa_zcheck_monitor_collect.
READ TABLE gt_zcheck_monitor_collect INTO wa_zcheck_monitor_collect
WITH TABLE KEY zzbukr = <fs_outs_unrel_checks>-bukrs
zubhkt = <fs_outs_unrel_checks>-hkont.
IF sy-subrc = 0.
<fs_outs_unrel_checks>-dmbtr = ABS( <fs_outs_unrel_checks>-dmbtr ) -
ABS( wa_zcheck_monitor_collect-zrwbtr ).
ENDIF.
ENDLOOP.
ENDIF.
Move records to output table
CALL METHOD me->process_data.
ENDMETHOD. "sum_gl_accounts
METHOD monday_routines
METHOD monday_routines.
wa_outs_trade_coll-bukrs = im_bukrs.
wa_outs_trade_coll-hkont = im_hkont.
CLEAR lv_date.
CALL METHOD me->difference_in_days
EXPORTING
im_date = im_date
im_budat = im_budat
IMPORTING
ex_diff = lv_date.
One day
IF lv_date = 3.
wa_outs_trade_coll-one_day = im_dmbtr.
Two days
ELSEIF lv_date = 4.
wa_outs_trade_coll-two_days = im_dmbtr.
More than two days
ELSEIF lv_date > 4.
wa_outs_trade_coll-more_than_two_days = im_dmbtr.
ENDIF.
COLLECT wa_outs_trade_coll INTO gt_outs_trade_coll.
CLEAR wa_outs_trade_coll.
ENDMETHOD. "monday_routines
METHOD sunday_routines
METHOD sunday_routines.
wa_outs_trade_coll-bukrs = im_bukrs.
wa_outs_trade_coll-hkont = im_hkont.
CLEAR lv_date.
CALL METHOD me->difference_in_days
EXPORTING
im_date = im_date
im_budat = im_budat
IMPORTING
ex_diff = lv_date.
One day
IF lv_date = 2.
wa_outs_trade_coll-one_day = im_dmbtr.
Two days
ELSEIF lv_date = 3.
wa_outs_trade_coll-two_days = im_dmbtr.
More than two days
ELSEIF lv_date > 3.
wa_outs_trade_coll-more_than_two_days = im_dmbtr.
ENDIF.
COLLECT wa_outs_trade_coll INTO gt_outs_trade_coll.
CLEAR wa_outs_trade_coll.
ENDMETHOD. "sunday_routines
METHOD tuesday_routines
METHOD tuesday_routines.
wa_outs_trade_coll-bukrs = im_bukrs.
wa_outs_trade_coll-hkont = im_hkont.
CLEAR lv_date.
CALL METHOD me->difference_in_days
EXPORTING
im_date = im_date
im_budat = im_budat
IMPORTING
ex_diff = lv_date.
One day
IF lv_date = 1.
wa_outs_trade_coll-one_day = im_dmbtr.
Two days
ELSEIF lv_date = 4.
wa_outs_trade_coll-two_days = im_dmbtr.
More than two days
ELSEIF lv_date > 4.
wa_outs_trade_coll-more_than_two_days = im_dmbtr.
ENDIF.
COLLECT wa_outs_trade_coll INTO gt_outs_trade_coll.
CLEAR wa_outs_trade_coll.
ENDMETHOD. "tuesday_routines
METHOD other_days_routines
METHOD other_days_routines.
wa_outs_trade_coll-bukrs = im_bukrs.
wa_outs_trade_coll-hkont = im_hkont.
CLEAR lv_date.
CALL METHOD me->difference_in_days
EXPORTING
im_date = im_date
im_budat = im_budat
IMPORTING
ex_diff = lv_date.
One day
IF lv_date = 1.
wa_outs_trade_coll-one_day = im_dmbtr.
Two days
ELSEIF lv_date = 2.
wa_outs_trade_coll-two_days = im_dmbtr.
More than two days
ELSEIF lv_date > 3.
wa_outs_trade_coll-more_than_two_days = im_dmbtr.
ENDIF.
COLLECT wa_outs_trade_coll INTO gt_outs_trade_coll.
CLEAR wa_outs_trade_coll.
ENDMETHOD. "other_days_routines
METHOD difference_in_days
METHOD difference_in_days.
CALL FUNCTION 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
EXPORTING
i_date_from = im_budat
I_KEY_DAY_FROM =
i_date_to = im_date
I_KEY_DAY_TO =
I_FLG_SEPARATE = ' '
IMPORTING
e_days = ex_diff.
E_MONTHS =
E_YEARS =
ENDMETHOD. "difference_in_days
METHOD outs_check_released
METHOD outs_check_released.
FIELD-SYMBOLS: <fs_zcheck_monitor> LIKE LINE OF gt_zcheck_monitor.
SELECT zzbukr zhbkid zhktid
zubhkt zrwbtr zrlsvd
zrlsdt
FROM zcheck_monitor
INTO TABLE gt_zcheck_monitor
WHERE zrlsvd <> space.
IF NOT gt_zcheck_monitor[] IS INITIAL.
LOOP AT gt_zcheck_monitor ASSIGNING <fs_zcheck_monitor>.
MOVE-CORRESPONDING <fs_zcheck_monitor> TO wa_zcheck_monitor_collect.
COLLECT wa_zcheck_monitor_collect INTO gt_zcheck_monitor_collect.
CLEAR wa_zcheck_monitor_collect.
ENDLOOP.
ENDIF.
ENDMETHOD. "outs_check_released
METHOD process_data
METHOD process_data.
FIELD-SYMBOLS: <fs_t012k> LIKE LINE OF gt_t012k,
<fs_company> LIKE LINE OF gt_company,
<fs_cash_in_bank> LIKE LINE OF gt_cash_in_bank,
<fs_outs_trade_coll> LIKE LINE OF gt_outs_trade_coll,
<fs_misc_collection> LIKE LINE OF gt_misc_collection,
<fs_outs_rel_checks> LIKE LINE OF gt_outs_rel_checks,
<fs_outs_unrel_checks> LIKE LINE OF gt_outs_unrel_checks.
SORT gt_t012k BY bukrs hbkid.
LOOP AT gt_t012k ASSIGNING <fs_t012k>.
AT NEW hbkid.
READ TABLE gt_company ASSIGNING <fs_company>
WITH TABLE KEY bukrs = <fs_t012k>-bukrs.
IF sy-subrc = 0.
wa_header-bukrs = <fs_company>-bukrs.
wa_header-butxt = <fs_company>-butxt.
wa_header-hbkid = <fs_t012k>-hbkid.
wa_header-hktid = <fs_t012k>-hktid.
APPEND wa_header TO gt_header.
CLEAR wa_header.
ENDIF.
ENDAT.
wa_output-bukrs = <fs_t012k>-bukrs.
wa_output-hbkid = <fs_t012k>-hbkid.
wa_output-hktid = <fs_t012k>-hktid.
Move cash in bank
READ TABLE gt_cash_in_bank ASSIGNING <fs_cash_in_bank>
WITH TABLE KEY bukrs = <fs_t012k>-bukrs
hkont = <fs_t012k>-hkont.
IF sy-subrc = 0.
wa_output-cash_in_bank = <fs_cash_in_bank>-dmbtr.
ADD wa_output-cash_in_bank TO wa_output-tot_cash_bal.
ENDIF.
CLEAR lv_hkont.
lv_hkont = <fs_t012k>-hkont.
ADD 1 TO lv_hkont.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = lv_hkont
IMPORTING
output = lv_hkont.
Move outstanding trade collection(Deposit in transit)
READ TABLE gt_outs_trade_coll ASSIGNING <fs_outs_trade_coll>
WITH TABLE KEY bukrs = <fs_t012k>-bukrs
hkont = lv_hkont.
IF sy-subrc = 0.
wa_output-one_day = <fs_outs_trade_coll>-one_day.
ADD wa_output-one_day TO wa_output-tot_cash_bal.
wa_output-two_days = <fs_outs_trade_coll>-two_days.
ADD wa_output-two_days TO wa_output-tot_cash_bal.
wa_output-more_than_two_days = <fs_outs_trade_coll>-more_than_two_days.
ADD wa_output-more_than_two_days TO wa_output-tot_cash_bal.
ENDIF.
Move miscellaneous collection
READ TABLE gt_misc_collection ASSIGNING <fs_misc_collection>
WITH TABLE KEY bukrs = <fs_t012k>-bukrs
hkont = lv_hkont.
IF sy-subrc = 0.
wa_output-misc_collection = <fs_misc_collection>-dmbtr.
ADD wa_output-misc_collection TO wa_output-tot_cash_bal.
ENDIF.
Move outstanding released checks
CLEAR lv_hkont.
lv_hkont = <fs_t012k>-hkont.
ADD 3 TO lv_hkont.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = lv_hkont
IMPORTING
output = lv_hkont.
READ TABLE gt_outs_rel_checks ASSIGNING <fs_outs_rel_checks>
WITH TABLE KEY bukrs = <fs_t012k>-bukrs
hkont = lv_hkont.
IF sy-subrc = 0.
wa_output-outs_rel_checks = <fs_outs_rel_checks>-dmbtr.
IF wa_output-outs_rel_checks < 0.
ADD wa_output-outs_rel_checks TO wa_output-tot_cash_bal.
ELSE.
SUBTRACT wa_output-outs_rel_checks FROM wa_output-tot_cash_bal.
ENDIF.
ELSE.
CLEAR wa_zcheck_monitor_collect.
READ TABLE gt_zcheck_monitor_collect INTO wa_zcheck_monitor_collect
WITH TABLE KEY zzbukr = <fs_t012k>-bukrs
zubhkt = lv_hkont.
IF sy-subrc = 0.
wa_output-outs_rel_checks = wa_zcheck_monitor_collect-zrwbtr.
IF wa_output-outs_rel_checks < 0.
ADD wa_output-outs_rel_checks TO wa_output-tot_cash_bal.
ELSE.
SUBTRACT wa_output-outs_rel_checks FROM wa_output-tot_cash_bal.
ENDIF.
ENDIF.
ENDIF.
Move outstanding unreleased checks
CLEAR lv_hkont.
lv_hkont = <fs_t012k>-hkont.
ADD 3 TO lv_hkont.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = lv_hkont
IMPORTING
output = lv_hkont.
READ TABLE gt_outs_unrel_checks ASSIGNING <fs_outs_unrel_checks>
WITH TABLE KEY bukrs = <fs_t012k>-bukrs
hkont = lv_hkont.
IF sy-subrc = 0.
wa_output-outs_unrel_checks = <fs_outs_unrel_checks>-dmbtr.
ENDIF.
Move importation docs. due
CLEAR wa_importation_docs_due.
READ TABLE gt_importation_docs_due INTO wa_importation_docs_due
WITH TABLE KEY bukrs = <fs_t012k>-bukrs
hkont = lv_hkont
TRANSPORTING dmbtr.
IF sy-subrc = 0.
wa_output-imp_docs_due = wa_importation_docs_due-dmbtr.
ENDIF.
wa_output-est_cash_balance = wa_output-tot_cash_bal - ( wa_output-outs_unrel_checks +
wa_output-imp_docs_due ).
APPEND wa_output TO gt_output.
CLEAR wa_output.
ENDLOOP.
ENDMETHOD. "process_data
ENDCLASS. "lcl_get_data IMPLEMENTATION
CLASS lcl_alv_routines IMPLEMENTATION
CLASS lcl_alv_routines IMPLEMENTATION.
METHOD build_fieldcat.
DEFINE m_fieldcat.
add 1 to wa_fieldcat-col_pos.
wa_fieldcat-fieldname = &1.
wa_fieldcat-tabname = &2.
wa_fieldcat-coltext = &3.
wa_fieldcat-outputlen = &4.
wa_fieldcat-key = &5.
wa_fieldcat-just = &6.
wa_fieldcat-do_sum = &7.
wa_fieldcat-emphasize = &8.
wa_fieldcat-edit = &9.
append wa_fieldcat to gt_fieldcat.
clear wa_fieldcat.
END-OF-DEFINITION.
m_fieldcat 'BUKRS' 'GT_OUTPUT' text-a01 '12' 'X' '' '' '' ''.
m_fieldcat 'HBKID' 'GT_OUTPUT' text-a14 '10' 'X' '' '' '' ''.
m_fieldcat 'HKTID' 'GT_OUTPUT' text-a02 '10' 'X' '' '' '' ''.
m_fieldcat 'CASH_IN_BANK' 'GT_OUTPUT' text-a03 '12' '' 'R' 'X' '' ''.
m_fieldcat 'ONE_DAY' 'GT_OUTPUT' text-a04 '05' '' 'R' 'X' '' ''.
m_fieldcat 'TWO_DAYS' 'GT_OUTPUT' text-a05 '06' '' 'R' 'X' '' ''.
m_fieldcat 'MORE_THAN_TWO_DAYS' 'GT_OUTPUT' text-a06 '08' '' 'R' 'X' '' ''.
m_fieldcat 'MISC_COLLECTION' 'GT_OUTPUT' text-a07 '16' '' 'R' 'X' '' ''.
m_fieldcat 'OUTS_REL_CHECKS' 'GT_OUTPUT' text-a08 '21' '' 'R' 'X' '' ''.
m_fieldcat 'TREAS_TRANSACTIONS' 'GT_OUTPUT' text-a09 '19' '' 'R' 'X' '' 'X'.
m_fieldcat 'TOT_CASH_BAL' 'GT_OUTPUT' text-a10 '15' '' 'R' 'X' 'C300' ''.
m_fieldcat 'OUTS_UNREL_CHECKS' 'GT_OUTPUT' text-a11 '19' '' 'R' 'X' '' ''.
m_fieldcat 'IMP_DOCS_DUE' 'GT_OUTPUT' text-a12 '14' '' 'R' 'X' '' ''.
m_fieldcat 'EST_CASH_BALANCE' 'GT_OUTPUT' text-a13 '17' '' 'R' 'X' 'C300' ''.
ENDMETHOD. "build_fieldcat
METHOD sort_alv_display.
DEFINE m_sort.
clear gs_sort.
gs_sort-fieldname = &1.
gs_sort-spos = &2.
gs_sort-up = &3.
gs_sort-down = &4.
gs_sort-subtot = &5.
append gs_sort to gt_sort.
END-OF-DEFINITION.
m_sort 'BUKRS' '1' 'X' '' ''.
m_sort 'HBKID' '2' 'X' '' 'X'.
ENDMETHOD. "sort_alv_display
ENDCLASS. "lcl_alv_routines IMPLEMENTATION
CLASS lcl_event_receiver IMPLEMENTATION
CLASS lcl_event_receiver IMPLEMENTATION.
METHOD handle_data_changed.
LOOP AT er_data_changed->mt_mod_cells INTO ls_good.
CASE ls_good-fieldname.
WHEN 'TREAS_TRANSACTIONS'.
CLEAR lv_tot_cash_bal.
CALL METHOD er_data_changed->get_cell_value
EXPORTING
i_row_id = ls_good-row_id
i_fieldname = 'TOT_CASH_BAL'
IMPORTING
e_value = lv_tot_cash_bal.
IF ls_good-value CA 'ABCDEFGHIJKLMNOPQRSTUVWXYZ/'.
CALL METHOD er_data_changed->add_protocol_entry
EXPORTING
i_msgid = '0K'
i_msgno = '000'
i_msgty = 'E'
i_msgv1 = text-e01
i_msgv2 = ls_good-value
i_msgv3 = text-e02
i_fieldname = ls_good-fieldname
i_row_id = ls_good-row_id.
EXIT.
ELSE.
CLEAR lv_treas_transactions.
lv_treas_transactions = ls_good-value.
ADD lv_tot_cash_bal TO lv_treas_transactions.
CALL METHOD er_data_changed->modify_cell
EXPORTING
i_row_id = ls_good-row_id
i_fieldname = 'TOT_CASH_BAL'
i_value = lv_treas_transactions.
CLEAR lv_outs_unrel_checks.
CALL METHOD er_data_changed->get_cell_value
EXPORTING
i_row_id = ls_good-row_id
i_fieldname = 'OUTS_UNREL_CHECKS'
IMPORTING
e_value = lv_outs_unrel_checks.
CLEAR lv_imp_docs_due.
CALL METHOD er_data_changed->get_cell_value
EXPORTING
i_row_id = ls_good-row_id
i_fieldname = 'IMP_DOCS_DUE'
IMPORTING
e_value = lv_imp_docs_due.
lv_est_cash_balance = ls_good-value - ( lv_outs_unrel_checks +
lv_imp_docs_due ).
CALL METHOD er_data_changed->modify_cell
EXPORTING
i_row_id = ls_good-row_id
i_fieldname = 'EST_CASH_BALANCE'
i_value = lv_est_cash_balance.
CLEAR lv_est_cash_balance.
ENDIF.
ENDCASE.
ENDLOOP.
ENDMETHOD. "handle_data_changed
METHOD handle_top_of_page.
WRITE: sy-repid.
ENDMETHOD. "handle_top_of_page
METHOD handle_top_of_list.
WRITE: sy-repid.
ENDMETHOD. "handle_top_of_list
ENDCLASS. "lcl_event_receiver IMPLEMENTATION
START-OF- -
Can anyone give me an example of a custom TableColumn
I just can't get to grips with creating a custom TableColumn
can somone give me a hand or a pointer to a tutorial, I just cant find one anywhere
ThanksFrom that thread's description, I think everything you are asking to do can be controlled by the TableModel itself. The data, types, etc. (that are the data that drive the table) are all defined in your table model.
Just subclass AbstractTableModel and implement the necessary methods. If while running, you change the # of columns, data types, etc. just fire the appropriate event from your TableModel fireTableStructureChanged(), etc. The columns, etc. will be rebuilt using the updated information from your table model. Not sure given your description if you will need to do any of that though. I think you can just extend the abstract table and with your own logic in getValueAt() to return the appropriate value from your data.
Note that the table expects all of the data in a column to be the same type. If your underlying data may have values in different types (classes) you will need to convert them to something generic before returning them from your model (like as a String).
Read up on this tutorial:
http://java.sun.com/docs/books/tutorial/uiswing/components/table.html
You pretty much don't have to muck with the TableColumnModel stuff unless you want to do advanced/tricky things like provide a generic way to hide/show columns, etc. -
Can you give me an example using the System_exec.vi
Hi
I am having trouble with the system_exec.vi. Is it possible for someone to give me an example please?
Thanks.Try this............
Regards
Werner
Attachments:
windows instruction.vi 21 KB -
Can you give me an example?
I use com.sapportals.htmlb.Tree to build a dynpage and set a NodeExpand envent on a TreeNode.In the event I want to create subnodes of the TreeNode.But I don't know how to transmite the TreeNode to the event.I mean I don't know how to know which TreeNode the subnode are built to.
Can you gei me an example?Hi,
Have you seen this blog ?
Build Your Own KM Navigation iView Using HTMLB Tree
https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1424
Patricio. -
Can anyone give me an example of for all entries in case of inner join
Hi abapers,
I am trying to replace an inner join with for all entries.
So kindly give me a demo code so that i can understand the use and apply it.
And plz tell me in which case it is better to use for all entries and in which case to use inner join so that better performance will occur.
With Regards
AnsumanHello Ansuman,
For example:
DATA:
BEGIN OF fs_eket,
ebeln LIKE ekko-ebeln, " Purchasing Document Number
ebelp LIKE ekpo-ebelp, " Item Number of Purchasing Doc
END OF fs_eket. " fs_eket
DATA:
t_eket LIKE " Purchase table
STANDARD TABLE
OF fs_eket.
Using joins:
select ebeln ebelp
into corresponding fields of table t_eket
from ekko join ekpo
on ekkoebeln eq ekpoebeln
where ebeln in s_sbeln.
The select statement can be replaced by
SELECT ebeln
FROM ekko
INTO CORRESPONDING FIELDS OF TABLE t_eket
WHERE ebeln IN s_ebeln.
IF sy-subrc EQ 0.
sort t_eket by ebeln.
SELECT ebeln
ebelp
FROM ekpo
INTO CORRESPONDING FIELDS OF TABLE t_eket
FOR ALL ENTRIES IN t_eket
WHERE ebeln EQ t_eket-ebeln.
The duplicate entries are removed by using FOR ALL ENTRIES. Or else by using the join, you have teh sort the table by key fields and then delete adjacent duplicates.
Hope it helps you
Regards
Indu
Maybe you are looking for
-
CLAIM AGAINT ADOBE FOR UNAUTHORIZED CHARGES JANUARY 2012 TO FEBRUARY 2015 Adobe Photoshop CS5.1 WILL NOT STOP CHARGING MY CREDIT CARD !!!!!!!!!!!!!!!!!!!!!!! Adobe's system is set up to make it VERY difficult to stop charging your credit card AFTER
-
I am on a Galaxy S4. Sending text as usually, recipient gets an email of the text. Is is my settings or theirs? What needs to be changed?
-
Add lines to a PO with the PO API
Hello All, Has anyone out there used the PO API to interface lines into an existing PO? Can this even be done? Thanks for any help, Bradley
-
Hi, I have the following script : CREATE USER USER IDENTIFIED BY pwd DEFAULT TABLESPACE TABLES TEMPORARY TABLESPACE TEMP PROFILE DEFAULT ACCOUNT UNLOCK; How can I modify it in order to execute with a parameter (username) , like this : SQL>@myscript u
-
How do I get my email to not show up when I use iMessage?
After updating my software to iOS 7, every time I use iMessage my email shows up on others phones instead of my contact name and my phone number. I tried making sure my phone number was entered into my appleid settings, restarted my phone and signed