on 07-01-2008 1:45 PM
all,
I try to update via a program the storage location in PPOMA_BBP with function module BBP_UPDATE_ATTRIBUTES.
Whil pretty much all attrbuted I can update with this FM, it fails for updating the storage location.
I provide
et_attr-ATTR_ID = 'LAG'
et_attr-VALUE_LOGSYS = 'backend...'
et_attr-VALUE = 1621' "a valid backend storage loc.
and call the FM BBP_UPDATE_ATTRIBUTES.
The FM returns with sy-subrc = 0.
When I check the update in PPOMA_BBP (Ext.Attributes, Storage location), the value for the storage location (here 1621) is set, but the plnt, Source system are not set
Anybody an idea ? Do I need to use another FM for the extended attributes ?
Thanks in advance
Christian
You are using the correct function module, but the values have not been populated correctly.
Please find an example code below:
REPORT zkb_update_storage_loc.
DATA: lt_bbp_attributes TYPE TABLE OF bbp_attributes.
DATA: ls_bbp_attributes TYPE bbp_attributes.
ls_bbp_attributes-attr_id = 'LAG'.
ls_bbp_attributes-value_logsys = 'BACKEND LOG SYS'.
ls_bbp_attributes-value(20) = 'Storage Loc'.
ls_bbp_attributes-value+20(10) = 'BACKEND LOG SYS'.
ls_bbp_attributes-value+30(4) = 'Company Code of stor loc'.
APPEND ls_bbp_attributes TO lt_bbp_attributes.
CALL FUNCTION 'BBP_UPDATE_ATTRIBUTES'
EXPORTING
user_id_p = 'USER ID'
scenario_p = 'BBP'
start_date_p = sy-datum
end_date_p = '99991231'
TABLES
it_attr_p = lt_bbp_attributes
EXCEPTIONS
object_id_missed = 1
no_active_plvar = 2
object_not_found = 3
no_attributes = 4
times_invalid = 5
inconsistent_values = 6
update_error = 7
ambiguous_position = 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.
ELSE.
COMMIT WORK AND WAIT.
ENDIF.
Hope this solves your problem.
Regards
Kathirvel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi. No idea on the function module, but you can use an ecatt or call transaction on transaction PP01 instead for this.
You might have to change a setting in table T777i to allow the extended attributes to be changed in this transaction though.
Regards,
Dave.
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.