cancel
Showing results for 
Search instead for 
Did you mean: 

Link to action doesn't work in a POWL application

Former Member
0 Kudos

Hi,

I have developed a web dynpro ABAP application and it is called by portal,

This WD calls standard POWL, in a POWL there is a LinkToAction field.

When I click on field the system should open a new window (shopping cart detail),

but it doesn't happen anything.

which could the problem be?

Thank you.

Best regards.

Al

Accepted Solutions (0)

Answers (1)

Answers (1)

vineetrrakesh
Explorer
0 Kudos

Hi Alberto,

You need to do the following:

1. Define an Action (corresponding to your Link to action which is typically the FIELD Name of the column in POWL Table) in your POWL feeder Implementation "IF_POWL_FEEDER~GET_ACTION" .

2. Handle the defined action in another feeder implementation "IF_POWL_FEEDER~HANDLE_ACTION".

3. Now you need to raise an portal event from the method "IF_POWL_FEEDER~HANDLE_ACTION".

4. This Portal event will be again captured in the event "POWL_FOLLOW_UP" from POWL WD component "POWL_UI_COMP"

5. You can handle this event "POWL_FOLLOW_UP" in your WD which uses "POWL_UI_COMP" and throw a pop-up from your WD component.

For more reference see thread

Hope you get your solution.

Regards

Vineet

Former Member
0 Kudos

Hi Vineet,

1. Define an Action (corresponding to your Link to action which is typically the FIELD Name of the column in POWL Table) in your POWL feeder Implementation "IF_POWL_FEEDER~GET_ACTION" .

IF_POWL_FEEDER~GET_ACTION is a standard object of custom feeder class, how can I define a new Action?

2. Handle the defined action in another feeder implementation "IF_POWL_FEEDER~HANDLE_ACTION".

this code could be rigth?

METHOD if_powl_feeder~handle_action.

*

*

*

FIELD-SYMBOLS: <shopping_cart> TYPE STANDARD TABLE.

IF i_actionid = 'SELECTION'.

  • triggers the event

e_portal_actions-fire_wdevent = abap_true.

  • Pass parameters to event

ASSIGN c_result_tab TO <shopping_cart>.

i_shopping_cart = <shopping_cart>.

  • selected row

READ TABLE c_selected INTO ls_selected INDEX y_index.

  • Read selected POWL data

READ TABLE i_shopping_cart INDEX ls_selected-TABIX INTO s_shopping_cart.

CHECK sy-subrc = 0.

  • Pass parameters

ls_parameter-key = 'OBJECT_ID'.

ls_parameter-value = 'I_'.

APPEND ls_parameter TO e_portal_actions-parameters.

ENDIF.

ENDMETHOD.

3. Now you need to raise an portal event from the method "IF_POWL_FEEDER~HANDLE_ACTION".

where a portal event has to be raised?

4. This Portal event will be again captured in the event "POWL_FOLLOW_UP" from POWL WD component "POWL_UI_COMP"

5. You can handle this event "POWL_FOLLOW_UP" in your WD which uses "POWL_UI_COMP" and throw a pop-up from your WD component.

it is not clear point 5.

thanks.

Best regards.

Al

vineetrrakesh
Explorer
0 Kudos

Hi Alberto,

1. Define an Action (corresponding to your Link to action which is typically the FIELD Name of the column in POWL Table) in your POWL feeder Implementation "IF_POWL_FEEDER~GET_ACTION" .

IF_POWL_FEEDER~GET_ACTION is a standard object of custom feeder class, how can I define a new Action?

<Vineet> See the Wiki Link http://wiki.sdn.sap.com/wiki/display/WDABAP/DocumentationInformationabout+POWL

This has a document (POWL.doc) for POWL, refer page number 20. You can use parameter C_ACTION_DEFS for explicitly defining Actions.

2. Handle the defined action in another feeder implementation "IF_POWL_FEEDER~HANDLE_ACTION".

this code could be rigth?

METHOD if_powl_feeder~handle_action.

*

*

*

FIELD-SYMBOLS: <shopping_cart> TYPE STANDARD TABLE.

IF i_actionid = 'SELECTION'.

  • triggers the event

e_portal_actions-fire_wdevent = abap_true.

  • Pass parameters to event

ASSIGN c_result_tab TO <shopping_cart>.

i_shopping_cart = <shopping_cart>.

  • selected row

