cancel
Showing results for 
Search instead for 
Did you mean: 

Maintain Attributes

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member183819
Active Contributor
0 Kudos

Hi

Hope that you have maintained basic account assigment settings in spro.

Regards

Muthu

Former Member
0 Kudos

Thanks Muthu.

Yes maintained SEttings in SPRO.

I can go and manually assign cost centers for the ORGUNIT_ID using the TCODE - pposa_bbp

But I have to do this in Mass level so need to do it programatically for the ORGUNIT_ID.

any FM, or BAPI or standard programs.

Thanks,

Ster.

former_member183819
Active Contributor
0 Kudos

Hi

Hope that you would have ventured these links.

B_UPLOAD_COST_CENTER_ATTRIBUTE allows the upload of cost center attribute. You can modify this program or alternately use the function module: BBP_UPDATE_ATTRIBUTES.

regards

Muthu

Edited by: Muthuraman Govindasamy on Sep 17, 2008 5:57 PM

Former Member
0 Kudos

Thanks Muthu.

I have tried the FM but its not working. It works for Plant, Storage Location but am unable to do it for Cost Center at the ORGUNIT_ID level.

Please let me now the attributes that needs to be passed when doing for Cost center at the orgunit_id level.

Thanks,

Ster

former_member183819
Active Contributor
0 Kudos

Hi

Try with orgid like

O 5XXXXXX instead of user in the given file. Since in srm there are some places we used to maintain like US+USER.

you can try in trail and error method.

regards

Muthu

Former Member
0 Kudos

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

Answers (1)

Answers (1)

Former Member
0 Kudos

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.