Skip to Content
0
Former Member
May 09, 2011 at 07:28 AM

Data transfer between to components

35 Views

Hi,

My requirement is to add a button 'Duplicate Check' in the component view 'BT115H_SLSO/SOHOverView' and on click of the button an event need to be triggered 'EH_ONDUPLICATE', and it should call the view 'BT115S_SLSO/SlsOrdSQ' and it should open with selection fields requested by client and pre filled with values from previous view. Ex:- Sale order ID, Posting date Channel partner etc... And this search fields includes item level search also.. (Ex:- Item product, quantity).

On click of search it should display the orders with the current filled search criteria.

My part of work done:

1) Created a duplicate button in IF_BSP_WD_TOOLBAR_CALLBACK~GET_BUTTONS method of view BT115H_SLSO/SOHOverView.

2) Created a event handler to handle the on click event 'EH_ONDUPLICATE'.

3) In the event handler method, read the attribute 'GUID' of the current Order.

4) Created component usage for the view 'BT115S_SLSO/SlsOrdSQ'

5) Opened one pop-up using the created component usage to cal the view 'BT115S_SLSO/SlsOrdSQ' in the pop-up.

6) Created one out bound plug in the view 'BT115H_SLSO/SOHOverView' . (But code not inserted to handle data transfer)

7) In the do_prepare_output method of view 'BT115S_SLSO/SlsOrdSQ' , added some code to set the search field criteria, but the previous fields are also getting diplayed.

"" here is the code inserted in do_prepare_output"""

lr_qs = me->get_current_dquery( ).

lr_qs->clear_selection_param_values( ).

lr_qs->delete_empty_selection_params( ).

lr_qs->add_selection_param( iv_attr_name = 'OBJECT_ID' iv_sign = 'I' iv_option = 'EQ' iv_low = '6020104' ).

lr_qs->add_selection_param( iv_attr_name = 'CHANNEL_PARTNER' iv_sign = 'I' iv_option = 'EQ' iv_low = 'XYZ' ).

So on click of 'Duplicate Check' a search screen is displayed but with empty values and different search fields..

Now i was stuck:

What code need to be inserted in the created outbound plug...

Should i create a inbound plug for collecting the guid in the search view?? (code snippets if possible)

How to set the selection criteria in the new pop-up screen with the required fields..

how to fill the selection criteria conditions with the required values...

Please help me out.

Thanks in advance..

Regards,

Swathi.

Edited by: swathi Chandra on May 9, 2011 1:00 PM

Edited by: swathi Chandra on May 9, 2011 1:05 PM