Performance Report in EM
Is it possible to produce a performance report of a database in Enterprise Manager over 1 month to 1 year ???
Hello,
You need to change retention peirod of awr/addm report from 7 days to 1 month or 1 year ; u can also create a baseline and compare with your future reports.
Regards
Similar Messages
-
hai
how to create an vendor performance report which display purchase order issued to a vendor, material supplied delivery times, payment terms, prices during a period of time.
for this report what are the tables and fields we have to use pls give me sample report..
thank you..Hi,
Against the RFQ's vendor submit quotations and the Based on the RFQ's data we have to compare the different Vendors with the respective data like terms and prices
Fetch the data of all RFQ's from EKKO and EKPO tables
and take the EKKO-KNUMV field and pass to KONV table and fetch the different prices based on the Condition types for each RFQ and put it in a tabular format and compare.
see the sample code
*& Report ZRFQ_COMP
*& Quotation Comparison Report
REPORT ZRFQ_COMP no standard page heading line-size 187 line-count 35.
*&Tables
Tables : ekko,
ekpo,
konp,
a016.
*&Data Decleration
Data : v_pos type i value 19.
Data : begin of it_rfq occurs 0,
ebeln type ekko-ebeln,
ekorg type ekko-ekorg,
lifnr type ekko-lifnr,
matnr type ekpo-matnr,
WERKS type ekpo-WERKS,
end of it_rfq.
Data : begin of it_a016 occurs 0,
ebeln type ekko-ebeln,
knumh type knumh,
end of it_a016.
Data : begin of it_a363 occurs 0,
werks type werks,
lifnr type lifnr,
matnr type matnr,
knumh type knumh,
end of it_a363.
Data : begin of it_pr_details occurs 0,
knumh type knumh,
kschl type kschl,
kbetr type kwert,
end of it_pr_details.
Data : begin of it_final occurs 0,
ebeln type ebeln,
lifnr type lifnr,
name1 type lfa1-name1,
pb00 type kbetr,
zpac type kbetr,
zb00 type kbetr,
ZIN1 type kbetr,
JEC1 type kbetr,
JHX1 type kbetr,
JMOP type kbetr,
JMX1 type kbetr,
JMX3 type kbetr,
JSEP TYPE KBETR,
JVRD type kbetr,
end of it_final.
Data : begin of it_vendorname occurs 0,
lifnr type lifnr,
name1 type lfa1-name1,
end of it_vendorname.
*&Selection Screen
Selection-screen: begin of block blk1 with frame title text-001.
parameters : p_matnr like ekpo-matnr obligatory.
select-options : s_ebeln for ekko-ebeln,
s_ekorg for ekko-ekorg,
s_lifnr for ekko-lifnr.
Selection-screen: end of block blk1.
*&Start-of-Selection.
Start-of-selection.
Select ekko~ebeln
ekko~ekorg
ekko~lifnr
ekpo~matnr
ekpo~werks
into table it_rfq
from ekko
inner join ekpo
on ekkoebeln eq ekpoebeln
where ekko~ebeln in s_ebeln
and ekko~ekorg in s_ekorg
and ekko~lifnr in s_lifnr
and ekpo~matnr eq p_matnr
and ekko~bstyp eq 'A'.
if sy-subrc eq 0.
*--> Condition number from A tables.
Perform get_connum.
*--> Getting the Pricing Details from Konp Table.
Perform get_prices.
*--> Populate Vendor Name.
Perform pop_vendor_name.
*--> Populating the Final Internal table for Report.
Perform pop_final_tab.
else.
message 'Purchase Document does not exist' type 'E'.
endif.
*&End-of-Selection.
End-of-Selection.
write :/ sy-vline,
2 'Vendor Number',
19 sy-vline.
v_pos = 19.
loop at it_final.
write at v_pos sy-vline.
v_pos = v_pos + 1.
write at v_pos it_final-lifnr.
v_pos = v_pos + 35.
endloop.
write at: v_pos sy-vline,
/(v_pos) sy-uline.
write :/ sy-vline,
2 'Gross Price',
19 sy-vline.
v_pos = 19.
loop at it_final.
write at v_pos sy-vline.
v_pos = v_pos + 20.
write at v_pos it_final-pb00.
v_pos = v_pos + 16.
endloop.
write at: v_pos sy-vline,
/(v_pos) sy-uline.
write :/ sy-vline,
2 'Packing & Forward',
19 sy-vline.
v_pos = 19.
loop at it_final.
write at v_pos sy-vline.
v_pos = v_pos + 20.
write at v_pos it_final-zpac.
v_pos = v_pos + 16.
endloop.
write at: v_pos sy-vline,
/(v_pos) sy-uline.
write :/ sy-vline,
2 'Surcharge',
19 sy-vline.
v_pos = 19.
loop at it_final.
write at v_pos sy-vline.
v_pos = v_pos + 20.
write at v_pos it_final-zb00.
v_pos = v_pos + 16.
endloop.
write at: v_pos sy-vline,
/(v_pos) sy-uline.
write :/ sy-vline,
2 'Installation',
19 sy-vline.
v_pos = 19.
loop at it_final.
write at v_pos sy-vline.
v_pos = v_pos + 20.
write at v_pos it_final-zin1.
v_pos = v_pos + 16.
endloop.
write at: v_pos sy-vline,
/(v_pos) sy-uline.
write :/ sy-vline,
2 'Ed cess on BED%',
19 sy-vline.
v_pos = 19.
loop at it_final.
write at v_pos sy-vline.
v_pos = v_pos + 20.
write at v_pos it_final-jec1.
v_pos = v_pos + 16.
endloop.
write at: v_pos sy-vline,
/(v_pos) sy-uline.
write :/ sy-vline,
2 'A/P Secess set off',
19 sy-vline.
v_pos = 19.
loop at it_final.
write at v_pos sy-vline.
v_pos = v_pos + 20.
write at v_pos it_final-jhx1.
v_pos = v_pos + 16.
endloop.
write at: v_pos sy-vline,
/(v_pos) sy-uline.
write :/ sy-vline,
2 'Basic Excise Duty',
19 sy-vline.
v_pos = 19.
loop at it_final.
write at v_pos sy-vline.
v_pos = v_pos + 20.
write at v_pos it_final-zpac.
v_pos = v_pos + 16.
endloop.
write at: v_pos sy-vline,
/(v_pos) sy-uline.
write :/ sy-vline,
2 'A/P BED set off',
19 sy-vline.
v_pos = 19.
loop at it_final.
write at v_pos sy-vline.
v_pos = v_pos + 20.
write at v_pos it_final-jmx1.
v_pos = v_pos + 16.
endloop.
write at: v_pos sy-vline,
/(v_pos) sy-uline.
write :/ sy-vline,
2 'Ecess % set off',
19 sy-vline.
v_pos = 19.
loop at it_final.
write at v_pos sy-vline.
v_pos = v_pos + 20.
write at v_pos it_final-jmx3.
v_pos = v_pos + 16.
endloop.
write at: v_pos sy-vline,
/(v_pos) sy-uline.
write :/ sy-vline,
2 'Sec ED Cess on BED',
19 sy-vline.
v_pos = 19.
loop at it_final.
write at v_pos sy-vline.
v_pos = v_pos + 20.
write at v_pos it_final-jsep.
v_pos = v_pos + 16.
endloop.
write at: v_pos sy-vline,
/(v_pos) sy-uline.
write :/ sy-vline,
2 'VAT%',
19 sy-vline.
v_pos = 19.
loop at it_final.
write at v_pos sy-vline.
v_pos = v_pos + 20.
write at v_pos it_final-jvrd.
v_pos = v_pos + 16.
endloop.
write at: v_pos sy-vline,
/(v_pos) sy-uline.
*&Top-of-Page.
Top-of-Page.
format color 1.
Write: 'Material Number :' color 1, p_matnr color 1.
loop at it_final.
v_pos = v_pos + 1.
v_pos = v_pos + 35.
endloop.
write at: /(v_pos) sy-uline,/ sy-vline,2 'Vendor Name'.
v_pos = 19.
loop at it_final.
write at v_pos sy-vline.
v_pos = v_pos + 1.
write at v_pos it_final-name1.
v_pos = v_pos + 35.
endloop.
write at: v_pos sy-vline,
/(v_pos) sy-uline.
*& Form get_connum
Condition number from A tables
form get_connum .
Select EVRTN
knumh
from a016
into table it_a016
for all entries in it_rfq
where EVRTN eq it_rfq-ebeln.
Select werks
lifnr
matnr
knumh
from a363
into table it_a363
for all entries in it_rfq
where werks eq it_rfq-werks
and lifnr eq it_rfq-lifnr
and matnr eq it_rfq-matnr.
endform. " get_connum
*& Form get_prices
Getting the Pricing Details from Konp Table.
form get_prices .
if not it_a016[] is initial.
select knumh
kschl
kbetr
from konp
into table it_pr_details
for all entries in it_a016
where knumh eq it_a016-knumh.
endif.
if not it_a363[] is initial.
select knumh
kschl
kbetr
from konp
appending table it_pr_details
for all entries in it_a016
where knumh eq it_a016-knumh.
endif.
endform. " get_prices
*& Form pop_final_tab
Populating the Final Internal table for Report
form pop_final_tab .
data : l_subrc like sy-subrc.
sort it_a016 by ebeln.
loop at it_rfq.
clear l_subrc.
read table it_a016 with key ebeln = it_rfq-ebeln
binary search.
if sy-subrc eq 0.
loop at it_pr_details where knumh eq it_a016-knumh.
it_final-ebeln = it_rfq-ebeln.
it_final-lifnr = it_rfq-lifnr.
read table it_vendorname with
key lifnr = it_rfq-lifnr.
it_final-name1 = it_vendorname-name1.
case it_pr_details-kschl.
when 'PBOO'.
it_final-pb00 = it_pr_details-kbetr.
if it_pr_details-kbetr eq 0.
clear it_final.
continue.
endif.
when 'ZPAC'.
it_final-zpac = it_pr_details-kbetr.
when 'ZB00'.
it_final-ZB00 = it_pr_details-kbetr.
when 'ZIN1'.
it_final-ZIN1 = it_pr_details-kbetr.
endcase.
endloop.
else.
l_subrc = sy-subrc.
endif.
read table it_a363 with key lifnr = it_rfq-lifnr
werks = it_rfq-werks
matnr = it_rfq-matnr.
if sy-subrc eq 0.
loop at it_pr_details where knumh eq it_a016-knumh.
it_final-ebeln = it_rfq-ebeln.
it_final-lifnr = it_rfq-lifnr.
read table it_vendorname with
key lifnr = it_rfq-lifnr.
it_final-name1 = it_vendorname-name1.
case it_pr_details-kschl.
when 'JEC1'.
it_final-JEC1 = it_pr_details-kbetr.
when 'JHX1'.
it_final-JHX1 = it_pr_details-kbetr.
when 'JMOP'.
it_final-JMOP = it_pr_details-kbetr.
when 'JMX1'.
it_final-JMX1 = it_pr_details-kbetr.
when 'JMX3'.
it_final-JMX3 = it_pr_details-kbetr.
when 'JSEP'.
it_final-JSEP = it_pr_details-kbetr.
when 'JVRD'.
it_final-JVRD = it_pr_details-kbetr.
endcase.
endloop.
elseif l_subrc ne 0.
continue.
endif.
append it_final.
clear it_final.
endloop.
endform. " pop_final_tab
*& Form pop_vendor_name
Populate Vendor Name
form pop_vendor_name .
if not it_rfq[] is initial.
Select lifnr
name1
from lfa1
into table it_vendorname
where lifnr eq it_rfq-lifnr.
endif.
endform. " pop_vendor_name
Reward points if useful
Regards
Anji -
GT70 2PC – Software testing and performance report.
It is so excited here again. Currently, my first/only object after work is playing Titanfall.
I intended to share another performance testing today. But I didn’t. I found there are too many great open box posts on different forums. Therefore, I decide to dig the MSI software compatibility and do a touring. What can I say? I’m Mr.Curiosity who really desires to know every built-in application in system. That is why I share this article with you, my friends. I would like to discuss with everybody who is interested in MSI software. Of course, I have some performance reports for you, too. Please also remind me if you find any typo/wrong in this post. Thanks in advance.
1. MSI Boot Configure
This is the first software which pops up immediately. It is thoughtful design because we can choose enter the [Windows 8.1 metro] or [desktop] by ourselves now. I give it two thumbs up!!!
Select your favorite boot configuration and press [OK]. If we want it work immdiately, we can logout the system and re-login again.
2. MSI Remind Manager
Honestly, I didn’t know what it is in the beginning. The cute robot shows every time when I login the system. I found this is a reminder for product registration. Good, I would like to have best MSI support and warranty for my lovely GT70 2PC. But don’t worry, if you don’t want to get this message again, you just need to select the right option and close it.
3. Synaptics TouchPad
This is a driver for mouse. [Mouse property] will show if we do the double clicks on TouchPad icon in tray. You can choose enable/disable internal pointing device when external pointing device is attached. This is brilliant. A tough guy (like me…HA! HA!) didn’t like to play game with touchpad. Because the character in game will be weak and slow if I control it by touchpad. Of course, I need the external mouse all the time and don’t want the interference from touchpad.
4. System Control Manager (SCM)
We can enable/disable the WLAN/BT/camera devices by SCM. Besides, it can control the display brightness, volume, screen on/off and ECO. ECO is special mode for gaming watching movie.
5. Sound Blaster CINEMA
Sound Blaster CINEMA is come from an old school audio company – CREATIVE. The software can adjust the surround sound easily. We also can adjust 5.1/7.1 surround sound for the internal speakers and external headphone. That is great, isn’t it?
Besides, we can also adjust CRYSTALIZER/BASS/SMART VOLUME/digital output by ourselves.
6. Killer Network Manager
This is a major feature of MSI NB.
In Killer Network Manager, we can set the network priority for each of applications and we also can abandon the connection from malicious software.
[Performance] shows current status of network. We can find out which application occupied the most greedy resources by it.
[Network -> Test Network Speed] will detect the network environment automatically. Furthermore, it will adjust the priority for applications.
[Killer Ethernet] show the LAN connection info.
[Killer Wireless] show the router info.
7. SteelSeries Engine
This is another major feature of MSI NB
If we do the right click on icon in tray, the menu will show following list. We can select [Launch SteelSeries Firmware Update Tool], [Updates]…and so on.
If we select the [Settings]. It can help us change default language and set application auto running when system power on.
I. Buttons
Double click to open the SteelSeries Engine. I think it can set 4 different keyboard settings for each of profiles. And it can switch by FN+1~4.
[Keypress Marc] can record what you input. And [Record Delays ] can modify the delay time. HA! No game can block us anymore. Please remember to press the [SAVE] for your setting
[Launch Application] can launch any application immediately. I suggest to set the cold key for this function.
Here is example. I use [PgUp] to quick start the 3D Mark11. See, it will pop up when I pressed [PgUp].
It is simple to use [TextMarco] set our own phrase. Now I become a quick speaker in my team. One key, only one key can help me to type a lot of words.
Are you tired to press some keys that you never want to touch in game (Like WIN KEY)? It is not the problem now. [Disable Key] will do the favor and disable any key which you hate.
II. [Colors] can change the color of backlight keyboard. Also, you can set different modes (Gaming/Audio…etc) on it.
We can change the color zone. There is not only 4 or 5 colors. The engine provides thousands of colors for us. [Audio mode] is the coolest. It will change colors by itself when we play music by speakers. I like to dance with my keyboard.
III. We can select different languages by [Settings].
IV. [Properties] can save our hard works of settings reliably.
V. If you want to defeat your competitors, it is important to know your enemy. However, It is more important to know yourself. [Statistics] can help us observe which keys are most popular by our fingers.
Right click on [Profile]. It can modify/export/import/delete the profiles.
Mouse can use the same kind of settings as keyboard.
DPI setting for mouse.
Save files.
We can record the mouse, too.
8. Norton
Norton Internet Security: Anti-Virus software, MSI provides 60 days for free.
Norton Online Backup: Online data backup software, MSI provides 30 days for free.
Norton Anti-Theft: Anti-Theft software, MSI provides 30 days for free.
If you like Norton’s products, you can buy it online.
If you don’t, I believe we can uninstall it directly.
So, the decision is ours.
Introduction from Norton official website
9. Dragon Gaming Center
I. System Monitor:
It can monitor CPU/GPU loading and temperature. We also can find the network speed and fan speed in it.
II. Utility:
You can set your favorite apps in [Add new Utility].
E.g. I added a [MSI Afterburner]. Click [Open] to build the link. Do you feel familiar with something? Exactly, [Launch Application] of [SteelSeries Engine] can do this, too.
III. Instant Play:
We can define [Fn+F4] to enable the quick start. But there is more secret.
We can also use [Browse] to assign the game which we want.
Click the icon of game and [Fn+F4] will be ready. We can only use 1 program at once.
I usually change the brightness, volume and mouse sensitive before the game. As you know, every games are different. It is sweet because we can use [Apply Setting] to do this.
I can’t believe it. We also can find the clock feature in it. How convenient it is!
IV. Hybrid Power is another MSI feature.
It can provide the power by AC adapter and battery in the same time. We can monitor the status in here.
10. BurnRecovery
It can create the recovery CD/DVD/USB for MSI NB.
Here can select Recovery disc/USB/ISO.
I will make a ISO file first.
We can select where to put the ISO.
Creating the recovery file...
Finish!
Open the folder and we can find 4 ISO files in it.
Well…[BurnRecovery Help] provide the details spec.
In my opinion, everyone should create their own recovery image. You will need it in one day.
11. Battery Calibration
This is software for battery calibration. In order to keep our battery good, we should do the calibration every three months. Don’t forget to plug-in the AC adapter and battery during the process..
Press [Start] to begin the process. It will make the battery fully charged first.
Then, it will empty the battery like this.
System will shut down after the empty process. At last, fully charged again. It will take 4~5 hrs to complete the process.
12. MSI Dragoon Army /MSI Facebook /Web site /YouTube
Those are MSI forums/Facebook/official website/YouTube and links.
[MSI Dragoon Army] is the official forum for MSI. We can find NB, MB and AIO info in it.
Facebook Quick Link for many countries of world.
MSI official website
YouTube channel of MSI.
13. Super-Charger
There is no message when I click this app at the first time. But when I attached my IPAD, it pops up the [Super-Charger]. It is amazing because IPAD can’t be charge by this USB port. As far as I know, the USB 3.0 only provides maximum 900mA for its device. IPAD will need 2.1A for charge process. I have no idea how MSI NB make IPAD charging okay.
14. XSplit GameCaster
This is one of important features. I saw many different first class gaming machines this year. All of them have the broadcast software. (Like PS4, Xbos ONE)
It can switch the default language after we login.
Twitch/YouTube / Facebook/ Twitter/Google+ can be used by [Accounts]. It is easy to start the live show.
We can modify the resolution and use twitch by [Setting]
We can configure FPS/CPU loading/where to show on display by [Status label].
Hotkey configuration.
Videos storage.
Press [Ctrl+Tab] to call Gamecaster in game. And we can twitch or modify setting. I will provide my gaming video for you later.
15. Power DVD
This is a famous video player. Also, it can support BD format.
We can use the [Setting] to change our language.
We can change 5 times for default country .
It is glad that I’ve finished the introduction of GT70 software.
Performance report:
Um…Now is late at night. I should go to my lovely bed. Following is the testing report for the reference.
1. FurMark
1920*1080, 15 minutes.
2. AIDA 64
CPU and GPU stress testing, 30 minutes.
3. 3D Mark 11
4. 3DMark Vantage
5. 3DMark 2013
6. Heaven Benchmark 4.0
7. CINBENCH 11.5
8. FINAL FANTASY XIV Benchmark
9. PCMARK 7
10. HD Tune Pro 5.50
11. AS SSD Benchmark
12. Crystal Disk Mark
I didn’t forget my promise. Here is my gaming videos
http://youtu.be/tCd5Lnj2U0IEditors' Choice Award. Good job MSI !!
http://www.computershopper.com/laptops/reviews/msi-gt70-dominator-893#review-body -
Unable to change RFC destination in IT Performance reporting wizard
Hi Experts,
I am setting up IT Performance Reporting in my Solman EHP1 system. In the first page of the PErformance reporting wizard, it asked me for RFC destination from BI to Solman(1st field) and Solman to BI (2nd field). I initially entered an existing RFC destination that we are already using in a separate application that has a user with very-limited authorization. Now, I am trying to change the RFC destination by running the same "Configure IT Performance Reporting" wizard but both fields are already GREYED out.
I tried deleting the RFC destination previously defined in an attempt to reenable the fields but only the 2nd field was enabled. When I try to continue the setup, it results into a Shortdump because it is still looking for the initially defined RFC dest which is defined in the 1st field that cannot be edited.
SAP has not yet provided us with a solution.Your help is greatly appreciated.
Thank you very much.You canprovide the RFC destination in DOE administration portal. Goto Configurations link and search for "BACKEND DESTINATION" parameter in "BACKEND CONFIGURATION" link. Here you can provide RFC destination at SWCV level or at Data object level.
After deleting RFC destination in SM59, it will never take you to backend system. -
Vendor Scorecard Performance Report
The Vendor Scorecard Performance Report data is based on dates entered in the PO (dates provided by the vendor to us at the time we cut the PO or even months after the PO is cut-this date can change) as opposed to our expected lead time (lead time promised by the vendor in general).We always need to put the vendor's advised date in the PO so that our back-order reports have the correct ETA info. Currently, the report will show the vendor as having an almost perfect record because our expected receipt date is based on the vendor's production schedule (whether it is within our expected lead time or not).
We need some kind of indicator in the vendor set up which tells the system that the expected delivery date is "out of tolerance". Is there any way to achieve this and have the report based on expected lead time as opposed to PO dates?
Could somebody please help me to achieve this...?No database version? No example tables and data? No attempt to solve this yourself?
Please provide the necessary details as mentioned in the SQL and PL/SQL FAQ:
{message:id=9360002} -
Dear Experts,
Following is the scenario,
Sales Person Raj
Customer Code C1000
Payment Terms 15 days
Invoice Date 01.02.2010
Invoice Value 20000
Payment Date 20.02.2010
Payment Amount 20000
Payment performance 0%
As the customer has not paid within the credit days, when i execute a query based on the sales person and posting date (From, To) parameters the payment performance should result 0%.
Is the same possible to generate through query?
Awaiting your reply
saravanan
Edited by: Sanbrahma39 on Feb 16, 2010 1:01 PMDear Gordon,
As rightly conveyed the payment performance is calculated based on the (Paidtodate/Doctotal)*100. I tried to generate the report using query
SELECT T0.[DocNum], T0.[DocDate], T0.[CardName], T0.[DocTotal], T0.[PaidToDate] FROM OINV T0 INNER JOIN OSLP T1 ON T0.SlpCode = T1.SlpCode WHERE T1.[SlpName] = [%0] and T0.[DocDate] > = [%1] and T0.[DocDate] < = [%2].
The thing is SAP delivered the result perfectly based on the query given above, now the condition is like the query has to check the payment received within the payment terms, then only it need to consider for payment performance.
Ex:
Sales Employee - Raj
Customer Code -C1000
Payment Terms -15 days
IN1 Date - 01.02.2010
IN1 Amount - 10000
Payment Date - 14.02.2010
Payment Amt - 10000
IN2 Date - 02.02.2010
IN2 Amount - 40000
Payment Date - 19.02.2010
Payment Amount - 40000
Now if i try to generate a payment performance report of a sales employee Raj as per my query it would show 100% as payment terms is not been considered.
I need a query to consider the payment terms also so when i generate a report the payment performance should be 20% only.
Hope this assists
Saravanan -
What are the main tables using in vendor performance report.
what are the main tables using in vendor performance report.
how many select statements are in ABAP reports.Refer the links -
vendor performance report !!!
vendor performance report
vendor performance report
I need standard vendor performance report
Regards,
Amit
Reward all helpful replies. -
Functiona Spec For VENDOR PERFORMANCE REPORT
Hi experts
I need to develope a VENDOR PERFORMANCE REPORT. But due to some reason i cant be able to get the Functional Specification for that object. So could you please help me by sending the above mention functional Specification.
thnaks and regadrs
PratikPratik,
Bad question in ABAP forum.
can you please close this thread and put it into MM forum for quick reply.
Amit. -
What is vendor performance report what are the fields using in the report
What is vendor performance report what are the fields using in the report and i need some sample reports for that particular topic (clasical report)not using any alvs or any advance topics.
U R Satish Patnaikhi
good
*"Table declarations...................................................
TABLES:
EKKO, " Purchasing Document Header
CDHDR, " Change document header
SSCRFIELDS. " Fields on selection screens
*"Selection screen elements............................................
SELECT-OPTIONS:
S_EBELN FOR EKKO-EBELN, " Purchasing Document Number
S_LIFNR FOR EKKO-LIFNR, " Vendor's account number
S_EKGRP FOR EKKO-EKGRP, " Purchasing group
S_BEDAT FOR EKKO-BEDAT, " Purchasing Document Date
S_UDATE FOR CDHDR-UDATE. " Creation date of the change
" document
*" Data declarations...................................................
Field String to hold Purchase Document Number *
DATA:
BEGIN OF FS_EBELN,
EBELN(90) TYPE C, " Purchase Document Number
ERNAM TYPE EKKO-ERNAM, " Name of Person who Created
" the Object
LIFNR TYPE EKKO-LIFNR, " Vendor's account number
EKGRP TYPE EKKO-EKGRP, " Purchasing group
BEDAT TYPE EKKO-BEDAT, " Purchasing Document Date
END OF FS_EBELN,
Field String to hold Purchase Document Header *
BEGIN OF FS_EKKO,
EBELN TYPE EKKO-EBELN, " Purchasing Document Number
ERNAM TYPE EKKO-ERNAM, " Name of Person who Created the
" Object
LIFNR TYPE EKKO-LIFNR, " Vendor's account number
EKGRP TYPE EKKO-EKGRP, " Purchasing group
BEDAT TYPE EKKO-BEDAT, " Purchasing Document Date
END OF FS_EKKO,
Field String to hold Account Number and name of the Vendor *
BEGIN OF FS_LFA1,
LIFNR TYPE LFA1-LIFNR, " Account Number of Vendor
NAME1 TYPE LFA1-NAME1, " Name1
END OF FS_LFA1,
Field String to hold Change date and the name of the user *
BEGIN OF FS_CDHDR,
OBJECTCLAS TYPE CDHDR-OBJECTCLAS, " Object Class
OBJECTID TYPE CDHDR-OBJECTID, " Object value
CHANGENR TYPE CDHDR-CHANGENR, " Document change number
USERNAME TYPE CDHDR-USERNAME, " User name
UDATE TYPE CDHDR-UDATE, " Creation date of the change
" document
END OF FS_CDHDR,
Field String to hold Change document items *
BEGIN OF FS_CDPOS,
OBJECTCLAS TYPE CDPOS-OBJECTCLAS," Object class
OBJECTID(10) TYPE C, " Object Value
CHANGENR TYPE CDPOS-CHANGENR, " Document change number
TABNAME TYPE CDPOS-TABNAME, " Table Name
FNAME TYPE CDPOS-FNAME, " Field Name
VALUE_NEW TYPE CDPOS-VALUE_NEW, " New contents of changed field
VALUE_OLD TYPE CDPOS-VALUE_OLD, " Old contents of changed field
END OF FS_CDPOS,
Field String to hold Date Element Name *
BEGIN OF FS_DATAELE,
TABNAME TYPE DD03L-TABNAME, " Table Name
FIELDNAME TYPE DD03L-FIELDNAME, " Field Name
ROLLNAME TYPE DD03L-ROLLNAME, " Data element (semantic domain)
END OF FS_DATAELE,
Field String to hold Short Text of the Date Element *
BEGIN OF FS_TEXT,
ROLLNAME TYPE DD04T-ROLLNAME, " Data element (semantic domain)
DDTEXT TYPE DD04T-DDTEXT, " Short Text Describing R/3
" Repository Objects
END OF FS_TEXT,
Field String to hold data to be displayed on the ALV grid *
BEGIN OF FS_OUTTAB,
EBELN TYPE EKKO-EBELN, " Purchasing Document Number
ERNAM TYPE EKKO-ERNAM, " Name of Person who Created the
" Object
LIFNR TYPE EKKO-LIFNR, " Vendor's account number
EKGRP TYPE EKKO-EKGRP, " Purchasing group
BEDAT TYPE EKKO-BEDAT, " Purchasing Document Date
WERKS TYPE LFA1-WERKS, " Plant
NAME1 TYPE LFA1-NAME1, " Name1
USERNAME TYPE CDHDR-USERNAME, " User name
UDATE TYPE CDHDR-UDATE, " Creation date of the change
" document
DDTEXT TYPE DD04T-DDTEXT, " Short Text Describing R/3
" Repository Objects
VALUE_NEW TYPE CDPOS-VALUE_NEW, " New contents of changed field
VALUE_OLD TYPE CDPOS-VALUE_OLD, " Old contents of changed field
END OF FS_OUTTAB,
Internal table to hold Purchase Document Number *
T_EBELN LIKE STANDARD TABLE
OF FS_EBELN,
Internal table to hold Purchase Document Header *
T_EKKO LIKE STANDARD TABLE
OF FS_EKKO,
Temp Internal table to hold Purchase Document Header *
T_EKKO_TEMP LIKE STANDARD TABLE
OF FS_EKKO,
Internal table to hold Account number and Name of the Vendor *
T_LFA1 LIKE STANDARD TABLE
OF FS_LFA1,
Internal Table to hold Change date and the name of the user *
T_CDHDR LIKE STANDARD TABLE
OF FS_CDHDR,
Internal Table to hold Change document items *
T_CDPOS LIKE STANDARD TABLE
OF FS_CDPOS,
Temp. Internal Table to hold Change document items *
T_CDPOS_TEMP LIKE STANDARD TABLE
OF FS_CDPOS,
Internal Table to hold Data Element Name *
T_DATAELE LIKE STANDARD TABLE
OF FS_DATAELE,
Temp. Internal Table to hold Data Element Name *
T_DATAELE_TEMP LIKE STANDARD TABLE
OF FS_DATAELE,
Internal Table to hold Short Text of the Date Element *
T_TEXT LIKE STANDARD TABLE
OF FS_TEXT,
Internal Table to hold data to be displayed on the ALV grid *
T_OUTTAB LIKE STANDARD TABLE
OF FS_OUTTAB.
C L A S S D E F I N I T I O N *
CLASS LCL_EVENT_HANDLER DEFINITION DEFERRED.
*" Data declarations...................................................
Work variables *
DATA:
W_EBELN TYPE EKKO-EBELN, " Purchasing Document Number
W_LIFNR TYPE EKKO-LIFNR, " Vendor's account number
W_EKGRP TYPE EKKO-EKGRP, " Purchasing group
W_VALUE TYPE EKKO-EBELN, " Reflected Value
W_SPACE VALUE ' ', " Space
W_FLAG TYPE I, " Flag Variable
W_VARIANT TYPE DISVARIANT, " Variant
*--- ALV Grid
W_GRID TYPE REF TO CL_GUI_ALV_GRID,
*--- Event Handler
W_EVENT_CLICK TYPE REF TO LCL_EVENT_HANDLER,
*--- Field catalog table
T_FIELDCAT TYPE LVC_T_FCAT.
AT SELECTION-SCREEN EVENT *
AT SELECTION-SCREEN ON S_EBELN.
Subroutine to validate Purchase Document Number.
PERFORM VALIDATE_PD_NUM.
AT SELECTION-SCREEN ON S_LIFNR.
Subroutine to validate Vendor Number.
PERFORM VALIDATE_VEN_NUM.
AT SELECTION-SCREEN ON S_EKGRP.
Subroutine to validate Purchase Group.
PERFORM VALIDATE_PUR_GRP.
START-OF-SELECTION EVENT *
START-OF-SELECTION.
Subroutine to select all Purchase orders.
PERFORM SELECT_PO.
CHECK W_FLAG EQ 0.
Subroutine to select Object values.
PERFORM SELECT_OBJ_ID.
CHECK W_FLAG EQ 0.
Subroutine to select Changed values.
PERFORM SELECT_CHANGED_VALUE.
CHECK W_FLAG EQ 0.
Subroutine to Select Purchase Orders.
PERFORM SELECT_PUR_DOC.
Subroutine to select Vendor Details.
PERFORM SELECT_VENDOR.
Subroutine to select Text for the Changed values.
PERFORM DESCRIPTION.
END-OF-SELECTION EVENT *
END-OF-SELECTION.
IF NOT T_EKKO IS INITIAL.
Subroutine to populate the Output Table.
PERFORM FILL_OUTTAB.
Subroutine to build Field Catalog.
PERFORM PREPARE_FIELD_CATALOG CHANGING T_FIELDCAT.
CALL SCREEN 100.
ENDIF. " IF NOT T_EKKO...
CLASS LCL_EVENT_HANDLER DEFINITION
Defining Class which handles events
CLASS LCL_EVENT_HANDLER DEFINITION .
PUBLIC SECTION .
METHODS:
HANDLE_HOTSPOT_CLICK
FOR EVENT HOTSPOT_CLICK OF CL_GUI_ALV_GRID
IMPORTING E_ROW_ID E_COLUMN_ID.
ENDCLASS. " LCL_EVENT_HANDLER DEFINITION
CLASS LCL_EVENT_HANDLER IMPLEMENTATION
Implementing the Class which can handle events
CLASS LCL_EVENT_HANDLER IMPLEMENTATION .
*---Handle Double Click
METHOD HANDLE_HOTSPOT_CLICK .
Subroutine to get the HotSpot Cell information.
PERFORM GET_CELL_INFO.
SET PARAMETER ID 'BES' FIELD W_VALUE.
CALL TRANSACTION 'ME23N'.
ENDMETHOD. " HANDLE_HOTSPOT_CLICK
ENDCLASS. " LCL_EVENT_HANDLER
*& Module STATUS_0100 OUTPUT
PBO Event
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'OOPS'.
SET TITLEBAR 'TIT'.
Subroutine to fill the Variant Structure
PERFORM FILL_VARIANT.
IF W_GRID IS INITIAL.
CREATE OBJECT W_GRID
EXPORTING
I_SHELLSTYLE = 0
I_LIFETIME =
I_PARENT = CL_GUI_CONTAINER=>SCREEN0
I_APPL_EVENTS =
I_PARENTDBG =
I_APPLOGPARENT =
I_GRAPHICSPARENT =
I_NAME =
I_FCAT_COMPLETE = SPACE
EXCEPTIONS
ERROR_CNTL_CREATE = 1
ERROR_CNTL_INIT = 2
ERROR_CNTL_LINK = 3
ERROR_DP_CREATE = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. " IF SY-SUBRC <> 0
CALL METHOD W_GRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_BUFFER_ACTIVE =
I_BYPASSING_BUFFER =
I_CONSISTENCY_CHECK =
I_STRUCTURE_NAME =
IS_VARIANT = W_VARIANT
I_SAVE = 'A'
I_DEFAULT = 'X'
IS_LAYOUT =
IS_PRINT =
IT_SPECIAL_GROUPS =
IT_TOOLBAR_EXCLUDING =
IT_HYPERLINK =
IT_ALV_GRAPHICS =
IT_EXCEPT_QINFO =
IR_SALV_ADAPTER =
CHANGING
IT_OUTTAB = T_OUTTAB
IT_FIELDCATALOG = T_FIELDCAT
IT_SORT =
IT_FILTER =
EXCEPTIONS
INVALID_PARAMETER_COMBINATION = 1
PROGRAM_ERROR = 2
TOO_MANY_LINES = 3
OTHERS = 4
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. " IF SY-SUBRC <> 0.
ENDIF. " IF W_GRID IS INITIAL
CREATE OBJECT W_EVENT_CLICK.
SET HANDLER W_EVENT_CLICK->HANDLE_HOTSPOT_CLICK FOR W_GRID.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
PAI Event
MODULE USER_COMMAND_0100 INPUT.
CASE SY-UCOMM.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'CANCEL'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form PREPARE_FIELD_CATALOG
Subroutine to build the Field catalog
<--P_T_FIELDCAT Field Catalog Table
FORM PREPARE_FIELD_CATALOG CHANGING PT_FIELDCAT TYPE LVC_T_FCAT .
DATA LS_FCAT TYPE LVC_S_FCAT.
Purchasing group...
LS_FCAT-FIELDNAME = 'EKGRP'.
LS_FCAT-REF_TABLE = 'EKKO'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Purchasing Document Number...
LS_FCAT-FIELDNAME = 'EBELN'.
LS_FCAT-REF_TABLE = 'EKKO' .
LS_FCAT-EMPHASIZE = 'C411'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
LS_FCAT-HOTSPOT = 'X'.
APPEND LS_FCAT TO PT_FIELDCAT .
CLEAR LS_FCAT .
Name of Person who Created the Object...
LS_FCAT-FIELDNAME = 'ERNAM'.
LS_FCAT-REF_TABLE = 'EKKO'.
LS_FCAT-OUTPUTLEN = '15' .
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Purchasing Document Date...
LS_FCAT-FIELDNAME = 'BEDAT'.
LS_FCAT-REF_TABLE = 'EKKO'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Vendor's account number...
LS_FCAT-FIELDNAME = 'LIFNR'.
LS_FCAT-REF_TABLE = 'EKKO'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Account Number of Vendor or Creditor...
LS_FCAT-FIELDNAME = 'NAME1'.
LS_FCAT-REF_TABLE = 'LFA1'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
LS_FCAT-COLTEXT = 'Vendor Name'(001).
LS_FCAT-SELTEXT = 'Vendor Name'(001).
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Creation date of the change document...
LS_FCAT-FIELDNAME = 'UDATE'.
LS_FCAT-REF_TABLE = 'CDHDR'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
LS_FCAT-COLTEXT = 'Change Date'(002).
LS_FCAT-SELTEXT = 'Change Date'(002).
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
User name of the person responsible in change document...
LS_FCAT-FIELDNAME = 'USERNAME'.
LS_FCAT-REF_TABLE = 'CDHDR'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
LS_FCAT-COLTEXT = 'Modified by'(003).
LS_FCAT-SELTEXT = 'Modified by'(003).
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Short Text Describing R/3 Repository Objects...
LS_FCAT-FIELDNAME = 'DDTEXT'.
LS_FCAT-REF_TABLE = 'DD04T'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '15'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Old contents of changed field...
LS_FCAT-FIELDNAME = 'VALUE_OLD'.
LS_FCAT-REF_TABLE = 'CDPOS'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '12'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
New contents of changed field...
LS_FCAT-FIELDNAME = 'VALUE_NEW'.
LS_FCAT-REF_TABLE = 'CDPOS'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '12'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
ENDFORM. " PREPARE_FIELD_CATALOG
*& Form SELECT_PO
Subroutine to select all the Purchase Orders
There are no interface parameters to be passed to this subroutine.
FORM SELECT_PO .
SELECT EBELN " Purchasing Document Number
ERNAM " Name of Person who Created
" the Object
LIFNR " Vendor's account number
EKGRP " Purchasing group
BEDAT " Purchasing Document Date
FROM EKKO
PACKAGE SIZE 10000
APPENDING TABLE T_EBELN
WHERE EBELN IN S_EBELN
AND BEDAT IN S_BEDAT.
ENDSELECT.
IF SY-SUBRC NE 0.
W_FLAG = 1.
MESSAGE S401(M8).
ENDIF. " IF SY-SUBRC NE 0
ENDFORM. " SELECT_PO
*& Form SELECT_OBJ_ID
Subroutine to select Object ID
There are no interface parameters to be passed to this subroutine.
FORM SELECT_OBJ_ID .
IF NOT T_EBELN IS INITIAL.
SELECT OBJECTCLAS " Object Class
OBJECTID " Object value
CHANGENR " Document change number
USERNAME " User name
UDATE " Creation date
FROM CDHDR
INTO TABLE T_CDHDR
FOR ALL ENTRIES IN T_EBELN
WHERE OBJECTID EQ T_EBELN-EBELN
AND UDATE IN S_UDATE
AND TCODE IN ('ME21N','ME22N','ME23N').
ENDSELECT.
IF SY-SUBRC NE 0.
W_FLAG = 1.
MESSAGE S833(M8) WITH 'Header Not Found'(031).
ENDIF. " IF SY-SUBRC NE 0.
ENDIF. " IF NOT T_EBELN IS INITIAL
ENDFORM. " SELECT_OBJ_ID
*& Form SELECT_CHANGED_VALUE
Subroutine to select Changed Values
There are no interface parameters to be passed to this subroutine.
FORM SELECT_CHANGED_VALUE .
IF NOT T_CDHDR IS INITIAL.
SELECT OBJECTCLAS " Object class
OBJECTID " Object value
CHANGENR " Document change number
TABNAME " Table Name
FNAME " Field Name
VALUE_NEW " New contents of changed field
VALUE_OLD " Old contents of changed field
FROM CDPOS
PACKAGE SIZE 10000
APPENDING TABLE T_CDPOS
FOR ALL ENTRIES IN T_CDHDR
WHERE OBJECTCLAS EQ T_CDHDR-OBJECTCLAS
AND OBJECTID EQ T_CDHDR-OBJECTID
AND CHANGENR EQ T_CDHDR-CHANGENR.
ENDSELECT.
IF SY-SUBRC NE 0.
W_FLAG = 1.
MESSAGE S833(M8) WITH 'Item Not Found'(032).
ENDIF. " IF SY-SUBRC NE 0.
ENDIF. " IF NOT T_CDHDR IS INITIAL
T_CDPOS_TEMP[] = T_CDPOS[].
ENDFORM. " SELECT_CHANGED_VALUE
*& Form SELECT_PUR_DOC
Subroutine to select Purchase Order Details
There are no interface parameters to be passed to this subroutine.
FORM SELECT_PUR_DOC .
IF NOT T_CDPOS IS INITIAL.
SORT T_EBELN BY EBELN.
LOOP AT T_CDPOS INTO FS_CDPOS.
READ TABLE T_EBELN INTO FS_EBELN WITH KEY EBELN =
FS_CDPOS-OBJECTID BINARY SEARCH.
IF SY-SUBRC NE 0.
DELETE TABLE T_EBELN FROM FS_EBELN.
ENDIF. " IF SY-SUBRC NE 0.
ENDLOOP. " LOOP AT T_CDPOS...
LOOP AT T_EBELN INTO FS_EBELN.
MOVE FS_EBELN-EBELN TO FS_EKKO-EBELN.
MOVE FS_EBELN-ERNAM TO FS_EKKO-ERNAM.
MOVE FS_EBELN-LIFNR TO FS_EKKO-LIFNR.
MOVE FS_EBELN-EKGRP TO FS_EKKO-EKGRP.
MOVE FS_EBELN-BEDAT TO FS_EKKO-BEDAT.
APPEND FS_EKKO TO T_EKKO.
ENDLOOP. " LOOP AT T_EBELN...
T_EKKO_TEMP[] = T_EKKO[].
ENDIF. " IF NOT T_CDPOS IS INITIAL
ENDFORM. " SELECT_PUR_DOC
*& Form SELECT_VENDOR
Subroutine to select Vendor details
There are no interface parameters to be passed to this subroutine.
FORM SELECT_VENDOR .
IF NOT T_EKKO IS INITIAL.
SORT T_EKKO_TEMP BY LIFNR.
DELETE ADJACENT DUPLICATES FROM T_EKKO_TEMP COMPARING LIFNR.
SELECT LIFNR " Account Number of Vendor or
" Creditor
NAME1 " Name 1
FROM LFA1
INTO TABLE T_LFA1
FOR ALL ENTRIES IN T_EKKO_TEMP
WHERE LIFNR EQ T_EKKO_TEMP-LIFNR.
IF SY-SUBRC NE 0.
MESSAGE S002(M8) WITH 'Master Details'(033).
ENDIF. " IF SY-SUBRC NE 0.
ENDIF. " IF NOT T_EKKO IS INITIAL
ENDFORM. " SELECT_VENDOR
*& Form DESCRIPTION
Subroutine to get the description
There are no interface parameters to be passed to this subroutine.
FORM DESCRIPTION .
IF NOT T_CDPOS IS INITIAL.
SORT T_CDPOS_TEMP BY TABNAME FNAME.
DELETE ADJACENT DUPLICATES FROM T_CDPOS_TEMP COMPARING TABNAME FNAME
SELECT TABNAME " Table Name
FIELDNAME " Field Name
ROLLNAME " Data element
FROM DD03L
INTO TABLE T_DATAELE
FOR ALL ENTRIES IN T_CDPOS_TEMP
WHERE TABNAME EQ T_CDPOS_TEMP-TABNAME
AND FIELDNAME EQ T_CDPOS_TEMP-FNAME.
IF NOT T_DATAELE IS INITIAL.
T_DATAELE_TEMP[] = T_DATAELE[].
SORT T_DATAELE_TEMP BY ROLLNAME.
DELETE ADJACENT DUPLICATES FROM T_DATAELE_TEMP COMPARING ROLLNAME.
SELECT ROLLNAME " Data element
DDTEXT " Short Text Describing R/3
" Repository Objects
FROM DD04T
INTO TABLE T_TEXT
FOR ALL ENTRIES IN T_DATAELE_TEMP
WHERE ROLLNAME EQ T_DATAELE_TEMP-ROLLNAME
AND DDLANGUAGE EQ SY-LANGU.
IF SY-SUBRC NE 0.
EXIT.
ENDIF. " IF SY-SUBRC NE 0.
ENDIF. " IF NOT T_DATAELE IS INITIAL.
ENDIF. " IF NOT T_CDPOS IS INITIAL.
ENDFORM. " DESCRIPTION
*& Form FILL_OUTTAB
Subroutine to populate the Outtab
There are no interface parameters to be passed to this subroutine.
FORM FILL_OUTTAB .
SORT T_CDHDR BY OBJECTCLAS OBJECTID CHANGENR.
SORT T_EKKO BY EBELN.
SORT T_LFA1 BY LIFNR.
SORT T_DATAELE BY TABNAME FIELDNAME.
SORT T_TEXT BY ROLLNAME.
LOOP AT T_CDPOS INTO FS_CDPOS.
READ TABLE T_CDHDR INTO FS_CDHDR WITH KEY
OBJECTCLAS = FS_CDPOS-OBJECTCLAS
OBJECTID = FS_CDPOS-OBJECTID
CHANGENR = FS_CDPOS-CHANGENR
BINARY SEARCH.
IF SY-SUBRC EQ 0.
MOVE FS_CDHDR-USERNAME TO FS_OUTTAB-USERNAME.
MOVE FS_CDHDR-UDATE TO FS_OUTTAB-UDATE.
READ TABLE T_EKKO INTO FS_EKKO WITH KEY
EBELN = FS_CDHDR-OBJECTID
BINARY SEARCH.
IF SY-SUBRC EQ 0.
MOVE FS_EKKO-EBELN TO FS_OUTTAB-EBELN.
MOVE FS_EKKO-ERNAM TO FS_OUTTAB-ERNAM.
MOVE FS_EKKO-LIFNR TO FS_OUTTAB-LIFNR.
MOVE FS_EKKO-EKGRP TO FS_OUTTAB-EKGRP.
MOVE FS_EKKO-BEDAT TO FS_OUTTAB-BEDAT.
READ TABLE T_LFA1 INTO FS_LFA1 WITH KEY
LIFNR = FS_EKKO-LIFNR
BINARY SEARCH.
IF SY-SUBRC EQ 0.
MOVE FS_LFA1-NAME1 TO FS_OUTTAB-NAME1.
ENDIF. " IF SY-SUBRC EQ 0.
ENDIF. " IF SY-SUBRC EQ 0.
ENDIF. " IF SY-SUBRC EQ 0.
MOVE FS_CDPOS-VALUE_NEW TO FS_OUTTAB-VALUE_NEW.
MOVE FS_CDPOS-VALUE_OLD TO FS_OUTTAB-VALUE_OLD.
READ TABLE T_DATAELE INTO FS_DATAELE WITH KEY
TABNAME = FS_CDPOS-TABNAME
FIELDNAME = FS_CDPOS-FNAME
BINARY SEARCH.
IF SY-SUBRC EQ 0.
READ TABLE T_TEXT INTO FS_TEXT WITH KEY
ROLLNAME = FS_DATAELE-ROLLNAME
BINARY SEARCH.
IF SY-SUBRC EQ 0.
MOVE FS_TEXT-DDTEXT TO FS_OUTTAB-DDTEXT.
ENDIF. " IF SY-SUBRC EQ 0.
ENDIF. " IF SY-SUBRC EQ 0.
APPEND FS_OUTTAB TO T_OUTTAB.
CLEAR FS_OUTTAB.
ENDLOOP.
ENDFORM. " FILL_OUTTAB
*& Form GET_CELL_INFO
Subroutine to get the Cell Information
--> W_VALUE Holds the value of Hotspot clicked
FORM GET_CELL_INFO .
CALL METHOD W_GRID->GET_CURRENT_CELL
IMPORTING
E_ROW =
E_VALUE = W_VALUE
E_COL =
ES_ROW_ID =
ES_COL_ID =
ES_ROW_NO =
ENDFORM. " GET_CELL_INFO
*& Form VALIDATE_PD_NUM
Subroutine to validate Purchase Document Number
There are no interface parameters to be passed to this subroutine.
FORM VALIDATE_PD_NUM .
IF NOT S_EBELN[] IS INITIAL.
SELECT EBELN " Purchase Document Number
FROM EKKO
INTO W_EBELN
UP TO 1 ROWS
WHERE EBELN IN S_EBELN.
ENDSELECT.
IF SY-SUBRC NE 0.
CLEAR SSCRFIELDS-UCOMM.
MESSAGE E717(M8).
ENDIF. " IF SY-SUBRC NE 0
ENDIF. " IF NOT S_EBELN[]...
ENDFORM. " VALIDATE_PD_NUM
*& Form VALIDATE_VEN_NUM
Subroutine to validate Vendor Number
There are no interface parameters to be passed to this subroutine.
FORM VALIDATE_VEN_NUM .
IF NOT S_LIFNR[] IS INITIAL.
SELECT LIFNR " Vendor Number
FROM LFA1
INTO W_LIFNR
UP TO 1 ROWS
WHERE LIFNR IN S_LIFNR.
ENDSELECT.
IF SY-SUBRC NE 0.
CLEAR SSCRFIELDS-UCOMM.
MESSAGE E002(M8) WITH W_SPACE.
ENDIF. " IF SY-SUBRC NE 0
ENDIF. " IF NOT S_LIFNR[]...
ENDFORM. " VALIDATE_VEN_NUM
*& Form VALIDATE_PUR_GRP
Subroutine to validate the Purchase Group
There are no interface parameters to be passed to this subroutine.
FORM VALIDATE_PUR_GRP .
IF NOT S_EKGRP[] IS INITIAL.
SELECT EKGRP " Purchase Group
FROM T024
INTO W_EKGRP
UP TO 1 ROWS
WHERE EKGRP IN S_EKGRP.
ENDSELECT.
IF SY-SUBRC NE 0.
CLEAR SSCRFIELDS-UCOMM.
MESSAGE E622(M8) WITH W_SPACE.
ENDIF. " IF SY-SUBRC NE 0
ENDIF. " IF NOT S_EKFRP[]...
ENDFORM. " VALIDATE_PUR_GRP
*& Form FILL_VARIANT
Subroutine to fill the Variant Structure
There are no interface parameters to be passed to this subroutine
FORM FILL_VARIANT .
Filling the Variant structure
W_VARIANT-REPORT = SY-REPID.
W_VARIANT-USERNAME = SY-UNAME.
ENDFORM. " FILL_VARIANT
reward point if helpful.
thanks
mrutyun^ -
Need Vendor performance report
i want Vendor performance report based on which you finalise the PO on a particular vendor?
pls give the source codeSee this sample code
*"Table declarations...................................................
TABLES:
EKKO, " Purchasing Document Header
CDHDR, " Change document header
SSCRFIELDS. " Fields on selection screens
*"Selection screen elements............................................
SELECT-OPTIONS:
S_EBELN FOR EKKO-EBELN, " Purchasing Document Number
S_LIFNR FOR EKKO-LIFNR, " Vendor's account number
S_EKGRP FOR EKKO-EKGRP, " Purchasing group
S_BEDAT FOR EKKO-BEDAT, " Purchasing Document Date
S_UDATE FOR CDHDR-UDATE. " Creation date of the change
" document
*" Data declarations...................................................
Field String to hold Purchase Document Number *
DATA:
BEGIN OF FS_EBELN,
EBELN(90) TYPE C, " Purchase Document Number
ERNAM TYPE EKKO-ERNAM, " Name of Person who Created
" the Object
LIFNR TYPE EKKO-LIFNR, " Vendor's account number
EKGRP TYPE EKKO-EKGRP, " Purchasing group
BEDAT TYPE EKKO-BEDAT, " Purchasing Document Date
END OF FS_EBELN,
Field String to hold Purchase Document Header *
BEGIN OF FS_EKKO,
EBELN TYPE EKKO-EBELN, " Purchasing Document Number
ERNAM TYPE EKKO-ERNAM, " Name of Person who Created the
" Object
LIFNR TYPE EKKO-LIFNR, " Vendor's account number
EKGRP TYPE EKKO-EKGRP, " Purchasing group
BEDAT TYPE EKKO-BEDAT, " Purchasing Document Date
END OF FS_EKKO,
Field String to hold Account Number and name of the Vendor *
BEGIN OF FS_LFA1,
LIFNR TYPE LFA1-LIFNR, " Account Number of Vendor
NAME1 TYPE LFA1-NAME1, " Name1
END OF FS_LFA1,
Field String to hold Change date and the name of the user *
BEGIN OF FS_CDHDR,
OBJECTCLAS TYPE CDHDR-OBJECTCLAS, " Object Class
OBJECTID TYPE CDHDR-OBJECTID, " Object value
CHANGENR TYPE CDHDR-CHANGENR, " Document change number
USERNAME TYPE CDHDR-USERNAME, " User name
UDATE TYPE CDHDR-UDATE, " Creation date of the change
" document
END OF FS_CDHDR,
Field String to hold Change document items *
BEGIN OF FS_CDPOS,
OBJECTCLAS TYPE CDPOS-OBJECTCLAS," Object class
OBJECTID(10) TYPE C, " Object Value
CHANGENR TYPE CDPOS-CHANGENR, " Document change number
TABNAME TYPE CDPOS-TABNAME, " Table Name
FNAME TYPE CDPOS-FNAME, " Field Name
VALUE_NEW TYPE CDPOS-VALUE_NEW, " New contents of changed field
VALUE_OLD TYPE CDPOS-VALUE_OLD, " Old contents of changed field
END OF FS_CDPOS,
Field String to hold Date Element Name *
BEGIN OF FS_DATAELE,
TABNAME TYPE DD03L-TABNAME, " Table Name
FIELDNAME TYPE DD03L-FIELDNAME, " Field Name
ROLLNAME TYPE DD03L-ROLLNAME, " Data element (semantic domain)
END OF FS_DATAELE,
Field String to hold Short Text of the Date Element *
BEGIN OF FS_TEXT,
ROLLNAME TYPE DD04T-ROLLNAME, " Data element (semantic domain)
DDTEXT TYPE DD04T-DDTEXT, " Short Text Describing R/3
" Repository Objects
END OF FS_TEXT,
Field String to hold data to be displayed on the ALV grid *
BEGIN OF FS_OUTTAB,
EBELN TYPE EKKO-EBELN, " Purchasing Document Number
ERNAM TYPE EKKO-ERNAM, " Name of Person who Created the
" Object
LIFNR TYPE EKKO-LIFNR, " Vendor's account number
EKGRP TYPE EKKO-EKGRP, " Purchasing group
BEDAT TYPE EKKO-BEDAT, " Purchasing Document Date
WERKS TYPE LFA1-WERKS, " Plant
NAME1 TYPE LFA1-NAME1, " Name1
USERNAME TYPE CDHDR-USERNAME, " User name
UDATE TYPE CDHDR-UDATE, " Creation date of the change
" document
DDTEXT TYPE DD04T-DDTEXT, " Short Text Describing R/3
" Repository Objects
VALUE_NEW TYPE CDPOS-VALUE_NEW, " New contents of changed field
VALUE_OLD TYPE CDPOS-VALUE_OLD, " Old contents of changed field
END OF FS_OUTTAB,
Internal table to hold Purchase Document Number *
T_EBELN LIKE STANDARD TABLE
OF FS_EBELN,
Internal table to hold Purchase Document Header *
T_EKKO LIKE STANDARD TABLE
OF FS_EKKO,
Temp Internal table to hold Purchase Document Header *
T_EKKO_TEMP LIKE STANDARD TABLE
OF FS_EKKO,
Internal table to hold Account number and Name of the Vendor *
T_LFA1 LIKE STANDARD TABLE
OF FS_LFA1,
Internal Table to hold Change date and the name of the user *
T_CDHDR LIKE STANDARD TABLE
OF FS_CDHDR,
Internal Table to hold Change document items *
T_CDPOS LIKE STANDARD TABLE
OF FS_CDPOS,
Temp. Internal Table to hold Change document items *
T_CDPOS_TEMP LIKE STANDARD TABLE
OF FS_CDPOS,
Internal Table to hold Data Element Name *
T_DATAELE LIKE STANDARD TABLE
OF FS_DATAELE,
Temp. Internal Table to hold Data Element Name *
T_DATAELE_TEMP LIKE STANDARD TABLE
OF FS_DATAELE,
Internal Table to hold Short Text of the Date Element *
T_TEXT LIKE STANDARD TABLE
OF FS_TEXT,
Internal Table to hold data to be displayed on the ALV grid *
T_OUTTAB LIKE STANDARD TABLE
OF FS_OUTTAB.
C L A S S D E F I N I T I O N *
CLASS LCL_EVENT_HANDLER DEFINITION DEFERRED.
*" Data declarations...................................................
Work variables *
DATA:
W_EBELN TYPE EKKO-EBELN, " Purchasing Document Number
W_LIFNR TYPE EKKO-LIFNR, " Vendor's account number
W_EKGRP TYPE EKKO-EKGRP, " Purchasing group
W_VALUE TYPE EKKO-EBELN, " Reflected Value
W_SPACE VALUE ' ', " Space
W_FLAG TYPE I, " Flag Variable
W_VARIANT TYPE DISVARIANT, " Variant
*--- ALV Grid
W_GRID TYPE REF TO CL_GUI_ALV_GRID,
*--- Event Handler
W_EVENT_CLICK TYPE REF TO LCL_EVENT_HANDLER,
*--- Field catalog table
T_FIELDCAT TYPE LVC_T_FCAT.
AT SELECTION-SCREEN EVENT *
AT SELECTION-SCREEN ON S_EBELN.
Subroutine to validate Purchase Document Number.
PERFORM VALIDATE_PD_NUM.
AT SELECTION-SCREEN ON S_LIFNR.
Subroutine to validate Vendor Number.
PERFORM VALIDATE_VEN_NUM.
AT SELECTION-SCREEN ON S_EKGRP.
Subroutine to validate Purchase Group.
PERFORM VALIDATE_PUR_GRP.
START-OF-SELECTION EVENT *
START-OF-SELECTION.
Subroutine to select all Purchase orders.
PERFORM SELECT_PO.
CHECK W_FLAG EQ 0.
Subroutine to select Object values.
PERFORM SELECT_OBJ_ID.
CHECK W_FLAG EQ 0.
Subroutine to select Changed values.
PERFORM SELECT_CHANGED_VALUE.
CHECK W_FLAG EQ 0.
Subroutine to Select Purchase Orders.
PERFORM SELECT_PUR_DOC.
Subroutine to select Vendor Details.
PERFORM SELECT_VENDOR.
Subroutine to select Text for the Changed values.
PERFORM DESCRIPTION.
END-OF-SELECTION EVENT *
END-OF-SELECTION.
IF NOT T_EKKO IS INITIAL.
Subroutine to populate the Output Table.
PERFORM FILL_OUTTAB.
Subroutine to build Field Catalog.
PERFORM PREPARE_FIELD_CATALOG CHANGING T_FIELDCAT.
CALL SCREEN 100.
ENDIF. " IF NOT T_EKKO...
CLASS LCL_EVENT_HANDLER DEFINITION
Defining Class which handles events
CLASS LCL_EVENT_HANDLER DEFINITION .
PUBLIC SECTION .
METHODS:
HANDLE_HOTSPOT_CLICK
FOR EVENT HOTSPOT_CLICK OF CL_GUI_ALV_GRID
IMPORTING E_ROW_ID E_COLUMN_ID.
ENDCLASS. " LCL_EVENT_HANDLER DEFINITION
CLASS LCL_EVENT_HANDLER IMPLEMENTATION
Implementing the Class which can handle events
CLASS LCL_EVENT_HANDLER IMPLEMENTATION .
*---Handle Double Click
METHOD HANDLE_HOTSPOT_CLICK .
Subroutine to get the HotSpot Cell information.
PERFORM GET_CELL_INFO.
SET PARAMETER ID 'BES' FIELD W_VALUE.
CALL TRANSACTION 'ME23N'.
ENDMETHOD. " HANDLE_HOTSPOT_CLICK
ENDCLASS. " LCL_EVENT_HANDLER
*& Module STATUS_0100 OUTPUT
PBO Event
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'OOPS'.
SET TITLEBAR 'TIT'.
Subroutine to fill the Variant Structure
PERFORM FILL_VARIANT.
IF W_GRID IS INITIAL.
CREATE OBJECT W_GRID
EXPORTING
I_SHELLSTYLE = 0
I_LIFETIME =
I_PARENT = CL_GUI_CONTAINER=>SCREEN0
I_APPL_EVENTS =
I_PARENTDBG =
I_APPLOGPARENT =
I_GRAPHICSPARENT =
I_NAME =
I_FCAT_COMPLETE = SPACE
EXCEPTIONS
ERROR_CNTL_CREATE = 1
ERROR_CNTL_INIT = 2
ERROR_CNTL_LINK = 3
ERROR_DP_CREATE = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. " IF SY-SUBRC <> 0
CALL METHOD W_GRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_BUFFER_ACTIVE =
I_BYPASSING_BUFFER =
I_CONSISTENCY_CHECK =
I_STRUCTURE_NAME =
IS_VARIANT = W_VARIANT
I_SAVE = 'A'
I_DEFAULT = 'X'
IS_LAYOUT =
IS_PRINT =
IT_SPECIAL_GROUPS =
IT_TOOLBAR_EXCLUDING =
IT_HYPERLINK =
IT_ALV_GRAPHICS =
IT_EXCEPT_QINFO =
IR_SALV_ADAPTER =
CHANGING
IT_OUTTAB = T_OUTTAB
IT_FIELDCATALOG = T_FIELDCAT
IT_SORT =
IT_FILTER =
EXCEPTIONS
INVALID_PARAMETER_COMBINATION = 1
PROGRAM_ERROR = 2
TOO_MANY_LINES = 3
OTHERS = 4
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. " IF SY-SUBRC <> 0.
ENDIF. " IF W_GRID IS INITIAL
CREATE OBJECT W_EVENT_CLICK.
SET HANDLER W_EVENT_CLICK->HANDLE_HOTSPOT_CLICK FOR W_GRID.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
PAI Event
MODULE USER_COMMAND_0100 INPUT.
CASE SY-UCOMM.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'CANCEL'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form PREPARE_FIELD_CATALOG
Subroutine to build the Field catalog
<--P_T_FIELDCAT Field Catalog Table
FORM PREPARE_FIELD_CATALOG CHANGING PT_FIELDCAT TYPE LVC_T_FCAT .
DATA LS_FCAT TYPE LVC_S_FCAT.
Purchasing group...
LS_FCAT-FIELDNAME = 'EKGRP'.
LS_FCAT-REF_TABLE = 'EKKO'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Purchasing Document Number...
LS_FCAT-FIELDNAME = 'EBELN'.
LS_FCAT-REF_TABLE = 'EKKO' .
LS_FCAT-EMPHASIZE = 'C411'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
LS_FCAT-HOTSPOT = 'X'.
APPEND LS_FCAT TO PT_FIELDCAT .
CLEAR LS_FCAT .
Name of Person who Created the Object...
LS_FCAT-FIELDNAME = 'ERNAM'.
LS_FCAT-REF_TABLE = 'EKKO'.
LS_FCAT-OUTPUTLEN = '15' .
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Purchasing Document Date...
LS_FCAT-FIELDNAME = 'BEDAT'.
LS_FCAT-REF_TABLE = 'EKKO'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Vendor's account number...
LS_FCAT-FIELDNAME = 'LIFNR'.
LS_FCAT-REF_TABLE = 'EKKO'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Account Number of Vendor or Creditor...
LS_FCAT-FIELDNAME = 'NAME1'.
LS_FCAT-REF_TABLE = 'LFA1'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
LS_FCAT-COLTEXT = 'Vendor Name'(001).
LS_FCAT-SELTEXT = 'Vendor Name'(001).
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Creation date of the change document...
LS_FCAT-FIELDNAME = 'UDATE'.
LS_FCAT-REF_TABLE = 'CDHDR'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
LS_FCAT-COLTEXT = 'Change Date'(002).
LS_FCAT-SELTEXT = 'Change Date'(002).
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
User name of the person responsible in change document...
LS_FCAT-FIELDNAME = 'USERNAME'.
LS_FCAT-REF_TABLE = 'CDHDR'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
LS_FCAT-COLTEXT = 'Modified by'(003).
LS_FCAT-SELTEXT = 'Modified by'(003).
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Short Text Describing R/3 Repository Objects...
LS_FCAT-FIELDNAME = 'DDTEXT'.
LS_FCAT-REF_TABLE = 'DD04T'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '15'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Old contents of changed field...
LS_FCAT-FIELDNAME = 'VALUE_OLD'.
LS_FCAT-REF_TABLE = 'CDPOS'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '12'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
New contents of changed field...
LS_FCAT-FIELDNAME = 'VALUE_NEW'.
LS_FCAT-REF_TABLE = 'CDPOS'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '12'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
ENDFORM. " PREPARE_FIELD_CATALOG
*& Form SELECT_PO
Subroutine to select all the Purchase Orders
There are no interface parameters to be passed to this subroutine.
FORM SELECT_PO .
SELECT EBELN " Purchasing Document Number
ERNAM " Name of Person who Created
" the Object
LIFNR " Vendor's account number
EKGRP " Purchasing group
BEDAT " Purchasing Document Date
FROM EKKO
PACKAGE SIZE 10000
APPENDING TABLE T_EBELN
WHERE EBELN IN S_EBELN
AND BEDAT IN S_BEDAT.
ENDSELECT.
IF SY-SUBRC NE 0.
W_FLAG = 1.
MESSAGE S401(M8).
ENDIF. " IF SY-SUBRC NE 0
ENDFORM. " SELECT_PO
*& Form SELECT_OBJ_ID
Subroutine to select Object ID
There are no interface parameters to be passed to this subroutine.
FORM SELECT_OBJ_ID .
IF NOT T_EBELN IS INITIAL.
SELECT OBJECTCLAS " Object Class
OBJECTID " Object value
CHANGENR " Document change number
USERNAME " User name
UDATE " Creation date
FROM CDHDR
INTO TABLE T_CDHDR
FOR ALL ENTRIES IN T_EBELN
WHERE OBJECTID EQ T_EBELN-EBELN
AND UDATE IN S_UDATE
AND TCODE IN ('ME21N','ME22N','ME23N').
ENDSELECT.
IF SY-SUBRC NE 0.
W_FLAG = 1.
MESSAGE S833(M8) WITH 'Header Not Found'(031).
ENDIF. " IF SY-SUBRC NE 0.
ENDIF. " IF NOT T_EBELN IS INITIAL
ENDFORM. " SELECT_OBJ_ID
*& Form SELECT_CHANGED_VALUE
Subroutine to select Changed Values
There are no interface parameters to be passed to this subroutine.
FORM SELECT_CHANGED_VALUE .
IF NOT T_CDHDR IS INITIAL.
SELECT OBJECTCLAS " Object class
OBJECTID " Object value
CHANGENR " Document change number
TABNAME " Table Name
FNAME " Field Name
VALUE_NEW " New contents of changed field
VALUE_OLD " Old contents of changed field
FROM CDPOS
PACKAGE SIZE 10000
APPENDING TABLE T_CDPOS
FOR ALL ENTRIES IN T_CDHDR
WHERE OBJECTCLAS EQ T_CDHDR-OBJECTCLAS
AND OBJECTID EQ T_CDHDR-OBJECTID
AND CHANGENR EQ T_CDHDR-CHANGENR.
ENDSELECT.
IF SY-SUBRC NE 0.
W_FLAG = 1.
MESSAGE S833(M8) WITH 'Item Not Found'(032).
ENDIF. " IF SY-SUBRC NE 0.
ENDIF. " IF NOT T_CDHDR IS INITIAL
T_CDPOS_TEMP[] = T_CDPOS[].
ENDFORM. " SELECT_CHANGED_VALUE
*& Form SELECT_PUR_DOC
Subroutine to select Purchase Order Details
There are no interface parameters to be passed to this subroutine.
FORM SELECT_PUR_DOC .
IF NOT T_CDPOS IS INITIAL.
SORT T_EBELN BY EBELN.
LOOP AT T_CDPOS INTO FS_CDPOS.
READ TABLE T_EBELN INTO FS_EBELN WITH KEY EBELN =
FS_CDPOS-OBJECTID BINARY SEARCH.
IF SY-SUBRC NE 0.
DELETE TABLE T_EBELN FROM FS_EBELN.
ENDIF. " IF SY-SUBRC NE 0.
ENDLOOP. " LOOP AT T_CDPOS...
LOOP AT T_EBELN INTO FS_EBELN.
MOVE FS_EBELN-EBELN TO FS_EKKO-EBELN.
MOVE FS_EBELN-ERNAM TO FS_EKKO-ERNAM.
MOVE FS_EBELN-LIFNR TO FS_EKKO-LIFNR.
MOVE FS_EBELN-EKGRP TO FS_EKKO-EKGRP.
MOVE FS_EBELN-BEDAT TO FS_EKKO-BEDAT.
APPEND FS_EKKO TO T_EKKO.
ENDLOOP. " LOOP AT T_EBELN...
T_EKKO_TEMP[] = T_EKKO[].
ENDIF. " IF NOT T_CDPOS IS INITIAL
ENDFORM. " SELECT_PUR_DOC
*& Form SELECT_VENDOR
Subroutine to select Vendor details
There are no interface parameters to be passed to this subroutine.
FORM SELECT_VENDOR .
IF NOT T_EKKO IS INITIAL.
SORT T_EKKO_TEMP BY LIFNR.
DELETE ADJACENT DUPLICATES FROM T_EKKO_TEMP COMPARING LIFNR.
SELECT LIFNR " Account Number of Vendor or
" Creditor
NAME1 " Name 1
FROM LFA1
INTO TABLE T_LFA1
FOR ALL ENTRIES IN T_EKKO_TEMP
WHERE LIFNR EQ T_EKKO_TEMP-LIFNR.
IF SY-SUBRC NE 0.
MESSAGE S002(M8) WITH 'Master Details'(033).
ENDIF. " IF SY-SUBRC NE 0.
ENDIF. " IF NOT T_EKKO IS INITIAL
ENDFORM. " SELECT_VENDOR
*& Form DESCRIPTION
Subroutine to get the description
There are no interface parameters to be passed to this subroutine.
FORM DESCRIPTION .
IF NOT T_CDPOS IS INITIAL.
SORT T_CDPOS_TEMP BY TABNAME FNAME.
DELETE ADJACENT DUPLICATES FROM T_CDPOS_TEMP COMPARING TABNAME FNAME
SELECT TABNAME " Table Name
FIELDNAME " Field Name
ROLLNAME " Data element
FROM DD03L
INTO TABLE T_DATAELE
FOR ALL ENTRIES IN T_CDPOS_TEMP
WHERE TABNAME EQ T_CDPOS_TEMP-TABNAME
AND FIELDNAME EQ T_CDPOS_TEMP-FNAME.
IF NOT T_DATAELE IS INITIAL.
T_DATAELE_TEMP[] = T_DATAELE[].
SORT T_DATAELE_TEMP BY ROLLNAME.
DELETE ADJACENT DUPLICATES FROM T_DATAELE_TEMP COMPARING ROLLNAME.
SELECT ROLLNAME " Data element
DDTEXT " Short Text Describing R/3
" Repository Objects
FROM DD04T
INTO TABLE T_TEXT
FOR ALL ENTRIES IN T_DATAELE_TEMP
WHERE ROLLNAME EQ T_DATAELE_TEMP-ROLLNAME
AND DDLANGUAGE EQ SY-LANGU.
IF SY-SUBRC NE 0.
EXIT.
ENDIF. " IF SY-SUBRC NE 0.
ENDIF. " IF NOT T_DATAELE IS INITIAL.
ENDIF. " IF NOT T_CDPOS IS INITIAL.
ENDFORM. " DESCRIPTION
*& Form FILL_OUTTAB
Subroutine to populate the Outtab
There are no interface parameters to be passed to this subroutine.
FORM FILL_OUTTAB .
SORT T_CDHDR BY OBJECTCLAS OBJECTID CHANGENR.
SORT T_EKKO BY EBELN.
SORT T_LFA1 BY LIFNR.
SORT T_DATAELE BY TABNAME FIELDNAME.
SORT T_TEXT BY ROLLNAME.
LOOP AT T_CDPOS INTO FS_CDPOS.
READ TABLE T_CDHDR INTO FS_CDHDR WITH KEY
OBJECTCLAS = FS_CDPOS-OBJECTCLAS
OBJECTID = FS_CDPOS-OBJECTID
CHANGENR = FS_CDPOS-CHANGENR
BINARY SEARCH.
IF SY-SUBRC EQ 0.
MOVE FS_CDHDR-USERNAME TO FS_OUTTAB-USERNAME.
MOVE FS_CDHDR-UDATE TO FS_OUTTAB-UDATE.
READ TABLE T_EKKO INTO FS_EKKO WITH KEY
EBELN = FS_CDHDR-OBJECTID
BINARY SEARCH.
IF SY-SUBRC EQ 0.
MOVE FS_EKKO-EBELN TO FS_OUTTAB-EBELN.
MOVE FS_EKKO-ERNAM TO FS_OUTTAB-ERNAM.
MOVE FS_EKKO-LIFNR TO FS_OUTTAB-LIFNR.
MOVE FS_EKKO-EKGRP TO FS_OUTTAB-EKGRP.
MOVE FS_EKKO-BEDAT TO FS_OUTTAB-BEDAT.
READ TABLE T_LFA1 INTO FS_LFA1 WITH KEY
LIFNR = FS_EKKO-LIFNR
BINARY SEARCH.
IF SY-SUBRC EQ 0.
MOVE FS_LFA1-NAME1 TO FS_OUTTAB-NAME1.
ENDIF. " IF SY-SUBRC EQ 0.
ENDIF. " IF SY-SUBRC EQ 0.
ENDIF. " IF SY-SUBRC EQ 0.
MOVE FS_CDPOS-VALUE_NEW TO FS_OUTTAB-VALUE_NEW.
MOVE FS_CDPOS-VALUE_OLD TO FS_OUTTAB-VALUE_OLD.
READ TABLE T_DATAELE INTO FS_DATAELE WITH KEY
TABNAME = FS_CDPOS-TABNAME
FIELDNAME = FS_CDPOS-FNAME
BINARY SEARCH.
IF SY-SUBRC EQ 0.
READ TABLE T_TEXT INTO FS_TEXT WITH KEY
ROLLNAME = FS_DATAELE-ROLLNAME
BINARY SEARCH.
IF SY-SUBRC EQ 0.
MOVE FS_TEXT-DDTEXT TO FS_OUTTAB-DDTEXT.
ENDIF. " IF SY-SUBRC EQ 0.
ENDIF. " IF SY-SUBRC EQ 0.
APPEND FS_OUTTAB TO T_OUTTAB.
CLEAR FS_OUTTAB.
ENDLOOP.
ENDFORM. " FILL_OUTTAB
*& Form GET_CELL_INFO
Subroutine to get the Cell Information
--> W_VALUE Holds the value of Hotspot clicked
FORM GET_CELL_INFO .
CALL METHOD W_GRID->GET_CURRENT_CELL
IMPORTING
E_ROW =
E_VALUE = W_VALUE
E_COL =
ES_ROW_ID =
ES_COL_ID =
ES_ROW_NO =
ENDFORM. " GET_CELL_INFO
*& Form VALIDATE_PD_NUM
Subroutine to validate Purchase Document Number
There are no interface parameters to be passed to this subroutine.
FORM VALIDATE_PD_NUM .
IF NOT S_EBELN[] IS INITIAL.
SELECT EBELN " Purchase Document Number
FROM EKKO
INTO W_EBELN
UP TO 1 ROWS
WHERE EBELN IN S_EBELN.
ENDSELECT.
IF SY-SUBRC NE 0.
CLEAR SSCRFIELDS-UCOMM.
MESSAGE E717(M8).
ENDIF. " IF SY-SUBRC NE 0
ENDIF. " IF NOT S_EBELN[]...
ENDFORM. " VALIDATE_PD_NUM
*& Form VALIDATE_VEN_NUM
Subroutine to validate Vendor Number
There are no interface parameters to be passed to this subroutine.
FORM VALIDATE_VEN_NUM .
IF NOT S_LIFNR[] IS INITIAL.
SELECT LIFNR " Vendor Number
FROM LFA1
INTO W_LIFNR
UP TO 1 ROWS
WHERE LIFNR IN S_LIFNR.
ENDSELECT.
IF SY-SUBRC NE 0.
CLEAR SSCRFIELDS-UCOMM.
MESSAGE E002(M8) WITH W_SPACE.
ENDIF. " IF SY-SUBRC NE 0
ENDIF. " IF NOT S_LIFNR[]...
ENDFORM. " VALIDATE_VEN_NUM
*& Form VALIDATE_PUR_GRP
Subroutine to validate the Purchase Group
There are no interface parameters to be passed to this subroutine.
FORM VALIDATE_PUR_GRP .
IF NOT S_EKGRP[] IS INITIAL.
SELECT EKGRP " Purchase Group
FROM T024
INTO W_EKGRP
UP TO 1 ROWS
WHERE EKGRP IN S_EKGRP.
ENDSELECT.
IF SY-SUBRC NE 0.
CLEAR SSCRFIELDS-UCOMM.
MESSAGE E622(M8) WITH W_SPACE.
ENDIF. " IF SY-SUBRC NE 0
ENDIF. " IF NOT S_EKFRP[]...
ENDFORM. " VALIDATE_PUR_GRP
*& Form FILL_VARIANT
Subroutine to fill the Variant Structure
There are no interface parameters to be passed to this subroutine
FORM FILL_VARIANT .
Filling the Variant structure
W_VARIANT-REPORT = SY-REPID.
W_VARIANT-USERNAME = SY-UNAME.
ENDFORM. " FILL_VARIANT
Regards,
Pavan. -
U0095 Vendor performance report this report gives performance of supplier to se
Vendor performance report this report gives performance of supplier to send an order to customer
Kiran,
The functionality you are asking sounds like standard functionality. Doesn't make sense to custom develop the same.
Make sure you search and confirm that standard reports are NOT available for the same.
Regards,
Ravi
Note : please mark the helpful answers -
Performance report in ops center.
It is possible to create performance reports in ops center like PRM module in SunMC is doing for CPU Usage, Disk, Memory, Network.. etc.. ?
Thanks
AntonioHi Antonio,
You can also look at the Halcyon Neuron Performance Manager (http://www.halcyoninc.com/products/PerformanceManager/index.php). It hooks into Ops Center and/or SunMC to automate a lot of the reports (on top of what Ops Center provides out-of-the-box).
Note: I work for Halcyon, but part of my day job is also deploying and configuring Ops Center, so I hope this post is considered relevant.
Regards,
[email protected] -
Setting IT performance report in Solman
Hi,
We are trying to set up IT performance reporting in Solution Manager. BI client is same as production client. The Info objects are not getting activated. The job fails with the message to use a different BI client.
SOLMAN SM37 Job log:
Message text
Message class
Message no.
Message type
Job started
00
516
S
Step 001 started (program CCMSBI_SETUP_BATCH, variant , user ID KZHX33)
00
550
S
Incorrect client 025
00
001
S
use BI client 001.
00
001
S
Prerequisites check failed
00
001
A
Job cancelled
00
518
A
If any one faced this issue and resolved, kindly throw some light on it.
Thank you.
Regards,
ManjuHi Manju,
The issue is due to inactive object in the infocube .
Please check the note: 1110013 - ST: Manual activation of BI Content for E2E Diagnostics SP13 attachment . it will help to activate the inactive object.
or
Go to basis configuration -> step 5. configure automatically ->re-excute the Activate BW Source System. so it will reactive the infocube.
Also check the below discussion,
CCMS_BI_SETUP IT Performance Reporting Activation
Error :
20140620 050208[ERROR ]: Activation of InfoCube 0CCMDAY1 failed
20140620 050208[HELP ]: Attempt to activate object CUBE:0CCMDAY1 manually in transaction RSOR. If this is successful, execute setup again.
20140620 050208[ERROR ]: Activation of InfoCube 0CCMDAY2 failed
20140620 050208[HELP ]: Attempt to activate object CUBE:0CCMDAY2 manually in transaction RSOR. If this is successful, execute setup again.
20140620 050208[ERROR ]: Activation of InfoCube 0CCMMIN1 failed
20140620 050208[HELP ]: Attempt to activate object CUBE:0CCMMIN1 manually in transaction RSOR. If this is successful, execute setup again.
20140620 050208[ERROR ]: Activation of InfoCube 0CCMMIN2 failed
20140620 050208[HELP ]: Attempt to activate object CUBE:0CCMMIN2 manually in transaction RSOR. If this is successful, execute setup again.
20140620 050208[ERROR ]: Activation of InfoCube 0CCMMNTH1 failed
20140620 050208[HELP ]: Attempt to activate object CUBE:0CCMMNTH1 manually in transaction RSOR. If this is successful, execute setup again.
20140620 050208[ERROR ]: Activation of InfoCube 0CCMMNTH2 failed
20140620 050208[HELP ]: Attempt to activate object CUBE:0CCMMNTH2 manually in transaction RSOR. If this is successful, execute setup again.
20140620 050208[ERROR ]: Activation of InfoCube 0CCMQTR1 failed
20140620 050208[HELP ]: Attempt to activate object CUBE:0CCMQTR1 manually in transaction RSOR. If this is successful, execute setup again.
20140620 050208[ERROR ]: Activation of InfoCube 0CCMQTR2 failed
20140620 050208[HELP ]: Attempt to activate object CUBE:0CCMQTR2 manually in transaction RSOR. If this is successful, execute setup again.
20140620 050208[ERROR ]: Activation of InfoCube 0CCMVRKF failed
20140620 050208[HELP ]: Attempt to activate object CUBE:0CCMVRKF manually in transaction RSOR. If this is successful, execute setup again.
20140620 050208[ERROR ]: Activation of InfoCube 0CCMWEEK1 failed
20140620 050208[HELP ]: Attempt to activate object CUBE:0CCMWEEK1 manually in transaction RSOR. If this is successful, execute setup again.
20140620 050208[ERROR ]: Activation of InfoCube 0CCMWEEK2 failed
20140620 050208[HELP ]: Attempt to activate object CUBE:0CCMWEEK2 manually in transaction RSOR. If this is successful, execute setup again.
20140620 050208[ERROR ]: Activation of InfoCube 0SMD_PE2H failed
20140620 050208[HELP ]: Attempt to activate object CUBE:0SMD_PE2H manually in transaction RSOR. If this is successful, execute setup again.
20140620 050208[ERROR ]: Activation of InfoSet 0CCMIAGGR failed
20140620 050208[HELP ]: Attempt to activate object ISET:0CCMIAGGR manually in transaction RSOR. If this is successful, execute setup again.
20140620 050208[ERROR ]: Activation of InfoSet 0CCMIAVDT failed
20140620 050208[HELP ]: Attempt to activate object ISET:0CCMIAVDT manually in transaction RSOR. If this is successful, execute setup again.
20140620 050208[ERROR ]: Activation of InfoSet 0CCMICURR failed
20140620 050208[HELP ]: Attempt to activate object ISET:0CCMICURR manually in transaction RSOR. If this is successful, execute setup again.
20140620 050208[ERROR ]: Activation of MultiCube 0CCMPDATA failed
20140620 050208[HELP ]: Attempt to activate object MPRO:0CCMPDATA manually in transaction RSOR. If this is successful, execute setup again.
20140620 050208[ERROR ]: Activation of MultiCube 0CCMSDSR failed
20140620 050208[HELP ]: Attempt to activate object MPRO:0CCMSDSR manually in transaction RSOR. If this is successful, execute setup again.
20140620 050208[ERROR ]: Activation of MultiCube 0CCMSMTPH failed
20140620 050208[HELP ]: Attempt to activate object MPRO:0CCMSMTPH manually in transaction RSOR. If this is successful, execute setup again.
20140620 050208[ERROR ]: Activation of MultiCube 0SMD_MPEH failed
20140620 050208[HELP ]: Attempt to activate object MPRO:0SMD_MPEH manually in transaction RSOR. If this is successful, execute setup again.
20140620 050208[ERROR ]: Activation of DSO 0CCMAGGR failed
20140620 050208[HELP ]: Attempt to activate object ODSO:0CCMAGGR manually in transaction RSOR. If this is successful, execute setup again.
20140620 050208[ERROR ]: Activation of DSO 0CCMAVDT failed
20140620 050208[HELP ]: Attempt to activate object ODSO:0CCMAVDT manually in transaction RSOR. If this is successful, execute setup again.
20140620 050208[ERROR ]: Activation of DSO 0CCMBUFF failed
20140620 050208[HELP ]: Attempt to activate object ODSO:0CCMBUFF manually in transaction RSOR. If this is successful, execute setup again.
20140620 050208[ERROR ]: Activation of DSO 0CCMCURR failed
20140620 050208[HELP ]: Attempt to activate object ODSO:0CCMCURR manually in transaction RSOR. If this is successful, execute setup again.
20140620 050208[ERROR ]: Activation of DSO 0CCMSDCFG failed
20140620 050208[HELP ]: Attempt to activate object ODSO:0CCMSDCFG manually in transaction RSOR. If this is successful, execute setup again.
20140620 050208[ERROR ]: Activation of DSO 0CCMSYINF failed
20140620 050208[HELP ]: Attempt to activate object ODSO:0CCMSYINF manually in transaction RSOR. If this is successful, execute setup again.
20140620 050208[ERROR ]: Activation of DSO 0CCMTHRS failed
20140620 050208[HELP ]: Attempt to activate object ODSO:0CCMTHRS manually in transaction RSOR. If this is successful, execute setup again.
20140620 050208[ERROR ]: Activation of DSO 0CCM_SCFG failed
20140620 050208[HELP ]: Attempt to activate object ODSO:0CCM_SCFG manually in transaction RSOR. If this is successful, execute setup again."
Rg,
Karthik -
TFS performance report pack not working on TFS 2013
Hi
I have TFS 2013 setup and I found TFS performance report pack from http://blogs.msdn.com/b/granth/archive/2009/02/03/announcing-tfs-performance-report-pack.aspx URL.
These reports don't work after uploading to my report server. The blog talk about creating a shared data source TfsActivityReportDS
and using Data Source=localhost;Initial Catalog=TfsActivityLogging
as connection string.
I don't have any database by name TfsActivityReportDS in my TFS and as a result I am not able to run any report on my TFS 2013 server.
Is there any way to get these reports work for TFS 2013? Or is there other TFS performance report pack made for TFS 2013?
Regards, Premal AcharyaHi Charles,
Thanks a ton for your help. :)
It worked on TFS 2013. I followed your steps. I also found one easy way to edit the queries mentioned in those rdl files. I opened them in text editor and replaced TfsActivityLogging with my TFS project name (Tfs_DefaultCollection). Saved rdl file and opened
it in report builder and then my job was only to modify the data source.
I really appreciate your help for getting the reports worked on TFS 2013.
However I am only stuck with one little issue pertained to Server Status - Source Control Request Queue.rdl file
This report file doesn't have any queries and it also uses XML as connection to the data source. When I run this report on my TFS server I am getting error as URL "http://localhost:8080/versioncontrol/v1.0/administration.asmx" not found.
Detailed information about the report file is given below.
Report Name
Server Status - Source Control Request Queue
Connection type
XML
Connection string in data source
http://localhost:8080/versioncontrol/v1.0/administration.asmx
Query Under data set
<Query>
<Method Name="QueryServerRequests"
Namespace="http://schemas.microsoft.com/TeamFoundation/2005/06/VersionControl/Admin/03">
</Method>
<ElementPath IgnoreNamespaces="true">*</ElementPath>
</Query>
-------END---------
I don't know how to get it work. Your help and advice on this will be highly appreciated.
Thanks again for helping me to get other reports worked with TFS 2013.
Regards, Premal Acharya -
Snap ids to generate performance report
Hi,
I have a basic idea on statspack, and implementing this first time, looking for your help to generate statspack report.
scenario is this :-
we have to do a performance testing during bulk loading which happens daily at night for 1 hour.
i have sheduled a job to generate snaps on every interval of 15 min say :-
NAME SNAP_ID Date/Time
oracle 4 13.11.2006:08:45:00
oracle 1 13.11.2006:08:00:00
oracle 2 13.11.2006:08:15:00
oracle 3 13.11.2006:08:30:00
suppose at 08:00 there is no loading so i am considering this as a baseline snap ,
so, which snap ids i have to include to generate various performance report (like sp_1_2,sp_1_3,sp_14 etc) .
AsifSnap is a snap. A snapshot of database status at a given point in time. Statspack was designed to help DBA's diagnose the performance problems of a database during a particular interval of time by recording what all went on with the database.
If you are trying to analyze the database using only one snap, you will never get the correct picture.
Lets say in your case, you generate the report s_1 only which is before load. How will you diagnose the problem that happened after this snap?
Maybe you are looking for
-
DBIF_REPO_SQL_ERROR short dumps while activating data in ODS
Hi All, We are using BW3.5 with Oracle 9.2 on AIX 5.3 box, from the past few days we are getting DBIF_REPO_SQL_ERROR short dumps frequently while activating data in ODS. Runtime Error DBIF_REPO_SQL_ERROR Date and Time 08.01.2008 13:
-
How do I turn this off? I can't download anything until I put in the card's information. But the card doesn't work anymore, it ran out of money. It keeps saying that my last perchase was unseccessful or something. I just want this to stop so I can up
-
After 2.0 update, WiFi still connects, but won't load pages or any internet
So I had just used the IPod touch to hit some web pages, look at weather, stocks, youtube etc... an hour later.... installed the 2.0 update with the New York Times app, now I still connect to my access point, renewing IPs still work, It IS connected
-
I need to create an interactive workbook. The workbook should have areas that participants fill out and can later print as well as submit to a database for grading. Is this possible with InDesign or would another program work better? As an added feat
-
SDDM 4.1 - Physical Storage Properties Not Appearing in DDL
I have only had this problem while using 4.1, not 4.0. In Tools > Preferences > Data Modeler > DDL if have the "Include Storage in DDL" box checked, and I have a Storage Template assigned to my table in my physical model. However, when I preview my t