Skip to Content
0
Former Member
Dec 15, 2014 at 08:38 AM

Create Docflow between Items with BOL

427 Views

Hello everybody,

recently I try to create a dowflow relationship between two items (BUS1000130) below opportunities (BUS1000111). As there no BOL method for docflow creation exists below BOL relation BTItemDocFlowSet/BTDocFlowAll, I was wundering if maybe the method createDocFlow of BTOrderHeader can be facilitated in some way also to create docflow between items.

I tried this and gut a dump which says, that an item docflow linkage cannot be created without a header docflow linkage. This sounds sensible but actually a doflow relation between the two parent opportunities of the items exists. So I'm not sure if I the parameters which I hand over to the method createDocFlow are correct. I call the method this way:

TRY.

CLEAR lt_params.

CLEAR ls_params.
ls_params-name = 'OBJKEY_A'.
ls_params-value = ir_main_file->get_property_as_string( 'GUID' ).
APPEND ls_params TO lt_params.

CLEAR ls_params.
ls_params-name = 'OBJTYPE_A'.
ls_params-value = 'BUS2000130'.
APPEND ls_params TO lt_params.

CLEAR ls_params.
ls_params-name = 'OBJKEY_B'.
ls_params-value = ir_supdlv_file->get_property_as_string( 'GUID' ).
APPEND ls_params TO lt_params.

CLEAR ls_params.
ls_params-name = 'OBJTYPE_B'.
ls_params-value = 'BUS2000130'.
APPEND ls_params TO lt_params.

CLEAR ls_params.
ls_params-name = 'RELTYPE'.
ls_params-value = iv_rel_type.
APPEND ls_params TO lt_params.

CLEAR ls_params.
ls_params-name = 'BREL_KIND'.
ls_params-value = 'B'.
APPEND ls_params TO lt_params.

lr_parent_section ?= ir_supdlv_file->get_parent( )->get_parent( ).

IF lr_parent_section IS BOUND AND lr_parent_section->get_name( ) EQ 'BTAdminH'.

lr_parent_section->execute(
iv_method_name = 'createDocFlow'
it_param = lt_params ).

ENDIF.

I create try to create the docflow underneath the start opportunity named "lr_parent_section". OBJKEY_A is the GUID of the item below lr_parent_section. The OBJKEY_B is the GUID of the item underneath the other opportunity. As I see no possibility to hand over a GUID for the header of this opportunity, I'm not sure how to transport the header linkage of the two opportunities. As this docflow already exists, no check seems to be made between within the docflow creation method.

Can anybody give me a hint how to handle this problem? Would be great...

Thanks and best regards,

Markus