Query Issue in Creating a View....Please help me with this query..
I would like to create a view on this table with four columns
1. PN#_EXP_DATE
2. PN#
3. PN#_EFF_DATE
4. PN#
P_S_C A_C P EXP_DT
21698 13921 1 5/29/2009 3:15:41 PM
21698 13921 1 5/29/2009 3:54:57 PM
21698 1716656 4 5/29/2009 3:15:41 PM
21698 3217 3 5/29/2009 3:15:40 PM
21698 3217 3 5/29/2009 3:54:57 PM
21698 60559 2 5/29/2009 3:15:41 PM
21698 60559 2 5/29/2009 3:54:57 PM
I have a trigger on A, which inserts the DML records into B. (Table A and B structure is the almost the same,
where table B will have one extra column exp_dt)
NOw Table B can have records with same P_S_C and A_C columns and exp_dt will capture the history.
for example: from the above sample data, let us take first two records..
P_S_C A_C P EXP_DT
21698 13921 1 5/29/2009 3:15:41 PM --- Record 1
21698 13921 1 5/29/2009 3:54:57 PM --- Record 2
from this..
Note: 1. Table A and Table C can be joined using A.P_S_C and C.R_C to get the start_date.
2. PN# comes from table D. It contains numbers for the resp. weeks.
3. PN#_EFF_DATE is the previous immediate previous date for that record in history table (Table B).
I wanted the data like..
---- this is for the second record in the above..
PN#_EXP_DATE PN# PN#_EFF_DATE PN#
5/29/2009 3:54:57 PM 214 5/29/2009 3:15:41 PM 214
---- this is for the first record in the above..
PN#_EXP_DATE PN# PN#_EFF_DATE PN#
5/29/2009 3:54:41 PM 214 ( for this we should query the table C to get the
start_date, for this combinatation of P_S_C and A_C in table B
where B.P_S_C = C.A_C
and that value should be the EFF_DT for this record)
Please help me with this....
Thanks in advance..
Hi All,
select d.P# as "PN#_EXP_DATE", exp_date
from daily_prd d, cbs1_assoc_hist b
where to_char(d.day_date,'MM/DD/YYYY') = to_char(b.exp_date,'MM/DD/YYYY')
and d.period_type = 'TIMEREPORT';
This above query gives the output as follows:
pn#_exp_date exp_date
214 5/29/2009 3:15:40 PM
214 5/29/2009 3:15:41 PM
214 5/29/2009 3:15:41 PM
214 5/29/2009 3:15:41 PM
214 5/29/2009 3:54:57 PM
214 5/29/2009 3:54:57 PM
214 5/29/2009 3:54:57 PM
This below is the data from history table (Table B).
P_S_C A_C PLACE EXP_DATE
21698 3217 3 5/29/2009 3:15:40 PM
21698 13921 1 5/29/2009 3:15:41 PM
21698 1716656 4 5/29/2009 3:15:41 PM
21698 60559 2 5/29/2009 3:15:41 PM
21698 13921 1 5/29/2009 3:54:57 PM
21698 3217 3 5/29/2009 3:54:57 PM
21698 60559 2 5/29/2009 3:54:57 PM
I got the pn#_exp_date from the Table 'D', for the given exp_date from Table B.
My question is again....
CASE - 1
from the given records above, I need to look for exp_date for the given same P_S_C and A_C.
in this case we can take the example...
P_S_C A_C PLACE EXP_DATE
21698 3217 3 5/29/2009 3:15:40 PM
21698 3217 3 5/29/2009 3:54:57 PM
In this case, the
pn#_exp_date exp_date pn#_eff_date eff_date
214 5/29/2009 3:15:57 PM < PN# corresponding to the 5/29/2009 3:15:40 PM
eff_date .>
<Basically the eff_date is
nothing but the exp_date only.
we should take the immediate before one.
In this case, our eff_date is '5/29/2009 3:15:40 PM'.
but how to get this.
CASE - 2
from the above sample data, consider this
P_S_C A_C PLACE EXP_DATE
21698 1716656 4 5/29/2009 3:15:41 PM
In this case, there is only one record for the P_S_C and A_C combination.
The expected result :
pn#_exp_date exp_date pn#_eff_date eff_date
214 5/29/2009 3:15:41 PM < PN# corresponding to the 5/29/2009 3:15:40 PM
eff_date .>
<Basically the eff_date is
nothing but the exp_date only.
we should take the immediate before one.
In this case to get the eff_date, we should query the Table 'C', to get the eff_date, which is START_DT column in this table.
for this join B.P_S_C and C.R_C.
Hope I am clear now..
Thanks in advance.....
Similar Messages
-
i cannot transfer some videos to my iphone 3gs. the file is in MPEG4 format. i can view in itunes but cannot be transfered to iphone. Please help me with this problem.
In iTunes, Advanced>Create iPod or iPhone version
-
Hey guy can you please help me with this issue PLEASE!
Hey Apple can you please help me with this issue, i have a iPhone 3gs and when i put my sim card into the iPhone it makes iphone 3gs shut down suddenly how do i fix that?
iPhone version: 6.0.1
service provider: Vodafone nzYou could restarting your phone that sometimes fixes issues
Hold down the Sleep/Wake button and the home button together until the apple logo appears (ignore the ON/OFF slider) then let both buttons go and wait for phone to restart (no data will be lost). -
Please help me with this SQL query
I am practicing SQL queries and have come across one involving fetching data from 3 different tables.
The three tables are as below
<pre>
Country
location_id country
loc1 Spain
loc2 England
loc3 Spain
loc4 USA
loc5 Italy
loc6 USA
loc7 USA
</pre>
<pre>
User
user_id location_id
u1 loc1
u2 loc1
u3 loc2
u4 loc2
u5 loc1
u6 loc3
</pre>
<pre>
Post
post_id user_id
p1 u1
p2 u1
p3 u2
p4 u3
p5 u1
p6 u2
</pre>
I am trying to write an SQL query - for each country of users, display the average number of posts
I understand the logic behind this that we first need to group together all the locations and then the users belonging to one country and then find the average of their posts.
But, i'm having a difficulty in putting this in SQL form. Could someone please help me with this query.
Thanks.select
country.country,
count(*) Totalpostspercountry,
count(distinct post.user_id) Totaldistincuserspercountry,
count(*)/count(distinct post.user_id) Avgpostsperuserbycountry
from
country, muser, post
where country.location_id = muser.location_id
and muser.user_id = post.user_id
group by country.country
The output is like this for your sample data - hope this is what you were looking for :)
COUNTRY,TOTALPOSTSPERCOUNTRY,TOTALDISTINCUSERSPERCOUNTRY,AVGPOSTSPERUSERBYCOUNTRY
England,1,1,1,
Spain,5,2,2.5, -
i have a problem with xcode programming app when i lunch to it it asking me to enter my password and when i enter it the program show that it is wrong but am 100% sure it's wright so please help me with this issue thanks
That's not very intuitive
Check your mail server setup (mail>preferences>accounts>) choose your MobileMe account and select Outgoing Mail Server (SMTP) dropdown box, select Edit SMTP server list, verify that each instance of the me server has a password, if there are more than one and you only have one account then delete the one without a password. -
I am facing this issues that music stops playing when the display goes...Please help me with this...:)
Did you see the article linked at the top of this page?
iPod nano (6th generation): Music stops when display turns off
B-rock -
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
? -
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. -
Please help me with this calculation script
Hello everyone.
I have 2 fields named A and B. FieldA is user-enter value and FieldB is calculated. I want to write a script that do the following:
If FieldA is more than or equal to $10000, then FieldB always is $1000, Else FieldB = FieldA * 10%.
I don't know about scripting; however, after hour of search through google, I wrote this one:
var tvar
If (tvar >= 10000)then deposit.value = 1000
else deposit.value = total.rawValue*0.01
endif
And when I try to run, it say "Invalid Property Set Operation, value doesn't have a default property."
I know my script is bad and over the place. Can anyone please help me with this problem ASAP. Thank you so much, I'm in your debt.
I used Adobe LiveCycle Designer to create a PDF file.Thank you for your response.
tvar = total
At first I wrote it like this:
If (total.rawValue >= 10000)then deposit.rawvalue = 1000
else deposit.rawvalue = total.rawValue*0.01
endif
then I get an error message "accessor 'Total.rawValue' is unknown"
Hic, I think my script is screwed. Can you help me start fresh :)
Thank again. -
I just bought this movie "Godzilla 2014" but it won't show in my Movie Library. I closed my Itunes and put it back on again but still won't show up. I checked my purchased list and it shows that I recently bought the movie but when I checked the itunes store it wants to buy the movie again. Please help me with this right away Apple.
Apple Store Customer Service at 1-800-676-2775 or visit online Help for more information.
To contact product and tech support: Contacting Apple for support and service - this includes
international calling numbers..
For Mac App Store: Apple - Support - Mac App Store.
For iTunes: Apple - Support - iTunes. -
Hello, Honestly I just updated my 4s and my iPad 3 to iOS 6 and when try to press on the Music app or the iTunes app it says "cannot connect to iTunes Store" Could you please help me with this thank you so much, Charbel from Lebanon
See these previous discussions help.
App Store Updates (but only Updates)...: Apple Support Communities
Apps suddenly don't update: Apple Support Communities -
Hi, I'm stuck at step 9. I don't see my external harddrive when I want to save the DMG backup file. Can you please help me with this? I'm desperate to make this backup! Big thanx in advance!
http://support.apple.com/kb/HT1553Repair permissions and restart your computer. If this does not work, zap the pram. You should now see your external hard drive.
-
I recently upgraded to IOS 10.9.5 and now I can't export anything from final cut Pro X. Could somebody please help me with this?
SSign in to the App Store using the Apple ID that was used to purchase the software.
-
Can anyone please help me with this error: "Apple application support was not found... Error 2"
I've followed the instructions by removing all Apple files from my laptop, but when I reinstall the iTunes software it still comes up with this message:
"Apple application support is required to run iTunesHelper. Please uninstall iTunes, then install iTunes again. Error 2"
Thank youiTunes "Apple Application Support is required... Error 2" and possible fix.
I know this is a bit late but I came accross this thread trying to resolve this same problem and came up with a solution that worked for me, so thought I would share it here too. I hope it helps someone else.
I just resolved this on Win Vista (should apply equally for Win7 too). Please uninstall iTunes before proceeding though. I'll walk you through the process I followed, if you like you can jump straight to the Solution section.
Problems:
The initial error during the installation of iTunes was:
An error occurred during the installation of assembly 'Microsoft.VC80.CRT,version="8.0.50727.4053",type="win32",publicKeyToken='1fc8b 3b9a1e18e3b",processorarchitecture="x86". Please refer to Help and Support for more information. HRESULT:0x8007054F
The error (after installing iTunes) when trying to run iTunes was:
Apple Application Support is required to run iTunes. Please uninstall iTunes, then install iTunes again. Error 2 (Windows error 2).
After trying various fixes around the forums I came across this MSKB article, which relates to the first installation error:
http://support.microsoft.com/kb/2688946
This lead me to trying to install MS Visual C++ but I received the following error trying to install that:
Error 1935.An error occurred during the installation of assembly ‘Microsoft.VC80.ATL,type=”win32”,version=”8.0.50727.762”,publicKeyToken=”1fc8b3 b9a1e18e3b”,processorArchitecture=”amd64”’. Please refer to Help and Support for more information. HRESULT: 0x80070BC9. Assembly interface: IassemblyCacheItem, function: Commit, component: {837BF1EB-D770-94EB-A01F-C8B3B9A1E18E}
Note: The installation of VC++ rolls back when it fails.
Solution:
Through this error I found this MSKB article:
http://support.microsoft.com/kb/946414
The Automated MS "Fix It" msi package didn’t work.
Note: Please backup your registry first (see the above MSKB article for instructions).
I opened the registry and (as instructed in the MSKB article) deleted the following keys:
HKEY_LOCAL_MACHINE\COMPONENTS\
PendingXmlIdentifier
NextQueueEntryIndex
AdvancedInstallersNeedResolving
Reboot and reinstall iTunes.
If it helps you please like this so others can find it. -
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
Maybe you are looking for
-
Step by Step Instructions for Installing Self Signed Certificate using Certificate Modification Tool
I am looking for some step by step instructions for installing the self signed certificate from my Microsoft SBS 2003 server on a Treo 755p and 750p. In particular I need some help with the form of the actual certificate and how to use the Certifica
-
ITunes 9, Says I need Quicktime 7.6.4 even after most recent install.
I recently updated iTunes to the most current version. Now. when I open iTunes, I get the following Error message: QuickTime version 7.6.2 installed, iTunes requires QuickTime version 7.6.4 or later. Please uninstall iTunes, then install iTunes again
-
How to Print a interactive report without action button and search bar
Hello every one.... I am working on printing an interactive report. If there are 20 columns in that report i need to select some columns for printing. For this purpose i used actions button which is in the search bar of the interactive report. But i
-
HT1918 i want to deleted my apple id, how do i do it?
i want to deleted my apple id, how do i do it?
-
I have the following situation: I have seven systems. This 7 systems create an text files, that must be load by SAP ECCC. The scenario is the following: NON-SAP-Systems --> XI --> SAP ECC And I have other scenario when, SAP ECC gene