Application Development 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: 

RH_OM_ATTRIBUTES_UPDATE Error in sap abap

former_member198180
Active Participant
0 Kudos

Iam getting updation error in function module RH_OM_ATTRIBUTES_UPDATE in sap abap? please help me.

1 ACCEPTED SOLUTION

former_member1716
Active Contributor
0 Kudos

Hi,

Can You please tell us what is the error you are facing.

regards,

Satish

18 REPLIES 18

paul_bakker2
Active Contributor
0 Kudos

Um, what's the error message??

Paul

0 Kudos

HI Paul,

exception error- 6

error - update error

CALL FUNCTION

'RH_OM_ATTRIBUTES_UPDATE'
EXPORTING
plvar
= wa_1000-plvar
otype
= 'O' "otype
objid
= wa_1000-objid " hrp1000-otype"objid
* SELDATE = SY-DATUM
* scenario = p_sce
* NO_INSERT =
* ACTIVATE_OBJECT =
* IMPORTING
* UPD_BEGDA =
* UPD_ENDDA =
TABLES
attr_tab
= t_pt1222
EXCEPTIONS
no_active_plvar
= 1
object_not_found
= 2
no_attributes
= 3
times_invalid
= 4
inconsistent_values
= 5
update_error
= 6
nothing_to_update
= 7
OTHERS =

8

0 Kudos

Hi,

You can debug into the function module and find the error.

Or, in debug, check the values of the system messages (in structure SYST) just after the exception is raised.

cheers

Paul

0 Kudos

HI paul,

Iam getting exception in

 

'RHOM_WRITE_INFTY_BUFFERED'..i debugged the code .controller will fails to this function module..please update


0 Kudos

Again, you need to debug and check the error messages (held in structure SYST), just after the exception is raised.

You can't just say "there's an exception/error".. no one can help you with just that information.

cheers

Paul

0 Kudos

HI iam getting exception here... 

IF

act_subty IS INITIAL.
MESSAGE s116(5at) WITH scenario RAISING update_error.
* Kein Subtyp zu Szenario &1 gefunden
ENDIF

.

0 Kudos

Hi Paul ,

Iam getting error as below..please help

Error : E 5A 277 No authorization

0 Kudos

Hmm, sounds like an authorization error .

Run SU53, then take the log to your security guy / gal.

cheers

Paul

former_member1716
Active Contributor
0 Kudos

Hi,

Can You please tell us what is the error you are facing.

regards,

Satish

0 Kudos

HI satish,

Exception - 6

Error - updation

CALL FUNCTION

'RH_OM_ATTRIBUTES_UPDATE'
EXPORTING
plvar
= wa_1000-plvar
otype
= 'O' "otype
objid
= wa_1000-objid " hrp1000-otype"objid
* SELDATE = SY-DATUM
* scenario = p_sce
* NO_INSERT =
* ACTIVATE_OBJECT =
* IMPORTING
* UPD_BEGDA =
* UPD_ENDDA =
TABLES
attr_tab
= t_pt1222
EXCEPTIONS
no_active_plvar
= 1
object_not_found
= 2
no_attributes
= 3
times_invalid
= 4
inconsistent_values
= 5
update_error
= 6
nothing_to_update
= 7
OTHERS =

8

0 Kudos

Try Changing the Input for the field Otype to a variable whose type is declared as Otype and then pass that variable to the field Otype.

Please get back if the issue persists.

Regards,

Satish

0 Kudos

Hi satish i passed the variable..now this time iam getting an error .Exception = 2

Error = object_not_found= 2

0 Kudos

Please check the declarations you have made. You might have missed some.

Can you please lets us know how you have declared.

Regards,

Satish

0 Kudos

 

DELETE t_pt1222 WHERE attrib NE 'CODES'.

DATA : t_pt1222t TYPE TABLE OF pt1222,

* wa_t type table of pt1222,
wa_pt1222
TYPE pt1222.

LOOP AT t_pt1222 INTO wa_pt1222.

IF wa_pt1222-attrib IS NOT INITIAL AND wa_pt1222-low IS NOT INITIAL.

wa_pt1222
-attrib = wa_pt1222-attrib.
wa_pt1222
-low = ' '.
APPEND wa_pt1222 TO t_pt1222t.

CLEAR wa_pt1222.

ENDIF.
ENDLOOP.


CALL FUNCTION 'RH_OM_ATTRIBUTES_UPDATE'
EXPORTING
plvar
= wa_1000-plvar
otype
= 'O' "otype
objid
= wa_1000-objid " hrp1000-otype"objid
* SELDATE = SY-DATUM
scenario
= p_sce
* NO_INSERT =
* ACTIVATE_OBJECT =
IMPORTING
upd_begda
= sy-datum
upd_endda
= sy-datum
TABLES
attr_tab
= t_pt1222t
EXCEPTIONS
no_active_plvar
= 1
object_not_found
= 2
no_attributes
= 3
times_invalid
= 4
inconsistent_values
= 5
update_error
= 6
nothing_to_update
= 7
OTHERS = 8.

IF sy-subrc <> 0.

* Implement suitable error handling here
ENDIF.

IF sy-subrc EQ 0.
MESSAGE 'updated' TYPE 'I'.
ENDIF.

ENDLOOP.

0 Kudos

HI satish,

Can you please help me once.

0 Kudos

