‎2010 Jan 12 7:52 PM
hey ,
DATA: NODE_FLIGHTS TYPE REF TO IF_WD_CONTEXT_NODE.
DATA: RT_CARRID TYPE REF TO DATA.
FIELD-SYMBOLS: <FS_CARRID> TYPE TABLE
.* Retrieve the data from the select option
RT_CARRID = WD_THIS->M_HANDLER->GET_RANGE_TABLE_OF_SEL_FIELD( I_ID = 'S_WEIGHT).
Assign it to a field symbol
ASSIGN RT_CARRID->* TO <FS_CARRID>.
how can i pass RT_CARRID or <FS_CARRID> to a varible with type vbap-netgrw ( net weight ) ?
thanks
ASA
‎2010 Jan 12 9:03 PM
>
> hey ,
>
>
> DATA: NODE_FLIGHTS TYPE REF TO IF_WD_CONTEXT_NODE.
> DATA: RT_CARRID TYPE REF TO DATA.
> FIELD-SYMBOLS: <FS_CARRID> TYPE TABLE
>
> .* Retrieve the data from the select option
> RT_CARRID = WD_THIS->M_HANDLER->GET_RANGE_TABLE_OF_SEL_FIELD( I_ID = 'S_WEIGHT).
> * Assign it to a field symbol
> ASSIGN RT_CARRID->* TO <FS_CARRID>.
create a work area of type <FS_CARRID>.
field-symbol: <fs_wa> type line of <FS_CARRID>.
loop at <FS_CARRID> into <fs_wa>.
lv_netgr = <fs_wa>-netgr.
‎2010 Jan 12 9:03 PM
>
> hey ,
>
>
> DATA: NODE_FLIGHTS TYPE REF TO IF_WD_CONTEXT_NODE.
> DATA: RT_CARRID TYPE REF TO DATA.
> FIELD-SYMBOLS: <FS_CARRID> TYPE TABLE
>
> .* Retrieve the data from the select option
> RT_CARRID = WD_THIS->M_HANDLER->GET_RANGE_TABLE_OF_SEL_FIELD( I_ID = 'S_WEIGHT).
> * Assign it to a field symbol
> ASSIGN RT_CARRID->* TO <FS_CARRID>.
create a work area of type <FS_CARRID>.
field-symbol: <fs_wa> type line of <FS_CARRID>.
loop at <FS_CARRID> into <fs_wa>.
lv_netgr = <fs_wa>-netgr.
‎2010 Jan 13 7:22 AM
hey j@y and thanks for your reply,
i didn't debug your solution yet but i thing that i will get a syntax error :
<fs_wa> dosn't have a component netgr .
any other solution ?
Regards
ASA .
‎2010 Jan 12 9:51 PM
Hi,
You may use READ statement to read the contents.
Depending on your scenario, if SIGN = I and OPTION = EQ, you may shift the content left 3 places to get the contents of the select options table.
Use this,
Data variable type vbap-netgrw.
Read <FS_CARRID> into variable index 1.
shift variable left by 3 places.Regards
Prasenjit
P.S. this is just an example, you may derive your own logic from this.
‎2010 Jan 13 7:14 AM
hey Sharma ,
thanks for your reply.
variable type vbap-netgrw.
Read <FS_CARRID> into variable index 1.
shift variable left by 3 places.in the srtucture, indeed --> SIGN = I and OPTION = EQ LOW = my value , HIGH = empty
how can i extract and cast "my value" into a variable type vbap-netgrw ?
Regards
ASA
‎2010 Jan 13 9:02 AM
Hi,
Just define a variable of type string and another of type vbap-netgrw.
data var1 type string.
data var2 type vbap-netgrw.
Read <FS_CARRID> into var1 index 1.
shift var1 left by 3 places.
write var1 to var2.
Regards
Prasenjit
‎2010 Jan 13 9:17 AM
Hi,
yoi can delare awok area, for the table and assign the field symbol to it.
Eg: gwa_vbak = <wa>.
hear the type of gwa_vbak and <wa> , need to be the same.
after that, you can take your field from, gwa_vabk
as in vbak-netwr = gwa_vbak-netwr.
‎2010 Mar 26 9:43 PM