Please help me with modifying this code
I am using the attached code to acauire and save data to a text file, using 'write measurement file' express VI.
WHat I want to do is to replace 'write to measurement VI' with low-level file I/O VIs. I tried to convert the express VI, but the obtained code is too complicated.
Anyone can give me hints for using file I/O Vis to implement same function without using the express VI? Thanks a lot.
Message Edited by Dejun on 08-27-2007 11:26 AM
Attachments:
4.png 14 KB
code.vi 121 KB
Above code is in a case of an event structure, i.e., each time I click a buttom, such as 'RUN', data acquisition begins and write data into a file.
What I want is, each time this event case is executed, a file is open, write data to it, and finally close this file. The next time when I run this case, maybe another file is open for writting data.
The problem of using 'write measure file' express VI is: if a file is open in one execution of the case, it will continuously be in 'open' after this case execution is finished, i.e., there is no explicit close file function with the express VI, which in some cases may be a problem. What I need is closing the file at the end of each execution of a event case. With low-level file I/O VIs, maybe I can directly put a close file VI there.
The data file should be in text format so that data analysis software, such as MS-powerpoint, can directly reads it.
Message Edited by Dejun on 08-27-2007 01:55 PM
Message Edited by Dejun on 08-27-2007 01:56 PM
Similar Messages
-
I forgot restrictions cod in ipad air1 and don't off it , please help me for recovery this cod
i forgot restrictions cod in ipad air1 and don't off it , please help me for recovery this cod...
Locked Out, Forgot Lock or Restrictions Passcode, or Need to Restore Your Device: Several Alternative Solutions
A
1. iOS- Forgotten passcode or device disabled after entering wrong passcode
2. iPhone, iPad, iPod touch: Wrong passcode results in red disabled screen
3. Restoring iPod touch after forgotten passcode
4. What to Do If You've Forgotten Your iPhone's Passcode
5. iOS- Understanding passcodes
6. iTunes 10 for Mac- Update and restore software on iPod, iPhone, or iPad
7. iOS - Unable to update or restore
Forgotten Restrictions Passcode Help
iPad,iPod,iPod Touch Recovery Mode
You will need to restore your device as New to remove a Restrictions passcode. Go through the normal process to restore your device, but when you see the options to restore as New or from a backup, be sure to choose New.
You can restore from a backup if you have one from BEFORE you set the restrictions passcode.
Also, see iTunes- Restoring iOS software.
And also see How to Recover Forgotten iPhone, iPad Restrictions Passcode. -
my Iphone 4 is changing screens without me touching it. I will be in a msg and it will jump out of that msg and into another one... can anyone please help me with what this could be?
Try the basics from the manual.
restart.
reset.
restore.
iPhone User Guide (For iOS 4.2 and 4.3 Software) -
Please help me to complete this code
import java.security.MessageDigest;
import java.util.Map;
import java.util.Scanner;
public class PasswordService
//The hash is to be formed using the SHA algorithm
//to create a MessageDigest
private final String algorithmName = "SHA";
//Use a message digest to create hashed passwords
private MessageDigest md = null;
//We simulate a database of users using who have a login and password
//as a key and value pair in a Map
private Map<String, byte[]> userData;
//complete the constructor
public PasswordService()
//TODO - intialize the class instance data
//some dummy data - do not alter these lines
addUser("daddy", "cool");
addUser("nightflight", "topChat");
addUser("boney", "2E5sxuSRg6A");
public void showProvider()
//TODO
//Get the hash value for the provided string password.
public byte[] getHash(String password)
//TODO
return null;
public void addUser(String login, String password)
//TODO
public byte[] getPassword(String login)
//TODO
return null;
public boolean checkLogin(String login, String password)
// TODO
return false;
//This method is provided to perform a login from the command line
public boolean doLogin()
Scanner sc = new Scanner(System.in);
System.out.println("Enter login please");
String login = sc.next();
System.out.println("Your password please");
String password = sc.next();
return checkLogin(login, password);
public static void main(String[] args)
int attempts = 0;
showProvider();
while(attempts < 4)
boolean match = doLogin(); //request login and password
System.out.println("match? " + match);
attempts++;
}please help me to complete this code
void completeCode(Code code,Properties options) throws CodeCompletingException
CodeCompleterFactory cf = CodeCompleterFactory.newInstance();
CodeCompleter cc = cf.newCodeCompleter();
cc.complete(code,options);
} -
Return Current month Data:Help needed in modifying this code of a Procedure
Hello Folks i have this scenario where i need to modify this code so that it has to return data from the Current month First Day to the previous Day if its a daily report and previous month data if its a monthly report.
I have no clue how to modify this code below. Currently the code is returning data for Monthly reports for the previous month. Does anyone have any idea how to modify so that the code meets the requirements of both daily and monthly reprts.
BEGIN
if v_lowdate is null or v_highdate is null then
select to_number(to_char(sysdate, 'DD')) into v_cur_day from dual;
if v_cur_day < 25 then
-- this is for the previous month run
Select Add_Months(trunc(sysdate, 'MONTH'), -1)
INTO V_LOWDATE
FROM DUAL;
SELECT Last_Day(ADD_Months(Sysdate, -1)) INTO V_Highdate From Dual;
else
-- this is for the current month run
Select trunc(sysdate, 'MONTH') INTO V_LOWDATE FROM DUAL;
SELECT Last_Day(Sysdate) INTO V_Highdate From Dual;
end if;
end if;
Thanks
Edited by: user11961230 on Sep 30, 2009 8:34 PMHi Frank, This is code till the "modifying Code" which we were working. I will post the code after the "modifying Code" in the next reply. Thanks
CREATE OR REPLACE PROCEDURE "POPULATE_RECOVERY_ACTIVITYHN"(p_lowdate date,
p_highdate date) IS
v_lowdate date := p_lowdate;
v_highdate date := p_highdate;
v_error_code NUMBER(20);
v_error_text VARCHAR2(300);
v_recovery_id Recovery.Recovery_ID%type;
v_loop_control Number(20);
v_settlement_id recovery.settlement_id%type;
V_Event_ID Event.Event_ID%Type;
V_Event_Case_ID Event_Case.Event_Case_ID%Type;
V_Recovery_Month Varchar2(100);
V_Major_Company Major_Client.Major_Client_Name%Type;
V_Company Client.Client_Name%Type;
V_Client_Policy_Identifier Varchar2(100);
V_Lan_ID Varchar2(10) := 'TROVERIS';
V_Recovery_Account Client.Account_Number%Type;
V_AccountA Number(2) := 0;
V_AccountB Number(2) := 0;
V_Unit Event_Client_Field.Client_Field_Data%Type;
V_Market Event_Client_Field.Client_Field_Data%Type;
V_case_open_date Event_case.Open_Date%type;
V_Employer_Group_Code Employer_Group.Employer_Group_Code%Type;
V_Unknown1 Number(2) := 0;
V_Fee_Schedule_Code Event_Case.Fee_Schedule_Code%Type;
V_Total_Fee_Percent Number(20, 2) := 0.00;
V_Subrogation_Fee_Percent Number(20, 2) := 0.00;
V_Unknown2 Number(2) := NULL;
V_Unknown3 Number(2) := NULL;
V_TOTAL_MEDICAL Number(20, 2) := 0.00;
V_Recovery_Amount Number(20, 2) := 0.00;
V_Total_Tax Number(20, 2) := 0.00;
V_Administrative_Tax Number(20, 2) := 0.00;
V_Total_NonCash_Fee Number(20, 2) := 0.00;
V_Total_NonCash_Positive Number(20, 2) := 0.00;
V_Total_NonCash_Negative Number(20, 2) := 0.00;
V_Total_Recovery Number(20, 2) := 0.00;
V_Total_NonCash_Fee_Positive Number(20, 2) := 0.00;
V_Total_NonCash_Fee_Negative Number(20, 2) := 0.00;
V_Total_Admin_Fee Number(20, 2) := 0.00;
V_Total_Fee Number(20, 2) := 0.00;
V_Total_NonCash_Tax_Positive Number(20, 2) := 0.00;
V_Total_NonCash_Tax_Negative Number(20, 2) := 0.00;
report_type Varchar2(2);
v_gl_num client.gl_num%type; -- *002*
v_net_billable client.net_billable%type; -- *003*
vevent_id event.event_id%type; -- *006*
v_prev_event event.event_id%type; -- *006*
v_prev_case event_case.event_case_id%type; -- *006*
v_tot_recovery recovery.amount%type; -- *006*
v_rec_amount recovery.amount%type; -- *006*
v_prev_rec_amt recovery.amount%type; -- *006*
v_prev_rec_month recovery_activity.recovery_month%type; -- *006*
v_tot_fee recovery_activity.total_fee%type; --*006*
v_mth_rev unbundled_recoveries.monthly_revenue%type; -- *006*
v_diff number(18, 2); -- *006*
v_nc_count number := 0; -- *006*
v_c_count number := 0; -- *006*
v_nc_tot recovery.amount%type; -- *006*
v_used_rev recovery_activity.total_fee%type; -- *006*
v_use_mth_rev unbundled_recoveries.monthly_revenue%type := 0; -- *006*
v_use_nc_mth_rev unbundled_recoveries.monthly_revenue%type := 0; -- *006*
v_prev_netbill client.net_billable%type; -- *006*
v_event_type event.event_type_code%type;
v_date_typed event.date_typed%type;
v_acc_client_id client.acc_client_id%Type;
v_Recovery_Revenue_GL_Num client.recovery_revenue_gl_num%Type;
v_Funds_Due_GL_num client.funds_due_gl_num%Type;
v_lob Varchar2(20);
v_nc_recovery_id recovery.recovery_id%Type;
/*Changed the Client_Policy_Identifier to concatenate the Retlation to insured code instead of the description
which was exceeding the column size in the table. SWL 09/03/02. Checked with the Design Doc.*/
CURSOR RECOVERY_INFO IS
SELECT Event.Event_ID,
Event_Case.Event_Case_ID,
TO_CHAR(Recovery.Recovery_Date, 'FMMONTHYYYY') As Recovery_Month,
Major_Client.Major_Client_Name AS Major_Company,
-- Client.Client_Name AS Company,
-- nvl(client.legacy_client_id,'DC')||'-'||substr(Client.Client_Name,1,55) AS Company, -- SWL 04/01/04 52653
substr(nvl(client.legacy_client_id,
decode(client.client_id, 1, 'DC', client.client_code)) || '-' ||
Client.Client_Name,
1,
60) AS Company,
Event.Client_Policy_Identifier ||
Event_Case.Relation_To_Insured_code as Client_Policy_Identifier,
Client.Account_Number as Recovery_Account,
Employer_Group.Employer_Group_Code,
Event_Case.Fee_Schedule_Code,
Recovery_ID,
Event_case.Open_Date,
'(' || recovery.recovery_transaction_internal || ')' ||
l.recovery_transaction_descripti, --fml 110276
recovery.settlement_id,
trim(client.gl_num), -- *002*
nvl(trim(client.net_billable), 'N'), -- *003*
recovery.amount, -- *006*,
event.event_type_code,
event.date_typed,
recovery_id,
Client.ACC_CLIENT_ID,
Recovery_Revenue_GL_Num,
Funds_Due_GL_num
FROM Recovery,
Settlement,
Event_Case,
Event,
Employer_Group,
Client,
Major_Client,
recovery_transaction_lookup l
Where to_date(Recovery.Recovery_Date, 'DD-MON-RR') between
TO_DATE(v_lowdate, 'DD-MON-RR') and
TO_DATE(v_highdate, 'DD-MON-RR')
AND Settlement.Settlement_id = Recovery.Settlement_id
AND Settlement.Event_Case_ID = Event_Case.Event_Case_id
AND Event_Case.Event_ID = Event.Event_ID
AND Event.Employer_Group_ID = Employer_Group.Employer_Group_ID(+)
AND Event.Client_ID = Client.Client_ID
AND Client.Major_Client_id = Major_Client.Major_Client_ID(+)
and recovery.settlement_id not in
(select settlement_id
from recovery
where to_date(Recovery.Recovery_Date, 'DD-MON-RR') between
TO_DATE(v_lowdate, 'DD-MON-RR') and
TO_DATE(v_highdate, 'DD-MON-RR')
AND recovery_transaction_internal in
('05', '50', '52', '51'))
--001
and client.invoice_flag = 'N' *005* commenting
-- SWL 05/03/05 #71231
and event.event_id in
(select event_id
from event_end_user eeu
where eeu.active_flag = 'Y'
and eeu.owner_flag = 'Y'
and eeu.end_user_id in
(select end_user_id
from end_user
where end_user.research_internal_user = 'Y'))
and recovery.recovery_transaction_internal =
l.recovery_transaction_internal --fml 110276
order by event.event_id, recovery.amount; -- *006*
-- SWL 05/03/05 #71231
-- end of 001
-- SWL 11/10/03 # 52743
-- *006*
CURSOR get_recovery(vevent_id event.event_id%type) IS
SELECT sum(r.amount)
FROM Recovery r
Where to_date(r.Recovery_Date, 'DD-MON-RR') between
TO_DATE(v_lowdate, 'DD-MON-RR') and
TO_DATE(v_highdate, 'DD-MON-RR')
and r.event_id = vevent_id
and r.settlement_id not in
(select settlement_id
from recovery
where to_date(Recovery.Recovery_Date, 'DD-MON-RR') between
TO_DATE(v_lowdate, 'DD-MON-RR') and
TO_DATE(v_highdate, 'DD-MON-RR')
AND recovery_transaction_internal in
('05', '50', '52', '51'))
and r.event_id in
(select event_id
from event_end_user eeu
where eeu.active_flag = 'Y'
and eeu.owner_flag = 'Y'
and eeu.end_user_id in
(select end_user_id
from end_user
where end_user.research_internal_user = 'Y'));
CURSOR RECOVERY_INFO_NC IS
SELECT distinct Event.Event_ID,
Event_Case.Event_Case_ID,
TO_CHAR(Recovery.Recovery_Date, 'FMMONTHYYYY') As Recovery_Month,
Major_Client.Major_Client_Name AS Major_Company,
-- Client.Client_Name AS Company,
-- nvl(client.legacy_client_id,'DC')||'-'||substr(Client.Client_Name,1,55) AS Company, /* SWL 04/01/04 52653 */
substr(nvl(client.legacy_client_id,
decode(client.client_id,
1,
'DC',
client.client_code)) || '-' ||
Client.Client_Name,
1,
60) AS Company,
Event.Client_Policy_Identifier ||
Event_Case.Relation_To_Insured_code as Client_Policy_Identifier,
Client.Account_Number as Recovery_Account,
Employer_Group.Employer_Group_Code,
Event_Case.Fee_Schedule_Code,
'(' || recovery.recovery_transaction_internal || ')' ||
l.recovery_transaction_descripti, --fml 110276
recovery.settlement_id,
trim(client.gl_num), -- *002*
nvl(trim(client.net_billable), 'N'), -- *003*
recovery.amount,-- *006*
recovery.recovery_id,
event.event_type_code,
event.date_typed,
Client.ACC_CLIENT_ID,
Recovery_Revenue_GL_Num,
Funds_Due_GL_num
FROM Recovery,
Settlement,
Event_Case,
Event,
Employer_Group,
Client,
Major_Client,
recovery_transaction_lookup l
Where to_date(Recovery.Recovery_Date, 'DD-MON-RR') between
TO_DATE(v_lowdate, 'DD-MON-RR') and
TO_DATE(v_highdate, 'DD-MON-RR')
AND Settlement.Settlement_id = Recovery.Settlement_id
AND Settlement.Event_Case_ID = Event_Case.Event_Case_id
AND Event_Case.Event_ID = Event.Event_ID
AND Event.Employer_Group_ID = Employer_Group.Employer_Group_ID(+)
AND Event.Client_ID = Client.Client_ID
AND Client.Major_Client_id = Major_Client.Major_Client_ID(+)
and recovery.settlement_id in
(select settlement_id
from recovery
where to_date(Recovery.Recovery_Date, 'DD-MON-RR') between
TO_DATE(v_lowdate, 'DD-MON-RR') and
TO_DATE(v_highdate, 'DD-MON-RR')
--001
AND recovery.recovery_transaction_internal in
('05', '50', '52', '51')
and client.invoice_flag = 'N' *005* commenting
/* SWL 05/03/05 #71231 */
and event.event_id in
(select event_id
from event_end_user eeu
where eeu.active_flag = 'Y'
and eeu.owner_flag = 'Y'
and eeu.end_user_id in
(select end_user_id
from end_user
where end_user.research_internal_user = 'Y'))
and recovery.recovery_transaction_internal =
l.recovery_transaction_internal --fml 110276
order by event.event_id, recovery.amount; -- *006*
/* SWL 05/03/05 #71231 */
--end of 001
-- *006*
CURSOR get_recovery_nc(vevent_id event.event_id%type) IS
SELECT sum(r.amount)
FROM Recovery r
Where to_date(r.Recovery_Date, 'DD-MON-RR') between
TO_DATE(v_lowdate, 'DD-MON-RR') and
TO_DATE(v_highdate, 'DD-MON-RR')
AND r.event_id = vevent_id
and r.settlement_id in
(select settlement_id
from recovery
where to_date(Recovery.Recovery_Date, 'DD-MON-RR') between
TO_DATE(v_lowdate, 'DD-MON-RR') and
TO_DATE(v_highdate, 'DD-MON-RR'))
AND recovery_transaction_internal in ('05', '50', '52', '51')
and r.event_id in
(select event_id
from event_end_user eeu
where eeu.active_flag = 'Y'
and eeu.owner_flag = 'Y'
and eeu.end_user_id in
(select end_user_id
from end_user
where end_user.research_internal_user = 'Y'));
CURSOR Recovery_Totals_Nc IS
Select Recovery_Detail.Recovery_Id, /* SWL 07/01/04 59016 */
max(NVL(Recovery_Detail.Fees_Percent, 0) +
NVL(Recovery_Detail.Admin_Percent, 0)) as Total_Fee_Percent,
max(NVL(Recovery_Detail.Fees_Percent, 0)) as Subrogation_Fee_Percent,
max(NVL(Recovery.Amount, 0)) as Recovery_Amount, /* SWL 04/01/04 52653 */
Sum(NVL(Recovery_detail.Fees, 0) + NVL(Recovery_Detail.Admin, 0)) as Total_Fee,
Sum(NVL(Recovery_Detail.Fees_Taxes, 0) +
NVL(Recovery_Detail.Admin_Taxes, 0)) as Total_Tax,
Sum(NVL(Recovery_Detail.Admin_Taxes, 0)) as Administrative_tax,
Sum(NVL(Recovery_Detail.Admin, 0)) as Total_Admin_Fee,
sum(recovery.retained_by_client) as Non_cash_fee, --fml 110276
sum(recovery.allocation_check_amount) as cash --fml 110276
From Settlement, Recovery, Recovery_Detail
Where Recovery.settlement_id = v_settlement_id
And recovery.recovery_id = v_recovery_id
And Settlement.Settlement_id = Recovery.Settlement_id
And Recovery.Recovery_id = Recovery_detail.Recovery_id(+)
and to_date(Recovery.Recovery_Date, 'DD-MON-RR') between
TO_DATE(v_lowdate, 'DD-MON-RR') and
TO_DATE(v_highdate, 'DD-MON-RR') /*SWL 12/03/04 */
-- Group by Recovery_Detail.Fees_Percent; /* SWL 04/01/04 52653 */
Group by Recovery_Detail.recovery_id;
v_cash_recovery recovery_activity.cash_recovery%type;
CURSOR Recovery_Totals_Positive_Nc IS
-- Select Sum(Recovery.Amount) as Total_NonCash_Positive, /* SWL 04/01/04 52653 */
Select max(Recovery.Amount) as Total_NonCash_Positive,
Sum(NVL(Recovery_Detail.Fees_Taxes, 0) +
NVL(Recovery_Detail.Admin_Taxes, 0)) as Total_NonCash_Tax_Positive
From Settlement, Recovery, Recovery_detail
Where Recovery.settlement_id = v_settlement_id
And Settlement.Settlement_id = Recovery.Settlement_id
and recovery.recovery_id = v_recovery_id /* SWL 07/01/04 59016 */
And Recovery.Amount >= 0
And Recovery.Recovery_id = Recovery_detail.Recovery_id(+)
And Recovery.Recovery_Transaction_Internal in
('05', '50', '52', '51')
-- Group by Recovery_Detail.Fees_Percent; /* SWL 04/01/04 52653 */
Group by Recovery_Detail.recovery_id;
CURSOR Recovery_Totals_Negative_Nc IS
-- Select Sum(Recovery.Amount) as Total_NonCash_Negative, /* SWL 04/01/04 52653 */
Select max(Recovery.Amount) as Total_NonCash_Negative,
Sum(NVL(Recovery_Detail.Fees_Taxes, 0) +
NVL(Recovery_Detail.Admin_Taxes, 0)) as Total_NonCash_Tax_Negative
From Settlement, Recovery, Recovery_Detail
Where Recovery.settlement_id = v_settlement_id
And Settlement.Settlement_id = Recovery.Settlement_id
and recovery.recovery_id = v_recovery_id /* SWL 07/01/04 59016 */
And Recovery.Amount < 0
And Recovery.Recovery_id = Recovery_detail.Recovery_id(+)
And Recovery.Recovery_Transaction_Internal in
('05', '50', '52', '51')
Group by Recovery_Detail.recovery_id;
-- Group by Recovery_Detail.Fees_Percent; /* SWL 04/01/04 52653 */
/* SWL 11/10/03 # 52743 */
CURSOR Event_Client_Unit IS
Select e.Client_Field_Data as Unit
From Event_Client_Field e, recovery r
Where r.Event_ID = e.Event_ID
AND r.Recovery_ID = V_Recovery_ID
AND e.Client_Field_Name = 'UNIT';
CURSOR Bill_totals IS
Select mv_billdetail_case_sum.sum_paid as TOTAL_MEDICAL
From mv_billdetail_case_sum
where mv_billdetail_case_sum.event_id = V_Event_ID;
CURSOR NonCash_Fee IS
Select NVL(Sum(Recovery.Amount), 0) as Total_NonCash_Fee
From Settlement, Recovery
Where Recovery.Recovery_ID = V_Recovery_ID
And Settlement.Settlement_id = Recovery.Settlement_id
And Recovery.
Recovery_Transaction_Internal in ('05', '50', '52', '51');
/* SWL 04/01/04 52653 */
CURSOR Recovery_Totals IS
Select round(avg(NVL(Recovery_Detail.Fees_Percent, 0) +
NVL(Recovery_Detail.Admin_Percent, 0)),
2) as Total_Fee_Percent,
round(avg(NVL(Recovery_Detail.Fees_Percent, 0)), 2) as Subrogation_Fee_Percent,
max(NVL(Recovery.Amount, 0)) as Recovery_Amount,
Sum(NVL(Recovery_detail.Fees, 0) + NVL(Recovery_Detail.Admin, 0)) as Total_Fee,
Sum(NVL(Recovery_Detail.Fees_Taxes, 0) +
NVL(Recovery_Detail.Admin_Taxes, 0)) as Total_Tax,
Sum(NVL(Recovery_Detail.Admin_Taxes, 0)) as Administrative_tax,
Sum(NVL(Recovery_Detail.Admin, 0)) as Total_Admin_Fee
From Settlement, Recovery, Recovery_Detail
Where Recovery.Recovery_ID = V_Recovery_ID
And Settlement.Settlement_id = Recovery.Settlement_id
And Recovery.Recovery_id = Recovery_detail.Recovery_id(+)
Group by Recovery_Detail.recovery_id;
CURSOR Recovery_Totals_Positive IS
/* Select Sum(Recovery.Amount) as Total_NonCash_Positive,
Sum(NVL(Recovery_Detail.Fees_Taxes,0)+ NVL(Recovery_Detail.Admin_Taxes,0)) as Total_NonCash_Tax_Positive
*/ /* SWL 04/01/04 52653 */
Select max(Recovery.Amount) as Total_NonCash_Positive,
Sum(NVL(Recovery_Detail.Fees_Taxes, 0) +
NVL(Recovery_Detail.Admin_Taxes, 0)) as Total_NonCash_Tax_Positive
From Settlement, Recovery, Recovery_detail
Where Recovery.Recovery_ID = V_Recovery_ID
And Settlement.Settlement_id = Recovery.Settlement_id
And Recovery.Amount >= 0
And Recovery.Recovery_id = Recovery_detail.Recovery_id(+)
And Recovery.Recovery_Transaction_Internal in ('04', '17', '15') /*SWL 10/05/04 #63919*/--*009* added 15
Group by Recovery_Detail.recovery_id;
-- Group by Recovery_Detail.Fees_Percent; /* SWL 04/01/04 52653 */
CURSOR Recovery_NonFEE_Positive IS
Select Sum(NVL(Recovery_Detail.Fees, 0) + NVL(Recovery_Detail.Admin, 0)) as Total_NonCash_Fee_Positive
From Settlement, Recovery, Recovery_detail
Where Recovery.Recovery_ID = V_Recovery_ID
And Settlement.Settlement_id = Recovery.Settlement_id
And Recovery.Amount >= 0
And Recovery.Recovery_id = Recovery_detail.Recovery_id(+)
And Recovery.Recovery_Transaction_Internal in
('05', '50', '52', '51')
Group by Recovery_Detail.recovery_id;
-- Group by Recovery_Detail.Fees_Percent; /* SWL 04/01/04 52653 */
CURSOR Recovery_Totals_Negative IS
/* Select Sum(Recovery.Amount) as Total_NonCash_Negative,*/ /* SWL 04/01/04 52653 */
Select max(Recovery.Amount) as Total_NonCash_Negative,
Sum(NVL(Recovery_Detail.Fees_Taxes, 0) +
NVL(Recovery_Detail.Admin_Taxes, 0)) as Total_NonCash_Tax_Negative
From Settlement, Recovery, Recovery_Detail
Where Recovery.Recovery_ID = V_Recovery_ID
And Settlement.Settlement_id = Recovery.Settlement_id
And Recovery.Amount < 0
And Recovery.Recovery_id = Recovery_detail.Recovery_id(+)
And Recovery.Recovery_Transaction_Internal in ('04', '17', '15') /*SWL 10/05/04 #63919*/--*009* added 15
Group by Recovery_Detail.recovery_id;
-- Group by Recovery_Detail.Fees_Percent; /* SWL 04/01/04 52653 */
CURSOR Recovery_NonFEE_Negative IS
Select Sum(NVL(Recovery_Detail.Fees, 0) + NVL(Recovery_Detail.Admin, 0)) as Total_NonCash_Fee_Negative
From Settlement, Recovery, Recovery_Detail
Where Recovery.Recovery_ID = V_Recovery_ID
And Settlement.Settlement_id = Recovery.Settlement_id
And Recovery.Amount < 0
And Recovery.Recovery_id = Recovery_detail.Recovery_id(+)
And Recovery.Recovery_Transaction_Internal in
('05', '50', '52', '51')
Group by Recovery_Detail.recovery_id;
-- Group by Recovery_Detail.Fees_Percent; /* SWL 04/01/04 52653 */
--This is a generic cursor which will be used to control the number of rows inserted into the recovery_activity table
--There has to be 1 row inserted into the recovery_activity table for each detail record in the recovery_detail table.
--However, if no recovery_detail record exists there will be only 1 insert into the recovery_activity table.
CURSOR Control_Detail_Loop
IS
Select 1
FROM Recovery,
Recovery_Detail
Where Recovery.Recovery_ID = Recovery_Detail.Recovery_ID(+)
And Recovery.Recovery_ID = V_Recovery_ID;
/* SWL 04/01/04 Commented since the only time there were more entries in rd for a recovery is when there is a split fees */
/* accounting does not want this to be displayed in detail. They need this aggregated as a single fee entry so the recovery */
/* activity table will now have a single entry corresponding to each recovery in the recovery table. (#52653) */
CURSOR Control_Detail_Loop IS
Select 1 FROM Recovery where Recovery.Recovery_ID = V_Recovery_ID;
/* DJ 10/25/04 # 64633 start*/
CURSOR Event_Client_Market IS
Select e.Client_Field_Data as Market
From Event_Client_Field e, recovery r
Where r.Event_ID = e.Event_ID
AND r.Recovery_ID = V_Recovery_ID
AND e.Client_Field_Name = 'MARKET';
/* DJ 10/25/04 # 64633 end*/
v_cur_day integer := 0;
-----dj
v_vendor_fee_wh number;
v_total_vendor_fee_wh number;
v_rec_itc recovery_activity.recovery_transaction_internal%type;
--v_settlement_id settlement.settlement_id%type;
--*004* start
function unbundled_fee(pevent_id event.event_id%type,
plowdate date,
phighdate date) return number is
-- function variables
v_fee number(18, 2) := 0;
v_month_revenue unbundled_recoveries.monthly_revenue%type := 0;
v_cum_revenue unbundled_recoveries.cum_revenue%type := 0;
v_contract_fee_per unbundled_recoveries.contractual_fee_per%type := 0;
v_prev_cum_revenue unbundled_recoveries.cum_revenue%type := 0;
v_cum_ub_rec unbundled_recoveries.cum_ub_recoveries%type := 0;
v_cum_inv_paid unbundled_recoveries.cum_inv_paid%type := 0;
v_month_rec unbundled_recoveries.monthly_recoveries%type := 0;
v_cum_rec unbundled_recoveries.cum_recoveries%type := 0;
v_event_id event.event_id%type;
begin
--v_month_rec and v_cum_inv_paid
begin
select event_id,
(select sum(r.amount)
from recovery r
where r.event_id = e.event_id
and trunc(r.recovery_date) between plowdate and phighdate) as monthly_recoveries,
-- *006* added cum_rec
(select nvl(sum(r.amount), 0)
from recovery r
where r.event_id = e.event_id
and trunc(r.recovery_date) <= trunc(phighdate)) as cum_recoveries,
(select sum(decode(nvl(ex.client_invoice_closed, 'N'),
'N',
ex.paid_amount,
ex.client_invoice_received))
from expense ex
where ex.event_id = e.event_id
and upper(ex.status) = 'PAID'
and trunc(ex.check_date) <= phighdate
and trim(ex.orig_client_invoice_date) is not null
and nvl(ex.client_invoice_dispute, 'Y') = 'N') as cum_invoiced_paid
into v_event_id, v_month_rec, v_cum_rec, v_cum_inv_paid
from event e
where e.event_id = pevent_id;
exception
when no_data_found then
v_event_id := 0;
v_month_rec := 0;
v_cum_rec := 0;
v_cum_inv_paid := 0;
when others then
v_event_id := 0;
v_month_rec := 0;
v_cum_rec := 0;
v_cum_inv_paid := 0;
end;
-- *007* start
-- if event previously written to table, get values from table
begin
select nvl(ub.cum_revenue, 0)
into v_prev_cum_revenue
from unbundled_recoveries ub
where ub.event_id = pevent_id
and ub.month_id =
(select max(a.month_id)
from unbundled_recoveries a
where a.event_id = pevent_id
and a.month_id < to_char(v_lowdate, 'YYYYMM'));
exception
when no_data_found then
v_prev_cum_revenue := 0;
when others then
v_prev_cum_revenue := 0;
end;
-- *007* end
--v_contract_fee_per
begin
select nvl(max(rd.fees_percent), 0)
into v_contract_fee_per
from recovery_detail rd
where rd.recovery_id in
(select r.recovery_id
from recovery r,
(select a.event_id, max(amount) as amount
from recovery a
where a.event_id = pevent_id
and trunc(a.recovery_date) between plowdate and
phighdate
group by a.event_id) max_r
where r.event_id = max_r.event_id
and trunc(r.recovery_date) between plowdate and phighdate
and r.amount = max_r.amount);
exception
when no_data_found then
v_contract_fee_per := 0;
when others then
v_contract_fee_per := 0;
end;
v_cum_ub_rec := nvl(v_cum_rec, 0) - nvl(v_cum_inv_paid, 0);
if ((nvl(v_cum_ub_rec, 0) > 0) and (nvl(v_month_rec, 0) <> 0)) then
-- latest cumulative unbundled recoveries > 0
v_cum_revenue := round(((v_contract_fee_per / 100) * v_cum_ub_rec),
2);
v_month_revenue := v_cum_revenue - v_prev_cum_revenue;
end if;
v_fee := v_month_revenue;
return v_fee;
exception
when others then
raise_application_error(-20106,
substr('populate_recovery_activity.undebundled_fee: ' ||
Sqlcode || Sqlerrm,
1,
500));
return v_fee;
end; -
PLEASE HELP ME TO MODIFY THE CODE !
DATA:BEGIN OF I_PARTNER OCCURS 0,
VBELN LIKE VBPA-VBELN,
adrnr like vbpa-adrnr,
kunnr LIKE vbpa-kunnr,
PARVW LIKE VBPA-PARVW,
post_code1 LIKE adrc-post_code1,
po_box LIKE adrc-po_box,
name1 LIKE adrc-name1,
name2 LIKE adrc-name2,
city1 LIKE adrc-city1,
city2 LIKE adrc-city2,
country LIKE adrc-country,
street LIKE adrc-street,
str_suppl1 LIKE adrc-str_suppl1,
str_suppl2 LIKE adrc-str_suppl2,
str_suppl3 LIKE adrc-str_suppl3,
vtext like tpart-vtext,
ADRNP LIKE VBPA-ADRNP,
SMTP_ADDR LIKE ADR6-SMTP_ADDR,
END OF I_PARTNER.
SELECT
VBPA~VBELN
vbpa~adrnr
VBPA~PARVW
VBPA~KUNNR
VBPA~ADRNP
TPART~VTEXT
FROM VBPA AS VBPA
INNER JOIN TPART AS TPART
ON VBPAPARVW EQ TPARTPARVW
AND SPRAS = SY-LANGU
INTO CORRESPONDING FIELDS OF TABLE I_PARTNER
WHERE
VBPA~VBELN EQ S_VBELN.
WRITE:/
i_partner-adrnr under 'ADDRESS NUMBER',
i_partner-vbeln UNDER 'Order-No',
i_partner-parvw UNDER 'Partner-Type',
I_PARTNER-VTEXT UNDER 'Partner-Type description',
I_PARTNER-KUNNR UNDER 'Partner-no'.
ULINE.
endloop.
HERE I AM GETTING ALL THE POSSIBLE PARTNER TYPES.
I WANT TO GET THE OUT PUT ONLY WHEN THE PARTNER TYPE S ARE 'SP' 'BP' AND 'SH'.
PLEASE HELP.....Hi,
Both the answers are correct... iam just writing the code u needed..
ranges : gr_partner for tablename-fieldname.
initialization.
gr_partner-sign = 'I'.
gr_partner-option = 'EQ'
gr_partner-low = 'SP'
append gr_partner.
gr_partner-sign = 'I'.
gr_partner-option = 'EQ'
gr_partner-low = 'BP'
append gr_partner.
gr_partner-sign = 'I'.
gr_partner-option = 'EQ'
gr_partner-low = 'SH'
append gr_partner.
SELECT
VBPA~VBELN
vbpa~adrnr
VBPA~PARVW
VBPA~KUNNR
VBPA~ADRNP
TPART~VTEXT
FROM VBPA AS VBPA
INNER JOIN TPART AS TPART
ON VBPAPARVW EQ TPARTPARVW
AND SPRAS = SY-LANGU
INTO CORRESPONDING FIELDS OF TABLE I_PARTNER
WHERE
VBPA~VBELN EQ S_VBELN
and vbpa~parvw in gr_partner.
Regards,
Nagaraj -
Please help me break down this code
i really need help at understanding this, i put it together a while ago with some help but im really no pro at java but my tutor has asked me to give a break down of the code line by line
/* This program rolls two six-sided dice a user-specified
number of times, and prints how many times an ordered dice combination occured.
This is followed by a column stating how many times the sum of the two dice
equalled 2 through 12.
import java.util.Scanner;
public class DiceSumDistribution
public static void main(String[] args)
Scanner scan = new Scanner(System.in); //receive input from keyboard
System.out.print("Enter the number of times you would like to toss two dice: "); //prompt user for input
int timesToToss = scan.nextInt(); //read in user input
int[] diceSum = new int[37]; //this array holds the dice roll distribution table
int[] frequencySum = new int[13]; //this array holds how many times a dice sum occured
int die1, die2; //integers representing the two dice
for(int i = 0; i < timesToToss; i++) //toss two dice as many times as the user specified
die1 = (int) (Math.random()*6+1); //assign random number (1 through 6) to dice one
die2 = (int) (Math.random()*6+1); //assign random number (1 through 6) to dice two
diceSum[(6*(die1-1))+die2]++; //add one to appropriate cell in distribution table
frequencySum[die1+die2]++; //add one to appropriate sum counter
/*the dice roll distribution table shows how many times a certain combination of dice rolls
and the rows represent the other dice.
System.out.println("\n---Dice Roll Distribution Table---");
System.out.println("\t 1\t2\t3\t4\t5\t6"); //print distribution table
System.out.println("\t____________________________________________"); //print distribution table
for(int i = 1; i < 37; i++) //print all 36 cells of distribution tables
if(i%6 == 1) //if at the beginning of a table row
System.out.print(i/6+1 + "\t|"); //print row number
System.out.print(diceSum[i]+ "\t"); //for each cell in a row, print its value
if(i%6 == 0) //if at the end of a row
System.out.println(); //go down a line
/*this column represents how many times a sum occured. For example, if the following output occurs
System.out.println("\n---Dice Roll Sums---");
for(int i=2; i<=12; i++) //for each possible dice sum
System.out.println(i+": " + frequencySum); //print each dice sum on its own row
ii wrote this with some help a while ago but i havent done java at all since so im totaly clueless again. if someone could help i would be really greatful, thanks.ok chill man, and i wasnt asking you to do it for me or nothign liek that.
its mostly these parts im having trouble explaining
Scanner scan = new Scanner(System.in); //receive input from keyboard
System.out.print("Enter the number of times you would like to toss two dice: "); //prompt user for input
int timesToToss = scan.nextInt(); //read in user input
die1 = (int) (Math.random()*6+1); //assign random number (1 through 6) to dice one
die2 = (int) (Math.random()*6+1); //assign random number (1 through 6) to dice two
diceSum[(6*(die1-1))+die2]++; //add one to appropriate cell in distribution table
frequencySum[die1+die2]++; //add one to appropriate sum counter
if(i%6 == 1) //if at the beginning of a table row
System.out.print(i/6+1 + "\t|"); //print row number
System.out.print(diceSum[i]+ "\t"); //for each cell in a row, print its value
if(i%6 == 0) //if at the end of a row
System.out.println(); //go down a linei know in the last one there the "if(i%6 == 1) " and "if(i%6 == 0) " effect the
"System.out.print(i/6+1 + "\t|");" in some way, but i dont really know how to explain it.
thanks -
Can you please help me improve on this code
Here is code for a drag and drop activituy where there are 4 questions, each question is on a separate frame of a movieclip mentorquestions. I am trying to have the frame picked at random and then have either the yes target or the no target visible for the right answer to correspond with the question. yesplay is a little animation to let you know you got the correct answer. My code is a bit hit and miss I think.. I am doing something (or many things) wrong
any suggestions?
cheers
sub
import flash.events.MouseEvent;
yesplay.addEventListener(Event.ENTER_FRAME, checkit);
function checkit (myevent:Event):void {
if (yesplay.currentFrame == 27)
{reset1();
var incorrect:Number=0;
var correct:Number=0;
targetYes.visible=false;
targetNo.visible=false;
var Qmove:Array = [1,2,3,4];
var b:Number=4;
var a:Number;
var c:Number;
function pickquestion(){
a=Math.floor(Math.random() * b);
mentorquestions.gotoAndStop(Qmove[a]);
c=Qmove[a];
trace(c);
setanswer();
Qmove.splice(a,1);
b=b-1;
trace(a);
trace(Qmove);
trace(b);
pickquestion();
function setanswer(){;
if (c==3){
targetYes.visible=true;
targetNo.visible=false;
}else{
targetYes.visible=false;
targetNo.visible=true;
AbackBT.addEventListener(MouseEvent.CLICK, Abacker);
function Abacker(e:MouseEvent){
visible=false;
var Yx:Number=843;
var Yy:Number=295;
var Nx:Number=843;
var Ny:Number=394;
function reset1(){
yes.x=Yx;
yes.y=Yy;
no.x=Nx;
no.y=Ny;
pickquestion();
var startX:Number;
var startY:Number;
this.yes.addEventListener(MouseEvent.MOUSE_DOWN, pickMe);
this.yes.addEventListener(MouseEvent.MOUSE_UP,dropMe);
function pickMe(event:MouseEvent):void {
event.target.startDrag();
startX = event.target.x;
startY = event.target.y;
function dropMe(event:MouseEvent):void {
event.target.stopDrag();
var myTargetName:String = "yes" + event.target.name;
if (event.target.dropTarget != null && event.target.dropTarget.parent == targetYes){
event.target.x = targetYes.x;
event.target.y = targetYes.y;
yesplay.play();
}else{
event.target.x = startX;
event.target.y = startY;
wrongun.play();
this.yes.buttonMode = true;
this.no.addEventListener(MouseEvent.MOUSE_DOWN, pickMe1);
this.no.addEventListener(MouseEvent.MOUSE_UP,dropMe1);
function pickMe1(event:MouseEvent):void {
event.target.startDrag();
startX = event.target.x;
startY = event.target.y;
function dropMe1(event:MouseEvent):void {
event.target.stopDrag();
var myTargetName:String = "no" + event.target.name;
if (event.target.dropTarget != null && event.target.dropTarget.parent == targetNo){
event.target.x = targetNo.x;
event.target.y = targetNo.y;
yesplay.play();
}else{
event.target.x = startX;
event.target.y = startY;
wrongun.play();
this.no.buttonMode = true;You'll need to be more specific with presenting your problems insteasd of just putting up a bunch of code and asking others to fix it for you. Try to keep what you present focused on a specific problem.
-
Very Urgent Please Help Me with XML parsing(DOM parser)
Hi
Please help me with the following code.
I have an XML file
<catalog>
<book id="101">
<title>First Ex With ID 101</title>
<ID>500</ID>
<author>RAJU</author>
<price>39.95</price>
</book>
<book id="121">
<ID>501</ID>
<title>First Ex With ID 121</title>
<author>RAJU1</author>
<price>19.95</price>
</book>
</catalog>
By using DOM parser I have to retrive ID values .After getting this ID values i have to pass these values in someother method of someother class.What i suppose to do?Can anyone help me with this regards ,if possible plese write the code..
Regards
Raju GWell first up all create a parser class where u parse the document using DOm and get the id node and assigen it to a String sat str.
Now whatever processiong u want to do , u write in a separate class (say Process.java) in one method say doProcess(String str)
Now from parser class u just call the doProcess() method with passing str as a parameter.
eg.
Process p = new Process();
p.doProcess(str);
Hope this will help u.
....yogesh -
I cannot install Itunes and Icloud on my Sony Vaio Laptop - Window 7. Error says " computer/system not modified". Please help me with this problem.
Hello there, jag123059.
The following Knowledge Base article offers up some great steps to follow for resolving issues with installing iTunes:
Issues installing iTunes or QuickTime for Windows
http://support.apple.com/kb/ht1926
Thanks for reaching out to Apple Support Communities.
Cheers,
Pedro. -
i brought a iTunes card and the the code on the back is not there it has faded away can u please help me with this problem
Hi Daniel ...
Try here > iTunes Store: Invalid, inactive, or illegible codes -
Please Help me with this Logic.....
Seniors , Please Help me with this Requirment
BUKRS _____________________
GJAHR ____________________
LIFNR _____________________
MONAT _____________________
LIFNR NAME1 GSBER GJAHR HBAL SBAL ACCUMBAL
1001 ABB BUSS1 2005 300 00
ABB BUSS1 2005 00 100
300 100 (300-100)=200
ABB BUSS1 2006 200 00
ABB BUSS1 2006 200 00
400 00 (400-00)+ 200 =
600
ABB BUSS2 2005 300 00
ABB BUSS2 2005 00 100
300 100 ( 300-100) =200
ABB BUSS2 2006 400 00
ABB BUSS2 2006 00 100
400 100 (400-100)+200 =
500 ****************************************************************************
1400 300 (1400-300) **********************************************************************************************************
Same for the Next Vendor also...
This is the report for this Requirment i am working on....Please Help me in the Logic..How to Go on with it....
*& Report ZVENDOR_RECONCILLATION
REPORT ZVENDOR_RECONCILLATION.
TABLES : BSAK , BSIK , LFC1 , LFC3 , LFA1.
*ALV
TYPE-POOLS: SLIS.
*TYPE-POOLS icon.
DATA: It_SORT TYPE SLIS_T_SORTINFO_ALV ."WITH HEADER LINE.
DATA: TOP TYPE slis_t_listheader,
END TYPE slis_t_listheader,
EVENTS TYPE slis_t_event.
DATA : T_KEY TYPE SLIS_KEYINFO_ALV.
DATA : FIELDCAT TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
LAYOUT TYPE SLIS_LAYOUT_ALV OCCURS 1 WITH HEADER LINE ,
LCAT TYPE SLIS_FIELDCAT_ALV.
*INTERNAL TABLE
DATA: BEGIN OF sd_bsak,
bukrs TYPE bsak-bukrs,
lifnr TYPE bsak-lifnr,
umsks TYPE bsak-umsks,
umskz TYPE bsak-umskz,
augdt TYPE bsak-augdt,
augbl TYPE bsak-augbl,
zuonr TYPE bsak-zuonr,
gjahr TYPE bsak-gjahr,
belnr TYPE bsak-belnr,
buzei TYPE bsak-buzei,
budat TYPE bsak-budat,
bldat TYPE bsak-bldat,
xblnr TYPE bsak-xblnr,
blart TYPE bsak-blart,
monat TYPE bsak-monat,
bschl TYPE bsak-bschl,
zumsk TYPE bsak-zumsk,
shkzg TYPE bsak-shkzg,
gsber TYPE bsak-gsber,
dmbtr TYPE bsak-dmbtr,
wrbtr TYPE bsak-wrbtr,
sgtxt TYPE bsak-sgtxt,
saknr TYPE bsak-saknr,
hkont TYPE bsak-hkont,
END OF sd_bsak.
DATA: BEGIN OF sd_bsik,
bukrs TYPE bsik-bukrs,
lifnr TYPE bsik-lifnr,
umsks TYPE bsik-umsks,
umskz TYPE bsik-umskz,
augdt TYPE bsik-augdt,
augbl TYPE bsik-augbl,
zuonr TYPE bsik-zuonr,
gjahr TYPE bsik-gjahr,
belnr TYPE bsik-belnr,
buzei TYPE bsik-buzei,
budat TYPE bsik-budat,
bldat TYPE bsik-bldat,
xblnr TYPE bsik-xblnr,
blart TYPE bsik-blart,
monat TYPE bsik-monat,
bschl TYPE bsik-bschl,
zumsk TYPE bsik-zumsk,
shkzg TYPE bsik-shkzg,
gsber TYPE bsik-gsber,
dmbtr TYPE bsik-dmbtr,
wrbtr TYPE bsik-wrbtr,
sgtxt TYPE bsik-sgtxt,
saknr TYPE bsik-saknr,
hkont TYPE bsik-hkont,
zlsch TYPE bsik-zlsch,
END OF sd_bsik.
DATA: BEGIN OF it_lfa1,
lifnr TYPE lfa1-lifnr,
name1 TYPE lfa1-name1,
END OF it_lfa1.
*FINAL INTERNAL TABLE DECLARATION
DATA: BEGIN OF IT_FINAL,
lifnr TYPE bsak-lifnr,
gsber TYPE bsak-gsber,
bukrs TYPE bsak-bukrs,
umsks TYPE bsak-umsks,
umskz TYPE bsak-umskz,
augdt TYPE bsak-augdt,
augbl TYPE bsak-augbl,
zuonr TYPE bsak-zuonr,
gjahr TYPE bsak-gjahr,
belnr TYPE bsak-belnr,
buzei TYPE bsak-buzei,
budat TYPE bsak-budat,
bldat TYPE bsak-bldat,
xblnr TYPE bsak-xblnr,
blart TYPE bsak-blart,
monat TYPE bsak-monat,
bschl TYPE bsak-bschl,
zumsk TYPE bsak-zumsk,
shkzg TYPE bsak-shkzg,
gsber TYPE bsak-gsber,
dmbtr TYPE bsak-dmbtr,
wrbtr TYPE bsak-wrbtr,
sgtxt TYPE bsak-sgtxt,
saknr TYPE bsak-saknr,
hkont TYPE bsak-hkont,
DMBTR_S TYPE BSAK-DMBTR,
DMBTR_H TYPE BSAK-DMBTR,
DS TYPE P DECIMALS 2,
DH TYPE P DECIMALS 2,
SUB TYPE P DECIMALS 2,
ADD TYPE P DECIMALS 2,
BAL TYPE P DECIMALS 2,
lifnr TYPE bsik-lifnr,
umsks TYPE bsik-umsks,
umskz TYPE bsik-umskz,
augdt TYPE bsik-augdt,
augbl TYPE bsik-augbl,
zuonr TYPE bsik-zuonr,
gjahr TYPE bsik-gjahr,
belnr TYPE bsik-belnr,
buzei TYPE bsik-buzei,
budat TYPE bsik-budat,
bldat TYPE bsik-bldat,
xblnr TYPE bsik-xblnr,
blart TYPE bsik-blart,
monat TYPE bsik-monat,
bschl TYPE bsik-bschl,
zumsk TYPE bsik-zumsk,
shkzg TYPE bsik-shkzg,
gsber TYPE bsik-gsber,
dmbtr TYPE bsik-dmbtr,
wrbtr TYPE bsik-wrbtr,
sgtxt TYPE bsik-sgtxt,
saknr TYPE bsik-saknr,
hkont TYPE bsik-hkont,
zlsch TYPE bsik-zlsch,
lifnr TYPE lfa1-lifnr,
name1 TYPE lfa1-name1,
END OF IT_FINAL.
DATA: BEGIN OF SD_FINAL,
gsber TYPE bsak-gsber,
lifnr TYPE bsak-lifnr,
bukrs TYPE bsak-bukrs,
lifnr TYPE bsak-lifnr,
umsks TYPE bsak-umsks,
umskz TYPE bsak-umskz,
augdt TYPE bsak-augdt,
augbl TYPE bsak-augbl,
zuonr TYPE bsak-zuonr,
gjahr TYPE bsak-gjahr,
belnr TYPE bsak-belnr,
buzei TYPE bsak-buzei,
budat TYPE bsak-budat,
bldat TYPE bsak-bldat,
xblnr TYPE bsak-xblnr,
blart TYPE bsak-blart,
monat TYPE bsak-monat,
bschl TYPE bsak-bschl,
zumsk TYPE bsak-zumsk,
shkzg TYPE bsak-shkzg,
dmbtr TYPE bsak-dmbtr,
wrbtr TYPE bsak-wrbtr,
sgtxt TYPE bsak-sgtxt,
saknr TYPE bsak-saknr,
hkont TYPE bsak-hkont,
bukrs TYPE bsik-bukrs,
lifnr TYPE bsik-lifnr,
umsks TYPE bsik-umsks,
umskz TYPE bsik-umskz,
augdt TYPE bsik-augdt,
augbl TYPE bsik-augbl,
zuonr TYPE bsik-zuonr,
gjahr TYPE bsik-gjahr,
belnr TYPE bsik-belnr,
buzei TYPE bsik-buzei,
budat TYPE bsik-budat,
bldat TYPE bsik-bldat,
xblnr TYPE bsik-xblnr,
blart TYPE bsik-blart,
monat TYPE bsik-monat,
bschl TYPE bsik-bschl,
zumsk TYPE bsik-zumsk,
shkzg TYPE bsik-shkzg,
gsber TYPE bsik-gsber,
dmbtr TYPE bsik-dmbtr,
wrbtr TYPE bsik-wrbtr,
sgtxt TYPE bsik-sgtxt,
saknr TYPE bsik-saknr,
hkont TYPE bsik-hkont,
zlsch TYPE bsik-zlsch,
lifnr TYPE lfa1-lifnr,
name1 TYPE lfa1-name1,
line_color(4) TYPE c,
END OF SD_FINAL.
DATA IT_STD_BSAK LIKE TABLE OF SD_BSAK WITH HEADER LINE.
DATA IT_STD_BSIK LIKE TABLE OF SD_BSIK WITH HEADER LINE.
DATA IT_STD_LFA1 LIKE TABLE OF IT_LFA1 WITH HEADER LINE.
DATA IT_STD_FINAL LIKE TABLE OF IT_FINAL WITH HEADER LINE.
DATA IT_FINAL_DISPLAY LIKE TABLE OF SD_FINAL WITH HEADER LINE.
*SELECTION-SCREEN
SELECTION-SCREEN BEGIN OF BLOCK HEADER WITH FRAME TITLE TEXT-001.
PARAMETERS: P_BUKRS LIKE BSAK-BUKRS OBLIGATORY.
SELECT-OPTIONS : S_GJAHR FOR BSAK-GJAHR.
SELECT-OPTIONS: S_LIFNR FOR BSAK-LIFNR.
SELECT-OPTIONS: S_MONAT FOR BSAK-MONAT.
SELECTION-SCREEN END OF BLOCK HEADER.
START-OF-SELECTION.
SET PF-STATUS 'STATUS'.
PERFORM DATA_RETRIVAL.
PERFORM FIELD.
PERFORM EVENTS USING EVENTS.
PERFORM EVENTS_1 USING EVENTS.
PERFORM HEADER USING TOP.
PERFORM LAYOUT.
PERFORM DISPLAY.
END-OF-PAGE.
*& Form DATA_RETRIVAL
text
--> p1 text
<-- p2 text
FORM DATA_RETRIVAL .
SELECT BUKRS LIFNR UMSKS UMSKZ AUGDT AUGBL ZUONR GJAHR BELNR BUZEI BUDAT BLDAT XBLNR BLART
MONAT BSCHL ZUMSK SHKZG GSBER DMBTR WRBTR SGTXT SAKNR HKONT
FROM BSAK INTO TABLE IT_STD_BSAK
WHERE BUKRS = P_BUKRS
AND GJAHR IN S_GJAHR
AND LIFNR IN S_LIFNR
AND MONAT IN S_MONAT.
IF NOT IT_STD_BSAK[] IS INITIAL.
SELECT BUKRS LIFNR UMSKS UMSKZ AUGDT AUGBL ZUONR GJAHR BELNR BUZEI BUDAT BLDAT XBLNR
BLART MONAT BSCHL ZUMSK SHKZG GSBER DMBTR WRBTR SGTXT SAKNR HKONT ZLSCH
FROM BSIK INTO TABLE IT_STD_BSIK FOR ALL ENTRIES IN IT_STD_BSAK
WHERE BUKRS = IT_STD_BSAK-BUKRS AND LIFNR = IT_STD_BSAK-LIFNR AND GJAHR = IT_STD_BSAK-GJAHR .
ENDIF.
IF NOT IT_STD_BSAK[] IS INITIAL.
SELECT LIFNR NAME1
FROM LFA1 INTO TABLE IT_STD_LFA1 FOR ALL ENTRIES IN IT_STD_BSAK
WHERE LIFNR = IT_STD_BSAK-LIFNR.
ENDIF.
LOOP AT IT_STD_BSAK.
IT_STD_FINAL-BUKRS = IT_STD_BSAK-BUKRS.
IT_STD_FINAL-LIFNR = IT_STD_BSAK-LIFNR.
IT_STD_FINAL-UMSKS = IT_STD_BSAK-UMSKS.
IT_STD_FINAL-UMSKZ = IT_STD_BSAK-UMSKZ.
IT_STD_FINAL-AUGDT = IT_STD_BSAK-AUGDT.
IT_STD_FINAL-AUGBL = IT_STD_BSAK-AUGBL.
IT_STD_FINAL-ZUONR = IT_STD_BSAK-ZUONR.
IT_STD_FINAL-GJAHR = IT_STD_BSAK-GJAHR.
IT_STD_FINAL-BELNR = IT_STD_BSAK-BELNR.
IT_STD_FINAL-BUZEI = IT_STD_BSAK-BUZEI.
IT_STD_FINAL-BUDAT = IT_STD_BSAK-BUDAT.
IT_STD_FINAL-BLDAT = IT_STD_BSAK-BLDAT.
IT_STD_FINAL-XBLNR = IT_STD_BSAK-XBLNR.
IT_STD_FINAL-BLART = IT_STD_BSAK-BLART.
IT_STD_FINAL-MONAT = IT_STD_BSAK-MONAT.
IT_STD_FINAL-BSCHL = IT_STD_BSAK-BSCHL.
IT_STD_FINAL-ZUMSK = IT_STD_BSAK-ZUMSK.
IT_STD_FINAL-SHKZG = IT_STD_BSAK-SHKZG.
IT_STD_FINAL-GSBER = IT_STD_BSAK-GSBER.
IT_STD_FINAL-DMBTR = IT_STD_BSAK-DMBTR.
IT_STD_FINAL-WRBTR = IT_STD_BSAK-WRBTR.
IT_STD_FINAL-SGTXT = IT_STD_BSAK-SGTXT.
IT_STD_FINAL-SAKNR = IT_STD_BSAK-SAKNR.
IT_STD_FINAL-HKONT = IT_STD_BSAK-HKONT.
READ TABLE IT_STD_LFA1 WITH KEY LIFNR = IT_STD_FINAL-LIFNR.
IF SY-SUBRC = 0.
IT_STD_FINAL-NAME1 = IT_STD_LFA1-NAME1.
ENDIF.
APPEND IT_STD_FINAL.
CLEAR IT_STD_FINAL.
ENDLOOP.
LOOP AT IT_STD_BSIK.
IF SY-SUBRC = 0.
IT_STD_FINAL-BUKRS = IT_STD_BSIK-BUKRS.
IT_STD_FINAL-LIFNR = IT_STD_BSIK-LIFNR.
IT_STD_FINAL-UMSKS = IT_STD_BSIK-UMSKS.
IT_STD_FINAL-UMSKZ = IT_STD_BSIK-UMSKZ.
IT_STD_FINAL-AUGDT = IT_STD_BSIK-AUGDT.
IT_STD_FINAL-AUGBL = IT_STD_BSIK-AUGBL.
IT_STD_FINAL-ZUONR = IT_STD_BSIK-ZUONR.
IT_STD_FINAL-GJAHR = IT_STD_BSIK-GJAHR.
IT_STD_FINAL-BELNR = IT_STD_BSIK-BELNR.
IT_STD_FINAL-BUZEI = IT_STD_BSIK-BUZEI.
IT_STD_FINAL-BUDAT = IT_STD_BSIK-BUDAT.
IT_STD_FINAL-BLDAT = IT_STD_BSIK-BLDAT.
IT_STD_FINAL-XBLNR = IT_STD_BSIK-XBLNR.
IT_STD_FINAL-BLART = IT_STD_BSIK-BLART.
IT_STD_FINAL-MONAT = IT_STD_BSIK-MONAT.
IT_STD_FINAL-BSCHL = IT_STD_BSIK-BSCHL.
IT_STD_FINAL-ZUMSK = IT_STD_BSIK-ZUMSK.
IT_STD_FINAL-SHKZG = IT_STD_BSIK-SHKZG.
IT_STD_FINAL-GSBER = IT_STD_BSIK-GSBER.
IT_STD_FINAL-DMBTR = IT_STD_BSIK-DMBTR.
IT_STD_FINAL-WRBTR = IT_STD_BSIK-WRBTR.
IT_STD_FINAL-SGTXT = IT_STD_BSIK-SGTXT.
IT_STD_FINAL-SAKNR = IT_STD_BSIK-SAKNR.
IT_STD_FINAL-HKONT = IT_STD_BSIK-HKONT.
IT_STD_FINAL-ZLSCH = IT_STD_BSIK-ZLSCH.
ENDIF.
APPEND IT_STD_FINAL.
CLEAR IT_STD_FINAL.
ENDLOOP.
LOOP AT IT_STD_FINAL.
IF IT_STD_FINAL-SHKZG = 'S'.
IT_STD_FINAL-DMBTR_S = IT_STD_FINAL-DMBTR.
ELSE.
IF IT_STD_FINAL-SHKZG = 'H'.
IT_STD_FINAL-DMBTR_H = IT_STD_FINAL-DMBTR.
ENDIF.
ENDIF.
IT_STD_FINAL-DMBTR = ''.
MODIFY IT_STD_FINAL INDEX SY-TABIX TRANSPORTING DMBTR_H DMBTR_S DMBTR.
"VAR.
CLEAR IT_STD_FINAL.
ENDLOOP.
SORT IT_STD_FINAL BY LIFNR GSBER GJAHR.
ENDFORM. " DATA_RETRIVAL
*& Form FIELD
text
--> p1 text
<-- p2 text
form FIELD .
LCAT-FIELDNAME = 'LIFNR'.
LCAT-TABNAME = 'IT_STD_FINAL'.
LCAT-SELTEXT_L = 'Vendor No'.
LCAT-JUST = 'M'.
APPEND LCAT TO FIELDCAT.
CLEAR LCAT.
LCAT-FIELDNAME = 'NAME1'.
LCAT-TABNAME = 'IT_STD_FINAL'.
LCAT-SELTEXT_L = 'Vendor Name'.
LCAT-JUST = 'M'.
APPEND LCAT TO FIELDCAT.
CLEAR LCAT.
LCAT-FIELDNAME = 'GJAHR'.
LCAT-TABNAME = 'IT_STD_FINAL'.
LCAT-SELTEXT_L = 'Fiscal Year'.
LCAT-JUST = 'M'.
APPEND LCAT TO FIELDCAT.
CLEAR LCAT.
LCAT-FIELDNAME = 'GSBER'.
LCAT-TABNAME = 'IT_STD_FINAL'.
LCAT-SELTEXT_L = 'BussArea'.
LCAT-JUST = 'M'.
APPEND LCAT TO FIELDCAT.
CLEAR LCAT.
LCAT-FIELDNAME = 'DMBTR_S'.
LCAT-TABNAME = 'IT_STD_FINAL'.
LCAT-SELTEXT_L = 'Debit Balanace'.
LCAT-JUST = 'M'.
APPEND LCAT TO FIELDCAT.
CLEAR LCAT.
LCAT-FIELDNAME = 'DMBTR_H'.
LCAT-TABNAME = 'IT_STD_FINAL'.
LCAT-SELTEXT_L = 'Credit Balance'.
LCAT-JUST = 'M'.
APPEND LCAT TO FIELDCAT.
CLEAR LCAT.
LCAT-FIELDNAME = 'BAL'.
LCAT-TABNAME = 'IT_STD_FINAL'.
LCAT-SELTEXT_L = 'Accumulated Balance'.
LCAT-JUST = 'M'.
APPEND LCAT TO FIELDCAT.
CLEAR LCAT.
endform. " FIELD
*& Form DISPLAY
text
--> p1 text
<-- p2 text
form DISPLAY .
CLEAR: IT_STD_BSAK,IT_STD_BSIK, IT_STD_LFA1 .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = 'STATUS '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT = LAYOUT
IT_FIELDCAT = FIELDCAT[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT = IT_SORT
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS = 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
I_HTML_HEIGHT_TOP = 0
I_HTML_HEIGHT_END = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
IR_SALV_FULLSCREEN_ADAPTER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = IT_CHARG
t_outtab = IT_STD_FINAL[]
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. "DISPLAY
*& Form EVENTS
text
--> p1 text
<-- p2 text
form EVENTS USING P_EVENTS TYPE slis_t_event.
DATA: ls_event TYPE slis_alv_event.
ls_event-name = 'TOP_OF_PAGE'.
ls_event-form = 'TOP_OF_PAGE'.
APPEND ls_event TO P_EVENTS.
endform. " EVENTS
*& Form TOP_OF_PAGE
text
FORM TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = TOP.
ENDFORM. "TOP_OF_PAGE
*& Form LAYOUT
text
--> p1 text
<-- p2 text
form LAYOUT .
LAYOUT-ZEBRA = 'X'.
LAYOUT-INFO_FIELDNAME = 'LINE_COLOR'.
LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
APPEND LAYOUT." TO LAYOUT.
endform. " LAYOUT
*& Form EVENTS_1
text
-->P_EVENTS text
FORM EVENTS_1 USING P_EVENTS TYPE slis_t_event.
DATA: ls_event TYPE slis_alv_event.
WRITE: SY-UNAME.
ls_event-name = 'END_OF_PAGE'.
ls_event-form = 'END_OF_PAGE'.
APPEND ls_event TO P_EVENTS.
ENDFORM. " EVENTS_1Seniors , Please Help me with this Requirment
BUKRS _____________________
GJAHR ____________________
LIFNR _____________________
MONAT _____________________
LIFNR NAME1 GSBER GJAHR HBAL SBAL ACCUMBAL
1001 ABB BUSS1 2005 300 00
ABB BUSS1 2005 00 100
300 100 (300-100)=200
ABB BUSS1 2006 200 00
ABB BUSS1 2006 200 00
400 00 (400-00)+ 200 =
600
ABB BUSS2 2005 300 00
ABB BUSS2 2005 00 100
300 100 ( 300-100) =200
ABB BUSS2 2006 400 00
ABB BUSS2 2006 00 100
400 100 (400-100)+200 =
500 ****************************************************************************
1400 300 (1400-300) **********************************************************************************************************
Same for the Next Vendor also...
This is the report for this Requirment i am working on....Please Help me in the Logic..How to Go on with it....
*& Report ZVENDOR_RECONCILLATION
REPORT ZVENDOR_RECONCILLATION.
TABLES : BSAK , BSIK , LFC1 , LFC3 , LFA1.
*ALV
TYPE-POOLS: SLIS.
*TYPE-POOLS icon.
DATA: It_SORT TYPE SLIS_T_SORTINFO_ALV ."WITH HEADER LINE.
DATA: TOP TYPE slis_t_listheader,
END TYPE slis_t_listheader,
EVENTS TYPE slis_t_event.
DATA : T_KEY TYPE SLIS_KEYINFO_ALV.
DATA : FIELDCAT TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
LAYOUT TYPE SLIS_LAYOUT_ALV OCCURS 1 WITH HEADER LINE ,
LCAT TYPE SLIS_FIELDCAT_ALV.
*INTERNAL TABLE
DATA: BEGIN OF sd_bsak,
bukrs TYPE bsak-bukrs,
lifnr TYPE bsak-lifnr,
umsks TYPE bsak-umsks,
umskz TYPE bsak-umskz,
augdt TYPE bsak-augdt,
augbl TYPE bsak-augbl,
zuonr TYPE bsak-zuonr,
gjahr TYPE bsak-gjahr,
belnr TYPE bsak-belnr,
buzei TYPE bsak-buzei,
budat TYPE bsak-budat,
bldat TYPE bsak-bldat,
xblnr TYPE bsak-xblnr,
blart TYPE bsak-blart,
monat TYPE bsak-monat,
bschl TYPE bsak-bschl,
zumsk TYPE bsak-zumsk,
shkzg TYPE bsak-shkzg,
gsber TYPE bsak-gsber,
dmbtr TYPE bsak-dmbtr,
wrbtr TYPE bsak-wrbtr,
sgtxt TYPE bsak-sgtxt,
saknr TYPE bsak-saknr,
hkont TYPE bsak-hkont,
END OF sd_bsak.
DATA: BEGIN OF sd_bsik,
bukrs TYPE bsik-bukrs,
lifnr TYPE bsik-lifnr,
umsks TYPE bsik-umsks,
umskz TYPE bsik-umskz,
augdt TYPE bsik-augdt,
augbl TYPE bsik-augbl,
zuonr TYPE bsik-zuonr,
gjahr TYPE bsik-gjahr,
belnr TYPE bsik-belnr,
buzei TYPE bsik-buzei,
budat TYPE bsik-budat,
bldat TYPE bsik-bldat,
xblnr TYPE bsik-xblnr,
blart TYPE bsik-blart,
monat TYPE bsik-monat,
bschl TYPE bsik-bschl,
zumsk TYPE bsik-zumsk,
shkzg TYPE bsik-shkzg,
gsber TYPE bsik-gsber,
dmbtr TYPE bsik-dmbtr,
wrbtr TYPE bsik-wrbtr,
sgtxt TYPE bsik-sgtxt,
saknr TYPE bsik-saknr,
hkont TYPE bsik-hkont,
zlsch TYPE bsik-zlsch,
END OF sd_bsik.
DATA: BEGIN OF it_lfa1,
lifnr TYPE lfa1-lifnr,
name1 TYPE lfa1-name1,
END OF it_lfa1.
*FINAL INTERNAL TABLE DECLARATION
DATA: BEGIN OF IT_FINAL,
lifnr TYPE bsak-lifnr,
gsber TYPE bsak-gsber,
bukrs TYPE bsak-bukrs,
umsks TYPE bsak-umsks,
umskz TYPE bsak-umskz,
augdt TYPE bsak-augdt,
augbl TYPE bsak-augbl,
zuonr TYPE bsak-zuonr,
gjahr TYPE bsak-gjahr,
belnr TYPE bsak-belnr,
buzei TYPE bsak-buzei,
budat TYPE bsak-budat,
bldat TYPE bsak-bldat,
xblnr TYPE bsak-xblnr,
blart TYPE bsak-blart,
monat TYPE bsak-monat,
bschl TYPE bsak-bschl,
zumsk TYPE bsak-zumsk,
shkzg TYPE bsak-shkzg,
gsber TYPE bsak-gsber,
dmbtr TYPE bsak-dmbtr,
wrbtr TYPE bsak-wrbtr,
sgtxt TYPE bsak-sgtxt,
saknr TYPE bsak-saknr,
hkont TYPE bsak-hkont,
DMBTR_S TYPE BSAK-DMBTR,
DMBTR_H TYPE BSAK-DMBTR,
DS TYPE P DECIMALS 2,
DH TYPE P DECIMALS 2,
SUB TYPE P DECIMALS 2,
ADD TYPE P DECIMALS 2,
BAL TYPE P DECIMALS 2,
lifnr TYPE bsik-lifnr,
umsks TYPE bsik-umsks,
umskz TYPE bsik-umskz,
augdt TYPE bsik-augdt,
augbl TYPE bsik-augbl,
zuonr TYPE bsik-zuonr,
gjahr TYPE bsik-gjahr,
belnr TYPE bsik-belnr,
buzei TYPE bsik-buzei,
budat TYPE bsik-budat,
bldat TYPE bsik-bldat,
xblnr TYPE bsik-xblnr,
blart TYPE bsik-blart,
monat TYPE bsik-monat,
bschl TYPE bsik-bschl,
zumsk TYPE bsik-zumsk,
shkzg TYPE bsik-shkzg,
gsber TYPE bsik-gsber,
dmbtr TYPE bsik-dmbtr,
wrbtr TYPE bsik-wrbtr,
sgtxt TYPE bsik-sgtxt,
saknr TYPE bsik-saknr,
hkont TYPE bsik-hkont,
zlsch TYPE bsik-zlsch,
lifnr TYPE lfa1-lifnr,
name1 TYPE lfa1-name1,
END OF IT_FINAL.
DATA: BEGIN OF SD_FINAL,
gsber TYPE bsak-gsber,
lifnr TYPE bsak-lifnr,
bukrs TYPE bsak-bukrs,
lifnr TYPE bsak-lifnr,
umsks TYPE bsak-umsks,
umskz TYPE bsak-umskz,
augdt TYPE bsak-augdt,
augbl TYPE bsak-augbl,
zuonr TYPE bsak-zuonr,
gjahr TYPE bsak-gjahr,
belnr TYPE bsak-belnr,
buzei TYPE bsak-buzei,
budat TYPE bsak-budat,
bldat TYPE bsak-bldat,
xblnr TYPE bsak-xblnr,
blart TYPE bsak-blart,
monat TYPE bsak-monat,
bschl TYPE bsak-bschl,
zumsk TYPE bsak-zumsk,
shkzg TYPE bsak-shkzg,
dmbtr TYPE bsak-dmbtr,
wrbtr TYPE bsak-wrbtr,
sgtxt TYPE bsak-sgtxt,
saknr TYPE bsak-saknr,
hkont TYPE bsak-hkont,
bukrs TYPE bsik-bukrs,
lifnr TYPE bsik-lifnr,
umsks TYPE bsik-umsks,
umskz TYPE bsik-umskz,
augdt TYPE bsik-augdt,
augbl TYPE bsik-augbl,
zuonr TYPE bsik-zuonr,
gjahr TYPE bsik-gjahr,
belnr TYPE bsik-belnr,
buzei TYPE bsik-buzei,
budat TYPE bsik-budat,
bldat TYPE bsik-bldat,
xblnr TYPE bsik-xblnr,
blart TYPE bsik-blart,
monat TYPE bsik-monat,
bschl TYPE bsik-bschl,
zumsk TYPE bsik-zumsk,
shkzg TYPE bsik-shkzg,
gsber TYPE bsik-gsber,
dmbtr TYPE bsik-dmbtr,
wrbtr TYPE bsik-wrbtr,
sgtxt TYPE bsik-sgtxt,
saknr TYPE bsik-saknr,
hkont TYPE bsik-hkont,
zlsch TYPE bsik-zlsch,
lifnr TYPE lfa1-lifnr,
name1 TYPE lfa1-name1,
line_color(4) TYPE c,
END OF SD_FINAL.
DATA IT_STD_BSAK LIKE TABLE OF SD_BSAK WITH HEADER LINE.
DATA IT_STD_BSIK LIKE TABLE OF SD_BSIK WITH HEADER LINE.
DATA IT_STD_LFA1 LIKE TABLE OF IT_LFA1 WITH HEADER LINE.
DATA IT_STD_FINAL LIKE TABLE OF IT_FINAL WITH HEADER LINE.
DATA IT_FINAL_DISPLAY LIKE TABLE OF SD_FINAL WITH HEADER LINE.
*SELECTION-SCREEN
SELECTION-SCREEN BEGIN OF BLOCK HEADER WITH FRAME TITLE TEXT-001.
PARAMETERS: P_BUKRS LIKE BSAK-BUKRS OBLIGATORY.
SELECT-OPTIONS : S_GJAHR FOR BSAK-GJAHR.
SELECT-OPTIONS: S_LIFNR FOR BSAK-LIFNR.
SELECT-OPTIONS: S_MONAT FOR BSAK-MONAT.
SELECTION-SCREEN END OF BLOCK HEADER.
START-OF-SELECTION.
SET PF-STATUS 'STATUS'.
PERFORM DATA_RETRIVAL.
PERFORM FIELD.
PERFORM EVENTS USING EVENTS.
PERFORM EVENTS_1 USING EVENTS.
PERFORM HEADER USING TOP.
PERFORM LAYOUT.
PERFORM DISPLAY.
END-OF-PAGE.
*& Form DATA_RETRIVAL
text
--> p1 text
<-- p2 text
FORM DATA_RETRIVAL .
SELECT BUKRS LIFNR UMSKS UMSKZ AUGDT AUGBL ZUONR GJAHR BELNR BUZEI BUDAT BLDAT XBLNR BLART
MONAT BSCHL ZUMSK SHKZG GSBER DMBTR WRBTR SGTXT SAKNR HKONT
FROM BSAK INTO TABLE IT_STD_BSAK
WHERE BUKRS = P_BUKRS
AND GJAHR IN S_GJAHR
AND LIFNR IN S_LIFNR
AND MONAT IN S_MONAT.
IF NOT IT_STD_BSAK[] IS INITIAL.
SELECT BUKRS LIFNR UMSKS UMSKZ AUGDT AUGBL ZUONR GJAHR BELNR BUZEI BUDAT BLDAT XBLNR
BLART MONAT BSCHL ZUMSK SHKZG GSBER DMBTR WRBTR SGTXT SAKNR HKONT ZLSCH
FROM BSIK INTO TABLE IT_STD_BSIK FOR ALL ENTRIES IN IT_STD_BSAK
WHERE BUKRS = IT_STD_BSAK-BUKRS AND LIFNR = IT_STD_BSAK-LIFNR AND GJAHR = IT_STD_BSAK-GJAHR .
ENDIF.
IF NOT IT_STD_BSAK[] IS INITIAL.
SELECT LIFNR NAME1
FROM LFA1 INTO TABLE IT_STD_LFA1 FOR ALL ENTRIES IN IT_STD_BSAK
WHERE LIFNR = IT_STD_BSAK-LIFNR.
ENDIF.
LOOP AT IT_STD_BSAK.
IT_STD_FINAL-BUKRS = IT_STD_BSAK-BUKRS.
IT_STD_FINAL-LIFNR = IT_STD_BSAK-LIFNR.
IT_STD_FINAL-UMSKS = IT_STD_BSAK-UMSKS.
IT_STD_FINAL-UMSKZ = IT_STD_BSAK-UMSKZ.
IT_STD_FINAL-AUGDT = IT_STD_BSAK-AUGDT.
IT_STD_FINAL-AUGBL = IT_STD_BSAK-AUGBL.
IT_STD_FINAL-ZUONR = IT_STD_BSAK-ZUONR.
IT_STD_FINAL-GJAHR = IT_STD_BSAK-GJAHR.
IT_STD_FINAL-BELNR = IT_STD_BSAK-BELNR.
IT_STD_FINAL-BUZEI = IT_STD_BSAK-BUZEI.
IT_STD_FINAL-BUDAT = IT_STD_BSAK-BUDAT.
IT_STD_FINAL-BLDAT = IT_STD_BSAK-BLDAT.
IT_STD_FINAL-XBLNR = IT_STD_BSAK-XBLNR.
IT_STD_FINAL-BLART = IT_STD_BSAK-BLART.
IT_STD_FINAL-MONAT = IT_STD_BSAK-MONAT.
IT_STD_FINAL-BSCHL = IT_STD_BSAK-BSCHL.
IT_STD_FINAL-ZUMSK = IT_STD_BSAK-ZUMSK.
IT_STD_FINAL-SHKZG = IT_STD_BSAK-SHKZG.
IT_STD_FINAL-GSBER = IT_STD_BSAK-GSBER.
IT_STD_FINAL-DMBTR = IT_STD_BSAK-DMBTR.
IT_STD_FINAL-WRBTR = IT_STD_BSAK-WRBTR.
IT_STD_FINAL-SGTXT = IT_STD_BSAK-SGTXT.
IT_STD_FINAL-SAKNR = IT_STD_BSAK-SAKNR.
IT_STD_FINAL-HKONT = IT_STD_BSAK-HKONT.
READ TABLE IT_STD_LFA1 WITH KEY LIFNR = IT_STD_FINAL-LIFNR.
IF SY-SUBRC = 0.
IT_STD_FINAL-NAME1 = IT_STD_LFA1-NAME1.
ENDIF.
APPEND IT_STD_FINAL.
CLEAR IT_STD_FINAL.
ENDLOOP.
LOOP AT IT_STD_BSIK.
IF SY-SUBRC = 0.
IT_STD_FINAL-BUKRS = IT_STD_BSIK-BUKRS.
IT_STD_FINAL-LIFNR = IT_STD_BSIK-LIFNR.
IT_STD_FINAL-UMSKS = IT_STD_BSIK-UMSKS.
IT_STD_FINAL-UMSKZ = IT_STD_BSIK-UMSKZ.
IT_STD_FINAL-AUGDT = IT_STD_BSIK-AUGDT.
IT_STD_FINAL-AUGBL = IT_STD_BSIK-AUGBL.
IT_STD_FINAL-ZUONR = IT_STD_BSIK-ZUONR.
IT_STD_FINAL-GJAHR = IT_STD_BSIK-GJAHR.
IT_STD_FINAL-BELNR = IT_STD_BSIK-BELNR.
IT_STD_FINAL-BUZEI = IT_STD_BSIK-BUZEI.
IT_STD_FINAL-BUDAT = IT_STD_BSIK-BUDAT.
IT_STD_FINAL-BLDAT = IT_STD_BSIK-BLDAT.
IT_STD_FINAL-XBLNR = IT_STD_BSIK-XBLNR.
IT_STD_FINAL-BLART = IT_STD_BSIK-BLART.
IT_STD_FINAL-MONAT = IT_STD_BSIK-MONAT.
IT_STD_FINAL-BSCHL = IT_STD_BSIK-BSCHL.
IT_STD_FINAL-ZUMSK = IT_STD_BSIK-ZUMSK.
IT_STD_FINAL-SHKZG = IT_STD_BSIK-SHKZG.
IT_STD_FINAL-GSBER = IT_STD_BSIK-GSBER.
IT_STD_FINAL-DMBTR = IT_STD_BSIK-DMBTR.
IT_STD_FINAL-WRBTR = IT_STD_BSIK-WRBTR.
IT_STD_FINAL-SGTXT = IT_STD_BSIK-SGTXT.
IT_STD_FINAL-SAKNR = IT_STD_BSIK-SAKNR.
IT_STD_FINAL-HKONT = IT_STD_BSIK-HKONT.
IT_STD_FINAL-ZLSCH = IT_STD_BSIK-ZLSCH.
ENDIF.
APPEND IT_STD_FINAL.
CLEAR IT_STD_FINAL.
ENDLOOP.
LOOP AT IT_STD_FINAL.
IF IT_STD_FINAL-SHKZG = 'S'.
IT_STD_FINAL-DMBTR_S = IT_STD_FINAL-DMBTR.
ELSE.
IF IT_STD_FINAL-SHKZG = 'H'.
IT_STD_FINAL-DMBTR_H = IT_STD_FINAL-DMBTR.
ENDIF.
ENDIF.
IT_STD_FINAL-DMBTR = ''.
MODIFY IT_STD_FINAL INDEX SY-TABIX TRANSPORTING DMBTR_H DMBTR_S DMBTR.
"VAR.
CLEAR IT_STD_FINAL.
ENDLOOP.
SORT IT_STD_FINAL BY LIFNR GSBER GJAHR.
ENDFORM. " DATA_RETRIVAL
*& Form FIELD
text
--> p1 text
<-- p2 text
form FIELD .
LCAT-FIELDNAME = 'LIFNR'.
LCAT-TABNAME = 'IT_STD_FINAL'.
LCAT-SELTEXT_L = 'Vendor No'.
LCAT-JUST = 'M'.
APPEND LCAT TO FIELDCAT.
CLEAR LCAT.
LCAT-FIELDNAME = 'NAME1'.
LCAT-TABNAME = 'IT_STD_FINAL'.
LCAT-SELTEXT_L = 'Vendor Name'.
LCAT-JUST = 'M'.
APPEND LCAT TO FIELDCAT.
CLEAR LCAT.
LCAT-FIELDNAME = 'GJAHR'.
LCAT-TABNAME = 'IT_STD_FINAL'.
LCAT-SELTEXT_L = 'Fiscal Year'.
LCAT-JUST = 'M'.
APPEND LCAT TO FIELDCAT.
CLEAR LCAT.
LCAT-FIELDNAME = 'GSBER'.
LCAT-TABNAME = 'IT_STD_FINAL'.
LCAT-SELTEXT_L = 'BussArea'.
LCAT-JUST = 'M'.
APPEND LCAT TO FIELDCAT.
CLEAR LCAT.
LCAT-FIELDNAME = 'DMBTR_S'.
LCAT-TABNAME = 'IT_STD_FINAL'.
LCAT-SELTEXT_L = 'Debit Balanace'.
LCAT-JUST = 'M'.
APPEND LCAT TO FIELDCAT.
CLEAR LCAT.
LCAT-FIELDNAME = 'DMBTR_H'.
LCAT-TABNAME = 'IT_STD_FINAL'.
LCAT-SELTEXT_L = 'Credit Balance'.
LCAT-JUST = 'M'.
APPEND LCAT TO FIELDCAT.
CLEAR LCAT.
LCAT-FIELDNAME = 'BAL'.
LCAT-TABNAME = 'IT_STD_FINAL'.
LCAT-SELTEXT_L = 'Accumulated Balance'.
LCAT-JUST = 'M'.
APPEND LCAT TO FIELDCAT.
CLEAR LCAT.
endform. " FIELD
*& Form DISPLAY
text
--> p1 text
<-- p2 text
form DISPLAY .
CLEAR: IT_STD_BSAK,IT_STD_BSIK, IT_STD_LFA1 .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = 'STATUS '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT = LAYOUT
IT_FIELDCAT = FIELDCAT[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT = IT_SORT
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS = 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
I_HTML_HEIGHT_TOP = 0
I_HTML_HEIGHT_END = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
IR_SALV_FULLSCREEN_ADAPTER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = IT_CHARG
t_outtab = IT_STD_FINAL[]
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. "DISPLAY
*& Form EVENTS
text
--> p1 text
<-- p2 text
form EVENTS USING P_EVENTS TYPE slis_t_event.
DATA: ls_event TYPE slis_alv_event.
ls_event-name = 'TOP_OF_PAGE'.
ls_event-form = 'TOP_OF_PAGE'.
APPEND ls_event TO P_EVENTS.
endform. " EVENTS
*& Form TOP_OF_PAGE
text
FORM TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = TOP.
ENDFORM. "TOP_OF_PAGE
*& Form LAYOUT
text
--> p1 text
<-- p2 text
form LAYOUT .
LAYOUT-ZEBRA = 'X'.
LAYOUT-INFO_FIELDNAME = 'LINE_COLOR'.
LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
APPEND LAYOUT." TO LAYOUT.
endform. " LAYOUT
*& Form EVENTS_1
text
-->P_EVENTS text
FORM EVENTS_1 USING P_EVENTS TYPE slis_t_event.
DATA: ls_event TYPE slis_alv_event.
WRITE: SY-UNAME.
ls_event-name = 'END_OF_PAGE'.
ls_event-form = 'END_OF_PAGE'.
APPEND ls_event TO P_EVENTS.
ENDFORM. " EVENTS_1 -
Please help to re-write this query using exists or with
Hi please help to re-write this query using exists or with, i need to write same code for 45 day , 90 days and so on but sub query condition is same for all
SELECT SUM (DECODE (t_one_mon_c_paid_us, 0, 0, 1)) t_two_y_m_mul_ca_
FROM (SELECT SUM (one_mon_c_paid_us) t_one_mon_c_paid_us
FROM (
SELECT a.individual_id individual_id,
CASE
WHEN NVL
(b.ship_dt,
TO_DATE ('05-MAY-1955')
) >= SYSDATE - 45
AND a.country_cd = 'US'
AND b.individual_id in (
SELECT UNIQUE c.individual_id
FROM order c
WHERE c.prod_cd = 'A'
AND NVL (c.last_payment_dt,
TO_DATE ('05-MAY-1955')
) >= SYSDATE - 745)
THEN 1
ELSE 0
END AS one_mon_c_paid_us
FROM items b, addr a, product d
WHERE b.prod_id = d.prod_id
AND d.affinity_1_cd = 'ADH'
AND b.individual_id = a.individual_id)
GROUP BY individual_id)
Edited by: user4522368 on Aug 23, 2010 9:11 AMPlease try and place \ before and after you code \Could you not remove the inline column select with the following?
SELECT a.individual_id individual_id
,CASE
when b.Ship_dt is null then
3
WHEN b.ship_dt >= SYSDATE - 90
3
WHEN b.ship_dt >= SYSDATE - 45
2
WHEN b.ship_dt >= SYSDATE - 30
1
END AS one_mon_c_paid_us
FROM items b
,addr a
,product d
,order o
WHERE b.prod_id = d.prod_id
AND d.affinity_1_cd = 'ADH'
AND b.individual_id = a.individual_id
AND b.Individual_ID = o.Individual_ID
and o.Prod_CD = 'A'
and NVL (o.last_payment_dt,TO_DATE ('05-MAY-1955') ) >= SYSDATE - 745
and a.Country_CD = 'US' -
Hi Everyone...Please help me with this query...!
Please Help me with this doubt as I am unable to understand the logic...behind this code. It's a begineer level code but I need to understand the logic so that I am able to grasp knowledge. Thank you all for being supportive. Please help me.
//Assume class Demo is inherited from class SuperDemo...in other words class Demo extends SuperDemo
//Volume is a method declared in SuperDemo which returns an integer value
//weight is an integer vairable declared in the subclass which is Demo
class Example
public static void main(String qw[])
Demo ob1=new Demo(3,5,7,9);
//Calling Constructor of Demo which takes in 4 int parameters
SuperDemo ob2=new SuperDemo();
int vol;
vol=ob1.volume();
System.out.println("Volume of ob1 is " + vol);
System.out.println("Weight of ob1 is " + ob1.weight);
System.out.println();
ob2=ob1;
}Can someone please make me understand --- how is this possible and why !
If the above statement is valid then why not this one "System.out.println(ob2.weight);"
Thanks Thanks Thanks!u see the line wherein I am referencing the objectof
a subclass to the superclass...right? then why we
can't do System.out.println(ob2.weight)?You need to distinguish two things:
- the type of the object, which determines with the
object can do
- the type of the reference to the object, which
determines what you see that you can do
Both don't necessarily have to match. When you use a
SuperDemo reference (obj2) to access a Demo instance
(obj1), for all you know, the instance behind obj2 is
of type SuperDemo. That it's in reality of type Demo
is unknown to you. And usually, you don't care -
that's what polymorphism is about.
So you have a reference obj2 of type SuperDemo.
SuperDemo objects don't have weight, so you don't see
it - even though it is there.So from ur explanation wat I understand is - Even though u reference a subclass object to a superclass, u will only be able to access the members which are declared in the superclass thru the same...right
? -
Please help me with this indicator on my screen...it has reduced voice quality
Please help me with the rectangular symbol on the top next to the speaker symbol. It seems that I have turned on some option by mistake and everytime I make or receive a call, this symbol comes up. It wasn't the case earlier.
Because of this my voice call quality has dropped significantly. Please help soon.
Thanks,
itsmits
Solved!
Go to Solution.Sure, it's been answered here in the forums many many times.
That is the call Audio Boost indicator.
To change it, press your green dial key > Menu key > Enhanced Audio Boost.
1. If any post helps you please click the below the post(s) that helped you.
2. Please resolve your thread by marking the post "Solution?" which solved it for you!
3. Install free BlackBerry Protect today for backups of contacts and data.
4. Guide to Unlocking your BlackBerry & Unlock Codes
Join our BBM Channels (Beta)
BlackBerry Support Forums Channel
PIN: C0001B7B4 Display/Scan Bar Code
Knowledge Base Updates
PIN: C0005A9AA Display/Scan Bar Code
Maybe you are looking for
-
My brand new iphone 4 is not working
Hello everyone hope things are getting well with everyone I have purchased iphone 4 32GB brand new from Oman and am living in Oman but unfortunattly my beginning with this iphone was unlucky at all. When i opened it at the beginning i did not get any
-
Java is call by value or call by reference
Hi! friends, I want to know,java is call by value and call by reference. Please give the the exact explanation with some example code.
-
Result.getString("column_name")
Hello All, I was wondering which is the best practice when we are getting the result from a query : result.getString("column_name") or result.getString("column_number") Thanks
-
Error message at end of lion install??
Im not sure what the exact message is, Ive received it twice now...i download Lion, but then it says it cannot be installed. I'm running OS snow leopard, newest version, imac from june of 08. I have all the right specs...Im not sure whats going on.
-
What Router Would Be Best If Using Two PlayStation 3 Consoles?
What Router Would Be Best If Using Two PlayStation 3 Consoles That Are Connected To The Same Broadband Internet Connection? My Two Cousins Aren't Able To Connect To The Same Lobby Party Together As I Am To Play COD MW3. They Have Tried Having Both C