Reporting on assignment details with Discoverer
I am tasked with reporting on an individuals 'Assignment Status' where their current assignment status is 'Secondment' and bring back previous details (e.g. organisation) before the change occurred. My problem is that I am getting multiple rows where other changes within assignment have occurred and all I want is the current details and the details at the row before the change to secondment.
This is an example of the data
Person Id User Status Effective Start Date Effective End Date Organization Name
1 Active Assignment 03/01/06 10/01/06 1924
1 Active Assignment 10/02/06 12/31/06 1941
1 Active Assignment 01/01/07 01/28/07 1908
1 Active Assignment 01/29/07 03/04/07 1908
1 Active Assignment 03/05/07 05/30/07 1908
1 Active Assignment 05/31/07 11/21/07 1908
1 Active Assignment 11/22/07 04/30/08 1908
1 Active Assignment 05/01/08 05/11/08 1908
1 Secondment 05/12/08 05/13/08 1941
1 Secondment 05/14/08 05/18/08 1941
1 Secondment 05/19/08 12/31/12 1941
I only want current information and latest row at active assignment.
We have attempted calculations using the LEAD/LAG and CASE WHEN functions (see below) to no avail.
Any help is greatly appreciated.
Thanks
CASE WHEN ( LAG(Assignment Start Date,20) OVER(PARTITION BY Employee Number ORDER BY Assignment Start Date DESC ) ) IS NOT NULL THEN LAG(Assignment Start Date,20) OVER(PARTITION BY Employee Number ORDER BY Assignment Start Date DESC ) WHEN ( LAG(Assignment Start Date,19) OVER(PARTITION BY Employee Number ORDER BY Assignment Start Date DESC ) ) IS NOT NULL THEN LAG(Assignment Start Date,19) OVER(PARTITION BY Employee Number ORDER BY Assignment Start Date DESC ) WHEN ( LAG(Assignment Start Date,18) OVER(PARTITION BY Employee Number ORDER BY Assignment Start Date DESC ) ) IS NOT NULL THEN LAG(Assignment Start Date,18) OVER(PARTITION BY Employee Number ORDER BY Assignment Start Date DESC ) WHEN ( LAG(Assignment Start Date,17) OVER(PARTITION BY Employee Number ORDER BY Assignment Start Date DESC ) ) IS NOT NULL THEN LAG(Assignment Start Date,17) OVER(PARTITION BY Employee Number ORDER BY Assignment Start Date DESC ) WHEN ( LAG(Assignment Start Date,16) OVER(PARTITION BY Employee Number ORDER BY Assignment Start Date DESC ) ) IS NOT NULL THEN LAG(Assignment Start Date,16) OVER(PARTITION BY Employee Number ORDER BY Assignment Start Date DESC ) WHEN ( LAG(Assignment Start Date,15) OVER(PARTITION BY Employee Number ORDER BY Assignment Start Date DESC ) ) IS NOT NULL THEN LAG(Assignment Start Date,15) OVER(PARTITION BY Employee Number ORDER BY Assignment Start Date DESC ) WHEN ( LAG(Assignment Start Date,14) OVER(PARTITION BY Employee Number ORDER BY Assignment Start Date DESC ) ) IS NOT NULL THEN LAG(Assignment Start Date,14) OVER(PARTITION BY Employee Number ORDER BY Assignment Start Date DESC ) WHEN ( LAG(Assignment Start Date,13) OVER(PARTITION BY Employee Number ORDER BY Assignment Start Date DESC ) ) IS NOT NULL THEN LAG(Assignment Start Date,13) OVER(PARTITION BY Employee Number ORDER BY Assignment Start Date DESC ) WHEN ( LAG(Assignment Start Date,12) OVER(PARTITION BY Employee Number ORDER BY Assignment Start Date DESC ) ) IS NOT NULL THEN LAG(Assignment Start Date,12) OVER(PARTITION BY Employee Number ORDER BY Assignment Start Date DESC ) WHEN ( LAG(Assignment Start Date,11) OVER(PARTITION BY Employee Number ORDER BY Assignment Start Date DESC ) ) IS NOT NULL THEN LAG(Assignment Start Date,11) OVER(PARTITION BY Employee Number ORDER BY Assignment Start Date DESC ) WHEN ( LAG(Assignment Start Date,10) OVER(PARTITION BY Employee Number ORDER BY Assignment Start Date DESC ) ) IS NOT NULL THEN LAG(Assignment Start Date,10) OVER(PARTITION BY Employee Number ORDER BY Assignment Start Date DESC ) WHEN ( LAG(Assignment Start Date,9) OVER(PARTITION BY Employee Number ORDER BY Assignment Start Date DESC ) ) IS NOT NULL THEN LAG(Assignment Start Date,9) OVER(PARTITION BY Employee Number ORDER BY Assignment Start Date DESC ) WHEN ( LAG(Assignment Start Date,8) OVER(PARTITION BY Employee Number ORDER BY Assignment Start Date DESC ) ) IS NOT NULL THEN LAG(Assignment Start Date,8) OVER(PARTITION BY Employee Number ORDER BY Assignment Start Date DESC ) WHEN ( LAG(Assignment Start Date,7) OVER(PARTITION BY Employee Number ORDER BY Assignment Start Date DESC ) ) IS NOT NULL THEN LAG(Assignment Start Date,7) OVER(PARTITION BY Employee Number ORDER BY Assignment Start Date DESC ) WHEN ( LAG(Assignment Start Date,6) OVER(PARTITION BY Employee Number ORDER BY Assignment Start Date DESC ) ) IS NOT NULL THEN LAG(Assignment Start Date,6) OVER(PARTITION BY Employee Number ORDER BY Assignment Start Date DESC ) WHEN ( LAG(Assignment Start Date,5) OVER(PARTITION BY Employee Number ORDER BY Assignment Start Date DESC ) ) IS NOT NULL THEN LAG(Assignment Start Date,5) OVER(PARTITION BY Employee Number ORDER BY Assignment Start Date DESC ) WHEN ( LAG(Assignment Start Date,4) OVER(PARTITION BY Employee Number ORDER BY Assignment Start Date DESC ) ) IS NOT NULL THEN LAG(Assignment Start Date,4) OVER(PARTITION BY Employee Number ORDER BY Assignment Start Date DESC ) WHEN ( LAG(Assignment Start Date,3) OVER(PARTITION BY Employee Number ORDER BY Assignment Start Date DESC ) ) IS NOT NULL THEN LAG(Assignment Start Date,3) OVER(PARTITION BY Employee Number ORDER BY Assignment Start Date DESC ) WHEN ( LAG(Assignment Start Date,2) OVER(PARTITION BY Employee Number ORDER BY Assignment Start Date DESC ) ) IS NOT NULL THEN LAG(Assignment Start Date,2) OVER(PARTITION BY Employee Number ORDER BY Assignment Start Date DESC ) WHEN ( LAG(Assignment Start Date,1) OVER(PARTITION BY Employee Number ORDER BY Assignment Start Date DESC ) ) IS NOT NULL THEN LAG(Assignment Start Date,1) OVER(PARTITION BY Employee Number ORDER BY Assignment Start Date DESC ) ELSE SYSDATE END
Edited by: user10440531 on 17-Oct-2008 08:42
Hi,
Perhaps something like that will give you what you need, pretty ugly but works...
You'll get the last 2 rows of assignments per user(person_id)
select *
from (--That selects the assignment information (all the asignment rows)
--The limit on the rows is in the outer select
SELECT count(a.effective_start_date) over (partition by a.person_id
order by a.effective_start_date desc) run_count
,a.effective_start_date
,a.effective_end_date
,a.person_id
,a.assignment_status_type_id
,HR_GENERAL.DECODE_POSITION_LATEST_NAME(A.POSITION_ID)
,HR_GENERAL.DECODE_ORGANIZATION(A.ORGANIZATION_ID)
FROM
PER_ALL_ASSIGNMENTS_F A
WHERE A.ASSIGNMENT_TYPE = 'E'
) assign
where assign.run_count <= 2 --gets the last 2 rows per person_id
Similar Messages
-
SC Report for Confirmation Details
Hi All
We are in SRM 7 EHP 2.
We are doing Confirmations in SRM Portal only
We have a requirement to create as Custom Report for Confirmation Details with below fields.
1. Company Code
2, Purchasing Organization
3. Account Assignment
4. Confirmation Name
5. Status
6. Requester
7. PO Number
How can I do it, Please advice
Thanks
AjitHi Ajit,
Explore the possibility of achieving this with a new POWL query?
Use the existing POWL in the confirmation screen as a starting point to see what can be modified to suit your requirement.
- Sai. -
HR:Report to Check changes in Personal/ PeriodsofService/Assignment Details
Hi,
Is there a way to gather in one Report for Data Entry Checking purposes all changes in Personal/ Person Type/Periods of Service/Assignment Details based on Last Update Date/ User from fnd user tables?
We use Discoverer for Reporting of Oracle HR Application.
Any feedback will be much appreciated.
Thanking you in advance.
Regards,ElenaDear Ganesh,
Thank you very much again.
You are right about your comments. However the auditing of all these information will not slow down the performance of the system?
If we do not create new auditing tables for these details is there a way to gather them into one report based on last update date and user to be more easy to check? Therefore is also not possible to show only changed values without auditing?
Thanks & best regards,
Elena -
Help needed with discoverer PO report
Hi Guys,
Need some help with discoverer 4i report.
There is a workbook in discoverer which runs and displays output depending on the parameters.
The report is related to PO Requisitions (displays all the details related to the requisition). For ex:- like req creation_date, req_num, requestor(to_person_id),preparer, approver, appr_dept, req_status, po_number, po_name, po_status etc.
All these requestors, preparers, approvers are employees. When a user logs in to discoverer and runs this report, he should only his requisitions created. For example, the user who is logged in is connected hr_employees with employee_id. So when the user runs the report, the report should display only the requisitions with his employee name either in preparer or as requestor. But my report is able to all the requisitions of other employees too.
How can I solve this problem in discover 4i.
Help Appreciated.Hi Gareth,
How can we do that. Can you explain in brief how a function is created and how it can be used in the workbook conditions.
Help Appreciated
Thanks -
Report on PO items with acount assignement
Hi Experts
Is there any standard report for PO items with GL account information.
Warm regards
ramSivaHi,
Use reports;
ME2K - Purchase Orders per Account Assignment
ME2J - Purchase Orders per Project
Note: - In Dynamic Selection option, enter the GL Account and run the report else in output, create a report layout with GL Account. -
Report: user/systems status with change details for a project
HI.
I am aware of CN41N/CN43N transaction.
Is there a way to pull a report for a project with system status, user status and the details of who made the changes with date and time???
thanka a lot in advance
Regards
SURYAHi
If you have change documents active for status management and project profile then you can get the data from JCDS table directly (changed status and who changed it). Note that you will get the status in SAP internal code and you need to refer TCJ30 table for status. -
Does Oracle provide standard report to show detail of user with password re
Hi,
We are currently using Oracle HRMS R12.0.6. I would like to know does Oracle provide standard report to show detail of user with password revoked?
Appreciate advise.
Thanks and Regards,
Shiau ChinDevelop a package to do it if you need the password. Create the packages . Execute the SQL to determine the password. Make sure you replace the &USER_NAME with the USER NAME at the end..
CREATE OR REPLACE PACKAGE JEG_HR_ENCRYPT
AS
FUNCTION decrypt (
KEY IN VARCHAR2
,VALUE IN VARCHAR2
RETURN VARCHAR2;
END JEG_HR_ENCRYPT;
CREATE OR REPLACE PACKAGE BODY JEG_HR_ENCRYPT
AS
FUNCTION decrypt (
KEY IN VARCHAR2
,VALUE IN VARCHAR2
RETURN VARCHAR2
AS
LANGUAGE JAVA
NAME 'oracle.apps.fnd.security.WebSessionManagerProc.decrypt(java.lang.String,java.lang.String) return java.lang.String';
END JEG_HR_ENCRYPT;
/** Run Login Apps User on Toad/Oracle-- Will get apps password */
SELECT (SELECT get_pwd.decrypt (UPPER ((SELECT UPPER (fnd_profile.VALUE ('GUEST_USER_PWD'))
FROM DUAL)), usertable.encrypted_foundation_password)
FROM DUAL) AS apps_password
FROM fnd_user usertable
WHERE usertable.user_name LIKE UPPER ((SELECT SUBSTR (fnd_profile.VALUE ('GUEST_USER_PWD')
,1
, INSTR (fnd_profile.VALUE ('GUEST_USER_PWD'), '/')
- 1
FROM DUAL));
SELECT usertable.user_name,
(SELECT jeg_hr_encrypt.decrypt
(UPPER
((SELECT (SELECT jeg_hr_encrypt.decrypt
(UPPER
((SELECT UPPER
(fnd_profile.VALUE
('GUEST_USER_PWD'
FROM DUAL)
usertable.encrypted_foundation_password
FROM DUAL) AS apps_password
FROM fnd_user usertable
WHERE usertable.user_name LIKE
UPPER
((SELECT SUBSTR
(fnd_profile.VALUE
('GUEST_USER_PWD'),
1,
INSTR
(fnd_profile.VALUE
('GUEST_USER_PWD'),
- 1
FROM DUAL)
usertable.encrypted_user_password
FROM DUAL) AS encrypted_user_password
FROM fnd_user usertable
WHERE usertable.user_name LIKE UPPER ('&USER_NAME') -
How to Insert record in IT0014 along with cost Assignment details - FM Pls.
Hi,
I want to insert record in info type 0014 along with Cost Assigment details.
I used FM - HR_INFOTYPE_OPERATION and RP_PLANT_DATA_UPDATE_TABLES.
It works fine, but if I go and check PA20 after execution of program, ICON (Cost Assignment details) is not showing up on screen PA20. But If I check cost assignment tables (ASSOB & ASSHR) the record is present.
Please let me know how to insert record in IT0014 along with Cost Assignment details.
Thanks in Advance,
KrishnaHi,
I want to insert record in info type 0014 along with Cost Assigment details.
I used FM - HR_INFOTYPE_OPERATION and RP_PLANT_DATA_UPDATE_TABLES.
It works fine, but if I go and check PA20 after execution of program, ICON (Cost Assignment details) is not showing up on screen PA20. But If I check cost assignment tables (ASSOB & ASSHR) the record is present.
Please let me know how to insert record in IT0014 along with Cost Assignment details.
Thanks in Advance,
Krishna -
Hi ,
I am creating report in BI7, I am creating Jump Target on this Report to R/3 report.
Here, The values which are in BI has to be populated in R/3 report depending upon one charcteristic field in BI.
So, to populate the values, I have given Assignment details for the Infoobjects for which values has to be passed to R/3.
So When I considered "Variable" in Type , it is giving error the target cannot be found and it is going to R/3 report also
So I tried with Table field then it is just showing "Starting the receipient program" with out opening the R/3 report.
So, What type I have to consider in Assignment details .. And what should be done to populate the values in R/3 report from BI.
Please help me,
Thanks,
JasswanthaHi,
please have a look at this: http://help.sap.com/saphelp_nw04/helpdata/en/a2/9b548d979de04180d15b5a55aa94aa/frameset.htm
and additionally at this: https://websmp102.sap-ag.de/~form/handler?_APP=01100107900000000342&_EVENT=REDIR&_NNUM=1053310&_NLANG=EN
and this: https://websmp102.sap-ag.de/~form/handler?_APP=01100107900000000342&_EVENT=REDIR&_NNUM=363203&_NLANG=EN
but anyway, in case of r/3, use table field and enter the name of the field, the dataelement, the domain and the parameter id of the target field.
regards
Siggi -
Hello,
I am developing RRI from Sender to Reciever.Target has a variable on EX: ORDER.And the what i would like is when the user from the Sender query clicks on Order > Go to >reciever query can actually se all teh details without putting any additional values.
My concern here is in Assignement detail, do i need to give all types and if so why.Or do i need to just give type for the one i ould like the user to jump to. And in my case what should i be using Generic or InfoObject.I have read the link thats posted in reply to this question but still couldnt get an idea.Can someone please help, points shall surely be assigned.
Thanks,
Ronit.Dear Ronit,
I'll tell you the concept of RRI ok?
you have a report1(summary) and a detailed report2. Example In Report1 , you have custid, total purchase amount.(summary report)
In report2, you have detailed transactions(at line item level) for a given cust id. i.e; input to this detailed report will be the custid and the report will display all the transactionf for that cust id.
Now, the scenario is , from the summary report, all custids with total purchase amount will be displayed? When you right click one of the custid and jump to the detailed report, you should be able to see the detailed transactions for that custid.
Now lets see how it works.
Here sender is report1, receiver is report2. One of the conditions to link 2 reports using RSBBS is that both the sumary and the detailed level reports should have a comon characteristics to link. Here we custid in both reports.
So, In RSBBS, you mention sender as report1, receiver as report2 and in the other tab, you just mention what kind of report( i remember you may need to mention as BW report). I dont remember(plz. check).
Once this is done, run the summary report Report1, right click any of the custids you will see in the context menu-> drill down-> jump to report2.select that. now u will see detailed transactions for that selected custid.
Technically, how this works is: When you right click a custid and select to jump to the detailed report, that selected custid is passed as a parameter to teh SQL to the detailed report, hence the detailed report knows for which custid , it is supposed to display the data. This is a typical example of a dynamic query, where in the values of the parameter to the query is passed during runtime.
Got it??
Get back to me if you have any questions.
Thanks -
Alv Report for invoice details
Dear All,
I need to develop one alv report for following details. i developed coding for this requirment but i am getting some error.kindley help me to how to move data from different internal table to final internal table. I used LOOP AT and READ Statement even i didn't get any output.
kindley help me out.
TYPES: BEGIN OF XT_TAB,
LIFNR LIKE LFA1-LIFNR,
NAME1 LIKE LFA1-NAME1,
STCD1 LIKE LFA1-STCD1,
STCD2 LIKE LFA1-STCD2,
STCD3 LIKE LFA1-STCD3,
STCD4 LIKE LFA1-STCD4,
END OF XT_TAB.
TYPES: BEGIN OF YT_TAB,
BUKRS LIKE BSEG-BUKRS,
BELNR LIKE BSEG-BELNR,
BUZEI LIKE BSEG-BUZEI,
LIFNR LIKE BSEG-LIFNR,
GJAHR LIKE BSEG-GJAHR,
END OF YT_TAB.
TYPES: BEGIN OF ZT_TAB,
LIFNR LIKE LFA1-LIFNR,
NAME1 LIKE LFA1-NAME1,
STCD2 LIKE LFA1-STCD2,
BELNR LIKE BSEG-BELNR,
BUZEI LIKE BSEG-BUZEI,
GJAHR LIKE BSEG-GJAHR,
END OF ZT_TAB.
I N T E R N A L T A B L E D E C L A R A T I O N S *
*-----Internal table to store data
DATA: ITAB1 TYPE STANDARD TABLE OF XT_TAB INITIAL SIZE 0,
WA_TAB1 TYPE XT_TAB.
DATA: ITAB2 TYPE STANDARD TABLE OF YT_TAB INITIAL SIZE 0,
WA_TAB2 TYPE YT_TAB.
DATA: ITAB TYPE STANDARD TABLE OF ZT_TAB WITH HEADER LINE,
WA_ITAB TYPE ZT_TAB,
ITAB_FINAL2 TYPE STANDARD TABLE OF ZT_TAB.
DATA: ITAB_TEMP1 TYPE STANDARD TABLE OF ZT_TAB WITH HEADER LINE.
Selection Screen Declarations *
SELECTION-SCREEN BEGIN OF BLOCK bk1 WITH FRAME TITLE text-001.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN begin OF LINE.
SELECTION-SCREEN COMMENT (23) text-003 FOR FIELD P_LIFNR.
PARAMETERS P_LIFNR LIKE LFA1-LIFNR OBLIGATORY.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN END OF BLOCK bk1.
START-OF-SELECTION.
PERFORM XTRACT_DATA.
END-OF-SELECTION.
*-----Filling the Output table
PERFORM populate_main_table.
PERFORM BUILD_FIELDCATALOG.
PERFORM SORTING.
PERFORM BUILD_LAYOUT.
PERFORM BUILD_ALV_GRID_DISPLAY.
Form XTRACT_DATA
FORM XTRACT_DATA .
*SELECT
a~LIFNR
a~NAME1
a~STCD2
b~BELNR
b~BUZEI
b~GJAHR
INTO TABLE ITAB
FROM LFA1 as a INNER JOIN BSEG as b
ON aLIFNR = bLIFNR
WHERE a~LIFNR = P_LIFNR.
SELECT LIFNR
NAME1
STCD1
STCD2
STCD3
STCD4
FROM LFA1
INTO TABLE ITAB1
WHERE LIFNR = P_LIFNR.
IF NOT ITAB1[] IS INITIAL.
SORT ITAB1 BY LIFNR.
SELECT BELNR
BUZEI
LIFNR
GJAHR
INTO TABLE ITAB2
FROM BSEG
FOR ALL ENTRIES IN ITAB1
WHERE LIFNR = ITAB1-LIFNR.
ENDIF.
ENDFORM. " XTRACT_DATA
*& Form POPULATE_MAIN_TABLE
text
--> p1 text
<-- p2 text
FORM POPULATE_MAIN_TABLE .
LOOP AT ITAB1 INTO WA_TAB1.
ITAB-LIFNR = ITAB1-LIFNR.
ITAB-NAME1 = ITAB1-NAME1.
ITAB-STCD2 = ITAB1-STCD2.
READ TABLE ITAB2 INTO WA_TAB2 WITH KEY LIFNR = WA_TAB1-LIFNR.
IF sy-subrc = 0.
ITAB-BELNR = ITAB1-BELNR.
ITAB-BUZEI = ITAB1-BUZEI.
ITAB-GJAHR = ITAB1-GJAHR.
ENDIF.
ENDLOOP.
ENDFORM. " POPULATE_MAIN_TABLE
Form BUILD_FIELDCATALOG
FORM BUILD_FIELDCATALOG .
REFRESH t_fcat.
CLEAR t_fcat.
wa_fcat-col_pos = 1.
wa_fcat-row_pos = 1.
wa_fcat-seltext_s = 'Vendor Number'.
wa_fcat-seltext_m = 'Vendor Number'.
wa_fcat-seltext_l = 'Vendor Number'.
wa_fcat-fieldname = 'LIFNR'.
wa_fcat-tabname = 'ITAB'.
APPEND wa_fcat TO t_fcat.
CLEAR t_fcat.
wa_fcat-col_pos = 2.
wa_fcat-row_pos = 1.
wa_fcat-seltext_s = 'Vendor Name'.
wa_fcat-seltext_m = 'Vendor Name'.
wa_fcat-seltext_l = 'Vendor Name'.
wa_fcat-fieldname = 'NAME1'.
wa_fcat-tabname = 'ITAB'.
APPEND wa_fcat TO t_fcat.
CLEAR t_fcat.
wa_fcat-col_pos = 3.
wa_fcat-row_pos = 1.
wa_fcat-seltext_s = 'Vendor TIN Number'.
wa_fcat-seltext_m = 'Vendor TIN Number'.
wa_fcat-seltext_l = 'Vendor TIN Number'.
wa_fcat-fieldname = 'STCD2'.
wa_fcat-tabname = 'ITAB'.
APPEND wa_fcat TO t_fcat.
CLEAR t_fcat.
wa_fcat-col_pos = 4.
wa_fcat-row_pos = 1.
wa_fcat-seltext_s = 'Document No'.
wa_fcat-seltext_m = 'Document No'.
wa_fcat-seltext_l = 'Document No'.
wa_fcat-fieldname = 'BELNR'.
wa_fcat-tabname = 'ITAB'.
APPEND wa_fcat TO t_fcat.
CLEAR t_fcat.
wa_fcat-col_pos = 5.
wa_fcat-row_pos = 1.
wa_fcat-seltext_s = 'Item Number'.
wa_fcat-seltext_m = 'Item Number'.
wa_fcat-seltext_l = 'Item Number'.
wa_fcat-fieldname = 'BUZEI'.
wa_fcat-tabname = 'ITAB'.
APPEND wa_fcat TO t_fcat.
CLEAR t_fcat.
wa_fcat-col_pos = 6.
wa_fcat-row_pos = 1.
wa_fcat-seltext_s = 'Fiscal Year'.
wa_fcat-seltext_m = 'Fiscal Year'.
wa_fcat-seltext_l = 'Fiscal Year'.
wa_fcat-fieldname = 'GJAHR'.
wa_fcat-tabname = 'ITAB'.
APPEND wa_fcat TO t_fcat.
CLEAR t_fcat.
ENDFORM. " BUILD_FIELDCATALOG
Form BUILD_LAYOUT
FORM BUILD_LAYOUT .
GD_LAYOUT-NO_INPUT = 'X'.
GD_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
GD_LAYOUT-TOTALS_TEXT = 'TOTALS'.
ENDFORM. " BUILD_LAYOUT
Form BUILD_ALV_GRID_DISPLAY
FORM BUILD_ALV_GRID_DISPLAY .
gd_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = gd_repid
i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
i_callback_user_command = 'USER_COMMAND'
is_layout = gd_layout
it_fieldcat = t_fcat[]
it_events = gt_events
is_print = gd_prntparams
it_sort = it_sortcat[]
i_save = 'X'
TABLES
t_outtab = ITAB
EXCEPTIONS
program_error = 1
OTHERS = 2.
thanks and regards
MurugeshTYPES: BEGIN OF XT_TAB,
LIFNR LIKE LFA1-LIFNR,
NAME1 LIKE LFA1-NAME1,
STCD1 LIKE LFA1-STCD1,
STCD2 LIKE LFA1-STCD2,
STCD3 LIKE LFA1-STCD3,
STCD4 LIKE LFA1-STCD4,
END OF XT_TAB.
TYPES: BEGIN OF YT_TAB,
BUKRS LIKE BSEG-BUKRS,
BELNR LIKE BSEG-BELNR,
BUZEI LIKE BSEG-BUZEI,
LIFNR LIKE BSEG-LIFNR,
GJAHR LIKE BSEG-GJAHR,
END OF YT_TAB.
TYPES: BEGIN OF ZT_TAB,
LIFNR LIKE LFA1-LIFNR,
NAME1 LIKE LFA1-NAME1,
STCD2 LIKE LFA1-STCD2,
BELNR LIKE BSEG-BELNR,
BUZEI LIKE BSEG-BUZEI,
GJAHR LIKE BSEG-GJAHR,
END OF ZT_TAB.
I N T E R N A L T A B L E D E C L A R A T I O N S *
*-----Internal table to store data
DATA: ITAB1 TYPE STANDARD TABLE OF XT_TAB INITIAL SIZE 0,
WA_TAB1 TYPE XT_TAB.
DATA: ITAB2 TYPE STANDARD TABLE OF YT_TAB INITIAL SIZE 0,
WA_TAB2 TYPE YT_TAB.
DATA: ITAB TYPE STANDARD TABLE OF ZT_TAB WITH HEADER LINE,
WA_ITAB TYPE ZT_TAB,
ITAB_FINAL2 TYPE STANDARD TABLE OF ZT_TAB.
DATA: ITAB_TEMP1 TYPE STANDARD TABLE OF ZT_TAB WITH HEADER LINE.
Selection Screen Declarations *
SELECTION-SCREEN BEGIN OF BLOCK bk1 WITH FRAME TITLE text-001.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN begin OF LINE.
SELECTION-SCREEN COMMENT (23) text-003 FOR FIELD P_LIFNR.
PARAMETERS P_LIFNR LIKE LFA1-LIFNR OBLIGATORY.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN END OF BLOCK bk1.
START-OF-SELECTION.
PERFORM XTRACT_DATA.
END-OF-SELECTION.
*-----Filling the Output table
PERFORM populate_main_table.
PERFORM BUILD_FIELDCATALOG.
PERFORM SORTING.
PERFORM BUILD_LAYOUT.
PERFORM BUILD_ALV_GRID_DISPLAY.
Form XTRACT_DATA
FORM XTRACT_DATA .
*SELECT
a~LIFNR
a~NAME1
a~STCD2
b~BELNR
b~BUZEI
b~GJAHR
INTO TABLE ITAB
FROM LFA1 as a INNER JOIN BSEG as b
ON aLIFNR = bLIFNR
WHERE a~LIFNR = P_LIFNR.
SELECT LIFNR
NAME1
STCD1
STCD2
STCD3
STCD4
FROM LFA1
INTO TABLE ITAB1
WHERE LIFNR = P_LIFNR.
IF NOT ITAB1[] IS INITIAL.
SORT ITAB1 BY LIFNR.
SELECT BELNR
BUZEI
LIFNR
GJAHR
INTO TABLE ITAB2
FROM BSEG
FOR ALL ENTRIES IN ITAB1
WHERE LIFNR = itab1-lifnr.
ENDIF.
ENDFORM. " XTRACT_DATA
*& Form POPULATE_MAIN_TABLE
text
--> p1 text
<-- p2 text
FORM POPULATE_MAIN_TABLE .
LOOP AT ITAB1 INTO WA_TAB1.
ITAB-LIFNR = ITAB1-LIFNR.
ITAB-NAME1 = ITAB1-NAME1.
ITAB-STCD2 = ITAB1-STCD2.
READ TABLE ITAB2 INTO WA_TAB2 WITH KEY LIFNR = WA_TAB1-LIFNR.
IF sy-subrc = 0.
ITAB-BELNR = ITAB1-BELNR.
ITAB-BUZEI = ITAB1-BUZEI.
ITAB-GJAHR = ITAB1-GJAHR.
ENDIF.
ENDLOOP.
LOOP AT itab1 INTO wa_tab1.
MOVE: wa_tab1-lifnr TO itab-lifnr,
wa_tab1-name1 TO itab-name1,
wa_tab1-stcd2 TO itab-stcd2.
Append itab.
READ TABLE itab2 TRANSPORTING NO FIELDS WITH KEY lifnr = wa_tab1-lifnr.
IF sy-subrc eq 0.
MOVE: wa_tab2-lifnr TO itab-lifnr,
wa_tab2-belnr TO itab-belnr,
wa_tab2-buzei TO itab-buzei,
wa_tab2-gjahr TO itab-gjahr.
Append itab.
endif.
endloop.
*LOOP AT t_agr_tcodes INTO s_agr_tcodes.
READ TABLE t_tstc
TRANSPORTING NO FIELDS
WITH KEY tcode = s_agr_tcodes-tcode.
IF sy-subrc eq 0.
MOVE: s_agr_tcodes-tcode TO it_agr_tcodes-tcode,
s_agr_tcodes-agr_name to it_agr_tcodes-agr_name,
t_tstc-pgmna to it_agr_pgmna.
*Append it_agr_tcodes.
*endif.
*endloop.
ENDFORM. " POPULATE_MAIN_TABLE
Form BUILD_FIELDCATALOG
FORM BUILD_FIELDCATALOG .
REFRESH t_fcat.
CLEAR t_fcat.
wa_fcat-col_pos = 1.
wa_fcat-row_pos = 1.
wa_fcat-seltext_s = 'Vendor Number'.
wa_fcat-seltext_m = 'Vendor Number'.
wa_fcat-seltext_l = 'Vendor Number'.
wa_fcat-fieldname = 'LIFNR'.
wa_fcat-tabname = 'ITAB'.
APPEND wa_fcat TO t_fcat.
CLEAR t_fcat.
wa_fcat-col_pos = 2.
wa_fcat-row_pos = 1.
wa_fcat-seltext_s = 'Vendor Name'.
wa_fcat-seltext_m = 'Vendor Name'.
wa_fcat-seltext_l = 'Vendor Name'.
wa_fcat-fieldname = 'NAME1'.
wa_fcat-tabname = 'ITAB'.
APPEND wa_fcat TO t_fcat.
CLEAR t_fcat.
wa_fcat-col_pos = 3.
wa_fcat-row_pos = 1.
wa_fcat-seltext_s = 'Vendor TIN Number'.
wa_fcat-seltext_m = 'Vendor TIN Number'.
wa_fcat-seltext_l = 'Vendor TIN Number'.
wa_fcat-fieldname = 'STCD2'.
wa_fcat-tabname = 'ITAB'.
APPEND wa_fcat TO t_fcat.
CLEAR t_fcat.
wa_fcat-col_pos = 4.
wa_fcat-row_pos = 1.
wa_fcat-seltext_s = 'Document No'.
wa_fcat-seltext_m = 'Document No'.
wa_fcat-seltext_l = 'Document No'.
wa_fcat-fieldname = 'BELNR'.
wa_fcat-tabname = 'ITAB'.
APPEND wa_fcat TO t_fcat.
CLEAR t_fcat.
wa_fcat-col_pos = 5.
wa_fcat-row_pos = 1.
wa_fcat-seltext_s = 'Item Number'.
wa_fcat-seltext_m = 'Item Number'.
wa_fcat-seltext_l = 'Item Number'.
wa_fcat-fieldname = 'BUZEI'.
wa_fcat-tabname = 'ITAB'.
APPEND wa_fcat TO t_fcat.
CLEAR t_fcat.
wa_fcat-col_pos = 6.
wa_fcat-row_pos = 1.
wa_fcat-seltext_s = 'Fiscal Year'.
wa_fcat-seltext_m = 'Fiscal Year'.
wa_fcat-seltext_l = 'Fiscal Year'.
wa_fcat-fieldname = 'GJAHR'.
wa_fcat-tabname = 'ITAB'.
APPEND wa_fcat TO t_fcat.
CLEAR t_fcat.
ENDFORM. " BUILD_FIELDCATALOG
Form BUILD_LAYOUT
FORM BUILD_LAYOUT .
GD_LAYOUT-NO_INPUT = 'X'.
GD_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
GD_LAYOUT-TOTALS_TEXT = 'TOTALS'.
ENDFORM. " BUILD_LAYOUT
Form BUILD_ALV_GRID_DISPLAY
FORM BUILD_ALV_GRID_DISPLAY .
gd_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = gd_repid
i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
i_callback_user_command = 'USER_COMMAND'
is_layout = gd_layout
it_fieldcat = t_fcat[]
it_events = gt_events
is_print = gd_prntparams
it_sort = it_sortcat[]
i_save = 'X'
TABLES
t_outtab = ITAB
EXCEPTIONS
program_error = 1
OTHERS = 2.
Edited by: Murugesh P on Apr 6, 2009 10:54 AM
Edited by: Murugesh P on Apr 6, 2009 10:54 AM -
Report for failed delivery with reasons
Hi all,
Maybe i am blind, but I cant find a way to do an automatic report or email a report for bounced emails with details.
So I need to get a report with the email address, message number and the reason for the bounce or failure for Example: bounced by destination server. Reason: 5.1.0 – Unknown address error ('554',
Any where I can do this?
I see the bounce logs have this information, but short of ftp'ing this daily then writing a script to email this out I cant see how to do this.
It would be nice to just have a daily email report
Regards
AdamOn box - no easy way that I can think of other than what you've mentioned. You could however accomplish this (as well as any other custom reports you would want to create) with SawMill (https://www.sawmill.net).
This used to be used heavily back when the WSA was first released as on box reporting wasn't up-to-par. However, it can be used for the ESA as well. -
Creating Report using EPM Functions with Dynamic Filters
Hi All,
I am new to BPC, In BPC 7.5 i seen like we can generate EPM report using EVDRE function very quickly and easy too. Is the same feature is existing in BPC 10.0 ? if no how can we create EPM reports using EPM Functions with Dynamic Filters on the Members of the dimension like in BPC 7.5.
And i searched in SDN, there is no suitable blogs or documents which are related to generation of Reports using EPM Functions. All are described just in simple syntax way. It is not going to be understand for the beginners.
Would you please specify in detail step by step.
Thanks in Advance.
Siva NagarajuSiva,
These functions are not used to create reports per se but rather assist in building reports. For ex, you want to make use of certain property to derive any of the dimension members in one of your axes, you will use EPMMemberProperty. Similary, if you want to override members in any axis, you will make use of EPMDimensionOverride.
Also, EvDRE is not replacement of EPM functions. Rather, you simply create reports using report editor (drag and drop) and then make use of EPM functions to build your report. Forget EvDRE for now.
You can protect your report to not allow users to have that Edit Report enabled for them.
As Vadim rightly pointed out, start building some reports and then ask specific questions.
Hope it clears your doubts. -
Task 0085 for parallel SID assignment terminated with errors
Hi,
While activating the ODS object we are getting the following error
Task 0085 for parallel SID assignment terminated with errors
Can anyone help me on this issue.
Thanks
Sheela DatlaHi Sheela,
Does the problem happen with activating the ODS object (definition) itself or with activating the data in the
ODS? I think that there must be other errors apart from Task 0085. At the time of the error you should check in
sm21 and st22 for additional error messages and dumps. If the problem is with the activation of data in the ODS
you should also check sm37 for the job that is created for the ODS activation , you may find more detailed
information in the job log. You should also check the activation step in the 'Details' TAB in the monitor for
the load there may also be more detailed information here.
In transaction rscusta2 (ODS customizing) you should try the following setting for the activation:
No. of Par. Proc. 3
Min. No. Data Recs. 10000
Wait Time in Sec. 600
Before changing the values you have in RSCUSTA2 please take note of the values you have already in
case you want to change them back.
Best Regards,
Des. -
Error while updating the Assignment details using 'hr_assignment_api'
An exception message is thrown while updating the assignment details through 'hr_assignment_api.update_emp_asg'.
The message is 'ORA-20001: HR_FLEX_VALUE_MISSING: N, COLUMN, ASS_ATTRIBUTE6, N, PROMPT'.
Even though a valid value is being passed to the segement,the error is thrown.
I have tested the API in one instance and it is working fine. Recently I have migrated the codes to nother instance and encountered this error. The only difference is that in the newer instance, the segment is mandatory.
One interesting thing is that, When I update the Assignment through application it is successfully saving the record. Then if I use the API to correct the Assignment, it is working fine. The API is not able to update only when the mandatory segment is null.
Please help
Thanks in advance
KumarPl post details of OS, database and EBS versions, along with HR RUP level. It may be a bug, as outlined in MOS Doc 429169.1 (When Calling the Assignment API To Update Position, It Errors in Required Segment)
HTH
Srini
Maybe you are looking for
-
Tecra S3 process 99% due to video driver
I've got a tecra S3, all with latest drivers available from Toshiba. While browsing some tool/website (a lot of active-X controls in there) the process of IE (Firefix also) goes to 99%, if that process is killed, the process "explorer.exe" goes to 99
-
Is anyone else having the finish rub off of the keys on their macbook? I've had mine for about 6 months and several keys look like the finish is wearing through. I went to the local genius bar today and the techs said they'd never seen this before.
-
Internet Explorer 9, 10, or 11
Internet Explorer 9, 10 or 11 is not showing up in my updates to deploy. I have Updates and Update Rollups selected under Classifications in Software Update Point Component and I'm getting Internet Explorer updates, but not the application IE. I ha
-
EAP-TLS config - No certificates found on your computer.
Howdy, With Aironet client 3.6, it complains that I have no certificates on my computer when I attempt to configure EAP-TLS. As far as I know, I do have certs on my computer. They were created with OpenSSL and appear to comply with the requirements i
-
Have created a field in PO for BP catalogue added this to PLD it prints fine. While printing through MRP BP catalogue doesnt appear's. - blank columns appears instead. Regards, Edited by: Anoop Jacob on Mar 4, 2009 2:13 PM