on 11-24-2009 6:45 AM
hi all,
I have to update the SLAS of the object ID. I am using Fm " RH_UPDATE_INFty". but it is not updating the SCLAS
Code is given below
REPORT ZTEST_RH_UPDATE_INFTY.
DATA:
lt_relation TYPE TABLE OF p1001,
ls_relation TYPE p1001.
ls_relation-mandt = sy-mandt.
ls_relation-plvar = '01'.
ls_relation-otype = 'E'.
ls_relation-objid = '30000031'.
ls_relation-infty = '1001'.
ls_relation-istat = '1'.
ls_relation-rsign = 'A'.
ls_relation-relat = '025'.
ls_relation-begda = '20090709'.
ls_relation-endda = '20090711'.
ls_relation-sclas = 'P'.
ls_relation-sobid = '00123749'.
APPEND ls_relation TO lt_relation.
CALL FUNCTION 'RH_UPDATE_INFTY'
EXPORTING
vtask = 'S'
ORDER_FLG = 'X'
COMMIT_FLG = 'X'
AUTHY = 'X'
PPPAR_IMP =
OLD_TABNR_NEW_LANGU = ' '
REPID = ' '
FORM = ' '
KEEP_LUPD =
WORKF_ACTV = 'X'
tables
innnn = lt_relation
ILFCODE =
EXCEPTIONS
ERROR_DURING_UPDATE = 1
NO_AUTHORIZATION = 2
REPID_FORM_INITIAL = 3
CORR_EXIT = 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.
please help .
thanks
Sachin
Hi,
Before RH_UPDATE_INFTY, call function RH_PM_ENQUEUE, after RH_UPDATE_INFTY, call function RH_PM_DEQUEUE.
Regards,
Dilek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Dilek,
thanks for ur reply.
I have added both FM but its not updating yet.
below is my code.
REPORT ZTEST_RH_UPDATE_INFTY.
DATA:
lt_relation TYPE TABLE OF p1001,
ls_relation TYPE p1001.
ls_relation-mandt = sy-mandt.
ls_relation-plvar = '01'.
ls_relation-otype = 'E'.
ls_relation-objid = '30000031'.
ls_relation-infty = '1001'.
ls_relation-istat = '1'.
ls_relation-rsign = 'A'.
ls_relation-relat = '025'.
ls_relation-begda = '20090709'.
ls_relation-endda = '20090711'.
ls_relation-sclas = 'P'.
ls_relation-sobid = '00123749'.
APPEND ls_relation TO lt_relation.
CALL FUNCTION 'RH_PM_ENQUEUE'
EXPORTING
act_plvar = '01'
act_otype = 'E'
act_objid = '30000031'
ERROR_TYPE = 'I'
EXCEPTIONS
ERROR_IN_ENQUEUE = 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.
CALL FUNCTION 'RH_UPDATE_INFTY'
EXPORTING
vtask = 'S'
ORDER_FLG = 'X'
COMMIT_FLG = 'X'
AUTHY = 'X'
PPPAR_IMP =
OLD_TABNR_NEW_LANGU = ' '
REPID = ' '
FORM = ' '
KEEP_LUPD =
WORKF_ACTV = 'X'
tables
innnn = lt_relation
ILFCODE =
EXCEPTIONS
ERROR_DURING_UPDATE = 1
NO_AUTHORIZATION = 2
REPID_FORM_INITIAL = 3
CORR_EXIT = 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.
CALL FUNCTION 'RH_PM_DEQUEUE'
EXPORTING
act_plvar = '01'
act_otype = 'E'
act_objid = '30000031'.
why this code is not updating SCLAS.
please help
thanks
Sachin
Make sure that in HRP1001 there is an entry with the following fields - check via SE16-:
ls_relation-mandt = sy-mandt.
ls_relation-plvar = '01'.
ls_relation-otype = 'E'.
ls_relation-objid = '30000031'.
ls_relation-istat = '1'.
ls_relation-rsign = 'A'.
ls_relation-relat = '025'.
ls_relation-begda = '20090709'.
ls_relation-endda = '20090711'.
Actually if I were you, I would first select from HRP1001 into corresponding fields of ls_relation for the above key fields.
Then I would change the sclas field (in LOOP AT ls_relation ... ENDLOOP iteration )
Finally, please try to change vtask to 'B'
Hope this helps,
Dilek
Edited by: Dilek Ersoz Adak on Nov 24, 2009 12:33 PM
hi all,
first i was doing this by using BDc.. but during BDc, the field SCLAS is in non-editable mode. so i was not able to do recording for updating SCLAS.
please tell FM to update SCLAS..
thanks
Sachin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try using BAPI_BOOK_ATTENDANCE.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
7 | |
7 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.