READ TABLE c_selected INTO ls_selected INDEX y_index.

  • Read selected POWL data

READ TABLE i_shopping_cart INDEX ls_selected-TABIX INTO s_shopping_cart.

CHECK sy-subrc = 0.

  • Pass parameters

ls_parameter-key = 'OBJECT_ID'.

ls_parameter-value = 'I_'.

APPEND ls_parameter TO e_portal_actions-parameters.

ENDIF.

ENDMETHOD.

<Vineet> Seems good provided you have defined the action name in "your class->IF_POWL_FEEDER~GET_ACTION" as 'SELECTION'.

3. Now you need to raise an portal event from the method "IF_POWL_FEEDER~HANDLE_ACTION".

where a portal event has to be raised?

<Vineet> You have alrday raised it when you used "e_portal_actions-fire_wdevent = abap_true", as above you can additionally pass parameters as you have done in pushing some data in "e_portal_actions-parameters".

4. This Portal event will be again captured in the event "POWL_FOLLOW_UP" from POWL WD component "POWL_UI_COMP"

<Vineet>Let's assume your WD component is "MY_COMP" which uses "POWL_UI_COMP". then in the component controller or View you can handle an event "POWL_FOLLOW_UP" which is a POWL Interface event. This vene has the same action "SELECTION"a nd the parameters which you have raised from "your class->IF_POWL_FEEDER~HANDLE_ACTION".

5. You can handle this event "POWL_FOLLOW_UP" in your WD which uses "POWL_UI_COMP" and throw a pop-up from your WD component.

it is not clear point 5.

<Vineet> From the event handler of "POWL_FOLLOW_UP" you can launch another webdynpro in a po-up or a new winmdow.

Please let me knwo in case you face issue.

Regards

Vineet

thanks.

Best regards.

vineetrrakesh
Explorer
0 Kudos

Hi Alberto,

As you need to handle through a link to action, you can ignore the GET_ACTION changes and directly start from HANDLE_ACTION but you need to check the action as below in HANDLE_ACTION.

i_action_id = 'FIELD_NAME" "Field_name is the coulmn name on whivh the Link to action elemnt is bound.

Sorry for confusion.

Regards

Vineet

Former Member
0 Kudos

Hi Vineet,

very good solution, but now system gives this message

Error application is coming up.

20110127

151127

sap

http://sapportal.company.it:8888/sap/bc/webdynpro/sapsrm/wda_l_fpm_oif

OBJECTS_OBJREF_NOT_ASSIGNED_NO

Access via 'NULL' object reference not possible.

Method: PREPARE_NAVIGATION of program /1BCWDY/E68GWXQOY9IQO69T8ULI==CP

Method: MODIFY_VIEW_ASSEMBLY of program /1BCWDY/E68GWXQOY9IQO69T8ULI==CP

Method: IF_WDR_VIEW_DELEGATE~WD_INVOKE_EVENT_HANDLER of program /1BCWDY/E68GWXQOY9IQO69T8ULI==CP

Method: INVOKE_EVENTHANDLER of program CL_WDR_DELEGATING_VIEW========CP

Method: FIRE_EVENT of program CL_WDR_COMPONENT==============CP

Method: IFWDR_INTERNAL_API~RAISE_EVENT of program SAPLWDR_RG_PROXY_FACTORY

Method: IF_COMPONENTCONTROLLER~FIRE_PREPARE_NAVIGATION_EVT of program /1BCWDY/E68GWXQOY9IQO69T8ULI==CP

Method: WDDOBEFORENAVIGATION of program /1BCWDY/E68GWXQOY9IQO69T8ULI==CP

Method: IF_WDR_COMPONENT_DELEGATE~WD_DO_BEFORE_NAVIGATION of program /1BCWDY/E68GWXQOY9IQO69T8ULI==CP

Method: DO_BEFORE_NAVIGATION of program CL_WDR_DELEGATING_COMPONENT===CP

thank you.

Best regards.

Al

vineetrrakesh
Explorer
0 Kudos

Hi Alberto,

This Error Message is strange, I can suggest you to run program POWL_D01 to clear your POWL Cache and re-run your application. Sometimes the changes in POWL becomes incomatible with the data stored in cache.

You might need to provide your POWL Query ID as input to the report.

I am not sure but it might fix your problem. Please let me know if it doesn't fix your problem.

Regards

Vineet