Hi Satish

Iam getting error as below..please help

Error : E 5A 277 No authorization

0 Kudos

Hi kalpana,

It seems you have an authorization issue. Check with your BASIS team whether you have roles maintained properly.

regards,

Satish

0 Kudos

Hi Kalpana,

These Infotypes are different compated to 1000 ,

So you can use RH_INSERT_INFTY to update IT1222 These IT contains TABNR fields which needs to be updated.

Use the code and change the FM I am giving the code for IT1017 and use change it to IT1222.

TABLES pppar.

DATA : ptsub LIKE t777d-ptnnnn VALUE 'PT1017'.

DATA : pt_tabnr LIKE d021t-fldn VALUE 'P1017-TABNR'.

DATA: %upd_repid LIKE sy-repid,

       %upd_form TYPE edperform.

DATA : tdata_sort LIKE t77cd-tdata_sort VALUE ' '.

DATA: fcode_for_insert LIKE hrrhap-fcode.

CONSTANTS: tabnr_fdname LIKE dfies-fieldname VALUE '-TABNR'.

CONSTANTS:      def_vtask_space  LIKE hrrhap-vtask VALUE ' ',

                 def_commit_flg_no LIKE hrrhap-commit_flg VALUE ' ',

                 def_authy_no LIKE hrrhap-authy VALUE 'X'.

DATA: BEGIN OF dyn_tab OCCURS 1,

         vdata LIKE pplog-vdata,

         opera(1),

       END OF dyn_tab.

FIELD-SYMBOLS : <ptsub>, <pttabnr>,

                 <ptsub_char> TYPE any.

pppar-fcode =   'INSE'.

pppar-listb =   '0'.

pppar-break =   '0'.

pppar-cycle =   '0'.

pppar-updat =   '1'.

pppar-clear =   '1'.

pppar-timco =   '2'.

pppar-vtask =   'D'.

pppar-enque =   '1'.

pppar-langu =   '1'.

pppar-pstat =   'INSE'.

pppar-ppnnn =   'P1017'.

pppar-edynr =   '2000'.

pppar-ldynr =   '3000'.

pppar-lvdat =   '000'.

pppar-lpsub =   '000'.

pppar-dialg =   'RH_INFOTYP_1017'.

pppar-repid =   'MP101700'.

pppar-dvary =   'INSE'.

pppar-dbtab =   'HRP1017'.

pppar-tbtab =   'HRT1017'.

pppar-ptnnnn  =   'PT1017'.



pplog_tab-mandt =   '800'.

pplog_tab-plvar =   '01'.

pplog_tab-otype =   'S'.

pplog_tab-objid =   '50013077'.

pplog_tab-infty =   '1017'.

pplog_tab-istat =   '1'.

pplog_tab-begda =   sy-datum.

pplog_tab-endda =   '99991231'.

pplog_tab-varyf =   'E'.

pplog_tab-seqnr     = '000'.

pplog_tab-aedtm sy-datum.

pplog_tab-uname sy-uname.

pplog_tab-itxnr =   '00000000'.

APPEND pplog_tab.


CALL FUNCTION 'RH_INSERT_INFTY'

   EXPORTING

     fcode               = 'INSE'

     vtask               = 'B'

*   ORDER_FLG           = 'X'

*   COMMIT_FLG          = 'X'

*   AUTHY               = 'X'

*   PPPAR_IMP           =

*   OLD_TABNR           = ' '

     repid               = sy-repid

     form                = '%TAB_DB'

*   KEEP_LUPD           =

*   WORKF_ACTV          = 'X'

   TABLES

     innnn               = pplog_tab[]

*   ILFCODE             =

   EXCEPTIONS

     no_authorization    = 1

     error_during_insert = 2

     repid_form_initial  = 3

     corr_exit           = 4

     begda_greater_endda = 5

     OTHERS              = 6.

IF sy-subrc <> 0.

* Implement suitable error handling here

ELSE.

   CALL FUNCTION 'RH_UPDATE_DATABASE'

     EXPORTING

       vtask     = 'D'

     EXCEPTIONS

       corr_exit = 1

       OTHERS    = 2.

   COMMIT WORK.

ENDIF.



Copy and paste the below code and don't change.this one and update Attribute Value from , Value To , Default & Exclude values.


form %tab_db tables %td_tab

              using  %td_set

                     %td_tabix.

   data: %td_tab_count type p.

   field-symbols: <%td_tab_char> type any.                 "ANDUNI

   assign %td_tab to <%td_tab_char> casting type c.        "ANDUNI

   refresh %td_tab.

   loop at dyn_tab.

*    <ptsub> = dyn_tab.

*    %td_tab = <ptsub>.

     <ptsub_char> = dyn_tab.                               "ANDUNI

     <%td_tab_char> = <ptsub_char>.                        "ANDUNI

     append %td_tab.

   endloop.

   describe table %td_tab lines %td_tab_count.

   if %td_tab_count = 0.

*   leere Tabelle => Kopfzeile clearen

     clear <ptsub>.

*    %td_tab = <ptsub>.                                   "ANDUNI

     <%td_tab_char> = <ptsub_char>.                        "ANDUNI

   endif.

   if tdata_sort ne space.

     sort %td_tab.

   endif.

endform.




I hope this will be helpful.




Thanks & Reagrds,

Raghunadh Kodali.