Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

CIC - Copy to the clipboard

Former Member
0 Kudos

Hello,

When user, on transaction CIC (l-shape), click on the ISU-Finder to find a BP by giving a premise number it should copy to the clipboard the BP when i click on the checkmark button. This part is build by SAP.

I am trying to copy the Premise to the clipboard by using user-exit EXIT_SAPLEECIC_COMP00_001. I tried many attempts by using SAP function modules in order to create a Business Object Premise and add the element to the clipboard.

I tried FMs such as :

CALL FUNCTION 'CIC_EVENT_RAISE'

EXPORTING

event = 'ADD_XTAINER_TO_BDD'

p1 = xtain

EXCEPTIONS

OTHERS = 99.

When i used this one, i got an item in the clipboard but it said : Uninitiliazed Business Process Unit.

Does somebody have to code a 'Copy to Clipboard' for a businness object.

Thanks

1 REPLY 1

Former Member
0 Kudos

I found byselft the solution. Here the step for those who have to do the same:

  • Copy Premise to the clipboard (BDD)

l_procobj-header = 'OBJH'.

l_procobj-type = 'SWO'.

  • Create object Premises

CALL FUNCTION 'SWO_CREATE'

EXPORTING

objtype = 'PREMISES'

objkey = l_key

IMPORTING

object = l_procobj-handle

return = l_return.

IF NOT l_return IS INITIAL.

EXIT.

ENDIF.

  • Set Object ID

CALL FUNCTION 'SWO_OBJECT_ID_SET'

EXPORTING

object = l_procobj-handle

objectkey = l_key

IMPORTING

return = l_return

EXCEPTIONS

OTHERS = 1.

IF NOT l_return IS INITIAL.

EXIT.

ENDIF.

  • Buffer Refresh

CALL FUNCTION 'SWO_OBJECT_REFRESH'

EXPORTING

object = l_procobj

EXCEPTIONS

error_create = 02.

l_def-element = '<MAINOBJ>'.

l_def-editorder = 2000 - 1.

l_def-reftype = 'O'.

l_def-refobjtype = 'PREMISES'.

  • APPEND l_def TO li_def.

CALL FUNCTION 'EWO_XTAINER_ELEMENT_SET'

EXPORTING

x_elemdef = l_def

x_value = l_procobj

CHANGING

xy_xtainer = l_desk_xtain

EXCEPTIONS

invalid_elemdef = 1

internal_error = 2

OTHERS = 3.

CALL FUNCTION 'CIC_EVENT_RAISE'

EXPORTING

event = 'ADD_XTAINER_TO_BDD'

p1 = l_desk_xtain

EXCEPTIONS

OTHERS = 99.