on 01-08-2008 7:26 PM
Your help in this will be highly appreciated.
I am trying to create layout with labels, input fields and a button, dynamically. The corresponding code is
method WDDOMODIFYVIEW .
data: MY_TEXT type string.
data: MY_TEXT1 type string.
MY_TEXT = 'nani'.
MY_TEXT1 = 'nani'.
data: LR_CONTAINER type ref to CL_WD_UIELEMENT_CONTAINER,
LR_LABEL1 TYPE REF TO CL_WD_LABEL,
LR_INPUT1 TYPE REF TO CL_WD_INPUT_FIELD,
LR_LABEL2 TYPE REF TO CL_WD_LABEL,
LR_INPUT2 TYPE REF TO CL_WD_INPUT_FIELD,
LR_BUTTON type ref to CL_WD_BUTTON,
LR_FLOW_DATA type ref to CL_WD_FLOW_DATA.
LR_INPUT1 = CL_WD_INPUT_FIELD=>NEW_INPUT_FIELD( ID = 'nani' ).
LR_FLOW_DATA = CL_WD_FLOW_DATA=>NEW_FLOW_DATA( element = LR_INPUT1 ).
LR_LABEL1 = CL_WD_LABEL=>NEW_LABEL( text = 'ENTER FIRST NUMBER' label_For = 'nani' ).
LR_FLOW_DATA = CL_WD_FLOW_DATA=>NEW_FLOW_DATA( element = LR_LABEL1 ).
LR_INPUT2 = CL_WD_INPUT_FIELD=>NEW_INPUT_FIELD( ID = 'bobby' ).
LR_FLOW_DATA = CL_WD_FLOW_DATA=>NEW_FLOW_DATA( element = LR_INPUT2 ).
LR_LABEL2 = CL_WD_LABEL=>NEW_LABEL( text = 'ENTER SECOND NUMBER' label_For = 'bobby' ).
LR_FLOW_DATA = CL_WD_FLOW_DATA=>NEW_FLOW_DATA( element = LR_LABEL2 ).
LR_BUTTON = CL_WD_BUTTON=>NEW_BUTTON( text = MY_TEXT enabled = '' ).
LR_FLOW_DATA = CL_WD_FLOW_DATA=>NEW_FLOW_DATA( element = LR_BUTTON ).
LR_CONTAINER ?= view->GET_ELEMENT( 'ROOTUIELEMENTCONTAINER' ).
LR_CONTAINER->ADD_CHILD( LR_LABEL1 ).
LR_CONTAINER->ADD_CHILD( LR_INPUT1 ).
LR_CONTAINER->ADD_CHILD( LR_LABEL2 ).
LR_CONTAINER->ADD_CHILD( LR_INPUT2 ).
LR_CONTAINER->ADD_CHILD( LR_BUTTON ).
endmethod.
I am getting the following error when i test this appl.
The following error text was processed in the system NSP : WebDynpro Exception: IDs Can Only Contain Characters of Syntactical Character Set
The error occurred on the application server PRAHLADA_NSP_00 and in the work process 0 .
The termination type was: RABAX_STATE
The ABAP call stack was:
Method: RAISE of program CX_WD_GENERAL=================CP
Method: CONSTRUCTOR of program CL_WDR_VIEW_ELEMENT===========CP
Method: CONSTRUCTOR of program CL_WD_INPUT_FIELD=============CP
Method: NEW_INPUT_FIELD of program CL_WD_INPUT_FIELD=============CP
Method: WDDOMODIFYVIEW of program /1BCWDY/2GN5ALLJN5OMZS36CS81==CP
Method: IF_WDR_VIEW_DELEGATE~WD_DO_MODIFY_VIEW of program /1BCWDY/2GN5ALLJN5OMZS36CS81==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
You can visit these blogs by Thomas Szues:
[Dynamic Programming in Web Dynpro ABAP - 1|https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2888] [original link is broken] [original link is broken] [original link is broken];
[Dynamic Programming in Web Dynpro ABAP - II |https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2915] [original link is broken] [original link is broken] [original link is broken];
Hope this helps
Raja T
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think the problem here is that the IDs are in lower case. The syntactic character set is upper case A-Z, 0-9, underscore and not much else.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prahlada Sriyapureddy,
Well, Welcome to DYNAMIC PROGRAMMING IN WDA's...
I have been fighting with these kind of problems for the past 4 days...Error messages are so wierd that they wont even indicate proper reason.
BTW,I think you can fix this error, by mapping these input fields to some existing context elements. I mean,
LR_INPUT1 = CL_WD_INPUT_FIELD=>NEW_INPUT_FIELD( ID = 'RAJA' BIND_VALUE = 'GENERAL_DATA.NUMBER1' ).
Assuming that there is a Context Attribute - NUMBER1 in the Context Node - GENERAL_DATA.
Hope this should close your problem.
Regards
Raja Sekhar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
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.