on 05-19-2010 6:31 AM
Hi,
I'm using one View to display ALV. One of that Column is hyperlinked to read click event. The scenario is -- when user clicks on that, it should display next ALV on different view.
Data in the first ALV is coming up and one of the column has well been hyperlinked. But, my problem is - when I process the click event, the dump comes which is as under --
Data no longer available when SALV_WD_TABLE GET_MODEL called
I tried to display data on the same view using Table UI Element and it is coming. But, ALV is not getting populated.
Can you please guide me what is missing?
Thanks.
Kumar Saurav.
Hi Kumar,
When are you trying to populate the ALV in the second view? Is the data avaliable in the context at this point? put a breakpoint in your code where you create and bind the ALV component. Are the context nodes that you are binding into the ALV avaliable?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
There is one ALV containing hyper-linked Column. Click event on that column should open next ALV. Both ALV are on different Views.
First ALV is perfect and when hyper-linked column is clicked it fetches the requisite data. These data are available to be shown in Table UI Element ( just to verify whether data is there or not ) but not being populated in second ALV.
While debugging, when processing reaches the point where GET_MODEL is called, it gives dump as below --
The following error text was processed in the system DEV : Data no longer available when SALV_WD_TABLE GET_MODEL called
The ABAP call stack was:
Method: IF_SALV_WD_COMP_TABLE_IF~GET_MODEL of program CL_SALV_WD_C_TABLE============CP
Method: GET_MODEL of program /1BCWDY/6L6X1683MSZV4KN4U2V9==CP
Method: IWCI_SALV_WD_TABLE~GET_MODEL of program /1BCWDY/6L6X1683MSZV4KN4U2V9==CP
Method: WDDOMODIFYVIEW of program /1BCWDY/7B6BPXV7BTHYS9IXPRJJ==CP
Method: IF_WDR_VIEW_DELEGATE~WD_DO_MODIFY_VIEW of program /1BCWDY/7B6BPXV7BTHYS9IXPRJJ==CP
Method: DO_MODIFY_VIEW of program CL_WDR_DELEGATING_VIEW========CP
Method: MODIFY_VIEW of program CL_WDR_VIEW===================CP
Method: DO_MODIFY_VIEW of program CL_WDR_CLIENT_COMPONENT=======CP
Method: DO_MODIFY_VIEW of program CL_WDR_WINDOW_PHASE_MODEL=====CP
Method: PROCESS_REQUEST of program CL_WDR_WINDOW_PHASE_MODEL=====CP
Now, I'm unable to understand that if data can come in Table Element, how can it be not available for ALV?
I'm using this code to get the ALV --
* Calling ALV
DATA LO_COMPONENTINTERFACE TYPE REF TO IF_WD_COMPONENT_USAGE.
LO_COMPONENTINTERFACE = WD_THIS->WD_CPUSE_ALV_TABLE7( ).
IF LO_COMPONENTINTERFACE->HAS_ACTIVE_COMPONENT( ) IS INITIAL.
LO_COMPONENTINTERFACE->CREATE_COMPONENT( ).
ENDIF.
DATA LO_INTERFACECONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE .
LO_INTERFACECONTROLLER = WD_THIS->WD_CPIFC_ALV_TABLE7( ).
DATA LO_VALUE TYPE REF TO CL_SALV_WD_CONFIG_TABLE.
LO_VALUE = LO_INTERFACECONTROLLER->GET_MODEL(
).
Can you please suggest what exactly is getting wrong over here..?
Thanks.
Kumar Saurav.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you able to get the data in the second alv in the same view?
If so, strore your data in a Global table declared in the attribute tab on Comp controller and use this table anywhere you want in your application.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you have a common component controller - use the cc context to share data. The whole concept of the contexts is for controlled data sharing...
Sharing data using the cc attributes is bad practice.
Global data/variables in general is bad practice.
Global variables of any sort mean that there is no control over what can update them/read them/delete them which means that supporting code written using global variable is much harder.
Sorry - I know this doesn't answer the original question - but I think it is important.
Hi Sanket,
No, even there it is not coming. Actually, I guess, I've missed any one step to call the GET_MODEL part.
For your review, I'm pasting it here. Can you please have a look on that..?
DATA LO_CMP_USAGE TYPE REF TO IF_WD_COMPONENT_USAGE.
LO_CMP_USAGE = WD_THIS->WD_CPUSE_ALV_TABLE7( ).
IF LO_CMP_USAGE->HAS_ACTIVE_COMPONENT( ) IS INITIAL.
LO_CMP_USAGE->CREATE_COMPONENT( ).
ENDIF.
DATA LO_INTERFACECONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE .
LO_INTERFACECONTROLLER = WD_THIS->WD_CPIFC_ALV_TABLE7( ).
DATA LO_VALUE TYPE REF TO CL_SALV_WD_CONFIG_TABLE.
LO_VALUE = LO_INTERFACECONTROLLER->GET_MODEL(
).
Thanks.
Kumar Saurav.
Hi,
Here is the code --
DATA LO_ND_VBAKTAB TYPE REF TO IF_WD_CONTEXT_NODE.
DATA LO_EL_VBAKTAB TYPE REF TO IF_WD_CONTEXT_ELEMENT.
DATA LS_VBAKTAB TYPE WD_THIS->ELEMENT_VBAKTAB.
DATA LV_DEL_QTY LIKE LS_VBAKTAB-DEL_QTY.
* navigate from <CONTEXT> to <VBAKTAB> via lead selection
LO_ND_VBAKTAB = WD_CONTEXT->GET_CHILD_NODE( NAME = WD_THIS->WDCTX_VBAKTAB ).
* @TODO handle not set lead selection
IF LO_ND_VBAKTAB IS INITIAL.
ENDIF.
* get element via lead selection
LO_EL_VBAKTAB = LO_ND_VBAKTAB->GET_ELEMENT( ).
* @TODO handle not set lead selection
IF LO_EL_VBAKTAB IS INITIAL.
ENDIF.
* alternative access via index
LO_EL_VBAKTAB = LO_ND_VBAKTAB->GET_ELEMENT( INDEX = 1 ).
* @TODO handle non existant child
IF LO_EL_VBAKTAB IS INITIAL.
ENDIF.
* get single attribute
LO_EL_VBAKTAB->GET_ATTRIBUTE(
EXPORTING
NAME = `DEL_QTY`
IMPORTING
VALUE = LV_DEL_QTY ).
**** Fetching DEL_QTY Ends
* Diff-Clicks Handling
BREAK-POINT.
FIELD-SYMBOLS: <L_VALUE> TYPE ANY.
ASSIGN R_PARAM->VALUE->* TO <L_VALUE>. " now <l_value> will contain the value of VBELN
MOVE <L_VALUE> TO LS_VBAKTAB-DEL_QTY. "LS_VBAKTAB-ORDER_NO.
MOVE <L_VALUE> TO LV_DEL_QTY.
* Diff-Clicks Handling ends
* Fetching ORDER_NO
* alternative access via index
LO_EL_VBAKTAB = LO_ND_VBAKTAB->GET_ELEMENT( INDEX = 1 ).
* @TODO handle non existant child
IF LO_EL_VBAKTAB IS INITIAL.
ENDIF.
* get single attribute
LO_EL_VBAKTAB->GET_ATTRIBUTE(
EXPORTING
NAME = `ORDER_NO`
IMPORTING
VALUE = LS_VBAKTAB-ORDER_NO ). "LV_ORDER_NO ).
* Fetching ORDER_NO Ends
* Test Passing VBELV
DATA LO_ND_IMPORTING_3 TYPE REF TO IF_WD_CONTEXT_NODE.
DATA LO_EL_IMPORTING_3 TYPE REF TO IF_WD_CONTEXT_ELEMENT.
DATA LS_IMPORTING_3 TYPE WD_THIS->ELEMENT_IMPORTING_3.
DATA LV_VBELV LIKE LS_IMPORTING_3-VBELV.
LV_VBELV = LS_VBAKTAB-ORDER_NO. " direct passing
* navigate from <CONTEXT> to <IMPORTING_3> via lead selection
LO_ND_IMPORTING_3 = WD_CONTEXT->GET_CHILD_NODE( NAME = WD_THIS->WDCTX_IMPORTING_3 ).
* get element via lead selection
LO_EL_IMPORTING_3 = LO_ND_IMPORTING_3->GET_ELEMENT( ).
* get single attribute
LO_EL_IMPORTING_3->GET_ATTRIBUTE(
EXPORTING
NAME = `VBELV`
IMPORTING
VALUE = LS_VBAKTAB-ORDER_NO ). "LV_VBELV ).
* set all declared attributes
LO_EL_IMPORTING_3->SET_STATIC_ATTRIBUTES(
EXPORTING
STATIC_ATTRIBUTES = LS_IMPORTING_3 ).
LS_IMPORTING_3-VBELV = LV_VBELV.
* Test Passing VBELV Ends
* Setting attributes
LO_EL_IMPORTING_3->SET_STATIC_ATTRIBUTES(
EXPORTING
STATIC_ATTRIBUTES = LS_IMPORTING_3 ).
DATA LO_COMPONENTCONTROLLER TYPE REF TO IG_COMPONENTCONTROLLER .
LO_COMPONENTCONTROLLER = WD_THIS->GET_COMPONENTCONTROLLER_CTR( ).
LO_COMPONENTCONTROLLER->EXECUTE_ZBAPI_FMDELV(
).
* Setting attributes Ends
* Setting DELVTAB
DATA LO_ND_DELVTAB_1 TYPE REF TO IF_WD_CONTEXT_NODE.
DATA LO_EL_DELVTAB_1 TYPE REF TO IF_WD_CONTEXT_ELEMENT.
DATA LS_DELVTAB_1 TYPE WD_THIS->ELEMENT_DELVTAB_1.
* navigate from <CONTEXT> to <DELVTAB_1> via lead selection
LO_ND_DELVTAB_1 = WD_CONTEXT->GET_CHILD_NODE( NAME = WD_THIS->WDCTX_DELVTAB_1 ).
* @TODO handle not set lead selection
IF LO_ND_DELVTAB_1 IS INITIAL.
ENDIF.
* get element via lead selection
LO_EL_DELVTAB_1 = LO_ND_DELVTAB_1->GET_ELEMENT( ).
* @TODO handle not set lead selection
IF LO_EL_DELVTAB_1 IS INITIAL.
* ENDIF.
* get message manager
DATA LO_API_CONTROLLER TYPE REF TO IF_WD_CONTROLLER.
DATA LO_MESSAGE_MANAGER TYPE REF TO IF_WD_MESSAGE_MANAGER.
LO_API_CONTROLLER ?= WD_THIS->WD_GET_API( ).
CALL METHOD LO_API_CONTROLLER->GET_MESSAGE_MANAGER
RECEIVING
MESSAGE_MANAGER = LO_MESSAGE_MANAGER
.
* report message
CALL METHOD LO_MESSAGE_MANAGER->REPORT_ERROR_MESSAGE
EXPORTING
MESSAGE_TEXT = 'No Data found for the Given Selection - Please Select from Last Three Months Only'
* PARAMS =
* MSG_USER_DATA =
* IS_PERMANENT = ABAP_FALSE
* SCOPE_PERMANENT_MSG = CO_MSG_SCOPE_CONTROLLER
* VIEW =
SHOW_AS_POPUP = 'X'
* CONTROLLER_PERMANENT_MSG =
* MSG_INDEX =
* CANCEL_NAVIGATION =
* RECEIVING
* MESSAGE_ID =
.
* get message manager Ends
ELSE.
*** alternative access via index
** lo_el_delvtab_1 = lo_nd_delvtab_1->get_element( index = 1 ).
*** @TODO handle non existant child
** IF lo_el_delvtab_1 IS INITIAL.
** ENDIF.
* get all declared attributes
LO_EL_DELVTAB_1->GET_STATIC_ATTRIBUTES(
IMPORTING
STATIC_ATTRIBUTES = LS_DELVTAB_1 ).
* Setting DELVTAB Ends
Thanks.
Kumar Saurav.
User | Count |
---|---|
81 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.