Updating HRP1000
hi ,
i want to update the HR table HRP1000 without any transaction code, is it possible, is there any function module to do this, or is there any other way to do this job is yes tell me .....
thanks in advance,
chinnu.p
Hi
[How to use FM RH_INSERT_INFTY|How to use FM RH_INSERT_INFTY??]
[Sample Example|Re: RH_INSERT_INFTY]
[Sample Example 2 |RH_INSERT_INFTY]
Regards
Pavan
Similar Messages
-
Function modules for updating,modifying etc for OM infotypes (1000,1001)
Hi experts,
can anybody help me by giving some FM s which will be used to Insert,Update etc for OM infotypes. i need to update HRP1000,HRP1001 AND HRT1222 tables. i tried with 'HR_INFOTYPE_OPERATION' & 'HR_MAINTAIN_MASTERDATA'. but these two FMs require PERNR as parameter. but i do not have here.
regards,
MurthyHi Murthy,
Here's a sample code to update IT1000.
DATA wa_1000 TYPE p1000.
populate wa_1000 with updated data.
CALL FUNCTION 'RH_PNNNN_MAINTAIN'
EXPORTING
act_fcode = 'AEND' " AEND to modify, INSE to insert
act_otype = wa_1000-otype
act_objid = wa_1000-objid
act_infty = '1000'
act_pnnnn = wa_1000
suppress_dialog = '2' " you can use 0 if you want Dialog mode
EXCEPTIONS
infty_not_valid = 1
no_plvar = 2
object_not_defined = 3
otype_not_valid = 4
no_authority = 5
action_rejected = 6
no_gdate = 7
fcode_not_supported = 8
OTHERS = 9.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Hope that helps,
Hanna -
Checkbox cant be updated in ALV Grid
Hi in my requirement, ALV Grid contains checkbox, when I check that, the internal table for checkbox is not updated.
In code I am writting:
Final Internal Tbale:
Data: BEGIN OF T_FINAL occurs 0,
CHK_BOX,
END OF T_FINAL.
LS_FIELDCAT-TABNAME = t_final.
LS_FIELDCAT-COL_POS = 1.
LS_FIELDCAT-FIELDNAME = 'CHK_BOX'.
LS_FIELDCAT-SELTEXT_S = check box.
LS_FIELDCAT-INPUT = 'X'.
LS_FIELDCAT-OUTPUTLEN = 1.
LS_FIELDCAT-CHECKBOX = 'X'.
LS_FIELDCAT-EDIT = 'X'.
APPEND LS_FIELDCAT TO LT_FIELDCAT.
CLEAR LS_FIELDCAT.
DATA: I_CHECK TYPE TABLE OF T_FINAL,
WA_CHECK TYPE T_FINAL.
LOOP AT I_FINAL INTO WA_FINAL.
IF WA_FINAL-CHK_BOX = 'X'.
APPEND WA_FINAL TO I_CHECK.
{ APPEND WA_FINAL TO I_CHECK[] also I try}
ENDIF.
ENDLOOP.
In layout:
LS_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
LS_LAYOUT-BOX_FIELDNAME = 'CHK_BOX'.try this its working for me......
*& Report ZHR_REPT_EMP_NOT_PBOOKED
*& Program title: List of employees who have not done Pre-Booking and
Provision to send E mail to such employees
*& Description: To display a list of emloyees in report and then sending mails to them
*& Business analyst: Vinay Kale/Abhijeet More
*& Developed by: Vivek Jain
REPORT ZHR_REPT_EMP_NOT_PBOOKED.
TYPE-POOLS slis.
tables
TABLES: pernr,
pa0001,
hrp1001,
hrp1000,
zodtab,
zcstab,
zsbutab.
Infotypes
INFOTYPES :0001, "org assignment,
1001,
1000,
0105.
TYPES : BEGIN OF i_conf,
checkbox ,
pernr TYPE pa0001-pernr, "personnel Number.
ename TYPE pa0001-ename, "Name of Employee.
zzbtc TYPE pa0001-zzbtc, "Band.
btrtl TYPE pa0001-btrtl, "Grade
Location type string,
persk type string,
ptext type string,
werks TYPE p0001-werks,
zzod_txt type string, "OD name
zzod type pa0001-zzod,
zzcs type string, "cluster/sector
vertical type string,
sbu LIKE pa0001-zzsbu, "SBU
sbutxt LIKE zsbutab-zsbutxt, "SBUTXT
orgeh LIKE pa0001-orgeh, "Vertical
org_text type string,
zzbloc LIKE pa0001-zzbloc, "base location
dept_loc type string, "dept loc
ename_s LIKE pa0001-ename, "Department
zztc LIKE pa0001-zztc,
endda type p0001-endda,
celltab type lvc_t_styl,
tc_name type string,
tc_num type string,
END OF i_conf.
DATA : it_conf TYPE STANDARD TABLE OF i_conf WITH HEADER LINE,
wa_conf TYPE i_conf.
*data: begin of gs_outtab.
*data: checkbox type c. "field for checkbox
§B1.Extend your output table by a field to dis- or enable
cells for input.
*data: celltab type lvc_t_styl. "field to switch editability
include structure i_conf.
*data: end of gs_outtab.
*data: gt_outtab type gs_outtab occurs 0 with header line.
*& DATA DECLARATION FOR EMAIL
DATA: docdata TYPE sodocchgi1,
objpack TYPE STANDARD TABLE OF sopcklsti1 WITH HEADER LINE,
objhead TYPE STANDARD TABLE OF solisti1 WITH HEADER LINE,
objtxt TYPE STANDARD TABLE OF solisti1 WITH HEADER LINE,
objbin TYPE STANDARD TABLE OF solisti1 WITH HEADER LINE,
reclist TYPE STANDARD TABLE OF somlreci1 WITH HEADER LINE.
DATA: tab_lines TYPE sy-tabix.
DATA : p_1001 TYPE TABLE OF p1001 WITH HEADER LINE.
DATA : p_0001 TYPE TABLE OF p0001 WITH HEADER LINE.
DATA : p_0105 TYPE TABLE OF p0105 WITH HEADER LINE.
DATA : od TYPE p0001-zzod.
DATA : new_pernr type p0001-pernr.
DATA : pernr_s type p0001-pernr.
DATA : email_s type p0105-USRID_LONG.
DATA : email type p0105-USRID_LONG.
DATA : tc_name type string.
DATA : tc_num type string.
DATA : emails type string.
DATA : sel_all type string.
DATA: REF_GRID TYPE REF TO CL_GUI_ALV_GRID.
DATA : flag type i.
DATA : title TYPE string.
DATA : pernr_temp tYPE p0001-pernr.
DATA : rel type string.
DATA : stat type string.
DATA : count type i.
DATA : v_dynnr type sy-dynnr.
DATA : g_grid type ref to cl_gui_alv_grid.
DATA : g_custom_container type ref to cl_gui_custom_container,
g_container type scrfname value 'CC'.
************field cat*******************************
DATA: fieldcat TYPE lvc_t_fcat,
wa_fieldcat LIKE LINE OF fieldcat.
DATA: gd_layout TYPE lvc_s_layo,
gd_repid TYPE sy-repid.
DATA:gt_events TYPE slis_t_event,
gt_list_top_of_page TYPE slis_t_listheader.
DATA rec_fetched TYPE sy-tabix.
CONSTANTS g_top_of_page TYPE slis_formname VALUE 'TOP_OF_PAGE'.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_zzod FOR zsbutab-zod NO INTERVALS ,
s_btrtl FOR pa0001-btrtl NO INTERVALS.
SELECTION-SCREEN END OF BLOCK b1.
start-of-selection.
if pn-begda is initial.
pn-begda = '18000101'.
endif.
if pn-endda is initial.
pn-begda = '99991230'.
endif.
clear : it_conf,it_conf[].
get pernr.
clear new_pernr.
move pernr-pernr to new_pernr.
*************checking whether employee has booked or prebooked for any event***************
clear: p_1001,p_1001[].
perform read_info tables p_1001 using new_pernr '1' 'B027' .
IF SY-SUBRC <> 0.
clear: p_1001,p_1001[].
perform read_info tables p_1001 using new_pernr '1' 'B023' .
IF SY-SUBRC <> 0.
clear: p_1001,p_1001[].
perform read_info tables p_1001 using new_pernr '2' 'B027' .
IF SY-SUBRC <> 0.
clear: p_1001,p_1001[].
perform read_info tables p_1001 using new_pernr '2' 'B023' .
IF SY-SUBRC <> 0.
clear : p_0001,p_0001[].
CALL FUNCTION 'HR_READ_INFOTYPE'
EXPORTING
pernr = new_pernr
infty = '0001'
BEGDA = pn-begda
ENDDA = pn-endda
TABLES
infty_tab = p_0001
EXCEPTIONS
infty_not_found = 1
OTHERS = 2.
sort p_0001 descending by begda.
read table p_0001 index 1.
move p_0001-pernr to wa_conf-pernr.
move p_0001-ename to wa_conf-ename.
move p_0001-zzbtc to wa_conf-zzbtc.
move p_0001-btrtl to wa_conf-btrtl.
move p_0001-werks to wa_conf-werks.
move p_0001-zzsbu to wa_conf-sbu.
move p_0001-orgeh to wa_conf-orgeh.
move p_0001-zzbloc to wa_conf-zzbloc.
move p_0001-zztc to wa_conf-zztc.
move p_0001-zzod to wa_conf-zzod.
move p_0001-endda to wa_conf-endda.
move p_0001-btrtl to wa_conf-btrtl.
***************************sending mail to employee and his/her superior***********************************
select single sachn telnr into (wa_conf-tc_name , wa_conf-tc_num) from t526
where SACHX = it_conf-zztc
and werks = it_conf-werks .
**************clustor txt*********************
select single zcstxt into wa_conf-zzcs from zcstab
where zcs = p_0001-zzcs
and zod = p_0001-zzod.
**********operating division******************************
select single ZODLTXT into wa_conf-zzod_txt from zodtab
where zod = wa_conf-zzod.
**********sbu txt**************************************************************
select single zsbutxt into wa_conf-sbutxt from zsbutab
where zsbu = wa_conf-sbu.
**********location*************************************
select single btext into wa_conf-location from t001p
where btrtl = wa_conf-btrtl
and werks = wa_conf-werks.
**********Dept********************************************
select single orgtx into wa_conf-org_text from t527x
where sprsl = 'EN'
and orgeh = wa_conf-orgeh
and begda <= p_0001-begda
and endda >= p_0001-begda.
**************grade*****************************************
SELECT SINGLE ptext FROM t503t INTO wa_conf-persk
WHERE sprsl = 'EN'
AND persk = p_0001-persk .
*******************vertical****************************
select single zverttxt into wa_conf-vertical from zvtab
where zvert = p_0001-zzvert.
*******deputation location*****************
if p_0001-ZZDEPFLG = 'X'.
select single zdltxt into wa_conf-dept_loc from zdltab where zdl = p_0001-zzdploc.
endif.
***get imm superior
CALL FUNCTION 'ZHR_GET_IMMMED_SUPERIOR'
EXPORTING
pernr = new_pernr
begda = '18000101'
endda = '99991231'
IMPORTING
v_pernr = pernr_s
EXCEPTIONS
not_found = 1
OTHERS = 2.
if sy-subrc = 0.
find the email of the immed. superiors personal number..
clear : p_0001,p_0001[].
CALL FUNCTION 'HR_READ_INFOTYPE'
EXPORTING
pernr = pernr_s
infty = '0001'
BEGDA = pn-begda
ENDDA = pn-endda
TABLES
infty_tab = p_0001
EXCEPTIONS
infty_not_found = 1
OTHERS = 2.
read table p_0001 index 1.
move p_0001-ename to wa_conf-ename_s.
endif.
if wa_conf-btrtl in s_btrtl and wa_conf-zzod in s_zzod .
append wa_conf to it_conf.
endif.
endif.
endif.
endif.
endif.
clear wa_conf.
end-of-selection.
if it_conf[] is initial.
MESSAGE i501(zmod).
exit.
endif.
CALL SCREEN 100.
*& Module STATUS_0100 OUTPUT
text
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'USER'.
SET TITLEBAR 'xxx'.
if g_custom_container is initial.
data: lt_exclude type ui_functions.
create object g_custom_container
EXPORTING
container_name = g_container.
create object g_grid
EXPORTING
i_parent = g_custom_container.
perform fieldcat_build .
Exclude all edit functions in this example since we do not need them:
perform exclude_tb_functions changing lt_exclude.
perform build_data.
*§ B3.Use the layout structure to aquaint additional field to ALV.
gd_layout-stylefname = 'CELLTAB'.
PERFORM build_layout.
if it_conf[] is initial.
MESSAGE i501(zmod). "No data exists
else.
call method g_grid->set_table_for_first_display
EXPORTING
is_layout = gd_layout
it_toolbar_excluding = lt_exclude
CHANGING
it_fieldcatalog = fieldcat
it_outtab = it_conf[].
create object g_event_receiver.
set handler g_event_receiver->catch_doubleclick for g_grid.
Set editable cells to ready for input initially
call method g_grid->set_ready_for_input
EXPORTING
i_ready_for_input = 1.
endif.
endif.
ENDMODULE. " STATUS_0100 OUTPUT
*call screen 100.
*& Form build_layout
FORM build_layout.
CLEAR gd_layout.
v_dynnr = 100.
gd_layout-cwidth_opt = 'X'.
gd_layout-zebra = 'X'.
gd_layout-grid_title = text-002.
ENDFORM. "build_layout
*& Form exclude_tb_functions
text
-->PT_EXCLUDE text
form exclude_tb_functions changing pt_exclude type ui_functions.
data ls_exclude type ui_func.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_copy_row.
append ls_exclude to pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_delete_row.
append ls_exclude to pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_append_row.
append ls_exclude to pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_insert_row.
append ls_exclude to pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_move_row.
append ls_exclude to pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_copy.
append ls_exclude to pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_cut.
append ls_exclude to pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_paste.
append ls_exclude to pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_paste_new_row.
append ls_exclude to pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_undo.
append ls_exclude to pt_exclude.
endform. "exclude_tb_functions
*& Form field_cat
text
FORM fieldcat_build .
wa_fieldcat-fieldname = 'CHECKBOX'.
wa_fieldcat-tabname = 'IT_CONF'.
wa_fieldcat-checkbox = 'X'.
wa_fieldcat-edit = 'X'.
APPEND wa_fieldcat TO fieldcat.
clear wa_fieldcat.
wa_fieldcat-fieldname = 'PERNR'.
wa_fieldcat-coltext = 'P.S. No'.
wa_fieldcat-tabname = 'IT_CONF'.
APPEND wa_fieldcat TO fieldcat.
clear wa_fieldcat.
wa_fieldcat-fieldname = 'ENAME'.
wa_fieldcat-coltext = 'Employee Name'.
wa_fieldcat-tabname = 'IT_CONF'.
APPEND wa_fieldcat TO fieldcat.
clear wa_fieldcat.
wa_fieldcat-fieldname = 'ZZBTC'.
wa_fieldcat-coltext = 'Band'.
wa_fieldcat-tabname = 'IT_CONF'.
APPEND wa_fieldcat TO fieldcat.
clear wa_fieldcat.
wa_fieldcat-fieldname = 'PERSK'.
wa_fieldcat-coltext = 'Grade'.
wa_fieldcat-tabname = 'IT_CONF'.
APPEND wa_fieldcat TO fieldcat.
clear wa_fieldcat.
wa_fieldcat-fieldname = 'ZZOD_TXT'.
wa_fieldcat-coltext = 'OD Name'.
wa_fieldcat-tabname = 'IT_CONF'.
APPEND wa_fieldcat TO fieldcat.
clear wa_fieldcat.
wa_fieldcat-fieldname = 'ZZCS'.
wa_fieldcat-coltext = 'Cluster / Sector '.
wa_fieldcat-tabname = 'IT_CONF'.
APPEND wa_fieldcat TO fieldcat.
clear wa_fieldcat.
wa_fieldcat-fieldname = 'VERTICAL'.
wa_fieldcat-coltext = 'Vertical'.
wa_fieldcat-tabname = 'IT_CONF'.
APPEND wa_fieldcat TO fieldcat.
clear wa_fieldcat.
wa_fieldcat-fieldname = 'SBUTXT'.
wa_fieldcat-coltext = 'SBU'.
wa_fieldcat-tabname = 'IT_CONF'.
APPEND wa_fieldcat TO fieldcat.
clear wa_fieldcat.
wa_fieldcat-fieldname = 'ORG_TEXT'.
wa_fieldcat-coltext = 'Dept.'.
wa_fieldcat-tabname = 'IT_CONF'.
APPEND wa_fieldcat TO fieldcat.
clear wa_fieldcat.
wa_fieldcat-fieldname = 'LOCATION'.
wa_fieldcat-coltext = 'Empl. Base Location '.
wa_fieldcat-tabname = 'IT_CONF'.
APPEND wa_fieldcat TO fieldcat.
clear wa_fieldcat.
wa_fieldcat-fieldname = 'DEPT_LOC'.
wa_fieldcat-coltext = 'Empl. Deputation Location '.
wa_fieldcat-tabname = 'IT_CONF'.
APPEND wa_fieldcat TO fieldcat.
clear wa_fieldcat.
wa_fieldcat-fieldname = 'ENAME_S'.
wa_fieldcat-coltext = 'IS Name '.
wa_fieldcat-tabname = 'IT_CONF'.
APPEND wa_fieldcat TO fieldcat.
clear wa_fieldcat.
endform. "field_cat
*& Form check_lock
text
-->PS_OUTTAB text
-->P_LOCKED text
form check_lock using ps_outtab type i_conf
changing p_locked.
data ls_celltab type lvc_s_styl.
loop at ps_outtab-celltab into ls_celltab.
if ls_celltab-fieldname = 'CHECKBOX'.
if ls_celltab-style eq cl_gui_alv_grid=>mc_style_disabled.
p_locked = 'X'.
else.
p_locked = space.
endif.
endif.
endloop.
endform. "check_lock
*& Module USER_COMMAND_0100 INPUT
text
MODULE USER_COMMAND_0100 INPUT.
IF sy-ucomm = 'EMAIL'.
clear it_conf.
CALL METHOD g_grid->refresh_table_display.
data: ls_outtab type i_conf.
data: l_valid type c,
l_locked type c.
*§A4ad. Before you (a)set, reset or (d)evaluate checkboxes,
you must check the input cells.
If all entries are ok, ALV transferes new values to the output
table which you then can modify.
call method g_grid->check_changed_data
IMPORTING
e_valid = l_valid.
if l_valid eq 'X'.
loop at it_conf into ls_outtab.
if not ls_outtab-checkbox is initial
and not ls_outtab-checkbox eq '-'.
***************************sending mail to employee and his/her superior***********************************
select single sachn telnr into (tc_name , tc_num) from t526
where SACHX = ls_outtab-zztc
and werks = ls_outtab-werks .
******find the emil of employee.
clear : p_0105,p_0105[].
CALL FUNCTION 'HR_READ_INFOTYPE'
EXPORTING
pernr = ls_outtab-pernr
infty = '0105'
BEGDA = pn-begda
ENDDA = pn-endda
TABLES
infty_tab = p_0105
EXCEPTIONS
infty_not_found = 1
OTHERS = 2.
if sy-subrc = 0.
read table p_0105 with key subty = '0010'.
move p_0105-USRID_LONG to email.
endif.
find immediate superior by Z FM.
clear pernr_s.
CALL FUNCTION 'ZHR_GET_IMMMED_SUPERIOR'
EXPORTING
pernr = ls_outtab-pernr
IMPORTING
v_pernr = pernr_s
EXCEPTIONS
not_found = 1
OTHERS = 2.
if sy-subrc = 0.
find the email of the immed. superiors personal number..
clear : p_0105,p_0105[].
CALL FUNCTION 'HR_READ_INFOTYPE'
EXPORTING
pernr = pernr_s
infty = '0105'
BEGDA = pn-begda
ENDDA = pn-endda
TABLES
infty_tab = p_0105
EXCEPTIONS
infty_not_found = 1
OTHERS = 2.
read table p_0105 with key subty = '0010'.
move p_0105-USRID_LONG to email_s.
endif.
if email <> ' '.
count = 1.
perform send_mail using ls_outtab-ename email email_s tc_name tc_num count .
endif.
if email_s <> ' '.
count = 2.
perform send_mail using ls_outtab-ename email email_s tc_name tc_num count.
endif.
call method g_grid->refresh_table_display.
modify it_conf from ls_outtab.
endif.
endloop.
call method g_grid->refresh_table_display.
endif.
set screen 100.
endif.
**************************end of sending mail****************************************************
IF sy-ucomm = 'SELECT'.
CALL METHOD g_grid->refresh_table_display.
*§A4ad. Before you (a)set, reset or (d)evaluate checkboxes,
you must check the input cells.
If all entries are ok, ALV transferes new values to the output
table which you then can modify.
call method g_grid->check_changed_data
IMPORTING
e_valid = l_valid.
if l_valid eq 'X'.
loop at it_conf into ls_outtab.
perform check_lock using ls_outtab
changing l_locked.
if l_locked is initial
and not ls_outtab-checkbox eq '-'.
ls_outtab-checkbox = 'X'.
endif.
modify it_conf from ls_outtab.
endloop.
call method g_grid->refresh_table_display.
endif.
set screen 100.
endif.
IF sy-ucomm = 'BCK' and v_dynnr = 100.
clear v_dynnr.
set screen 1000.
leave screen. " 0."1000.
**call selection-screen 1000.
*call screen 1000.
endif.
IF sy-ucomm = 'EXIT' and v_dynnr = 100.
clear v_dynnr.
leave program.
endif.
IF sy-ucomm = 'CANC' and v_dynnr = 100.
clear v_dynnr.
leave program.
endif.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form send_mail
text
-->EMAIL_S text
-->EMAIL text
-->TC_NAME text
-->TC_NUM text
form send_mail using ename email email_s tc_name tc_num count.
*Body of mail
CLEAR objtxt.
CLEAR objtxt[].
objtxt = text-005.
concatenate objtxt ename into objtxt separated by space.
append objtxt.
clear objtxt.
objtxt = text-006.
concatenate objtxt email_s into objtxt separated by space.
append objtxt.
clear objtxt.
append objtxt.
objtxt = text-002.
append objtxt.
clear objtxt.
objtxt = text-003.
append objtxt.
clear objtxt.
append objtxt.
objtxt = text-004.
concatenate objtxt tc_name 'at' tc_num into objtxt separated by space.
append objtxt.
clear objtxt.
DESCRIBE TABLE objtxt LINES tab_lines.
READ TABLE objtxt INDEX tab_lines.
*Mail description
CLEAR docdata.
docdata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
docdata-obj_name = 'Reminder'.
docdata-obj_descr = 'REMINDER TO DO PRE-BOOKING'.
docdata-obj_langu = sy-langu.
*Packing list for main document
CLEAR objpack.
CLEAR objpack[].
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'RAW'.
APPEND objpack.
*Email receiver's list
CLEAR reclist.
CLEAR reclist[].
if count = 1.
reclist-receiver = '[email protected]'.
reclist-receiver = email.
else.
reclist-receiver = email_s.
endif.
reclist-rec_type = 'U'.
APPEND reclist.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
EXPORTING
document_data = docdata
document_type = 'RAW'
put_in_outbox = 'X'
commit_work = 'X'
TABLES
object_content = objtxt
receivers = reclist
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
DOCUMENT_TYPE_NOT_EXIST = 3
OPERATION_NO_AUTHORIZATION = 4
PARAMETER_ERROR = 5
X_ERROR = 6
ENQUEUE_ERROR = 7
OTHERS = 8.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
else.
message 'mail(s) sent successfully' type 'S'.
ENDIF.
endform. "send_mail
*& Form eventtab_build
FORM eventtab_build USING rt_events TYPE slis_t_event.
*Registration of events to happen during list display
DATA: ls_event TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = rt_events.
READ TABLE rt_events WITH KEY name = slis_ev_top_of_page INTO ls_event.
IF sy-subrc = 0.
MOVE g_top_of_page TO ls_event-form.
APPEND ls_event TO rt_events.
ENDIF.
ENDFORM. "eventtab_build
*& Form top_of_page
FORM top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = gt_list_top_of_page.
ENDFORM. "top_of_page
*& Form COMMENT_BUILD
FORM comment_build USING lt_top_of_page TYPE slis_t_listheader.
DATA: ls_line TYPE slis_listheader,
rp_date TYPE string. "report date
LIST HEADING LINE: TYPE H
CLEAR ls_line.
ls_line-typ = 'H'.
ls_line-info = text-007.
APPEND ls_line TO lt_top_of_page.
CONCATENATE sy-datum6(2) sy-datum4(2) sy-datum(4) INTO rp_date SEPARATED BY '.'.
STATUS LINE: TYPE S
CLEAR ls_line.
ls_line-typ = 'S'.
ls_line-key = text-008.
ls_line-info = rp_date.
APPEND ls_line TO lt_top_of_page.
ENDFORM. "comment_build
*& Form read_info
text
-->P_1001 text
-->PERNR text
-->STAT text
-->REL text
form read_info tables p_1001 using pernr stat rel.
CALL FUNCTION 'RH_READ_INFTY_1001'
EXPORTING
AUTHORITY = 'DISP'
WITH_STRU_AUTH = 'X'
PLVAR = '01'
OTYPE = 'P'
OBJID = pernr
ISTAT = stat
SUBTY = rel
BEGDA = pn-begda
ENDDA = pn-endda
TABLES
I1001 = p_1001
EXCEPTIONS
NOTHING_FOUND = 1
WRONG_CONDITION = 2
WRONG_PARAMETERS = 3
OTHERS = 4.
endform. "read_info
*& Module BACK INPUT
text
MODULE BACK INPUT.
IF SY-UCOMM = 'E'.
leave program.
endif.
IF SY-UCOMM = 'ENDE'.
leave program.
endif.
IF SY-UCOMM = 'ECAN'.
leave program.
endif.
ENDMODULE. " BACK INPUT -
Function Module to Update PPOCE data
Hey all,
Is there any MF or BAPI who can help me to update the data of an U.O in PPOCE.
When i change the value of the name of an organisation and his date , and i keep in sql trace , i just found an update in T527X but any call of MF....
Thanks in advance.Hi Filali,
If u need to update object abbreviation or name of the object (HRP1000) you can use FM 'RH_OBJECT_NAME_MODIFY_OR_LANGU'
For updating the date may be you can try FM "RH_UPDATE_INFTY".
You need to test the second FM that it suits ur req. or not
hope this will help
Regards,
Gus -
Updating HRP table through abap codes - is it correct
Hi all,
In my hrp1001 table,I want that All Qualifications (Q) and Tasks (T) assigned to all the functional roles (ZF) existing in the system should be transferred to the positions(S) tagged to those respective functional roles.
For that I am supposed to write a code which copies the entries from Qualifications (Q) and Tasks (T) and tag the same to the positions (S).
Below is the sample code which is adding just one record to HRP1001 through abap statment. What I am curious to know is wheather it is logically correct to update HRP table through abap statments or no. If not, Please let me know what should we do as a solution - should we update all records through LSMW of PP01 or any thing else we can do???
REPORT ZHRPAR0005 .
TABLES: HRP1000, HRP1001.
DATA IT_1001 LIKE HRP1001 OCCURS 5 WITH HEADER LINE..
SELECT SINGLE * FROM HRP1001 INTO IT_1001 WHERE OTYPE = 'CP' AND PLVAR = '01' AND SCLAS NE 'S'.
IT_1001-OTYPE = 'S'.
APPEND IT_1001.
INSERT INTO HRP1001 VALUES IT_1001.
Thanks
RibhuHi Ribhu..
there are various FMs available for this purpose..
use those... becasue if u directly insert, update or modify record in HRP1000 or HRP1001...
then some related table might not be updated..
So use FMs..
RH_COPY_INFTY
RH_CUT_INFTY
RH_DELETE_INFTY
RH_INSERT_INFTY
RH_INVERT_RELA_INFTY
RH_UPDATE_INFTY
<b>For IT 1001 </b>
RH_CUT_INFTY_1001_EXT
RH_CUT_INFTY_1001_EXT_GENERIC
RH_DELETE_INFTY_1001_EXT
RH_DEL_INFTY_1001_EXT_GENERIC
RH_INSERT_INFTY_1001_EXT
RH_UPDATE_INFTY_1001_EXT
RH_BASE_READ_INFTY_1001
RH_READ_INFTY_1001
RH_READ_INFTY_1001_EXT
RH_READ_INFTY_1001_EXT_ONLY
Reward if useful
Regards
Prax -
Updating HRP tables through abap code- is it correct?
Hi all,
In my hrp1001 table,I want that All Qualifications (Q) and Tasks (T) assigned to all the functional roles (ZF) existing in the system should be transferred to the positions(S) tagged to those respective functional roles.
For that I am supposed to write a code which copies the entries from Qualifications (Q) and Tasks (T) and tag the same to the positions (S).
Below is the sample code which is adding just one record to HRP1001 through abap statment. What I am curious to know is wheather it is logically correct to update HRP table through abap statments or no. If not, Please let me know what should we do as a solution - should we update all records through LSMW of PP01 or any thing else we can do???
REPORT ZHRPAR0005 .
TABLES: HRP1000, HRP1001.
DATA IT_1001 LIKE HRP1001 OCCURS 5 WITH HEADER LINE..
SELECT SINGLE * FROM HRP1001 INTO IT_1001 WHERE OTYPE = 'CP' AND PLVAR = '01' AND SCLAS NE 'S'.
IT_1001-OTYPE = 'S'.
APPEND IT_1001.
INSERT INTO HRP1001 VALUES IT_1001.
Thanks
RibhuHi Ribhu..
there are various FMs available for this purpose..
use those... becasue if u directly insert, update or modify record in HRP1000 or HRP1001...
then some related table might not be updated..
So use FMs..
RH_COPY_INFTY
RH_CUT_INFTY
RH_DELETE_INFTY
RH_INSERT_INFTY
RH_INVERT_RELA_INFTY
RH_UPDATE_INFTY
For IT 1001
RH_CUT_INFTY_1001_EXT
RH_CUT_INFTY_1001_EXT_GENERIC
RH_DELETE_INFTY_1001_EXT
RH_DEL_INFTY_1001_EXT_GENERIC
RH_INSERT_INFTY_1001_EXT
RH_UPDATE_INFTY_1001_EXT
RH_BASE_READ_INFTY_1001
RH_READ_INFTY_1001
RH_READ_INFTY_1001_EXT
RH_READ_INFTY_1001_EXT_ONLY
Reward if useful
Regards
Prax -
Using Tabstrip update the database table
Hi Guy's,
I created two screens(100 & 110).
Click 1 pushbutton HRP1000 related information is displayed.
Click 2 pushbutton it displays HRP1001 relatd information.
worked to read the data from the Database tables and output displayed sucessfuly . However i want to entered data in those fields wants to update to database table.
Please friends help me how to work this senario.
Thanks and Regards,
Sai.Hi Guy's,
To update the database records, wrote the logic in PAI
WHEN 'SAVE'.
INSERT HRP1001.
INSERT INTO HRP1001 VALUES wa_P2.
it displaying an error message " the work area wa_p2 is not long enough.
and also i tried using it_p2
it displaying an error message " you can't use internal table as work area".
Please help me friends it is very urgent.
Thanks and Regards,
Sai. -
Can anybody tell me is there any standard FM to update the HR tables :
HRP1048, HRP1002,HRP1001,HRP1000 efficiently?
I have to delimit and delete the records and I dont want to do direct update on HR tables.
thanks
TanishaTanisha,
1.Use the FM RH_RELATION_MAINTAIN to maintain HRP1001-Relationship.
Change the FCODE to do various options such as create,delete,display,delimit etc.,
For eg.,
*Relate account to project
IF WA_MAINTAIN-OTYPE = 'O' AND WA_MAINTAIN-SCLAS = 'O'.
WA_MAINTAIN-RSIGN = 'B'.
WA_MAINTAIN-RELAT = '002'.
*Relate position to project
ELSEIF WA_MAINTAIN-OTYPE = 'O' AND WA_MAINTAIN-SCLAS = 'S'.
WA_MAINTAIN-RSIGN = 'B'.
WA_MAINTAIN-RELAT = '003'.
*Relate job to position
ELSEIF WA_MAINTAIN-OTYPE = 'S' AND WA_MAINTAIN-SCLAS = 'C'.
WA_MAINTAIN-RSIGN = 'B'.
WA_MAINTAIN-RELAT = '007'.
*Relate employee to position
ELSEIF WA_MAINTAIN-OTYPE = 'S' AND WA_MAINTAIN-SCLAS = 'P'.
WA_MAINTAIN-RSIGN = 'A'.
WA_MAINTAIN-RELAT = '008'.
ENDIF.
WA_MAINTAIN-ENDDA = '99991231'.
*FM to create relationship
CALL FUNCTION 'RH_RELATION_MAINTAIN'
EXPORTING
ACT_FCODE = WA_MAINTAIN-FCODE
ACT_PLVAR = WA_MAINTAIN-PLVAR
ACT_OTYPE = WA_MAINTAIN-OTYPE
ACT_OBJID = WA_MAINTAIN-OBJID
ACT_ISTAT = WA_MAINTAIN-ISTAT
ACT_RSIGN = WA_MAINTAIN-RSIGN
ACT_RELAT = WA_MAINTAIN-RELAT
ACT_SCLAS = WA_MAINTAIN-SCLAS
ACT_SOBID = WA_MAINTAIN-SOBID
ACT_BEGDA = WA_MAINTAIN-BEGDA
ACT_ENDDA = WA_MAINTAIN-ENDDA
ACT_PROZT = WA_MAINTAIN-PROZT
EXCEPTIONS
MAINTAINANCE_FAILED = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
WRITE : WA_INPUT-OBJID.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
2.Use the FM RH_OBJECT_CREATE for maintaing hrp1000-Object ID creation.
Use the FM RH_DELETE_OBJECT for deletion of object ID.
For eg.,
CALL FUNCTION 'RH_OBJECT_CREATE'
EXPORTING
LANGU = SY-LANGU
PLVAR = '01'
OTYPE = 'O'
SHORT = V_NEWPROJECT
STEXT = V_PROJECTDESC
BEGDA = V_DATE
ENDDA = '99991231'
IMPORTING
OBJID = W_OBJID
EXCEPTIONS
TEXT_REQUIRED = 1
INVALID_OTYPE = 2
INVALID_DATE = 3
ERROR_DURING_INSERT = 4
ERROR_EXT_NUMBER = 5
UNDEFINED = 6
OTHERS = 7.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards
Thyagu
Edited by: Thyagu on Sep 18, 2008 11:31 AM
Edited by: Thyagu on Sep 18, 2008 11:34 AM -
Hello all,
Has anyone implemented a batch input to update PD infotypes (HRP1000, HRP1001 etc) through a batch input for transaction PP01? Can someone forward me a sample code? I am having trouble with the screens!!
Thx,
AliHi,
I dont have much idea about this,
But can you try this --
RH_PNNNN_MAINTAIN
Regards,
pankaj singh.
Reward if it iscorrect. -
Tecra M9-136 - BSOD during Vista SP2 update
Tecra M9-136 asked this morning to update to Vista SP2 and during the process the BSOD 0x0000007E arrived. Restarted in Safe Mode and the installer continued and then finally reported that the update had failed - and reverted to SP1. This took most of the morning.
It will start in Safe Mode but on a normal boot-up, Vista SP1 gets through the fingerprint recognition and then fails with the same BSOD (it doesn't get as far as displaying the desktop).
The laptop has BIOS level 1.80. I've tried in Safe mode to install 1.90 but it tells me that the battery has insufficient charge and the power adapter isn't attached. Both untrue.
Stuck - need advice. Could this be a hard fault? Can't see how I can update anything if it's a soft fault.
thanksThe message with the BSOD mentioned checking BIOS and driver versions. Anyway, no change made to that.,
I tried System Restore but the only available restore point was the SP2 installation. I thought Vista was supposed to save a restore point every 24 hours even if nothing new had been installed.
I've now found in System Information / Windows Error Reporting several messages like this:
28/09/2009 12:08 Windows Error Reporting Fault bucket 0x7E_NULL_IP_DRVNDDM+57bd, type 0
Event Name: BlueScreen
Response: None
Cab Id: 0

Problem signature:
P1: 
P2: 
P3: 
P4: 
P5: 
P6: 
P7: 
P8: 
P9: 
P10: 

Attached files:
C:\Windows\Minidump\Mini0928 09-04.dmp
C:\Users\me\AppData\Local\Te mp\WER-75660-0.sysdata.xml
C:\Users\me\AppData\L ocal\Temp\WER7D78.tmp.version.txt
& #x000d;
These files may be available here:
C:\Users\me\AppData\Local\Mic rosoft\Windows\WER\ReportArchive\Report06d1c4b5 -
Cannot open and update IPhoto after upgrading to OXYosemite
From the App store, I downloaded and installed OXYosemite. There are 2 more updates available: iPhoto and iMovie. When I try to upload them, the notice I get is "Update Unavailable with This Apple ID This update is not available for this Apple ID either because it was bought by a different user or the item was refunded or cancelled."
I have 2 apple IDs when I inquire about my ids. Signing in App Store with either of them, doesn't resolve the problem. I get the same notice. iTunes, Mac, mobile downloads, all use the same apple IP, only for the computer downloads from App Store isn't working.
What should I do?
Thanks, SevI have the same problem and can't find out how to correct it. Unable to update iPhoto or iMovie .. I get the same message as above user. Help!
-
Error message: "playlists selected for updating no longer exist"
I tried to update my ipod nano and I guess I had deleted a playlist, but since then, I have not been able to update. Every time I try, I get the following message:
"Cannot be updated because all of the playlists selected for updating no longer exist."
I haven't been able to highlight which playlists are selected to begin with.
I read through the manual and thought that maybe rebooting the whole system might work. So I deleted Itunes from my computer and re-installed.
Then I tried re-setting my ipod. So now I have nothing on my ipod.
I also deleted everything from my library, thinking it might help to start from scratch. Nothing has worked.
How do I "select" and "unselect" playlists so I can get up and running again?Here you go.
http://discussions.apple.com/thread.jspa?messageID=607312򔑐 -
Error message iPod cannot update b/c all of the playlists no longer exist
Hello. I have been getting this error message. "Songs on the iPod "MAR(the name of my iPod)" cannot update because all of the playlists selecting for updating no longer exist." And my playlists are still on the left side in my iTunes. They do exist. I have a feeling ths might have to do with the fact that on vacation the person I was visiting gave me a gift of putting all of his music that would fit into the external hard drive part of my iPod, and for the past week or so I have been putting that music onto my 40 GB portable hard drive at home. I suspect I took a vital folder out of my iPod by accident. Right now I have the folder iPod_control if I open my iPod up in My Computer. Am I missing something? Right now my iPod is empty because iTunes made a composite playlist last week and I deleted it thinking I could get my real playlists back. Can you help me, or reccomend a site/someone who can? Thank you.
PC Windows XPhiya!
And my playlists are still on the left side in my iTunes. They do exist.
let's just doublecheck this. folks get this message if they have "automatically update selected playlists only" selected in their itunes "ipod" preferences tab. so bring up that tab ("edit > preferences", click "ipod" while the ipod is showing up in the source list), and do a playlist by playlist crosscheck of the playlists selected in that tab, and the playlists showing up in the itunes sourcelist.
is there any playlist selected in the preferences tab that isn't showing up in the sourcelist?
love, b -
Video IPOD no longer recognized by Itunes and wont Update
This is a long complicated issue. My Ipod has been working flawlessly until 2 weeks ago. Someone tried to plug it up to their computer to charge it and it wiped out my library and added their library. At first i was thinking no big deal, i will just reconnect it with my computer and it will load my library back on. However once connected to my computer it is not recognized by itunes. So i did a reset , which seemed to be working great and it started "updating" about 80% through that process it gave me an error message that says " This disc can not be written to or written from" now I have no idea why it would say that? and although it seems completely wiped out and useless, it still shows that much memeory is missing in the "about ipod" screen on the ipod. So i know the information is there somewhere , somehow?... Anyway I dont know what to do, Does anybody have any suggestions?
Oh and I have also uninstalled and reinstalled the Itunes program to make sure it is up to date. WOuld adding new songs to my library have caused this problem?1. Try Resetting the iPod. Hold Select and Menu for 6-10 seconds - until you see the Apple Symbol.
2. Use iPod Updater to restore your iPod to factory settings.
See if those two steps clear up your problem. -
Error during OS 4.2 update; Ipod no longer recognized by windows or itunes;
I've had my 3G 8gb since last Feb and never updated the OS (3.1.3). Yesterday I tried updating to 4.2. (OS: Windows Vista 64bit Home Premium; iTunes: 10.1.1.4) There was an error (unfortunately did not make a note of). Now my ipod touch is stuck in "Recovery Mode" and cannot be seen by Windows or iTunes. Windows does detect new hardware but when I browse for the drivers, I get the error "Could not find driver software" after I pointed exactly where it was located in C:\Program Files\Common Files\Apple\Mobile Device Support and C:\Program Files\Common Files\Apple\Mobile Device Support\Drivers. I've tried removing all Apple software from my computer and then reinstalling iTunes but I get the same results. I don't know what else to try. Any ideas? Thanks!
I found a solution last night through http://support.apple.com/kb/ts1538. But thank you for trying. The worst part was that I was doing the right thing all along but I think there is a bug in Vista (or I don't understand why I couldn't do it the way I was). On the window that appears after I clicked "Browse my computer for driver software", there are 2 options. The first says "Browse for driver software on your computer" which has an edit box under it and a "Browse" button next to the edit box which allows you to pick the parent directory that driver is in. The second option says "Let me pick from a list of device drivers on my computer". I knew where the drivers were so I was doing option one and it would not work (many repeated attempts after re-installing iTunes, etc.) - VERY FRUSTRATING. But now I'm up and running!!!
Maybe you are looking for
-
Dynamic action on tabular forms fields
Hello guys. As I can see on the tabular form's fields I can't perform dynamic actions. What I want is to have a select list item when at the event Change it changes the values for all the records in that report. For example if I have 40 records in th
-
How can I make the calendar smaller?
After upgrading to Mountian Lion it seems the calendar is even bigger than before. I can make it larger, but I really want to make it smaller... The smallest it will go is still 5" or 6" wide across my screen. I want it to be about 4" wide... thank
-
2nd generation not showing itunes
I have an ipod shuffle 2nd gen that won't be recognized by itunes. i've tried resetting it but no luck.. Please help, I am fed up with my playlist ;-)
-
Corrupt label, wrong magic number
Hi guys, I have a problem I have 2 ultra 60 with disk array D1000. The problem is usually I turn off my disk array now last time I turned off my disk array after turning back Solaris doesn't recognized disks in disk array. I tried to relabel all disk
-
Double column options not showing up in answers environment
Hi, I have configured descriptor id for one of the dimension column, I have saved rpd, restarted the server twice, i am unable to get the "filter by column id" options in prompt not in the report filter. should i enable something at presentation leve