cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding Exception Handling

Former Member
0 Kudos

I have used a service call in my application and i binded the context nodes to the UI Elements, the Function module behind the Service call throws the Exceptions i used the try and catch method to get the exceptions, but i am not able to control the exceptions generated by the system . As the context is binded to elements it throwing the exceptions because the context doesnt contain any values here (because the service call raised exception ).

If possible to handle where i need to write the catch statements

The following error text was processed in the system WLT : Context binding for property TEXT of "PERNR" cannot be resolved: Node VIEW.1.EMPLOYEE does not contain any elements

The termination type was: RABAX_STATE

The ABAP call stack was:

Method: RAISE_FOR of program CX_WDR_ADAPTER_EXCEPTION======CP

Method: RAISE_BINDING_EXCEPTION of program CL_WDR_VIEW_ELEMENT_ADAPTER===CP

Method: GET_BOUND_ELEMENT of program CL_WDR_VIEW_ELEMENT_ADAPTER===CP

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Vikranth,

Am also facing the same dump but in different class in my program. Can you share with me how you resolved that problem if you got solution for that.

Thanks

Ravi

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I assume that you have yoru context cardinality setup as 1:n or 1:1. If you might have a condition where the context doesn't get populated, then consider setting the context node to 0:1 or 0:n - basically not required to be populated. Your other option would be to initialize the context yourself with an empty element - perhaps in the WDDOINIT. Just create an empty abap structure and do the BIND_STRUCTURE on the node. This will make things a little more difficult later if you don't have any exception, because I assume you will want to remove or overwrite this empty initial element. If you use a BIND_TABLE later after the service call, just be sure to keep the SET_INITIAL_ELEMENTS parameter set to ABAP_TRUE.

Former Member
0 Kudos

hi vikranth......

you can check the value of the node for which the exception raises before the node is read by default by the system... may be in the wddoinit or before a bapi call.

---regards,

alex b justin