cancel
Showing results for 
Search instead for 
Did you mean: 

how to pass the check box values from one view to another view

0 Kudos

Hi Experts,

I have a selection screen view which consists of check boxes.

WBS System status.

Release Completed Closed as 3 check boxes.

Note : The above ones are check boxes.

Based on the selection made by the user, those values needs to be passed to second view which retrieves the data and

displays the data accordingly.

At the same time if the user does not make any selection, then WBS System status should contain Released, Completed and Closed values and that needs to be sent to Second view.

Kindly advise.

Regards,

Chitrasen

Accepted Solutions (0)

Answers (5)

Answers (5)

0 Kudos

My Query is solved.

Former Member
0 Kudos

now the process is very simple ,

u can acess these attributes attr1 , attr2 and attr3 across second view as well

depending on whether attr1 value is ' ' or ' X' , u can perform correspondingly in ur second view



IF wd_comp_contoller = ' '.
'' do whatever u wish to perform if release cjeckbox is un checked
ELSE.
''do whatever u wish to perform if release cjeckbox is  checked

similarly proceed for complete and close , revert in case of issues

I hope it shud help

regards,

amit

former_member190818
Active Contributor
0 Kudos

Hi,

When you select the check box and while going to second view, set attribute value in context. In INIT method of second view, get those attribute values.

Or

You can also define the import parameters in outbound plug and while calling outbound plug from first view, pass those values to the parameters.

Regards,

JMB

Former Member
0 Kudos

hi ,

make a attribute of type WDY_BOOLEAN to achieve this functionality

u need to follow these steps :

1 in side ur component controller , under the ATTRIBUTES tab , make 3 attributes say attr1 , attr2 and attr3 of type WDY_BOOLEAN

2 create a context node , cn_check and 3 context attribute ca_check1 , ca_check2 and ca_check3 in ur first view for

release , complete and close check boxes

3 inside the DOINIT of ur 1st view , set the attributes attr1 , attr2 and attr3 to blank


wd_comp_controller->attr1 = ' ' 
wd_comp_controller->attr2 = ' ' 
wd_comp_controller->attr3 = ' ' 

4 inside the method , where u r validating , if the check boxes are checked or not , read the attributes ca_check1 , ca_check2 and

ca_check3



  DATA lo_nd_cn_check TYPE REF TO if_wd_context_node.
    DATA lo_el_cn_check TYPE REF TO if_wd_context_element.
    DATA ls_cn_check TYPE wd_this->element_cn_check.
    DATA lv_ca_check1 LIKE ls_cn_check-ca_check1.
*   navigate from <CONTEXT> to <CN_CHECK> via lead selection
    lo_nd_cn_check = wd_context->get_child_node( name = wd_this->wdctx_cn_check ).

*   get element via lead selection
    lo_el_cn_check = lo_nd_cn_check->get_element(  ).

*   get single attribute
    lo_el_cn_check->get_attribute(
      EXPORTING
        name =  `CA_CHECK`
      IMPORTING
        value = lv_ca_check1 ).


IF lv_ca_check1 EQ 'X' .
wd_comp_controller->attr1 = ' X' 
wd_comp_controller->attr2 = 'X ' 
wd_comp_controller->attr3 = ' X' 

Former Member
0 Kudos

Hi,

I guess you might have bound some attributes to these checkboxes. If you did so, then the HANDLER of the 2nd view,

using the cosde wizard READ these values of attibutes(GET_ATTRIBUTE of if_wd_context_node).

At the same time if the user does not make any selection, then WBS System status should contain Released, Completed and Closed values and that needs to be sent to Second view.

Please be more clear..........

Regards,

Lekha.