Skip to Content
0
Dec 04, 2013 at 11:02 AM

Adding attachment block from the standard | collection is not filled

127 Views

Hi all,

I'm working on a ZComponent where I have added the attachment assignmentblock as a usage from (GS_CM) in form of the two CUs CUGSCM and CUGSCM_DET (CUs have different names in my component)

I created a cuco with the Context nodes CMBO, ATTRIBUTES and ERPADMINH because I'm adding it to a ZComponent which is working with the LORD API. In the WD_USAGE_INITIALIZE I mapped like this:

Name in my zcomponent name in GS_CM CMBO CMBUSOBJ ERPADMINH PARENTNODE ATTRIBUTES ATTRIBUTES

When I add a new attachment, popup opens and I can choose as in the standard. By clicking "Attach" it ends up in an endless wheel of death (infinite loading). I debugged the process and found out the following:

METHOD EH_ONATTACH_BTN

WHEN 'attach'. "#EC NOTEXT
* attach document
lv_error = prepare_doc( ).
* any errors?
CHECK lv_error IS INITIAL.
* save behavior is new in 7.01 ( Business Role Parameter controlls commit or direct update mode )
lr_coco ?= me->comp_controller.
lr_coco->save( ).

The save method is called.

In the save()-method there is line which tries to get the current entity from the collection:

lr_cmbo ?= me->typed_context->cmbusobj->collection_wrapper->get_current( ).

The main problem: lr_cmbo stays INITIAL and doesn't get any value.

Where do I have to add coding or might have forgotten something?

Thanks in advance,

Daniel