on 09-17-2008 4:25 PM
Hello friends,
I am actually trying to Maintain attributes at ORG Level and User Level.
I am able to maintain for Plant, Storage location for ORGUNIT_ID level using the FM
BBP_UPDATE_ATTRIBUTES.
However when I am trying to maintain the Cost center for the same ORGUNIT_ID, its giving me an Fatal error.
I also looked into program B_UPLOAD_COST_CENTER_ATTRIBUTE, but it does the upload only for User ID, not for ORGUNIT_ID.
Any suggestions.
Ster.
However when
Hi
Hope that you have maintained basic account assigment settings in spro.
Regards
Muthu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please use the below code it will solve your problem.
REPORT zkb_update_org.
DATA: lt_attr_tab TYPE TABLE OF pt1222.
DATA: ls_attr_tab TYPE pt1222.
ls_attr_tab-attrib = 'CNT'.
ls_attr_tab-low = '<Logical System Name>\<Cost Center>'.
APPEND ls_attr_tab TO lt_attr_tab.
CALL FUNCTION 'RH_OM_ATTRIBUTES_INSERT'
EXPORTING
plvar = '01'
otype = 'O'
objid = 'Org id say 50000001'
begda = sy-datum
endda = '99991231'
scenario = 'BBP'
activate_object = 'X'
TABLES
attr_tab = lt_attr_tab
EXCEPTIONS
no_active_plvar = 1
object_not_found = 2
no_attributes = 3
times_invalid = 4
inconsistent_values = 5
update_error = 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.
ELSE.
COMMIT WORK AND WAIT.
ENDIF.
Regards
Kathirvel
i have done using this FM .May be this is useful, have alook into this.
SELECT SINGLE LOG_SYS DEST FROM BBP_BACKEND_DEST
INTO (V_LOGSYS, V_DESTINATION)
WHERE SYS_TYPE = 'R/3_4.70'.
Select single PARTNER_NO
from BBP_LOCMAP
into v_partner
where LOGSYS = V_LOGSYS and
EXT_LOCNO = v_plant.
***for plant
wa_up_values-attr_id = 'WRK'.
wa_up_values-value_logsys = V_LOGSYS.
wa_up_values-value(4) = v_plant.
wa_up_values-value+4(10) = V_LOGSYS.
wa_up_values-value+14(4) = v_CO_CODE.
wa_up_values-value+48(10) = v_partner.
append wa_up_values to t_UP_ATTRIBUTES.
***for company code
wa_up_values-VALUE_LOGSYS = V_LOGSYS.
wa_up_values-VALue = v_CO_CODE.
wa_up_values-attr_id = 'BUK'.
append wa_up_values to t_UP_ATTRIBUTES.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.