on 10-12-2012 4:05 AM
i have selection screen for sales order low and high. i have to extract sales order header and item data based on sales order low and high.
how to extract data through assistance class and how to pass selectoptions values in webdynpro.....
Hi Vishnu,
There are various ways to do this.
1. Create a method in assistance class say GET_SEL_OPT_DATA which returns the Select option range table
Call this from your webdynpro component and get the values in web dynpro
2. Create a node in Webdynpro component with the range data
Create a reference of this node in your assitance class.
Fill the node in the assistance class with your data
Now you can access the data in the assistance class as well as your WD component.
3. Create a global variable with the same structure as the Select option range table in the assistance class.
Fill this with the select options data.
This structure can be directly used in the WD Component using WD_ASSIST.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1. To create a reference of select option node in assistance class, do the following:
a. Create a method e.g. INITIALIZE in assistance class
b. Create an importing parameter IM_CONTEXT of type ref to IF_WD_CONTEXT_NODE
c. Create a global variable LO_SEL_NODE Type Ref To IF_WD_CONTEXT_NODE
c. Write the following code in the method INITIALIZE of class
LO_SEL_NODE = IM_CONTEXT->GET_CHILD_NODE( '<Your select options node name>' ).
d. Call this method from your component controller's WDDOINIT method and pass wd_context as parameter
WD_ASSIST->INITIALIZE( wd_Context ).
This way you can access the select options node in your assistance class in any method.
2. To access any global variable defined in the assistance class in the WD Component, you use WD_ASSIST variable created in your Component.
e.g.
a. Create a global variable say X type i in Attributes tab of assistance class.
b. To use this variable in your component anywhere in the code, just write WD_ASSIST->X. This will refer to variable X of Assistance class.
Hi Khushboo,
I am also having the same problem
In my WDINIT method i have got all the range tables.
I want to use the range tables in another method. As suggested by you I have created a Asistance class. How do we assign the range table to the global range table.So that I can use this in another methods.
Thanks and regards
Rajender patyal.
Hi Khushboo,
Thanks for the reply.
I have written the below code in WDDOINIT method.
DATA : lr_shipment TYPE REF TO data.
FIELD-SYMBOLS: <FS_lr_shipment> TYPE TABLe.
lr_shipment = WD_THIS->M_HANDLER->GET_RANGE_TABLE_OF_SEL_FIELD(
I_ID = 'SHIPMENT' ).
ASSIGN lr_shipment->* TO <fs_lr_shipment>.
wd_assist->t_shipment[] = <fs_lr_shipment>.
or
wd_assist->t_shipment[] = lr_shipment.
WD_Assist is the attribute of the assistance class. When I use this it says "WD_ASSIST it is not defined".
As told by you decalre the range table in the attributes of the class. When I declare a range table of Type DATA. It gives an error "Data type is too Generic".
We cant declare global variable or structures/Internal tables that can be used in whole of the program.
Thanks and Regards.
Rajender Patyal.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
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.