Home > Default > Dynamically fetch data from database and display it in the report

Dynamically fetch data from database and display it in the report

November 30Hits:0
Advertisement
Hi,
We have a requirement in developing a report which needs us to dynamically fetch data from the database and display it in the report.
We have a column called WORKER in the report.
For each worker there is a measure(PSA) associated with it.
In the report we have to display both the WORKER and the PSA column.
What we want is, when we display the list of the workers, the corresponding workerid_id of the worker will be passed and the value of his PSA will be fetched from the database and displayed in the report.
Or anything similar to this.
We also have drill applied on this WORKER column. So after any drill up or drill down also the value for PSA should change.
Is there any way of doing this?
Please help if possible.
Thanks,

Answers

hi,
data : count type i value 0.
data : Begin of itab occurs 0 ,
plan_version like hrhap-plan_version,
APPRAISAL_ID like hrhap-APPRAISAL_ID,
AP_START_DATE like hrhap-AP_START_DATE,
AP_END_DATE like hrhap-AP_END_DATE,
AP_STATUS like hrhap-AP_STATUS,
AP_STATUS_SUB like hrhap-AP_STATUS_SUB,
OBJ_DATE_SET like hrhap-OBJ_DATE_SET,
REVIEW_DATE_SET like hrhap-REVIEW_DATE_SET,
AP_DATE_SET like hrhap-AP_DATE_SET,
AP_DATE_EARLIEST like hrhap-AP_DATE_EARLIEST,
AP_DATE_LATEST like hrhap-AP_DATE_LATEST,
CHANGE_DATE like hrhap-CHANGE_DATE,
CHANGE_TIME like hrhap-CHANGE_TIME,
CHANGE_USER like hrhap-CHANGE_USER,
end of itab.
<b>select * from hrhap into corresponding fields of table itab.</b>
loop at itab.
write :/ itab-plan_version under 'plan_version',
itab-appraisal_id under 'Appraisal Id',
itab-AP_START_DATE under 'Start Date',
itab-AP_END_DATE under 'End date',
itab-AP_STATUS under 'Status',
itab-AP_STATUS_SUB under 'Substatus',
itab-OBJ_DATE_SET under 'Objective setting date',
itab-REVIEW_DATE_SET under 'Review date set',
itab-AP_DATE_SET under 'appraisal date',
itab-AP_DATE_EARLIEST under 'Earliest appraisal date',
itab-AP_DATE_LATEST under 'Latest Appraisal date',
itab-CHANGE_DATE under 'Change Date',
itab-CHANGE_TIME under 'change time',
itab-CHANGE_user under 'change user'.
count = count + 1.
endloop.
write : 'No of records' ,count.
rgds
anver
if hlped mark points.

Read other 7 answers

Tags:

Related Articles

  • Dynamically fetch data from database and display it in the reportNovember 30

    Hi, We have a requirement in developing a report which needs us to dynamically fetch data from the database and display it in the report. We have a column called WORKER in the report. For each worker there is a measure(PSA) associated with it. In the

  • How to fetch data from database in javafx 2.2 table which is editable.November 30

    Dears! I want to fetch data from database in javafx 2.2 tableformat with jdbc , which is also editable and i can add more records in this table also. Can anybody help meI can vaguely recall some sort of JavaFX database connectivity feature, I'm not s

  • Swing Applet in JSP: problem with fetching data from databaseNovember 30

    i am facing a problem while fetching data from database using Swing Applet plugged in a JSP page. // necessary import statements public class NewJApplet extends javax.swing.JApplet { private JLabel jlblNewTitle; private Vector vec; public static void

  • How to fetch latest data from database instead of clicking on Generate report in RSRT?November 30

    Hi all, We are not able to get latest data of BEx query.Everytime we have to click on Generate Report  button in RSRT for getting latest value. Is there any way to get latest value automatically? We are not doing any changes in query. When we click o

  • How can I get the date and time and display it on the report main page?November 30

    Gurus, How can I get the date and time and display it on the report main page? Thanks!Hello, You can create a Formula Colum returning a date : function CF_1Formula return Date is begin RETURN(SYSDATE); end; Put a Field in the Layout having this formu

  • Using a paramter to fetch data from databaseNovember 30

    Hello SAP, Is there a way to use a parameter that takes in the employee ID and have it fetch from the database the employee name.  Just to note, the tables that I am using in this report do not link to the employee table that contains the employee na

  • LabVIEW Memory full while fetching data from databaseOctober 11

    Hi, In my program I need to sync some data from client PC as per the selected time frame. But while fecthing the data from the clinet database, my application is hanging and when I run it with code I get the 'LabVIEW memory full' error message. Kindl

  • How to fetch data from Database using SUP MBOsNovember 30

    I'm learning to develop blackberry apps using SUP.I am new to both blackberry api and SUP. I need to make a login page for a Student and then validate the username and password entered using data from a database. I need to check the database for the

  • How to sort data from database and display in combobox in required orderNovember 30

    Hi evrybody, it makes me sick i need to get data form database and fill combobox in required order (last item added to database - last firstName) actualy i already did that, but i'm useing DefaultComboBoxModel and all records are sorted in alphabetic

  • Fetching data from database in case of mixed case in SE37November 30

    Hi, I have created a function module(in se37) where the input is Last name(PA0002-NACHN). My requirement is i have to fetch data from PA0002 based on last name. But the problem is if i give a name in mixed case(both upper and lower) sap converts the

Copyright (C) 2019 wisumpire.com, All Rights Reserved. webmaster#wisumpire.com 14 q. 0.653 s.