Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

problem with HR FUNCTION MODULE

Former Member
0 Likes
377

hi all,

if u check the function module Z_HR_READ_QUALI_TEXTE

the rsult of this FM is a table with 10 lines .

In that 10 lines somelines stsring with 'H2N0tiz' or (CET) .

I donot want there lines having 'H2N0tiz' or (CET) in the exported table LINES of the FM.

THE FM CODE IS:

FUNCTION Z_HR_READ_QUALI_TEXTE.

*"----

-


""Lokale Schnittstelle:

*" IMPORTING

*" VALUE(PLVAR) TYPE PLVAR DEFAULT '10'

*" VALUE(OTYPE) TYPE OTYPE

*" VALUE(OBJID) TYPE HROBJID

*" VALUE(DATUM) TYPE DATUM DEFAULT SY-DATUM

*" VALUE(QUALI) TYPE HROBJID

*" TABLES

*" LINES STRUCTURE TLINE

*" EXCEPTIONS

*" NOT_FOUND

*" ILLEGAL_INFOTYPE

*" INTERNAL_ERROR

*" NOTE_NOT_FOUND

*"----

-


  • dieser fuba liest die qualifikation des quali-profil's

  • des bewerbers / der person

  • im qualiprofil kann eine notiz hinterlegt werden

  • wir lesen diesen text

  • Marcus Sieber; 23.01.2007

*"----

-


  • lokale datendefinition

data: wa_hrp1001 like hrp1001,

wa_hripkey like p1001.

DATA: local_name TYPE ttname,

local_info TYPE tninfo,

local_head TYPE tthead,

local_spras LIKE thead-tdspras, "XMK#693640

local_subrc TYPE tsubrc,

local_title LIKE ttxit-tdtext,

lines_tab TYPE ttline OCCURS 1 WITH HEADER LINE.

*"----

-


  • 1. verknüpfung lesen

select single * from hrp1001

into wa_hrp1001

where otype = 'Q'

and objid = quali

and plvar = plvar

and rsign = 'B'

and relat = '032'

and istat = '1'

and sclas = otype

and sobid = objid

and begda <= datum

and endda >= datum.

if sy-subrc <> 0.

raise not_found.

endif.

PERFORM fgr_init(SAPLRHNT).

move-corresponding wa_hrp1001 to wa_hripkey.

PERFORM txt_compose_key(SAPLRHNT) USING wa_hripkey local_name local_info

local_subrc.

IF local_subrc <> 0.

RAISE illegal_infotype.

ENDIF.

PERFORM txt_get_spras(SAPLRHNT) USING

local_info-noteid "XMK#693640

local_name

local_info-noteobj

CHANGING local_spras

local_subrc.

*--- read text -

-


CALL FUNCTION 'READ_TEXT'

EXPORTING

id = local_info-noteid

language = local_spras "XMK#693640

name = local_name

object = local_info-noteobj

IMPORTING

header = local_head

TABLES

lines = lines_tab

EXCEPTIONS

id = 1

language = 1

name = 2

not_found = 2

object = 1

reference_check = 1

wrong_access_to_archive = 1

OTHERS = 1.

CASE sy-subrc.

WHEN 1. RAISE internal_error.

WHEN 2. RAISE note_not_found.

ENDCASE.

refresh lines.

lines[] = lines_tab[].

ENDFUNCTION.

1 REPLY 1
Read only

suresh_datti
Active Contributor
0 Likes
340

add the following in the data declaration

data: w_str1(7) value 'H2N0tiz' ,

w_str2(5) value '(CET)'.

& this line of code after<i> refresh lines.</i>

delete lines_tab where ( tdline cs w_str1 or tdline cs w_str2 ).

~Suresh