Query infotype and RT table
Hi experts!!
Is possible to do queries and get information from Infotypes and RT table in the same time.
We would like to do a query with information from infotypes an RT table, we don't want do a query for the data from infotypes and another one to get data from de rt table (PC00_M99_CWTR).
How is possible to do this kind os queries?
Kind regards,
Julian
To check on how to use cl_hr_pay_access class, I would first try google and then the where used list button while reviewing said class in se24 tcode - example of use: RPCGR1K0
DATA: pay_access TYPE REF TO cl_hr_pay_access. "access of payroll result
CREATE OBJECT pay_access.
CALL METHOD pay_access->read_cluster_dir
EXPORTING
pernr = pernr
IMPORTING
cluster_dir = rgdir[]
EXCEPTIONS
OTHERS = 4.
CALL METHOD pay_access->read_pa_result
EXPORTING
pernr = p_pernr
period = p_rgdir
molga = '07'
IMPORTING
payroll_result = pay_result
EXCEPTIONS
no_authorization = 1
read_error = 2
country_version_not_available = 3
OTHERS = 4.
CALL METHOD pay_access->read_pe_result
EXPORTING
pernr = p_pernr
period = p_rgdir
molga = '07'
IMPORTING
payroll_result = pay_result_person
EXCEPTIONS
no_authorization = 1
read_error = 2
country_version_not_available = 3
no_person_data = 4
OTHERS = 5.
result will be held in pay_result_person->inter deep structure
RT is inter-rt
BT is inter-bt
Or you can use function PYXX_READ_PAYROLL_RESULT - again - google or where used in se37 tcode. standard use in RPCDCI00
* FORM GET_PAYRESULT *
* read the internationl part of the payroll result from sequential *
* number I_SEQNR. *
form get_payresult using i_seqnr like pc261-seqnr
changing cs_payxx_result type pay99_international.
field-symbols: <payxx_result> type pay99_international.
call function 'PYXX_READ_PAYROLL_RESULT'
exporting
employeenumber = pernr-pernr
sequencenumber = i_seqnr
changing
payroll_result = <pay_result>
exceptions
illegal_isocode_or_clusterid = 1
error_generating_import = 2
import_mismatch_error = 3
subpool_dir_full = 4
no_read_authority = 5
no_record_found = 6
versions_do_not_match = 7
error_reading_archive = 8
error_reading_relid = 9
others = 10.
if sy-subrc <> 0.
case sy-subrc.
when 5.
perform error using c_er_payauth i_seqnr space
space space c_yes.
when others.
perform error using c_er_readpay i_seqnr sy-subrc
space space c_yes.
endcase.
endif.
assign component 'INTER' of structure <pay_result>
to <payxx_result>.
cs_payxx_result = <payxx_result>.
endform. " GET_PAYRESULT
Good luck.
Similar Messages
-
SAP QUERY LOOPS AND INTERNAL TABLE
Hi All, I have a query which i have made. It runs from Table EKPO which has PO details and what I want to do is now via ABAP Code pull through the total of goods receipt for the PO and Line Item into a field. Sounds Easy enough..Problem now,
The table which contains the GR data is EKBE which agains a PO and Line Item can have many 101 movements and 102 movements so what I want is an ABAP Statent to basically sum up the total of 101 for the PO & LINE ITEMS and then minus this from the total of 102 for the PO & LINE ITEMS and post the result in to this new field I have created.
I am pretty decent with ABAP Code in Querys I.e Select statements etc but from what I can see i need to create an internal table and do a loop and collect statement but I keep on failing due to not enough knowledge. Please can some one help me with this and provide me with the code and explanation as i would like to understand,
POINTS WILL BE REWARDED
Thanks
Kind Regards
Adeel SarwarHi,
This is the full code i have entered but its not working. Any help would be appreciated. If you could rectify the code and internal tables that would be great.
Thanks
TABLES: EKBE.
DATA: PurO LIKE EKPO-EBELN,
POLI LIKE EKPO-EBELP.
*New Table and Vars defined
DATA: BEGIN OF IT_EKBE,
IT_EKBE LIKE EKBE,
END OF IT_EKBE.
DATA: BEGIN OF IT_SUM OCCURS 0,
EBELN TYPE EBELN,
EBELP TYPE EBELP,
DMBTR TYPE DMBTR,
MENGE TYPE MENGE,
END OF IT_SUM.
CLEAR: QTYD.
MOVE: EKPO-EBELN TO PurO,
EKPO-EBELP TO POLI.
SELECT * FROM EKBE INTO IT_EKBE
WHERE EBELN = PurO
AND EBELP = POLI
AND BEWTP = 'E'
LOOP AT IT_EKBE.
MOVE CORRESPOING IT_EKBE TO IT_SUM.
IF IT_EKBE-BWART = '102'.
IT_SUM-DMBTR = IT_SUM-DMBTR * -1.
IT_SUM-MENGE = IT_SUM-MENGE * -1.
ENIDF.
COLLECT IT_SUM.
CLEAR IT_SUM.
ENDLOOP.
ENDSELECT.
If sy-subrc = 0.
QTYD = IT_SUM.
ELSE.
QTYD = 0.
ENDIF. -
Could query form and result table display at seperate pages
we are new at html db, there are a few of questions we need to clear before we make decision to use HTML DB to develop our next version of application: (I seperate them at differenct topics).
* Could query form and query result table display at differenct pages?
Thanks
Leiyeah, this is surely possible...and quite easy. you'd just set your form page up as you'd like. put a button on that page with a branch to your report page. then have your report query refer to the items you defined on the form page. so if your form page had an item called P1_JOB and P1_DEPTNO you could have your report use those items with a query like...
select ename, job, sal, empno, deptno
from emp
where :P1_JOB = job
and :P1_DEPTNO = deptno
...hope this helps,
raj -
Difference between Infotype and Database table
Hi all,
in SAP ABAP-HR we have the concept of INFOTYPE. will anybpdy please tell me , in simple word, what exactly is it? and what are the difference of INFOTYPE with DATABASE TABLE.
Anirban Bhattacharjeehi,
infotypes contains group of logically related fields on a single screen (just like TABLE) and which is bounded by TIME CONSTRIANT (no time constrint for table).
main diffarence is TIME CONSTRAINT, means validity period of data records in infotypes based on time constrint only.
for more information on time constrint follow this link.........
http://help.sap.com/saphelp_erp2005/helpdata/en/48/35c9f24abf11d18a0f0000e816ae6e/content.htm
each infotype contains, its corresponding database table.
ex: 0002---> personal information.
its database table: pa0002.
the table pa0002 contains four strctures pakey, pshd1, ps0002 and ci_p0002.
pakey-->contains key fields information.
psdh1--->contains last logon detils (usename....)
ps0002--->contains infotype specific fields.
ci_p0002--> for furthur addinf an any extra fields
Edited by: Ashok Reddy on Jun 25, 2008 2:12 PM -
Transport of infotype and data table to other client
Hi all,
I have made a custom infotype - 9002 and a data base table zpa9002. I put some entries in this table. By mistake I saved both the infotype and table in local objects - $tmp. I have changed the package of database table and created the request for it.
I am not able to change the attributes of infotype(9002) i.e. am not able to change its package from $temp to something else. Can anyone please let me know how to change that and what else to do to transport the complete infotype to other client.
Anothet thing I want to ask is - if I transport the database table to the other client, all the contents or data will also be transported or I have to do it manually?
Thanks to all,
RibhuHi,
If you transport a table, by default, the data <b>will not be</b> transported. you will have to do it manually.
You can include the entry R3TR TABU <table name> in the piecelist.
Regards,
Anand Mandalika. -
Infoset query logical database and transparent table
Hi!
We have an infoset with the data source logical database=PNP.
We get some fields from the infotype 0768, P0768-PERNR, P0768-BEGDA, etc.
Now we need add another table to make a join within infotype 0768 and table T5F99SE.
For instance, in infotype 0768 I have one record with the fields PERNR and BEGDA and in the T5F99SE I have 3 records related to the unique record of infotype 0768, the fields of the table are PERNR, BEGDA, ACTDT and ADDAT .
The fields values in the example can be:
Infotype 0768: PERNR=00101800, BEGDA=20110401, DICOT=20, BACHE=1200
Table T5F99SE: record 1 PERNR=00101800, BEGDA=20110401, ACTDT=20110401, ADDAT=PB E
record 2 PERNR=00101800, BEGDA=20110101, ACTDT=20110405, ADDAT=PC E01
record 3 PERNR=00101800, BEGDA=20110401, ACTDT=20110409, ADDAT=PA E
The result we want get with infoset query is
PERNR BEGDA DICOT BACHE ADDAT
00101800 20110101 20 1200 PB E
00101800 20110101 20 1200 PC E01
00101800 20110101 20 1200 PA E
I would like to get the fields of the infotype and some fields of the table T5F99SE.
Is possible do this action with ABAP modifying an infoset that already exists adding the fields of the transparent table?
What should I do?
Kind regards,
Julian.My guess is that it would not be possible to include a transparent table into the LDBs PNP and PNPCE. Would need input from a technical expert there.
However, instead of using the LDB, why don't you explore just using a direct table join? You may need to join PA0000, PA0001, PA0002 along with PA0768 and your other tables. An infoset can then be created on this table join.
To go to the mode where you can create the table join, in your infoset transactions, choose 'Table join' instead of 'LDB'. -
Weird problem with mysql query and data table buttons !!!!
Hi,
I'm using jsc 2 update 1 on windows and mysql 4.1 . I have a page with a data table. One column of the data table contains "Details" buttons.
Source query for the table is :
SELECT tbl_tesserati.idtbl_tesserati idTesserato,
tbl_tesserati.num_tessera,
tbl_tesserati.nome,
tbl_societa.codice_meccanografico
FROM tbl_tesserati
INNER JOIN tbl_rel_tesserato_discipline_societa ON tbl_tesserati.idtbl_tesserati = tbl_rel_tesserato_discipline_societa.id_tesserato
INNER JOIN tbl_cariche ON tbl_rel_tesserato_discipline_societa.id_carica = tbl_cariche.idtbl_cariche
INNER JOIN tbl_qualifiche ON tbl_rel_tesserato_discipline_societa.id_qualifica = tbl_qualifiche.idtbl_qualifiche
INNER JOIN tbl_discipline ON tbl_rel_tesserato_discipline_societa.id_disciplina = tbl_discipline.idtbl_discipline
INNER JOIN tbl_societa ON tbl_rel_tesserato_discipline_societa.id_societa = tbl_societa.idtbl_societa
LEFT JOIN tbl_province ON tbl_societa.provincia_sede_sociale = tbl_province.idtbl_province
LEFT JOIN tbl_comuni ON tbl_societa.comune_sede_sociale = tbl_comuni.idtbl_comuni
LEFT JOIN tbl_rel_tesserato_discipline_praticate ON tbl_rel_tesserato_discipline_praticate.tessera_id=
tbl_rel_tesserato_discipline_societa.idtbl_rel_tesserato_discipline
LEFT JOIN tbl_discipline_praticate ON tbl_discipline_praticate.idtbl_disciplina_praticate=tbl_rel_tesserato_discipline_praticate.disciplina_praticata_id
WHERE
tbl_tesserati.cognome LIKE ?
AND tbl_tesserati.nome LIKE ?
AND tbl_rel_tesserato_discipline_societa.id_societa LIKE ?
AND tbl_tesserati.idtbl_tesserati LIKE ?
AND tbl_cariche.idtbl_cariche LIKE ?
AND tbl_qualifiche.idtbl_qualifiche LIKE ?
AND tbl_tesserati.data_nascita >= ?
AND tbl_tesserati.data_nascita<= ?
AND tbl_discipline.idtbl_discipline LIKE ?
AND codice_affiliazione LIKE ?
AND tbl_societa.denominazione LIKE ?
AND YEAR(tbl_rel_tesserato_discipline_societa.data_scadenza) LIKE ?
AND (tbl_province.nome LIKE ? OR tbl_province.nome IS NULL)
AND ( tbl_comuni.nome LIKE ? OR tbl_comuni.nome IS NULL)
The tbl_tesserati.data_nascita is a mysql date field.
The click event handler code for the "Details" Button is:
public String btnModificaTesserato_action() {
try{
TableRowDataProvider rowData= (TableRowDataProvider)getBean("currentRowTesserati");
getRequestBean1().setId_tesserato((Long)rowData.getValue("idTesserato"));
} catch(Exception ex) {
log("errore nella query",ex);
return "dettaglioTesseratoSocieta";
}When i run the project and open the page the table is correctly rendered and populated with some rows. But when i click on details button nothing happens, the page is simply reloaded.
If i set a breakpoint in the code line TableRowDataProvider rowData= (TableRowDataProvider)getBean("currentRowTesserati");the debbuger does not stop the code execution ! As if the button was never clicked!
I tried to modify the source query to :
SELECT tbl_tesserati.idtbl_tesserati idTesserato,
tbl_tesserati.num_tessera,
tbl_tesserati.nome,
tbl_societa.codice_meccanografico
FROM tbl_tesserati
INNER JOIN tbl_rel_tesserato_discipline_societa ON tbl_tesserati.idtbl_tesserati = tbl_rel_tesserato_discipline_societa.id_tesserato
INNER JOIN tbl_cariche ON tbl_rel_tesserato_discipline_societa.id_carica = tbl_cariche.idtbl_cariche
INNER JOIN tbl_qualifiche ON tbl_rel_tesserato_discipline_societa.id_qualifica = tbl_qualifiche.idtbl_qualifiche
INNER JOIN tbl_discipline ON tbl_rel_tesserato_discipline_societa.id_disciplina = tbl_discipline.idtbl_discipline
INNER JOIN tbl_societa ON tbl_rel_tesserato_discipline_societa.id_societa = tbl_societa.idtbl_societa
LEFT JOIN tbl_province ON tbl_societa.provincia_sede_sociale = tbl_province.idtbl_province
LEFT JOIN tbl_comuni ON tbl_societa.comune_sede_sociale = tbl_comuni.idtbl_comuni
LEFT JOIN tbl_rel_tesserato_discipline_praticate ON tbl_rel_tesserato_discipline_praticate.tessera_id=
tbl_rel_tesserato_discipline_societa.idtbl_rel_tesserato_discipline
LEFT JOIN tbl_discipline_praticate ON tbl_discipline_praticate.idtbl_disciplina_praticate=tbl_rel_tesserato_discipline_praticate.disciplina_praticata_id
WHERE
tbl_tesserati.cognome LIKE ?
AND tbl_tesserati.nome LIKE ?
AND tbl_rel_tesserato_discipline_societa.id_societa LIKE ?
AND tbl_tesserati.idtbl_tesserati LIKE ?
AND tbl_cariche.idtbl_cariche LIKE ?
AND tbl_qualifiche.idtbl_qualifiche LIKE ?
AND tbl_tesserati.data_nascita >= ?
OR tbl_tesserati.data_nascita<= ?
AND tbl_discipline.idtbl_discipline LIKE ?
AND codice_affiliazione LIKE ?
AND tbl_societa.denominazione LIKE ?
AND YEAR(tbl_rel_tesserato_discipline_societa.data_scadenza) LIKE ?
AND (tbl_province.nome LIKE ? OR tbl_province.nome IS NULL)
AND ( tbl_comuni.nome LIKE ? OR tbl_comuni.nome IS NULL)
Using this query everything works well !! The click handler works and the debugger too !!
I changed only the AND in OR !!!
I also tried to change mysql-x-x-connector driver but without solving my problem.
Can someone help me ?
Thanks
GiorgioYou'll find that it is more to do with the way MySql deals with dates than anything else! Depending on how your date field is setup, then try using a BETWEEN statement for those 2 lines in your first query e.g.
AND ( tbl_tesserati.data_nascita BETWEEN ? AND ?)
The date column needs to be in the ISO format to work. If you examine your second query output, you might discover that the output is only going to refer to one parameter (probably the OR one). Did you manage to view the output logs from the application server? You would have got an idea from there with a message like stating a conversion error'.
Alternatively, you could try using the to_days() function and convert it directly to a number which would be a lot easier to deal with. For example:
AND to_days(tbl_tesserati.data_nascita >= ? )
AND to_days( tbl_tesserati.data_nascita<= ? )
Or try the BETWEEN version with to_days() and see what you get.
More info about date formatting (v5) here:
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_to-days
Before I forget, sometimes you may need to treat dates as Strings rather 'Long' as you did.
As a matter of interest, did you try your query in a different piece of software?
If my queries are a little more complicated, I tend to try MySql queries out in the free MySql query browser and also double check in another to verify certain issues. I found it easier to develop SQL in a seperate program then import the final version to JSC making the required modifications for parameters.
Message was edited by:
aerostra -
Query based on main table and audit table
Hi,
I had created auditing on some table. Values might not change and if they changed, it should be stored in audit table.
I want to get the values in the table a on real time basis, like dimentions in datawarehouse.
Trying to write a query based on table a and aud_a to get point-in-time or values at anytime in the past.
Something like
SELECT *
FROM a (table_name)
WHERE effective_from >= $DATE_TO_QUERY
AND effective_to < $DATE_TO_QUERY
How to get this kind of query .
Please help. ( Table structure for table a and audit table aud_a and trigger aud_tg_a given below)
Giving code as follows.
main table a
create table a
( val1 number,
val2 number,
update_by varchar2(30),
date_updated date);
creare auidt table aud_a
create table aud_a
( "AUDIT_SEQ" NUMBER,
"AUDIT_TRAN_ID" NUMBER,
"AUDIT_PROG_ID" VARCHAR2(30 BYTE),
"AUDIT_TERMINAL" VARCHAR2(16 BYTE),
"AUDIT_REASON" VARCHAR2(30 BYTE),
"AUDIT_ACTION" CHAR(1 BYTE),
"AUDIT_ACTION_BY" VARCHAR2(20 BYTE),
"AUDIT_ACTION_DT" DATE,
val1 number,
val2 number,
updated_by varchar2(30),
date_updated date);
trigger on table a to populate aud_a
CREATE OR REPLACE TRIGGER aud_tg_a AFTER
INSERT OR
DELETE OR
update on a
for each row
declare
v_time_now DATE;
v_terminal VARCHAR2(16);
v_tran_id NUMBER;
v_prog_id VARCHAR2(30);
V_reason VARCHAR2(30);
BEGIN
v_time_now := sysdate;
v_terminal := userenv('TERMINAL');
v_tran_id := 1;
v_prog_id := 'test';
v_reason := 'AUDIT';
IF inserting THEN
INSERT
INTO a
audit_seq,
AUDIT_tran_id,
AUDIT_prog_id,
AUDIT_reason,
AUDIT_terminal,
AUDIT_action_by,
AUDIT_action_dt,
AUDIT_action ,
val1,
val2,
updated_by,
date_updated
VALUES
s_audit_no.nextval,
v_tran_id,
v_prog_id,
v_reason,
v_terminal,
USER,
v_time_now,
'I' ,
:new.val1,
:new.val2,
:new.updated_by,
:new.date_updated
elsif deleting THEN
INSERT
INTO a
audit_seq,
AUDIT_tran_id,
AUDIT_prog_id,
AUDIT_reason,
AUDIT_terminal,
AUDIT_action_by,
AUDIT_action_dt,
AUDIT_action ,
us_agy_backed_id,
industry_subgroup,
comments,
updated_by,
date_updated
VALUES
s_audit_no.nextval,
v_tran_id,
v_prog_id,
v_reason,
v_terminal,
USER,
v_time_now,
'D' ,
:old.val1,
:old.val2,
:old.comments,
:old.updated_by,
:old.date_updated
elsif updating THEN
INSERT
INTO a
audit_seq,
AUDIT_tran_id,
AUDIT_prog_id,
AUDIT_reason,
AUDIT_terminal,
AUDIT_action_by,
AUDIT_action_dt,
AUDIT_action ,
us_agy_backed_id,
industry_subgroup,
comments,
updated_by,
date_updated
VALUES
s_audit_no.nextval,
v_tran_id,
v_prog_id,
v_reason,
v_terminal,
USER,
v_time_now,
'U' ,
:new.val1,
:new.val2,
:new.updated_by,
:new.date_updated
END IF;
END;
-------------------------Hi hoek,
I am not able to use Oracle's audit functionality becuase I need to trap some changes in particular tables and then rebuild query if required.
Thanks for your suggestion though.
Regards,
Milind -
Slow query due to large table and full table scan
Hi,
We have a large Oracle database, v 10g. Two of the tables in the database have over one million rows.
We have a few queries which take a lot of time to execute. Not always though, it that seems when load is high the queries tend
to take much longer. Average time may be 1 or 2 seconds, but maxtime can be up to 2 minutes.
We have now used Oracle Grid to help us examine the queries. We have found that some of the queries require two or three full table scans.
Two of the full table scans are of the two large tables mentioned above.
This is an example query:
SELECT table1.column, table2.column, table3.column
FROM table1
JOIN table2 on table1.table2Id = table2.id
LEFT JOIN table3 on table2.table3id = table3.id
WHERE table1.id IN(
SELECT id
FROM (
(SELECT a.*, rownum rnum FROM(
SELECT table1.id
FROM table1,
table2,
table3
WHERE
table1.table2id = table2.id
AND
table2.table3id IS NULL OR table2.table3id = :table3IdParameter
) a
WHERE rownum <= :end))
WHERE rnum >= :start
Table1 and table2 are the large tables in this example. This query starts two full table scans on those tables.
Can we avoid this? We have, what we think are, the correct indexes.
/best regards, Håkan>
Hi Håkan - welcome to the forum.
We have a large Oracle database, v 10g. Two of the tables in the database have over one million rows.
We have a few queries which take a lot of time to execute. Not always though, it that seems when load is high the queries tend
to take much longer. Average time may be 1 or 2 seconds, but maxtime can be up to 2 minutes.
We have now used Oracle Grid to help us examine the queries. We have found that some of the queries require two or three full table scans.
Two of the full table scans are of the two large tables mentioned above.
This is an example query:Firstly, please read the forum FAQ - top right of page.
Please format your SQL using tags [code /code].
In order to help us to help you.
Please post table structures - relevant (i.e. joined, FK, PK fields only) in the form - note use of code tags - we can just run table create script.
CREATE TABLE table1
Field1 Type1,
Field2 Type2,
FieldN TypeN
);Then give us some table data - not 100's of records - just enough in the form
INSERT INTO Table1 VALUES(Field1, Field2.... FieldN);
..Please post EXPLAIN PLAN - again with tags.
HTH,
Paul...
/best regards, Håkan -
Query Question: Sum of master and monthly table data
Hi All,
I have two tables that store financial data about programs. The PROGRAM table has the following columns (for purposes of this discussion):
ID, INITIAL_BUDGET, COST_CENTER
The PROGRAM_MONTHLY table has the following (abbreviated list of) columns:
ID, PROGRAM_ID (FK to PROGRAM.ID), CURRENT_FORECAST, RECORD_DATE
Every month, a copy of the program_monthly records for last month is made to new records in the PROGRAM_MONTHLY table and we use RECORD_DATE for our filters and comparisons. This way we have historical data, plus current month data that can be updated by our financial systems and program managers.
I am using Application Express and would like to create a dashboard chart that shows the summary of the INITIAL_BUDGET and the CURRENT_FORECAST for a selected month. Obviously, the INITAL_BUDGET doesn't change, but the CURRENT_FORECAST (and similar columns such as the amount committed to purchase orders, which were omitted to simplify the discussion) change monthly.
My goal is to create a chart that can display the initial budget, current forecast, amount committed on purchase orders, etc. for all cost centers, or just one at a time as the user requires, that is filtered by the month of the PROJECT_MONTHLY record. If I can come up with the statement for a view or query, then I can manage the rest.
The required syntax for the chart is "SELECT link, label, value FROM...", where "link" can be NULL, since is it an optional link to another URL. The "label" and "value" portion are the important parts.
For example, I have another chart that shows the project status (which is a Varchar 2 constrained to values such as, Active, On-Hold, Completed, etc.) with the status as the label and the count of the rows as the value. It starts:
select null link, pjm.PROJECT_STATUS label, COUNT(pjm.ID) value FROM ... However, I have been unable to come up with a query that generates the desired results for these PROGRAM and PROGRAM_MONTHLY tables. I have played with various types of joins and sub-queries, but my SQL just isn't up to the challenge yet. I realize that I might have to re-work the table structure to accomodate this requirement.
I would greatly appreciate any guidance in approaching this problem.
Many thanks for your time and help,
PetieCertainly, Warren, thanks so much for your willingness to look at my problem.
To keep things simple, I will put the fundamentals of the tables with sample data. Please let me know if you would like more and I would be happy to provide it.
Table: PROGRAM
ID PROGRAM_NUMBER INITIAL_BUDGET COST_CENTER
1 10001 100000 500-001
2 10002 125000 500-001
3 10003 150000 500-002
4 10004 175000 500-002
5 10005 10000 500-003
6 10006 200000 500-004Table: PROGRAM_MONTHLY
ID PROGRAM_ID CURRENT_FORECAST RECORD_DATE
1 1 95000 02-FEB-06
2 2 125000 02-FEB-06
3 3 145000 02-FEB-06
4 4 180000 02-FEB-06
5 5 9000 02-FEB-06
6 6 225000 02-FEB-06
7 1 97500 02-MAR-06
8 2 120000 02-MAR-06
9 3 145000 02-MAR-06
10 4 185000 02-MAR-06
11 5 10000 02-MAR-06
12 6 215000 02-MAR-06
Report Example 1
When a user would like to see the current summary data for all cost centers, they would see a chart with the following data:
INIT_BUDGET CURRENT_FORECAST
760000 772500
Report Example 2
When a user would like to see the summary data for all cost centers for last month, they would see a chart with the following data:
INIT_BUDGET CURRENT_FORECAST
760000 779000
Report Example 3
When a user would like to see the current summary data for cost center 500-001, they would see a chart with this following data:
INIT_BUDGET CURRENT_FORECAST
225000 220000I hope this better illustrates the solution I seek.
Thank you again for your time and assistance
Petie -
SAP QUERY using ASSHR and ASSOB tables
We currently have SAP query that reports on additional payments (Info type 0015). The user wants to report the cost center held on the cost assignment (Tables ASSOB and ASSHR).
The existing query uses infoset created using PNP logical database.
How do I add or join the ASSOB and ASSHR tables to Info type 0015 to report the cost center?
Thanks in advance
ShamshudinHi Sham
You may need to create custom fields in the infoset and create some code to pull out and display details from ASSHR and ASSOB corresponding to the ifnotype record. -
Infotype Operation: Infotype with TABNR and HRT tables
Hi all,
Can anyone share the code for updating the infotypes and corresponding HRT tables having TABNR field for example infotype 1018 and HRT1018.
Thanks,
ShilpaHi,
Go through below code
The HR_INFOTYPE_OPERATION function module is used for the Maintenance of HR infotypes, such as inserting, changing, deleting data etc
Parameters Explained
Here is a list of the fm's parameters and how they are used, obviously not all parameters will be used depending on what function you are performing i.e. insert, change, delet etc
infty - Infotype being updated
objectid - object id from infotype
number - Personnel number
validityend - validity end date
validitybegin - validity begin date
record - infotype record values to be updated, inserted etc (will be structure of infortyoe you are updating)
recordnumber - sequence nunber from infotype record you are updating
Operation - describes what operation is to be performed
COP = Copy
DEL = Delete
DIS = Display
EDQ = Lock/unlock
INS = Create
LIS9 = Delimit
MOD = Change
INSS = Create for Actions is not converted to Change
nocommit - commit yes('X') / no(' ')
dialog_mode - dialog mode or not, default is '0'
Example coding for MOD operation
CONSTANTS: change TYPE pspar-actio VALUE 'MOD'.
"This code is requred and locks the record ready for modification
CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'
EXPORTING
number = p_pernr.
"loop at p0071 into p_p0071. "added to put code in context
validitybegin = p_record-begda.
validityend = p_record-endda.
p_record-endda = pn-begda - 1.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = '0071'
subtype = p_record-subty
objectid = P_record-objps
number = p_record-pernr "employeenumber
validityend = validityend
validitybegin = validitybegin
record = p_record
recordnumber = p_record-SEQNR
operation = change
nocommit = nocommit
dialog_mode = '0'
IMPORTING
return = return_struct
key = personaldatakey
EXCEPTIONS
OTHERS = 0.
"endloop.
"unlock record after modification
CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'
EXPORTING
number = p_pernr.
Example coding for INS operation
CONSTANTS: insert TYPE pspar-actio VALUE 'INS'.
"This code is requred and locks the record ready for modification
CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'
EXPORTING
number = p_pernr.
validitybegin = p_record-begda.
validityend = p_record-endda.
p_record-pernr = p_pernr
p_record-begda = pn-begda.
p_record-endda = validityend.
p_record-subty = p_SUBTY. "subtype of new entry
p_record-SCREF = p_SUBTY. "subtype of new entry
"plus populate any other fields you need to update
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = '0071'
subtype = p_record-subty
number = p_record-pernr "employeenumber
validityend = validityend
validitybegin = validitybegin
record = p_record
operation = insert
nocommit = nocommit
dialog_mode = '0'
IMPORTING
return = return_struct
key = personaldatakey
EXCEPTIONS
OTHERS = 0.
"unlock record after modification
CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'
EXPORTING
number = p_pernr.
Thanks,
venkat -
Query results and table contents does not match
Hi Experts,
This is regarding a simple select Qyery that is not working.
POSNR has a conversion exit at the data element level.
After using the conversion exit, I am putting a select on table PRTE by passing converted POSNR.
CODE given below:
CALL FUNCTION 'CONVERSION_EXIT_ABPSP_OUTPUT'
EXPORTING
input = w_anla-posnr
IMPORTING
OUTPUT = l_posnr
select single pstrt pende
from prte into w_prte
where posnr = l_posnr.
The Results fetched (two dates PSTRT and PENDE)by the Query Differs from the table entry.
Kindly guide me in the same..
Thanks in advance..
Deepak
Edited by: Deepak KM on Sep 25, 2008 10:00 AMHI in Fm ,you use same variable in input and output either
w_anla-posnr or
i_posnr -
Target and Source Table - Query from ODI Repository
Hi folks,
Can anybody help me? I am trying to query the following from an ODI 11g work repository:
All tables and for each table the tables that are listed in designer as “filled by” (don’t know the exact translation as I am using a german ODI designer) – in other words “all tables and the tables they are depending on”. The reason is to perform a connect-by query on that.
There is a solution published on ODIEXPERTS: http://odiexperts.com/interface-mapping-query, but however it does not show me the expected results. Does anyone have an idea how to get a simple table like that:
TARGET SOURCE
TAB1 TAB2
TAB1 TAB3
TAB2 TAB4
TAB3 TAB5
TAB3 TAB6
TAB6 TAB7
Using the Metadata Navigator is no option as we don’t have Weblogic installed and I need the data for further processing.If memory serves you have an SNP_POP table still in that release, join to the Model table (the joins cols are obvious if I recall) to get the datastore names and your more or less there.
I dont have that table in 11.1.1.5 and we moved over a while back so cant really take a look anytime soon. -
ODI metadata query to find source and Target table for Interface
Hi Experts,
Client is migrating there source from EBS 11.5.10 to R12. They are in ODI BIApps. 7952 version.Since,all there mappings are customized they are not bothering about support from Oracle as far as BIApps is concerned.
Now,we need to know how many ODI mappings will be impacted when source EBS is migrating from 11.5.10 to R12 and so that we can only target those mappings accordingly.
So,please provide me with below inputs:
1) Any metadata query which will give me the source table and target table information's against an interface even-if the main interface source is another interface.
2) What are the other stuffs I need to look from point of view of mapping changes when the source is upgrading.e.g. only source table change is enough or I need to look into other stuffs.I feel,it is boiling down to create a separate source adapter for R12.
Regards,
SnehotoshSELECT C.TABLE_NAME AS "Target Table Name",
A.COL_NAME AS "Target Field Name",
Wm_Concat(G.SOURCE_DT) AS "Target Data Type",
Wm_Concat(G.LONGC) AS "Target Data Length",
Wm_Concat(TXT) AS "Transformation Rule",
Wm_Concat(DISTINCT F.TABLE_NAME) AS "Source Table Name",
Wm_Concat(D.COL_NAME) AS "Source Field Name",
Wm_Concat(D.SOURCE_DT) AS "Source Data Type",
Wm_Concat(D.LONGC) AS "Source Data Length"
FROM
SNP_POP_COL A JOIN SNP_TXT_CROSSR B ON A.I_TXT_MAP=B.I_TXT
JOIN SNP_POP C ON A.I_POP=C.I_POP
JOIN SNP_TXT E ON A.I_TXT_MAP=E.I_TXT AND B.I_TXT=E.I_TXT
LEFT OUTER JOIN SNP_COL D ON B.I_COL=D.I_COL
LEFT OUTER JOIN SNP_TABLE F ON F.I_TABLE= D.I_TABLE
LEFT JOIN SNP_COL G ON A.I_COL=G.I_COL
WHERE POP_NAME = 'XXXXXXX'
GROUP BY C.TABLE_NAME,A.COL_NAME ORDER BY 1
Maybe you are looking for
-
I have an older version of Firefox and adobe on a Sony VAIO. I keep getting pop-ups telling me to upgrade, and also frequent failures when I try to use the browser. I try to upgrade. I go thru the download step, then try the run step and get a messag
-
Hai guys, I want to modify the table values in tableview.But my modify operation not working.Could u guys help me. Layout <htmlb:tableView id = "tv1" headerVisible = "true" footerVisible = "false" design = "ALTERNATING" visibleRowCount = "5
-
Apply ALV variant before export file in background task
Hi all, I'm working on an ALV report. As my report should deal with a great amount of data, it's sometimes running in background. Users want the result to be sent by mail (in .CSV format so that they can use it in excel). For now, the sending is OK b
-
Hi - I would appreciate any help/advice about my vanishing Hard Drive. I have three hard drives in my G4 tower (dual 500 Mhz) and all have been working fine for more than 3 years until today. My 40GB Maxtor ATA drive began to behave very strangely; w
-
Flash buttons take to different links
Hey! My problem is: http://ajuvaba.planet.ee/extras/poetryslam.swf When I press buttons, then it starts animation. What I must do, when I wanna that after the animation the button takes me to HTML side. For example: when I push Home button, first it