on 06-25-2009 8:22 AM
Hi,
i am using DropDownByKey UI element. I am using the following code for displaying tha data in DropDown.
LOOP AT i_org_type INTO w_org_type.
value1-key = sy-tabix.
value1-value = w_org_type-org_type.
APPEND value1 TO set.
ENDLOOP.
value1 is of type wdy_key_value,
set is of type wdy_key_value_table.
This is running fine if sy-tabix is less then 10. But for sy-tabix >= 10, then APPEND statement is giving run time error.
Error analysis is as follow:
The following error text was processed in the system S92 : Error when inserting or changing in a sorted table
The error occurred on the application server pep74_S92_00 and in the work process 3 .
The termination type was: RABAX_STATE
The ABAP call stack was:
Method: WDDOINIT of program /1BCWDY/E8YS2GY3H6R11XV29QIQ==CP
Method: IF_WDR_VIEW_DELEGATE~WD_DO_INIT of program /1BCWDY/E8YS2GY3H6R11XV29QIQ==CP
Method: DO_INIT of program CL_WDR_DELEGATING_VIEW========CP
Method: INIT_CONTROLLER of program CL_WDR_CONTROLLER=============CP
Method: INIT_CONTROLLER of program CL_WDR_VIEW===================CP
Method: INIT of program CL_WDR_CONTROLLER=============CP
Method: GET_VIEW of program CL_WDR_VIEW_MANAGER===========CP
Method: BIND_ROOT of program CL_WDR_VIEW_MANAGER===========CP
Method: INIT of program CL_WDR_VIEW_MANAGER===========CP
Method: INIT_CONTROLLER of program CL_WDR_INTERFACE_VIEW=========CP
Please suggest.
Regards,
Amit
Hi,
Do not access the sy-tabix value directly inside your loop. First declare a variable of type char, then put the
sy-tabix value in the variable and use this for value1-key.
DATA a TYPE char20.
LOOP AT i_org_type INTO w_org_type.
a = sy-tabix
value1-key = a.
value1-value = w_org_type-org_type.
APPEND value1 TO set.
ENDLOOP.
Regards
Pankaj Aggarwal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For future postings, please note that this content is not sutiable for the Web Dynpro ABAP forum. This forum is for only Web Dynpro ABAP specific questions - not for all ABAP syntax that might happen to be within a WDA application. For such general questions like looping through an internal table, please use the ABAP General Forum.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.