cancel
Showing results for 
Search instead for 
Did you mean: 

WDDOINIT method

Former Member
0 Kudos

Hi All,

i have a view in my application ,in that i have a tab strip with 5 different tabs and each tab has to display a default table value and a search option, i wrote code in WDDO INIT method for all 5 tabs,

but i get an error message that,

Error: An exception occurred that was not caught.

if i write code for 1 tab in wddoinit , i can display the values for 1st tab.

how i will get all the remainig tab values in that method.

Thanks in advance,

Regards,

Raj.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hi raju.......

according to your scenario,

you need to pass the same value to all 5 tab strips.

so have a common node and bind that node to 5 different table ui elements that is present in teh 5 different tabs.

the problem is, you are trying to pass values to the tabs 2,3,4 and 5 which is not yet clicked.

---regards,

alex bv justin

Former Member
0 Kudos

Hi Justin,

i have different nodes for all 5 tabs and want to pass different node for each output value in each tab.

as i mentioned above sample code like i have to apply the code(currency.country,name etc..) in each tab.

i created only one view, so i need to add my code fora all 5 Tabs in WDDOINIT method one by one.

Regards,

Raju.

Former Member
0 Kudos

hi raju.......

what you can do is.. write teh code in the wddomodifyview method and with respect to the tab clicked, your code should get executed.

---regards,

alex b justin

Former Member
0 Kudos

Hi Justin,

Can you please let me know how to assign the Tabstrip property.

I have a Tabstrip with 5 tabs(tab_1,tab_2..etc) and i would like to check the TABs based on The "Selected Tab " Property.

i mentioned like this

DATA: SELECTED_TAB TYPE STRING.

IF SELECTED_TAB = 'TAB_1'.

LO_ZTR_TRAVELLER_PROFILE->CALLGLOBALMETHOD_CITY1( ).

based on the above condition i want to call a method and display the value.

please treat this is an urgent basis.

Thanks&Regards,

Raju.

Former Member
0 Kudos

Hi Raju,

The TabStrip has a property selectedTab, all you need to do is to create a context attribute called selected_tab of type string and bind it to to the selectedTab property of the TabStrip.

Then you can use the selected_tab context attribute to see which is the current tab and also to change to another tab as needed.

Best regards... Lucio

Former Member
0 Kudos

Hi Raju,

Please tell me is it a RABAX_STATE error when the exception comes.

If yes, what are you seeing in the st22 transaction.

Make available th code if possible.

Regards,

Sumit Oberoi

Former Member
0 Kudos

Hi Sumit,

Thanks for your reply ,

I gone thru ST22 transaction and found the below,

Error analysis

An exception occurred which is explained in detail below.

The exception, which is assigned to class 'CX_WDR_ADAPTER_EXCEPTION', was not

caught and

therefore caused a runtime error.

The reason for the exception is:

No text available for this exception

The occurrence of the exception is closely related to the occurrence of

a previous exception "CX_WD_CONTEXT", which was raised in the program

"CL_WDR_CONTEXT_NODE===========CP",

specifically in line 9 of the (include) program

"CL_WDR_CONTEXT_NODE===========CM01Q".

The cause of the exception was:

Node PROFILE.1.OUT_CURR does not contain any elements

My code in WDDOINIT was,

DATA: PARAM_TYPE1 TYPE ZTR_PROFILE_CITY-PARAM_TYPE VALUE 'CURRENCY',

PERNR1 TYPE ZTR_PROFILE_CITY-PERNR VALUE '19923'.

DATA: IT_CURR TYPE TABLE OF ZTR_PROFILE_CITY.

CALL FUNCTION 'ZTR_PROFILE_CITY' DESTINATION 'TRAVEL'

EXPORTING

I_PERNR = PERNR1

I_PARAM_TYPE = PARAM_TYPE1

TABLES

OUTPUT = IT_CURR.

DATA:

NODE_CURR_OUTPUT type ref to If_Wd_Context_Node,

ELEM_CURR_OUTPUT TYPE REF TO IF_WD_CONTEXT_ELEMENT,

STRU_CURR_OUTPUT TYPE WD_THIS->ELEMENT_CURR_OUTPUT.

NODE_CURR_OUTPUT = WD_CONTEXT->GET_CHILD_NODE( NAME = 'CURR_OUTPUT' ).

NODE_CURR_OUTPUT->BIND_TABLE( IT_CURR ).

similarly i need to display remaining 4 tabs data in that particular 4 Tabs.

i think iam getting error while BIND_Table from internal table to Context output Node.

Regards,

Raju.

Former Member
0 Kudos

Hi,

Just use one of the message objects defined in Exception class CL_WDR_CONTEXT_NODE and catch the exception.

The reason for the exception is tht in one of ur Tabs in which the table used is out_curr is not having any elements.

Just check this table.

Also run the program in debug mode and see what happens.

I hope it helps.

revert back in case of issue.

Regards,

Sumit Oberoi

Former Member
0 Kudos

Hi Raju

Just check the cardinality of node Curr_output. make it 0..N.

Regards

Naresh