cancel
Showing results for 
Search instead for 
Did you mean: 

Freely programmed help in ALV

Former Member
0 Kudos

   HI:ALL

      How to achieve  Freely programmed help in ALV?

Accepted Solutions (0)

Answers (1)

Answers (1)

ramakrishnappa
Active Contributor
0 Kudos

Hi Huang,

Nothing special we need to do for freely programmed search help in ALV. i.e. it is the same concept and procedure as we do it for normal fields in Webdynpro

You just need to choose search help type "Freely Programmed help" for the context attribute which is used in alv table.

Please find the below link

Creation and Usage of Freely Programmed Search Help In Web Dynpro for ABAP

You can achieve your requirement as below

  • Create a freely programmed search help component. let us say - ZF4_COMP
  • Now, use this component in your working component
  • Go to the context attribute and choose search help type for attribute and select freely programmed search help. You could see the component usage name and select it

Hope this helps you.

Regards,

Rama

Former Member
0 Kudos

hi:Ramakrishnappa

  Thank you for your reply!

  I have created Freely Programmed Search Help in wda of alv ,but    How to put a value of the date and time into  ALV field ,after click 'apply' button

Former Member
0 Kudos

Hi,

On APPLY buttton action, write the below code

*Fire the event to indicate that data selection is done

wd_comp_controller->fire_vh_data_selected_evt( ).
wd_comp_controller->value_help_listener->close_window( ).

*Raise Event

   cl_fpm_factory=>get_instance( )->raise_event_by_id( EXPORTING   iv_event_id   = '<custom event name>').

And in PROCESS_EVENT of your webdynpro component(where Freely Programmed search help is implemented) write the code as per your requirement to set the values back to the table.

CASE IO_EVENT->MV_EVENT_ID.

          WHEN '<CUSTOM EVENT NAME>'.

                    write code as per your requirement.

ENDCASE.

Thanks

KH

ramakrishnappa
Active Contributor
0 Kudos

Hi Huang,

Please refer the suggested link for more details and check out the action CHOOSE and write the below logic

WD_COMP_CONTROLLER->FIRE_VH_DATA_SELECTED_EVT(

  ).

  WD_COMP_CONTROLLER->VALUE_HELP_LISTENER->CLOSE_WINDOW( ).


Hope this helps you.


Regards,

Rama

Former Member
0 Kudos

hi:Katrice

  Thank you for your reply!

And in PROCESS_EVENT of your webdynpro component(where Freely Programmed search help is implemented) write the code as per your requirement to set the values back to the table.

CASE IO_EVENT->MV_EVENT_ID.

          WHEN '<CUSTOM EVENT NAME>'.

                    write code as per your requirement.

ENDCASE.

The upper part,can you say in detail?

thanks

Former Member
0 Kudos

hi:Katrice

    My probelm is put the value of date and time into the corresponding ALV Cell,

by Freely Programmed Value Help .

  how to do?

  Thanks!

Former Member
0 Kudos

Hi,

In component controller of your webdynpro component where you need to set the values back to ALV table, catch the event which has been raised in freely programmed search help and write the code to set back the values.

Thanks

KH

Former Member
0 Kudos

HI:Katrice

    According to your approach,the result is failed.

    My application can get the values from Freely Programmed Help by node 。

 

   Similar methodshttp://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/80ae749c-87c9-2d10-87bd-821b5e92e...

  but I don't kown how to get the values from Freely Programmed Help to ALV CELL!

  thanks.

Former Member
0 Kudos

HI:

  Are there no specific examples, let me refer!

  thanks

Former Member
0 Kudos

Hi,

Follow this steps,

1)In your actual webdynpro component, create nodes i.e the nodes which you've created in your freely programmed search help component.

2)In you freely programmed search help component create the same nodes as interface nodes.

3) Now when you raise the event in your freely programmed search help component and catch that event in process_event of your actual webdynpro component, just read that node values using code wizard. Then you'll get the values which you've selected from freely programmed search help component into your actual webdynpro component.

Thanks

KH

Former Member
0 Kudos

@huang kaiwei

PFA help document.

Thanks

KH