cancel
Showing results for 
Search instead for 
Did you mean: 

Org structure update using FM BBP_UPDATE_ATTRIBUTES

Former Member
0 Kudos

Hello Experts,

I want to update the org structure for company code and currency using custom program and i am calling a function module BBP_UPDATE_ATTRIBUTES in the program. But when i run the program the data is geting updated in the tcode PPOSA_BBP for position but it is not getting commited i.e while debugging i am able to see the data in PPOSA_BBP but after the program it is not reflecting in PPOSA_BBP for position..Sample code

IF pv_flag EQ c_x.

  • call the FM with replace_p eq X

CALL FUNCTION 'BBP_UPDATE_ATTRIBUTES'

EXPORTING

is_object = st_object

scenario_p = 'BBP'

end_date_p = '99991231'

replace_p = 'X'

TABLES

it_attr_p = it_attributes

EXCEPTIONS

object_not_found = 1

times_invalid = 2

update_error = 3

OTHERS = 4.

IF sy-subrc <> 0.

pc_subrc = sy-subrc.

ROLLBACK WORK.

ELSE.

COMMIT WORK AND WAIT.

ENDIF.

ELSE.

  • call the fm with replace eq space

CALL FUNCTION 'BBP_UPDATE_ATTRIBUTES'

EXPORTING

is_object = st_object

scenario_p = 'BBP'

end_date_p = '99991231'

replace_p = ''

TABLES

it_attr_p = it_attributes

EXCEPTIONS

object_not_found = 1

times_invalid = 2

update_error = 3

OTHERS = 4.

IF sy-subrc <> 0.

pc_subrc = sy-subrc.

ROLLBACK WORK.

ELSE.

COMMIT WORK AND WAIT.

ENDIF.

ENDIF.

Please suggest

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member183819
Active Contributor
0 Kudos

see this piece of code

http://wiki.sdn.sap.com/wiki/display/SRM/CodeSample3UpdatingExtendedAttributes%28Storage+Location%29

Muthu