Te:Texts in abap hr
Hello,
can anyone please tell me how to get texts for job and position of an employee in abap hr.
Thanks.
Ramya.
Hi,
Check the below code inorder get the details of employee.
CONSTANTS:
c_plvar(2) TYPE c VALUE '01',
c_otype(2) TYPE c VALUE 'P',
c_pos(2) TYPE c VALUE 'S',
c_org(2) TYPE c VALUE 'O'.
*get information from pa0001.
select single ename werks plans orgeh
from pa0001
into (wa_emp-manager_name,
wa_emp-manager_dept_num,
wa_emp-manager_posnr,
wa_emp-manager_team_num)
where pernr = l_man_pernr
and begda LE sy-datum
and endda GE sy-datum.
select position title text from HRP1000
select single stext into wa_emp-manager_postext
from hrp1000
where plvar = c_plvar
and otype = c_pos
and objid = wa_emp-manager_posnr
and begda LE sy-datum
and endda GE sy-datum.
*select team name text from HRP1000
select single stext into wa_emp-manager_team_nam
from hrp1000
where plvar = c_plvar
and otype = c_org
and objid = wa_emp-manager_team_num
and begda LE sy-datum
and endda GE sy-datum.
get the pers area text from t500p
select single name1 into wa_emp-manager_dept_txt
from t500p
where persa = wa_emp-manager_dept_num.
Regards,
Kumar
Edited by: kumar789 on Feb 17, 2010 5:45 PM
Similar Messages
-
Creating a long text using ABAP code.. fm SAVE_TEXT
When you create an order via IW31 one of the options is to click on the text button and create a long text. I am basically trying to mimic this action from within my ABAP code.
The text id details are as follows:
Text Name 500000015000046 which is (5000000 + order number)
Language EN
Text ID KOPF Order header text
Text Object AUFK Order text
If i manually create the text within the transaction i am then able to view and update it via function modules READ_TEXT and SAVE_TEXT. But if the text has not already been created READ_TEXT obviously returns nothing as it does not exist and SAVE_TEXT does not seem to created it!
Anyone know how i would go about creating this text using ABAP code?
Hope this make a bit of sense
Thanks in advance
MartI have implemented the code as i think it should be. See below, can any see what is wrong. If i add init_text it makes no difference and adding the commit_text just makes it hang
DATA: IT_TEXTS type standard table of TLINE,
wa_texts like line of it_texts,
wa_txtheader type THEAD.
wa_txtheader-TDID = 'KOPF'.
wa_txtheader-TDSPRAS = 'EN'.
wa_txtheader-TDNAME = '500000015000056'.
wa_txtheader-TDOBJECT = 'AUFK'.
wa_texts-tdformat = '*'.
wa_texts-tdline = 'hello'.
append wa_texts to it_texts.
wa_texts-tdformat = '*'.
wa_texts-tdline = 'hello'.
append wa_texts to it_texts.
wa_texts-tdformat = '*'.
wa_texts-tdline = 'hello'.
append wa_texts to it_texts.
wa_texts-tdformat = '*'.
wa_texts-tdline = 'hello'.
append wa_texts to it_texts.
wa_texts-tdformat = '*'.
wa_texts-tdline = 'hello'.
append wa_texts to it_texts.
wa_texts-tdformat = '*'.
wa_texts-tdline = 'hello'.
append wa_texts to it_texts.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
CLIENT = SY-MANDT
HEADER = wa_txtheader
INSERT = 'X'
SAVEMODE_DIRECT = ' '
OWNER_SPECIFIED = 'X'
LOCAL_CAT = ' '
IMPORTING
FUNCTION =
NEWHEADER =
TABLES
LINES = IT_TEXTS
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
OBJECT = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. -
how to make bigger text in ABAP web dynpro
Hi Jean,
there are several options.
a) as an enduser: use the web browser settings (in IE: menu -> view -> text size)
b) as a programmer: depending on the type of the view element use different designs. E.g. for the element "TextView" use design "header1"
c) as an admin / programmer: call the web dynpro application using your own style sheet.
Silke -
Hi everyone,
I'm tríing to retrieve the OTR text from ABAp code:
ls_info-text = cl_wd_utilities=>get_otr_text_by_alias(
alias = 'YHR1/COMPLE'
language = sy-langu ).
The problem is that the text only retrieved by it's original language, if I try a different language the result is empty
(Of course the text exist in both languages I've double checked it )
Does anyone have any idea what is the problem?
Thanks & bye
N.Ok I have the answer now.
The only way to translate the text properly is SOTR_EDIT transaction
Here's a guide :
https://wiki.sdn.sap.com/wiki/display/WDABAP/TranslatingTextswith+SOTR -
How to create a view to display Multiple lines of Text using ABAP WebDynpro
Hi,
I need to create a static view page in ABAP WebDynpro that displays Static text data in multiple paragraphs. I tried to use textview, formatted text, text edit controls by binding the textcontrol to a text object that is created in so10, but the output I am getting is only one line and the character count is limited to 60 to 65 characters.
I would like to know which control needs to be used in ABAP Webdynpro to get multiple lines displayed with text formatting like Paragraph, Indenting and Size.....
Thanks for your time!
Madhavi.Find the sample codes:
data sapscript_lines type tlinetab.
data sapscript_lines1 type tlinetab.
data sapscript_tline type tline.
data sapscript_head type thead.
data text type string.
data formatted_text type ref to cl_wd_formatted_text.
call function 'DOCU_GET'
EXPORTING
id = 'TX'
langu = 'D' "Germany language
object = 'WDR_TEST_HELP_EXP1'
IMPORTING
head = sapscript_head
TABLES
line = sapscript_lines
EXCEPTIONS
no_docu_on_screen = 1
no_docu_self_def = 2
no_docu_temp = 3
ret_code = 4
others = 5.
if sy-subrc <> 0.
text = space.
endif.
formatted_text = cl_wd_formatted_text=>create_from_sapscript(
sapscript_head = sapscript_head
sapscript_lines = sapscript_lines
" set it into the context
if Not ( formatted_text is initial ).
wd_context->set_attribute(
name = 'FORMATTED'
value = formatted_text->m_xml_text ).
endif.
clear sapscript_head.
clear sapscript_lines.
*Get the text created by SO10
CALL FUNCTION 'READ_TEXT_INLINE'
EXPORTING
ID = 'ST'
INLINE_COUNT = 1
LANGUAGE = 'E' "English language
NAME = '85XX_FOOTER'
OBJECT = 'TEXT'
LOCAL_CAT = ' '
IMPORTING
HEADER = sapscript_head
TABLES
INLINES = sapscript_lines1
LINES = sapscript_lines
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
OTHERS = 7
formatted_text = cl_wd_formatted_text=>create_from_sapscript(
sapscript_head = sapscript_head
sapscript_lines = sapscript_lines
" set it into the context
if Not ( formatted_text is initial ).
wd_context->set_attribute(
name = 'FORMATTED1'
value = formatted_text->m_xml_text ).
endif. -
Translating text symbols and selection texts in abap report
Hi All,
I have devolped a report and in that translation of selction texts and text symbols is required.
Problem: In abap text elements in the report i have gone for goto->translation->and then i have tried to translate by giving the target language as DE and changed all the texts but when i am tring to save it is showing a message that 'STILL 54 OF 54 TEXTS TO BE PROCESSED'.
Alternative solution :I have tried even using se63 and selected <rept> selection texts.
but still its showing the same error ('STILL 54 OF 54 TEXTS TO BE PROCESSED'.)
from se63.
kindly give me solution for this issue.
Thank you,
bhavani.Hi Bhavani.
Check the [SAP Document for translation|http://help.sap.com/saphelp_sm32/helpdata/EN/41/71601b3ab0f34a8e00aa01338c68f3/content.htm] -
[MESSAGE.GENERAL] How can take the actual error text for ABAP proxy error?
Hi...
I'm a ABAPer.
I got to create outbound abap proxy for synchronous server proxy and described below.
My problem is program can not catch the actual error message when occurred error during send data to XI.
The return message is just 'MESSAGE.GENERAL'.
But according to the XI part, 'Key error' is actual reason.
So... how can i take the actual error text like 'Key error'?
<b>* Only MESSAGE.GENERAL is return message for all kind of errors.</b>
Thanks.
Below----
TRY.
CREATE OBJECT abap_proxy.
CALL METHOD abap_proxy->execute_synchronous
EXPORTING
output = gs_out
IMPORTING
input = gs_in.
Exception Handling
<b> CATCH cx_ai_system_fault INTO go_sys_exception.
g_sys_result = go_sys_exception->get_text( ).</b>
CATCH cx_ai_application_fault INTO go_app_exception.
g_app_result = go_app_exception->get_text( ).
ENDTRY.
COMMIT WORK.
Return status 'D' is succeeded.
if gs_in-sales_group_rer_sap-xstat <> 'D'.
WRITE:/ 'System Error Message :', g_sys_result.
WRITE:/ 'Application Error Message :', g_app_result.
endif.
*--Result--
System Error Message : MESSAGE.GENERAL
Application Error Message :
Message was edited by: Miju cho
Message was edited by: Miju choThanks guys, this was useful.
My scenario is for Asynchronous communication.
I guess Fault messages are used in case of Synchronous communication for handling application errors. So if there was something wrong at the JDBC end then I could use the fault messages.
Have i got this right?
I also came across this piece on Acknowledgements. But is says that they can be used with the following Receivers:
The following receivers support acknowledgments:
ABAP and Java proxies (XI 3.0 SP1 for the latter)
Integration processes
IDocs (note that IDocs only return acknowledgments when they have been configured using the ALE audit)
Receiver adapters support system acknowledgments but not application acknowledgments
My Receiver is JDBC. So I guess I cannot use acknowledgements either.
Hence, I need to know what I can do to replicate the system errors eg. failed server etc...so that I can get catch these errors during sending.
I'll tell you abt what happened earlier.
My XI server was down. I executed the code for the sender ABAP Proxy and it did not catch the error. In SXMB_MONI in the R/3 system, I could see the messages queued up. When the XI server started, the messages were transferred to XI.
I need to handle such errors...ie. If the server is down or message did not reach XI then my ABAP program that sends data via ABAP proxy needs to know that something went wrong.
Thanks and Regards,
Ashwin -
Text Editor & ABAP Syntax Check
Hi all,
I've included a text editor box into my project to allow the user to key in ABAP codes. i got the codes of a sample program but i'm not sure how it works. can anyone kind enough to explain to me how to add buttons or assign functions to the buttons?
secondly, because i allow free-text for the user to key in ABAP codes, is there a function to check the syntax of the codes entered by the user?
i'll reward handsomely for any help rendered and it will be better if you could include sample codes as well(:
thanks!!! (:
SAMPLE CODE FOR TEXT EDITOR:
IF CODE_EDITOR IS INITIAL.
CREATE OBJECT CODE_EDITOR_CONTAINER
EXPORTING
CONTAINER_NAME = 'GEN_CODE'
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
CREATE_ERROR = 3
LIFETIME_ERROR = 4
LIFETIME_DYNPRO_DYNPRO_LINK = 5.
CREATE OBJECT CODE_EDITOR
EXPORTING
PARENT = CODE_EDITOR_CONTAINER
WORDWRAP_MODE =
CL_GUI_TEXTEDIT=>WORDWRAP_OFF
CL_GUI_TEXTEDIT=>WORDWRAP_AT_FIXED_POSITION
CL_GUI_TEXTEDIT=>WORDWRAP_AT_WINDOWBORDER
WORDWRAP_POSITION = G_EDITOR_LENGTH
WORDWRAP_TO_LINEBREAK_MODE = CL_GUI_TEXTEDIT=>TRUE.
ENDIF.
Edited by: Leslie Koh on Jan 18, 2008 4:28 AMHi Leslie
There is a abap key word which may help your purpose to do the syntax check. Please check the key work "SYNTAX-CHECK FOR itab " to be more in details,
Basic form :
SYNTAX-CHECK FOR itab ...MESSAGE f ...LINE g ...WORD h.
Extras:
1. ... PROGRAM f1
2. ... INCLUDE f2
3. ... OFFSET f3
4. ... TRACE-TABLE itab1
5. ... DIRECTORY ENTRY f4
6. ... REPLACING f5
7. ... FRAME ENTRY f6
8. ... MESSAGE-ID f7
9. ... ID id TABLE itab2
10.... SHORTDUMP-ID f8
11.... FILTER f9
This syntax will help you to check the syntax errors of ABAP program passed as internal table. You can get the entries keyed in by user in editor control through class method CL_GUI_TEXTEDIT->GET_TEXT_AS_R3TABLE in your PAI.
Hope this helps !
Kind Regards
Ranganath -
Finding Hard coded Text in ABAP program
Gurus,
Is there any method to find out Hard coded TEXT in an abap Program? For Example
write:/ TEXT-T01,
'Hello World',TEXT-T02.
In which i need to find out Hello world which is inside ''. I am not able to find with Search command.
Can you Please guide me,
Regards,
Lijo Joseph
Message was edited by: Lijo Joseph vazhappillytry this.
data: report_pg type SY-REPID ,
rpt_source type standard table of D022S .
REFRESH rpt_source .
move: <rpt name> to report_pg .
READ REPORT report_pg INTO rpt_source .
now do a search/find in rpt_source.
Regards
Raja -
How to get the field texts from abap dictionary into screen Text fields
Hi SapAll.
here i have got to modify one zscreen by adding 1 more field,when i added one field in teh screen by just writng the code in program as SELECT-OPTIONS ilart FOR CAUFVD-ILART.
but iam unable to get the field text for the text field from teh table CAUFVD.
CAN ANY BODY HELP ME IN THIS.
regards.
varmaHi Varma,
Even if you want to personalise the Text also you can do without checking the DICTREF checkbox. Dirctly you can give the text in the Text elements by using the Menu GOTO -> Text Elemetns -> Selection Texts.
Regards
Thiru -
How to get Leave Request text in ABAP HR
Dear Expert,
I am using BADI PT_ABS_REQ to validate leaves applied on portal.
Here I am getting ITEM_ID for the leave request, but I need leave request_id for leave text.
Also I want to update the timing of leave manually, based on the Leave applied (Exp First Half/Second Half).
Thanks.
Regards,
HemendraThe text i think you are referring to is in table PTREQ_NOTICE. The key is REQUEST_ID.
Edit : Sorry misunderstood the question. You can get REQUEST_ID from PTREQ_HEADERS where ITEM_LIST_ID equals ITEM_ID.
Edited by: Pedro Guarita on Apr 13, 2011 3:23 PM -
Displaying Russian commented text in ABAP program
Hi Experts,
I have one program in which comments are in Russian and in one system those commented text is being displayed in Russian after after choosing Cyrillic from Character set of Customizing of local layout option while in an other system same commented texts are displayed as junk characters even after choosing Cyrillic from Character set of Customizing of local layout option.
Example :
In 1st system, russian commented text is displayed correctly as follow
DATA: YEAR_AFABG(4) TYPE N. " Год даты начала амортизации
while in 2nd system in which code comes from the 1st sytem, russian commented text is not displayed in russian and displayed as junk characters as follows -
DATA: YEAR_AFABG(4) TYPE N. " Ãîä äàòû íà÷àëà àìîðòèçàöèè
Can anybody help me on these ? Any help would be highly appreciated.
Thanks in advance,
Akashtry this.
data: report_pg type SY-REPID ,
rpt_source type standard table of D022S .
REFRESH rpt_source .
move: <rpt name> to report_pg .
READ REPORT report_pg INTO rpt_source .
now do a search/find in rpt_source.
Regards
Raja -
Form of address text - HR ABAP
Hi all,
I have a requirement to get the Form of address text(e.g. Mr. Ms, Miss) from infotype field Q0002-ANREX into my smartform. Please advice how can i do the same.
Thanks & Reagrds,
Preetiplease don't use Q struture lilke Q0002-ANREX ...
it is there in th intotpye table pa00002 there the fireld is <b>ANRED -> Form-of-Address Key</b> ..
For that the check table is <b>T522G</b> ... and see inthe table <b>T522T</b>
so with person no in t pa0002 table take ANDRED and GESCH filter it in the check table <b>T522G</b> and <b>T522T</b> with language key ... you will get you data ...
so <b>ATEXT ,ANRLT</b> ... this 2 field from table <b>T522T</b> are the actualy fields for your requirement ..
Girish -
Long text so10 - filling of variables in abap.
Hi all, im facing this, maybe easy, task.
i have in SO10 created a long text with variable
for example:
"Hi, &USER&, how are you?".
i read this long text in abap program and now i need to to fill this variable &USER& with some value. How to do it? I think there should be some standard FM.
thanks, PhilippHi,
Use below two FMs:
* Read standard text
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = 'ST'
language = 'EN'
name = 'TEXT_NAME'
object = 'TEXT'
IMPORTING
header = wa_header
TABLES
lines = git_lines " Text Lines
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
IF sy-subrc = 0.
* Replace the symbols with the values
CALL FUNCTION 'TEXT_SYMBOL_REPLACE'
EXPORTING
header = wa_header
program = gc_program
TABLES
lines = git_lines.
ENDIF.
Here you simple have to fill the global variables before you call these FM.
Thanks.
Ravi -
Hi,
is there any way for wrapping text in ABAP which is similar to MS-word or MS-excel.
Currently i have 3 fields in an internal table.
first field is of length 10,
second field is of length 40,
third field of length 256.
Third field is mainly used for Notes.
client said that report coulmn length should be 80.
after 80 i need to wrap the text in next line, with out affecting display of other rows.
Please guide me.use FM RKD_WORD_WRAP
call function 'RKD_WORD_WRAP'
exporting
textline = idiagline
outputlen = 80
importing
out_line1 = idiag_1
out_line2 = idiag_2
exceptions
outputlen_too_large = 0
others = 0.
Regards,
Joy.
Maybe you are looking for
-
Skype on Windows 8.1 running very slow
Good day I have a problem here Since I have installed my Windows 8.1, integrated Skype works so slowly My video calls are worse than ever I usually get videos, both sending and receving at a medium fps of 10 My system requirements are more than enoug
-
How do I open a PDF file at a particular book mark
Is it possible to create a hyperlink (shortcut) in a program, such as excel or word, that when clicked would open a PDF file in adobe (pro in my case) and open that file at a particular bookmark in that file. I couldn't find anything in the help file
-
How to add new Tab in IW32 transaction ?
I need to add a new tab in the header tabstrip... I found an enhancement IWO10018.. There are two exits in it. EXIT_SAPLCOIH_018 EXIT_SAPLCOIH_019 I want to know if this enhancement will help me ? if so please tell me all the steps of how to use thes
-
CreateInsert and Commit in one operation
Is there a way to CreateInsert and Commit in one operation? I just want the user to click one button to create a new record.
-
I can't change my Apple ID alternate email address it's greyed out. Why?