GET OBJEC
Hi,
I have to use PCH Logical Database in my program.
Can you please let me know:
1. What should I do to get the standard PCH Selection Screen
2. What does GET OBJEC do.
Thanks and Regards,
Ishaq.
Hi Ishaq Ali Khan,
After selecting the logical database in Attributes.
Then inside u need to just give
TABLES: OBJEC.
To fetch the data from database u need to use GET Event block.
Please check this
REPORT logical_database.
TABLES: objec.
GET objec.
WRITE: objec-otype,
objec-objid,
objec-begda,
objec-endda.
Get is an Event Block.
GET in Logical Database acts as SELECT statement . It fetches the data from the database similar to SELECT statement.
Please check this link
http://help.sap.com/search/highlightContent.jsp
Hope this helps...
Best regards,
raam
Similar Messages
-
How to customize the selection screen of Get Objec
hi all,
I'm developing a program for sap hr.
I use the 'Get objec' to creat the selection screen.
and I wanna limit the date selection.
The defaut display is the 'Period' of radio-button group.
and I want only the single field 'Date' for input insead of a period with starting and ending dates (manuelly we need click on a button to switch to 'Date' input).
How can I switch automatically to the 'date' when I initilize my program?
Thanks a lot for your help
YiminHi,
This is possible through program attributes.
goto attributes, click on 'HR Report category'
now make sure that, 'Master Data (Infotype)' is changed accordingly your requirement.
I think it is helpfull to you.
Regards
Sai -
I am new to ABAP-HR.......
what is the difference between GET OBJEC and GET PERNR.
Iam asked to write a program using logical databases .. which one should I use ...
thanks,
shekhar....Hi Nevali.
I would like to suggest,
OBJEC - Work Area for Database PCH
PERNR - HR Master Data Reporting - PNP
Differences,
GET OBJEC - Reporting on Personnel Planning data
GET PERNR - Reporting on HR master data.
I would like to suggest a Reference,
[SAP HELP - Standard Reference for HR Logical Databases|http://help.sap.com/saphelp_nw04/helpdata/en/c6/8a15381b80436ce10000009b38f8cf/content.htm]
Hope that's usefull.
Good Luck & Regards.
Harsh Dave -
Rewrite or optimize the *Get Objec* instruction in an *OM* report
Hi All
I'm facing an optimization issue in a report OM and i would like to rewrite or optimize the code below.. I want to reduce the duration and i'm trying to write a new version without the PCH logical database . Will it be possible to reduce it without the PCH? How can i do it?
Thanks to all!
Infotypes *
infotypes: 1000, "Object
1001, "Relationships
9149, "Site
1013, "Employee Group/Subgroup
1008, "Acct. Assignment Features
1005, "Planned Conpensation
9107, "Org. Unit Type
1007, "Vacancy
0001, "Organisational Assignment
0002, "Personal Data
9101, "For Functional Area
9108. "Org. Unit Ref HR1K901124AJK
start-of-selection.
get objec.
end-of-selection.What is an ageing report? What are the data sources used to develop an aging report
Aging refers to values in different time period ranges. Example, the customer (credit) aging report can look like this.
customer (credit) for current period, 0 to 30 days, 30 to 90 days, 90 to 120 days. This is the way aging is classified.
What data sources does one use to get Balance sheet and P&L accounts tables and fields.
For P&L information, you may use 0FI_GL_6 datasource (or 0FI_GL_10 if you use ERP 5.0 version). This datasource reads the same information used in R/3 transaction f.01 (table glt0).
What are the tasks a BW consultant normally performs when he is involved in an end to end implementation project or a full life cycle project?
Requirement gathering, blueprint creation, development etc
Refer to posts on Sap Methodology and Sap lifecyle
What do you mean when you say worked on BW statistics to optimize the performance of Info Cubes. What are aggregates why do you need them?
Please check these links
http://help.sap.com/saphelp_nw04/helpdata/en/8c/131e3b9f10b904e10000000a114084/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/f0/3c8c3bc6b84239e10000000a114084/plain.htm
What are the design documents does one prepare, please give an example.
Design document is basically a document to say how the design is to be developed for a particular solution ex: FI it says what is the data fow and what are the data targets to be used and how data shld be stored for providing the client a solution they need.
Is cube a data target?
Yes cube is a data target.
Hope this Helps
Anand Raj -
Get OBJEC hide screen and transfer data
Hi experts!
How can i hide this kind of selection screen when i call
"get objec"
and how can i transfer my data manually to the selection range of get objec.
eg. i want to use the "get objec" function to collect the data for three objectid.
i could loop and call get objec 3 times and set the PCHOBJID-LOW value before, but there must be a way to do this with a range.
can someone help me
greets, thomasDear Abhishek, can you explain the step..in this step screen is comming but custom fields value is not coming and also likp table is not updated
Correct AnswerRe: Update and transfer data via BADI LE_SHP_TAB_CUST_HEAD
Abhisek Biswas Jan 21, 2009 7:28 AM (in response to Stephen Keam)
Hi Stephen,
You can do it by using PBO and PAI modules of the screen that you created. But you have to transfer the data from subscreen to the BADI method TRANSFER_DATA_FROM_SUBSCREEN and aslo from method TRANSFER_DATA_TO_SUBSCREEN to the subscreen. This will update the screen field data to LIKP.
You can aceive this by two ways.
1) You can use EXPORT in method TRANSFER_DATA_TO_SUBSCREEN and then IMPORT the value in the screen PBO. And You can EXPORT data from screen PAI and IMPORT data in method TRANSFER_DATA_FROM_SUBSCREEN.
2) Anither way to do it is by using Function modules and Function Group instead of EXPORT/IMPORT.
Create a Function group. In the global data define a structure/Work Area of type LIKP.
DATA w_likp TYPE likp.
Then create two Function modules, one to export data and another to import data.
Let us assume that the export FM takes in IS_LIKP as input and the import FM outputs the value of LIKP into ES_LIKP.
Then pass the value is_likp to the export FM in the BADI method TRANSFER_DATA_TO_SUBSCREEN and in the screen PAI pass the LIKP data to the export FM.
In the export Function module write the following code:
MOVE is_likp TO w_likp
Then in the Import FM write the following code:
MOVE w_likp TO es_likp.
The import FM is called from method TRANSFER_DATA_FROM_SUBSCREEN and from screen PBO.
This will solve your problem.
Regards,
Abhisek.
Alert Moderator
Like (0)
Reply -
Hi,
From what tables are taken data when is processed the code?
get objec.
I suppose, reading other posts, that main table is hrp1000.
Is it right?Hi Tony,
Get OBJEC is the event used to fetch data when u r using Logical database PCH.
Whatever infotypes u mention under Infotypes keyword, all the corresponding tables will be filled as soon as GET OBJEC is triggered. If u want to understand how PCH works just goto Tcode SE36->type PCH->Display and click on SOURCE CODE on the application toolbar to see the code.
Check this and get back to me incase of any queries.
Dont forget to reward points if found useful.
Thanks,
Satyesh -
How to get of loop of get objec
can some one tell how to get of logical database PCH.
Hi,
GEt of LDB PCH, if that means to know the logic for it.
Then goto se36 and give name PCH.
It ill display the related table & structures for you.
If you want to see the code for this logical database, then click on the ' SOURCE CODE' tab on the same screen, it will show the code.
Regards,
Amit
Reward all helpful queries. -
Select Query after the Event "GET node "
Hi,
My requirements is I am calling get object event in my report and preparing an internal table in the get event, after this i need to write a select query based on this internal table..
i want to avoid select query inside get event, my problem is to end the GET event and write a select query..
How can i do that..
can i write it in the end-of-selection.( i don't think so)
it looks like this.
start-of-selection.
get objec.
" Internal table preparation
????????event name needed??????????
select query.....
please suggest.END-OF-SELECTION.
Effect
This statement defines an event block, whose event is raised by the ABAP-runtime environment during the calling of an executable program , if the logical database, with which the program is linked, has completely finished its work.
Moderator message - Sandeep - if you have to cut and paste from the help, please note it as such.
Edited by: Rob Burbank on Nov 26, 2009 12:42 PM -
Hi all,
I need to get persons under an organization unit. I have a org unit number now, and need to get all the persons under it and its sub org units. I means if I get the root of the org structure, I need all the persons in the company.
Now, I guess the relationship between person and position, and the relationship between position and org unit are stored in table HRP1001. But I don't want to use the table directly, I want a Function Module to do this, is there one can match my requirement? Thanks~~For this
you need to use GET OBJEC.
Then upon the selection-screen pass the Evaulation path PERS-O.
which is nothing but the all the Personnel numbers under the org unit.
THEN
AFTER GET objec.
write objec-otype = 'P'.
and process all the personnel numbers
then you can retreive all the employees holding that org unit.
Please let me know for any further help on this...
Sas
Edited by: saslove sap on Oct 22, 2009 8:45 AM -
Dear SDN,
In order to create a custom Report, I need to understand a Standard program, which at a certain point has a "GET objec" command.
The structure objec, in this case, is related to the OBJEC table, which is related to the PCH database that was defined as the Logical Database in the program Attributes. (So far so good!)
My problem is that when the command "GET objec" is executed, it returns specific values in that structure, but I can't find where these data is coming from.
When in my Z program I execute the same command, it returns a completely different set of data.
Please, does anyone know what is the logic behind that command, or how I can find the source of the data that is loaded into this strucutre when the "GET" command is executed?
(The SAP Report in case is RHSBES00)
Thank you.Fabio,
Please search the forums using 'Logical database' and read some documentation to understand the GET command.
Basically it fills the structure from the database using select and goes in a select-endselect loop until the selection screen data is satisfied.
BR,
Diwakar -
OPtimize or rewrite *Get Obejc* instruction
Hi All
I'm facing an optimization issue in a report OM and i would like to rewrite or optimize the code below.. I want to reduce the duration and i'm trying to write a new version without the PCH logical database . Will it be possible to reduce it without the PCH? How can i do it?
Thanks to all!
Infotypes *
infotypes: 1000, "Object
1001, "Relationships
9149, "Site
1013, "Employee Group/Subgroup
1008, "Acct. Assignment Features
1005, "Planned Conpensation
9107, "Org. Unit Type
1007, "Vacancy
0001, "Organisational Assignment
0002, "Personal Data
9101, "For Functional Area
9108. "Org. Unit Ref HR1K901124AJK
start-of-selection.
get objec.
end-of-selection.Feels like I was just at the wrong place and the wrong time, at some unpredictable intersection of circumstances …
Ignoring the message didn't help, just left me without any .pdf output. I felt the need for results, so I started from File > New (as detailed in another post) and finally managed to migrate my content into a doc file that didn't throw any errors. On the way there, I came across "Separation out of range" and "Inconsistent colour definition", which I overcame with MIF and file-by-file comparison.
Arnis, you'd already helped me with the Creator vs real Distiller configuration
Error7103, if I hit this annoyance again I'll experiment with printer settings and routes.
N -
I wnat to add new fieldtext in the alv list output plz tell me
hi,
i whant add new fieldtext in the list output, plz tell me where can i modify it.
CORRECTIONS
DATE CORRECTION NOTE AUTHOR DESCRIPTION
09.03.2001 L9CK045451 0388404 XSC Wrong list output for multiple Os
05.06.2001 AL0K023393 0410219 Lud Wrong keydate for search with
Pchbegda and pchendda.
22.04.2004 S6BK024775 730486 PS Too many selection parameters in
header
19.06.2006 S6BK035494 956731 JF No sorting by qualification
REPORT RHPK_FIND_PERS_WITH_EXPIRED_QU MESSAGE-ID PQ.
DATA AUFRUF(8).
TABLES : OBJEC, GDSET.
DATA LIST.
DATA MARKFIELD(1) TYPE C.
ALV_POOL
TYPE-POOLS SLIS.
INCLUDES
INCLUDE .
INCLUDE RHPEINI0.
TABLES
DATA: orgeh_BUFFER like hrobject OCCURS 1 WITH HEADER LINE.
DATA: OBJECTS LIKE HRSOBID OCCURS 1 WITH HEADER LINE.
DATA: h_OBJEC LIKE objec OCCURS 0 WITH HEADER LINE.
DATA: pers_objects LIKE HRSOBID OCCURS 1 WITH HEADER LINE.
DATA: QUALI_TAB LIKE QUALI_PROF OCCURS 1 WITH HEADER LINE.
DATA: PERSONS LIKE PERSQ_PROF OCCURS 1 WITH HEADER LINE.
DATA: H_PERSONS LIKE HRPE_PROFL OCCURS 1 WITH HEADER LINE.
DATA: LIST_OUTPUT LIKE PERSQ_PROF OCCURS 1 WITH HEADER LINE.
DATA: BOOK_EVENT_TAB LIKE PERSQ_PROF OCCURS 1 WITH HEADER LINE.
DATA: PLAN_EVENT_TAB LIKE PERSQ_PROF OCCURS 1 WITH HEADER LINE.
DATA H_SUITED LIKE DYNP_PCRIT-SUITED.
DATA: O_COLOR LIKE STREEATTR-COLOR.
DATA: O_INTENSIV LIKE STREEATTR-INTENSIV.
DATA SHOW_KEY.
DATA EVENT.
DATA: HTEXT LIKE P1000-STEXT.
DATA: EVENT_TAB LIKE PERSQ_PROF OCCURS 1 WITH HEADER LINE.
DATA: COLLECTED_EVENTS LIKE PERSQ_PROF OCCURS 1 WITH HEADER LINE.
DATA: SUBTY_TAB LIKE HRPE_OTYPE_SUBTY OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF HIDE_STRU,
PERSTYPE LIKE HROTYPE-OTYPE,
PERSOBID LIKE HRSOBID-SOBID,
PERSTXT LIKE PERSQ_PROF-STEXT,
SCALE_ID LIKE HRPE_PROFQ-SCALE_ID,
TRAININGTYPE LIKE HRP1000-OTYPE,
TRAININGID LIKE HRP1000-OBJID,
TRAININGSTXT LIKE HRP1000-STEXT,
QUALID LIKE QUALI_PROF-QUALID,
QUALTEXT LIKE QUALI_PROF-QUALSTXT,
END OF HIDE_STRU.
DATA: BEGIN OF EXTAB OCCURS 10,
FCODE LIKE RSMPE-FUNC,
END OF EXTAB.
DATA: CURRENT_QUALID LIKE QUALI_PROF-QUALID.
DATA: CURRENT_TRAININGSID LIKE HRP1000-OBJID.
DATA: CURRENT_TRAININGTYPE LIKE HRP1000-OTYPE.
DATA: SUBRC LIKE SY-SUBRC.
VARIABLES
DATA: OBJID LIKE P1000-OBJID.
DATA: H_LINE_COUNT TYPE I.
DATA: H_TABIX1 LIKE SY-TABIX.
ALV-Variables
DATA: alv_events_line TYPE slis_alv_event. "header line
DATA ALV_EVENTS TYPE SLIS_T_EVENT.
DATA GT_ALV_LIST_TOP_OF_LIST TYPE SLIS_T_LISTHEADER.
DATA: gt_events TYPE SLIS_T_EVENT.
DATA G_REPID LIKE SY-REPID.
DATA G_VARIANT LIKE DISVARIANT.
DATA ALV_USERCOMMAND TYPE SLIS_FORMNAME VALUE 'USER_COMMAND'.
DATA G_USERCOMMAND_FOR_RANKINGLIST TYPE SLIS_FORMNAME VALUE
'USER_COMMAND_FOR_RANKINGLIST'.
DATA ALV_LAYOUT TYPE SLIS_LAYOUT_ALV.
DATA: GT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
DATA: ALV_OUTPUT LIKE HRPDV_EXPIRED_Q OCCURS 0 WITH HEADER LINE.
DATA: Help_OUTPUT LIKE HRPDV_EXPIRED_Q OCCURS 0 WITH HEADER LINE.
begin of Dynpro 5020 - POPUP: WEITER
DATA: OK_CODE_5020 LIKE SY-UCOMM.
DATA: NO_ORG. "if no org selected
DATA: H_TABIX LIKE SY-TABIX.
begin of Dynpro 20nn - Header
TABLES: DYNP_RHPP.
SELECTION SCREEN
SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-005.
PARAMETERS:
H_EVENTS LIKE DYNP_RHPP-GEN_TRAIN, "with training sugg
H_QUAL LIKE DYNP_RHPP-EXPIRED_QUAL. "with Qual
SELECTION-SCREEN END OF BLOCK B3.
INITIALIZATION
INITIALIZATION.
PERFORM READ_T77S0_PARAMETERS_FOR_PE.
get user parameters/Planvariante und Beginndatum setzen:
PCHOTYPE = $ORGEH.
CALL FUNCTION 'RHP0_USER_PARAMETERS_GET'
EXPORTING
FILL_IF_INITIAL = 'X'
IMPORTING
PLVAR = PCHPLVAR
BEGDA = PCHBEGDA
endda = Pchendda "Correction 0410219
WITH_KEY = SHOW_KEY
SUBSTITUTE =
ESSENTIAL = only_essential
ORG_UNIT = PCHOBJID-LOW
EXCEPTIONS
OTHERS = 0.
PCHBEGDA = LOW_DATE. "Correction note: 0410219 / AL0K023393
get menu text for key on/off
PERFORM USER_MENU_TEXT_KEY(SAPLRHP0) USING G_MENU_TEXT_KEY.
start-of-selection
START-OF-SELECTION.
terminate the selection if objid isn't given
READ TABLE PCHOBJID INDEX 1 TRANSPORTING NO FIELDS.
IF SY-SUBRC <> 0
AND PCHOBJID IS INITIAL.
PCHOBJID-SIGN = 'I'.
PCHOBJID-OPTION = 'EQ'.
PCHOBJID-LOW = '00000001'.
APPEND PCHOBJID.
NO_ORG = TRUE.
ELSE.
NO_ORG = FALSE.
ENDIF.
GET OBJEC.
terminate the selection if objid isn't given
IF NO_ORG = TRUE.
EXIT.
ENDIF.
OBJECTS-PLVAR = PCHPLVAR.
OBJECTS-OTYPE = PCHOTYPE.
OBJECTS-SOBID = OBJEC-REALO.
APPEND OBJECTS.
Für das lesen der Organisationseinheit
h_OBJEC-PLVAR = OBJEC-PLVAR.
h_OBJEC-OTYPE = OBJEC-OTYPE.
h_OBJEC-OBJID = OBJEC-objid.
append h_objec.
Read table h_objec index 1 transporting no fields.
if sy-subrc = 0.
Fill Buffer
orgeh_BUFFER = h_OBJEC.
orgeh_BUFFER[] = h_OBJEC[].
CALL FUNCTION 'RH_TEXT_BUFFER_FILL'
TABLES
OBJECTS = orgeh_BUFFER.
Loop at h_OBJEC.
H_TABIX = SY-TABIX.
Read text of organisation
CALL FUNCTION 'RH_READ_OBJECT'
EXPORTING
PLVAR = h_OBJEC-plvar
OTYPE = h_OBJEC-otype
OBJID = h_OBJEC-OBJID
IMPORTING
OBEG = h_objec-begda
OEND = h_objec-endda
SHORT = short
STEXT = h_OBJEC-stext
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2.
IF SY-SUBRC = 0.
modify h_OBJEC index H_TABIX.
ENDIF.
endloop.
endif.
end-of-selection
END-OF-SELECTION.
read objects of the organizational unit
OBJID = OBJECTS-SOBID.
CALL FUNCTION 'RHPH_PICK_UP_PERSONS'
EXPORTING
BEGDA = PCHBEGDA "Correction 0410219
ENDDA = PCHENDDA "Correction 0410219
STATUS = '1'
WITH_STEXT = 'X'
TABLES
OBJECTS = OBJECTS
PERSONS = H_PERSONS
EXCEPTIONS
UNDEFINED = 1
OTHERS = 2.
IF SY-SUBRC = 0.
prepare objects !
objects-otype = h_persons-ttype.
objects-sobid = h_persons-tobid.
append objects.
ELSE.
EXIT.
ENDIF.
CLEAR OBJECTS. REFRESH OBJECTS.
prepare sel_objects !
pers_objects-PLVAR = PCHPLVAR.
LOOP AT H_PERSONS.
pers_objects-OTYPE = H_PERSONS-TTYPE.
pers_objects-SOBID = H_PERSONS-TOBID.
APPEND pers_objects.
ENDLOOP.
sort objects and delete adjacent duplicates
SORT Pers_OBJECTS BY PLVAR OTYPE SOBID.
DELETE ADJACENT DUPLICATES FROM Pers_OBJECTS COMPARING PLVAR OTYPE
SOBID.
CALL FUNCTION 'RHPK_FIND_PERS_WITH_EXPIRED_Q'
EXPORTING
PLVAR = PCHPLVAR
CHECK_BEGDA = PCHBEGDA
CHECK_ENDDA = PCHENDDA
SUBTY = $ownsb "'B032'
only_essential =
target_otype =
target_ap_iea =
TABLES
IMP_PER_TAB = pers_objects
QUALI_TAB = QUALI_TAB
PERSONS = LIST_OUTPUT
altq_tab =
EXCEPTIONS
NO_QUALIFICATION = 1
NO_PERSON_FOUND = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
100% case
READ TABLE pers_objects INDEX 1 TRANSPORTING NO FIELDS.
IF SY-SUBRC = 0.
sort pers_objects by otype sobid.
check the selected persons: if org.unit was selected !
Loop at pers_objects.
H_TABIX = SY-TABIX.
READ TABLE LIST_OUTPUT WITH KEY OTYPE = pers_objects-OTYPE
SOBID = pers_objects-SOBID
BINARY SEARCH.
IF SY-SUBRC <> 0.
person doesn't belong to the selected org.unit
DELETE LIST_OUTPUT INDEX H_TABIX.
ENDIF.
ENDLOOP.
ENDIF. "org.unit check needed ?
end-of-selection.
sort h_objec by otype objid.
sort list_output by otype sobid.
sort h_persons by ttype tobid.
ALV-Liste aufbauen
loop at h_objec.
loop at h_persons where otype = h_objec-otype "XSC
and sobid = h_objec-objid. "XSC
Read table list_output with key
otype = h_persons-ttype
sobid = h_persons-tobid
binary search.
if sy-subrc = 0.
h_tabix1 = sy-tabix.
while sy-subrc = 0.
clear alv_output. "XSC
ALV_OUTPUT-otype = h_objec-otype.
ALV_OUTPUT-sobid = h_objec-objid.
ALV_OUTPUT-stext = h_objec-stext.
ALV_OUTPUT-Ptype = LIST_OUTPUT-otype.
ALV_OUTPUT-pobid = LIST_OUTPUT-sobid.
ALV_OUTPUT-pshort = LIST_OUTPUT-short.
ALV_OUTPUT-ptext = LIST_OUTPUT-stext.
ALV_OUTPUT-qualid = LIST_OUTPUT-qualid.
ALV_OUTPUT-qualstxt = LIST_OUTPUT-qualstxt.
ALV_OUTPUT-expbegda = LIST_OUTPUT-vbegda.
ALV_OUTPUT-expendda = LIST_OUTPUT-vendda.
PERFORM FIND_TRAINING TABLES QUALI_TAB EVENT_TAB COLLECTED_EVENTS
USING $PLVAR $GDATE H_EVENTS H_QUAL.
IF NOT EVENT_TAB[] IS INITIAL.
READ TABLE COLLECTED_EVENTS WITH KEY
QUALID = LIST_OUTPUT-QUALID.
IF SY-SUBRC = 0.
ALV_OUTPUT-ICON_S_EVENTS = ICON_BOOKEVENT.
endif.
ENDIF.
Append ALV_OUTPUT.
h_tabix1 = h_tabix1 + 1.
READ TABLE list_output INDEX h_tabix1
COMPARING otype sobid.
endwhile.
endif.
endloop.
endloop.
check if indicator for qualification view is set
IF h_qual = 'X'. "note 956731
SORT alv_output by qualid OTYPE SOBID ptype pobid "note 956731
expbegda expendda. "note 956731
ELSE. "note 956731
SORT alv_output by OTYPE SOBID ptype pobid qualid expbegda expendda.
ENDIF. "note 956731
DELETE ADJACENT DUPLICATES FROM ALV_OUTPUT COMPARING OTYPE SOBID ptype
pobid qualid expbegda expendda.
stext_AQ und icon-Feld noch nicht gefüllt
perform PREPARE_TOP_OF_LIST.
perform Build_FIELDCAT using GT_FIELDCAT[] H_EVENTS.
perform ALV_LAYOUT USING alv_layout.
G_REPID = SY-REPID.
G_VARIANT-REPORT = G_REPID.
PERFORM EVENTTAB_BUILD USING GT_EVENTS.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = 'X'
I_CALLBACK_PROGRAM = G_REPID
I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
I_CALLBACK_USER_COMMAND = ALV_USERCOMMAND
I_STRUCTURE_NAME = 'HRPDV_EXPIRED_Q'
IS_LAYOUT = ALV_LAYOUT
IT_FIELDCAT = GT_FIELDCAT[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = 'A'
IS_VARIANT = G_VARIANT
IT_EVENTS = GT_EVENTS
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = ALV_OUTPUT
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2 .
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*& Form FIND_TRAINING
text
-->P_QUALI_TAB text
-->P_EVENT_TAB text
-->P_$PLVAR text
-->P_GDATE text
-->P_H_EVENT text
-->P_H_QUAL text
FORM FIND_TRAINING TABLES P_QUALI_TAB STRUCTURE QUALI_TAB
P_EVENT_TAB STRUCTURE EVENT_TAB
P_COLLECTED_EVENTS STRUCTURE COLLECTED_EVENTS
USING VALUE(P_$PLVAR) LIKE P1000-PLVAR
VALUE(P_GDATE) LIKE P1000-GDATE
VALUE(P_H_EVENT) TYPE ANY
VALUE(P_H_QUAL) TYPE ANY.
IF NOT P_H_EVENT IS INITIAL.
READ TABLE EVENT_TAB INDEX 1 TRANSPORTING NO FIELDS.
IF SY-SUBRC <> 0.
CLEAR P_EVENT_TAB. REFRESH EVENT_TAB.
CLEAR P_COLLECTED_EVENTS. REFRESH P_COLLECTED_EVENTS.
IF EVENT = FALSE.
EVENT = TRUE.
ELSE.
EVENT = FALSE.
ENDIF.
CALL FUNCTION 'RHPH_FIND_TRAINING_FOR_QUAL'
EXPORTING
PLVAR = PCHPLVAR
GDATE = SY-DATUM
GET_NAME = 'X'
TABLES
QUALI_TAB = QUALI_TAB
TO_Q_TAB = EVENT_TAB
EXCEPTIONS
NO_QUALIFICATION = 1
NO_OBJECT_FOUND = 2
TECHNICAL_ERROR = 3
OTHERS = 4.
IF SY-SUBRC = 0.
the found qualifications are picked up into table event_tab
ENDIF.
IF SY-SUBRC = 1.
MESSAGE S015. "Zu den Eingaben wurden keine Daten gefunden
ENDIF.
IF SY-SUBRC > 2.
EXIT.
ENDIF.
collect events when there are double.
Veranstaltungen kollektieren, Können mehrfach auftauchen, da
verschiedenen Qualifikationen von gleichen Veranstaltungen vermittelt
LOOP AT P_EVENT_TAB INTO P_COLLECTED_EVENTS.
APPEND P_COLLECTED_EVENTS.
ENDLOOP.
SORT P_COLLECTED_EVENTS BY QUALID STEXT.
ENDIF.
ENDIF.
ENDFORM. " FIND_TRAINING
*& Form PREPARE_TOP_OF_LIST
text
--> p1 text
<-- p2 text
FORM PREPARE_TOP_OF_LIST.
DATA ALV_TOP_OF_LIST TYPE SLIS_LISTHEADER. "typ, key, info
DATA STEXT LIKE HRPDV_SUCCESSOR_VIEW-TTEXT.
DATA P_SUBRC LIKE SY-SUBRC.
DATA P_STEXT LIKE T777O-OTEXT.
DATA l_tabix like sy-tabix value 0.
DATA: h_counter TYPE i. "note 730486
ALV_TOP_OF_LIST-TYP = 'H'.
ALV_TOP_OF_LIST-INFO = TEXT-REQ.
APPEND ALV_TOP_OF_LIST TO GT_ALV_LIST_TOP_OF_LIST.
Organisationseinheit
ALV_TOP_OF_LIST-typ = 'S'.
Read text for organisationunit
PERFORM READ_TEXT_OTYPE_T777O(SAPLRHP0) USING SY-LANGU $ORGEH
P_STEXT P_SUBRC.
ALV_TOP_OF_LIST-key = P_STEXT.
fill buffer for read organisation-text
CALL FUNCTION 'RH_TEXT_BUFFER_FILL'
EXPORTING
CHECK_STRU_AUTH = 'X'
WITH_EXTINT = ' '
TABLES
OBJECTS = OBJECTS.
loop at objects for multipleselection
clear h_counter. "note 730486
LOOP AT OBJECTS.
$OBJID = OBJECTS-SOBID.
CALL FUNCTION 'RH_READ_OBJECT'
EXPORTING
PLVAR = OBJECTS-PLVAR
OTYPE = OBJECTS-OTYPE
OBJID = $OBJID
IMPORTING
SHORT = short
STEXT = STEXT
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IF h_counter >= 15. "note 730486
MOVE '( ... )' TO ALV_TOP_OF_LIST-INFO. "note 730486
APPEND ALV_TOP_OF_LIST TO gt_alv_list_top_of_list.
"note 730486
EXIT. "note 730486
ENDIF. "note 730486
CONCATENATE $ORGEH OBJECTS-SOBID STEXT INTO
ALV_TOP_OF_LIST-INFO SEPARATED BY SPACE.
APPEND ALV_TOP_OF_LIST TO GT_ALV_LIST_TOP_OF_LIST.
CLEAR ALV_TOP_OF_LIST.
ALV_TOP_OF_LIST-typ = 'S'.
l_tabix = l_tabix + 1.
ADD 1 TO h_counter. "note 730486
ENDLOOP.
CLEAR ALV_TOP_OF_LIST.
ALV_TOP_OF_LIST-TYP = 'S'.
ALV_TOP_OF_LIST-key = TEXT-003.
WRITE PCHBEGDA TO ALV_TOP_OF_LIST-INFO.
APPEND ALV_TOP_OF_LIST TO GT_ALV_LIST_TOP_OF_LIST.
clear ALV_TOP_OF_LIST-INFO.
ALV_TOP_OF_LIST-key = TEXT-004.
WRITE PCHENDDA TO ALV_TOP_OF_LIST-INFO.
Append ALV_TOP_OF_LIST TO GT_ALV_LIST_TOP_OF_LIST.
ENDFORM. " PREPARE_TOP_OF_LIST
*& Form BUILD_FIELDCAT
text
-->P_GT_FIELDCAT[] text
FORM BUILD_FIELDCAT USING P_GT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV
P_H_EVENTS.
DATA: WA_FIELDCAT LIKE LINE OF P_GT_FIELDCAT.
DATA: P_REPNAME LIKE SY-REPID,
L_TABIX LIKE SY-TABIX. "local variable for sy-tabix.
P_REPNAME = SY-REPID.
Erstellen des Feldkataloges
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = P_REPNAME
I_INTERNAL_TABNAME =
I_STRUCTURE_NAME = 'HRPDV_EXPIRED_Q'
I_CLIENT_NEVER_DISPLAY = 'X'
I_INCLNAME = PRONAME
CHANGING
CT_FIELDCAT = P_GT_FIELDCAT
EXCEPTIONS
INCONSISTENT_INTERFACE = 0
PROGRAM_ERROR = 0
OTHERS = 0.
LOOP AT P_GT_FIELDCAT INTO WA_FIELDCAT.
l_tabix = sy-tabix.
CASE WA_FIELDCAT-FIELDNAME.
when 'OTYPE'.
WA_FIELDCAT-DDICTXT = 'L'.
when 'SOBID'.
WA_FIELDCAT-DDICTXT = 'L'.
WHEN 'STEXT'.
WA_FIELDCAT-DDICTXT = 'L'.
when 'PTYPE'.
WA_FIELDCAT-DDICTXT = 'L'.
when 'POBID'.
WA_FIELDCAT-DDICTXT = 'L'.
when 'PSHORT'.
WA_FIELDCAT-DDICTXT = 'L'.
WHEN 'PTEXT'.
WA_FIELDCAT-DDICTXT = 'L'.
WHEN 'QUALID'.
WA_FIELDCAT-DDICTXT = 'L'.
WHEN 'QUALSTXT'.
WA_FIELDCAT-DDICTXT = 'L'.
WHEN 'EXPBEGDA'.
WA_FIELDCAT-DDICTXT = 'L'.
WHEN 'EXPENDDA'.
WA_FIELDCAT-DDICTXT = 'L'.
WHEN 'ICON_S_EVENTS'.
IF P_H_EVENTS IS INITIAL.
WA_FIELDCAT-NO_OUT = 'X'.
else.
WA_FIELDCAT-DDICTXT = 'X'.
endif.
ENDCASE.
MODIFY P_GT_FIELDCAT FROM WA_FIELDCAT INDEX l_tabix.
ENDLOOP.
ENDFORM. " BUILD_FIELDCAT
*& Form ALV_LAYOUT
text
-->P_L_ALV_LAYOUT text
FORM ALV_LAYOUT USING P_ALV_LAYOUT TYPE slis_layout_alv.
build layout
P_LAYOUT-BOX_FIELDNAME = 'MARK_X'. "fieldname for checkbox
P_ALV_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
P_ALV_LAYOUT-BOX_TABNAME = ALV_OUTPUT. "tabname for checkbox
p_ALV_layout-info_fieldname = 'ALV_COLOR'.
ENDFORM. " ALV_LAYOUT
FORM eventtab_build USING
FORM EVENTTAB_BUILD USING RT_EVENTS TYPE SLIS_T_EVENT.
DATA: LS_EVENT TYPE SLIS_ALV_EVENT.
MOVE 'TOP_OF_PAGE' TO LS_EVENT-NAME.
MOVE 'TOP_OF_PAGE' TO LS_EVENT-FORM.
APPEND LS_EVENT TO RT_EVENTS.
ENDFORM. "EVENTTAB_BUILD
*FORM TOP_OF_PAGE
FORM TOP_OF_PAGE. "#EC CALLED
NEW-PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = GT_ALV_LIST_TOP_OF_LIST[].
ENDFORM. "TOP_OF_PAGE
FORM USER_COMMAND *
USER_COMMAND for the list of successor view *
--> r_ucomm *
--> rs_selfield *
FORM USER_COMMAND USING ALV_UCOMM LIKE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD. "#EC CALLED
DATA: SELECTED_LINE LIKE HRPDV_expired_q.
DATA: SOBID_QUA LIKE P1000-OBJID.
DATA: LT_PERS_TAB LIKE HRSOBID OCCURS 0 WITH HEADER LINE.
CASE ALV_UCOMM.
WHEN '&IC1'. "per Doppelklick auswählen
READ TABLE ALV_OUTPUT INDEX
RS_SELFIELD-TABINDEX INTO SELECTED_LINE.
CASE RS_SELFIELD-FIELDNAME.
WHEN 'POTYPE' or 'POBID' or 'PTEXT' or 'OTYPE' or 'SOBID' or
'STEXT' or 'QUALID' or 'QUALSTXT' or 'EXPBEGDA' or 'EXPENDDA'.
READ TABLE ALV_OUTPUT INDEX RS_SELFIELD-TABINDEX INTO
Help_output.
IF SY-SUBRC <> 0.
MESSAGE S027. "Bitte gültige Zeile auswählen
EXIT.
Endif.
IF ALV_OUTPUT-SOBID IS INITIAL.
MESSAGE S015. "Zu den Eingaben wurden keine Daten gefunden
ELSE.
converte the variable because of the different types
SOBID_QUA = SELECTED_LINE-SOBID_QUA.
CALL FUNCTION 'RHPP_SHOW_PROFILE'
EXPORTING
PLVAR = pchplvar
OTYPE = SELECTED_LINE-PTYPE "XSC
OBJID = SELECTED_LINE-POBID "XSC
BEGDA = PCHBEGDA
ENDDA = PCHENDDA
MAINTAIN = ' '
EXCEPTIONS
NO_AUTHORITY = 1
NOT_FOUND = 2
OTHERS = 3.
CASE SY-SUBRC.
WHEN 0.
All right.
WHEN 1.
MESSAGE S015.
Zu Ihren Eingaben konnten keine Daten gefunden werden!
WHEN 2.
MESSAGE E000.
Dazu haben sie keine berechtigung!
WHEN OTHERS.
MESSAGE E008.
Es ist ein unvorhergesehener Fehler aufgetreten.
ENDCASE. "sy-subrc.
CLEAR ALV_OUTPUT.
ENDIF. "IF ALV_OUTPUT-SOBID IS INITIAL.
CLEAR ALV_OUTPUT-SOBID.
when 'ICON_S_EVENTS'.
IF SELECTED_LINE-ICON_S_EVENTS IS INITIAL.
MESSAGE S027. "Bitte gültige Zeile auswählen
EXIT.
ENDIF.
CLEAR LT_PERS_TAB.
REFRESH LT_PERS_TAB.
LT_PERS_TAB-PLVAR = pchPLVAR.
LT_PERS_TAB-OTYPE = SELECTED_LINE-PTYPE. "XSC
LT_PERS_TAB-SOBID = SELECTED_LINE-POBID. "XSC
APPEND LT_PERS_TAB.
SOBID_QUA = SELECTED_LINE-QUALID.
CALL FUNCTION 'RHPP_SHOW_SUGGEST_EVENTS'
EXPORTING
P_PLVAR = pchPLVAR
P_SOBID_QUA = SOBID_QUA
P_PROFCY_REQ = SELECTED_LINE-RATING_REQ
P_GDATE = sy-datum
TABLES
EVENT_TAB =
PERS_TAB = LT_PERS_TAB.
endcase.
CLEAR SELECTED_LINE.
ENDCASE. "case sy-ucomm
CLEAR SY-UCOMM.
ENDFORM. "USER_COMMANDPls be more specific in your question. If you want to include an extra field in your alv output, then read the field catalog table you created through "Reuse_alv_fieldcatalog_merge" and then add an extra entry in it giving the details of the field you want to add.. and then call the "resuse_alv_grid_display",
Hope this helps. To be able to help you in a better way, kindly revert with any specific issue.
Reward if helpful,
Karan -
hi techies.. im working on OM report. my requirement is to provide a list report showing the relationships between task and other organizational units.
and The report selection criteria will include following:
Task or Position (which perspective should the report be based on)
Task or Position selection
Search Term (if searching by name is necessary)
Period selection criteria
plz help me in doing this report. thank u in advance.REPORT demo_abap_objects.
TABLES: objec, gdstr.
INFOTYPES: 0002, 0006, 1003.
DATA: stabs LIKE p1003-stabs,
name LIKE p0001-ename.
INITIALIZATION.
pchotype = 'O'.
pchwegid = 'O-S-P'.
GET objec.
IF objec-otype = 'S'.
CLEAR stabs.
LOOP AT p1003 WHERE begda LE pc-endda
AND endda GE pc-begda.
IF p1003-stabs = 'X'.
stabs = 'X'.
WRITE : / objec-objid, objec-short, objec-stext.
ENDIF.
ENDLOOP.
ENDIF. -
Hr report using pch not working
I am trying to create a report using logical database pch.here is the code
TABLES: objec,
gdstr.
INFOTYPES: 0002,
1003.
GET objec.
LOOP AT p1003
WHERE begda LE pc-begda
AND endda GE pc-begda.
write: / p1003-abtel.
ENDLOOP.
but p1003 is not filled with value .
Anyone pls help me outdid you include start-of-selection and end-of-selection?
example:
TABLES: objec,
gdstr.
INFOTYPES: 0002,
1003.
start-of-selection.
GET objec.
LOOP AT p1003
WHERE begda LE pc-begda
AND endda GE pc-begda.
write: / p1003-abtel.
ENDLOOP.
end-of-selection.
Warren
Message was edited by:
Warren Clements -
Can anyone tell me how to read objects with planned status using PCH ldb.
Only objects with Active Status are read at Get Objec Event.Is there any specific reason that you cannot control the field?
Could you possibly add you own custom field to the selection screen for object status? Then before your get statement, you could populate the standard select option with the value from your custom select option.
Regards,
Chris H.
Maybe you are looking for
-
Change background color of JList
Hi Guys How do I set the background color under the JList (row headers)? and I do not mean Jlist.setBackgroundColor()!! Under the JList there is just white space but under the data column there is a grey color,,,and of course this looks like crap. Ho
-
Hello experts, I am getting a problem while working with field symbols. I have some data field symbol in the form of structure. The field symbols have the type 'TABLE' so the data fills in runtime, so the structure also changes run
-
My Photoshop elements 12 won't open
At Christmas I got given Photoshop Elements 12 for a preset, I was really excited to try it out but after download it wouldn't open (I have Windows 8). I ran the TroubleShooter and it says 'Incompatible program' but it says on the box 'Compatible wit
-
Anyone know of a shortcut to automatically Print to PDF?
I just want to dispense with the three step process to do a Print to PDF - hold my tongue right or something so that I can, say, Command, Alt, Shift, Option, Wiggle, P to get pass the dialogs. Anyone know of a setting or preference that allows me to
-
Protect DesignTime Object In GP
Hai All , I Developing objects in Gp at Designtime . By creating the Folder under that callable Objects , Actions,Blocks,Process. I want Protect my Objects. No other user will not able to modify. How to Do this ! if any one know tell me..