01-02-2012 2:25 PM
Hi all,
I am currently facing an issue where I have declared a variable and have fetched the workarea field name in it. To be exact, the variable contains the workarea name whose value I am finally populating to the table control. Now although the workarea name when manually copied and pasted in field name in debugging mode exhibits the value of the it, Im unable to fetch the same value in the variable as I have only the work area name in it. I need the value of the workarea-field to be in the variable.Please provide your valuable suggestions for this issue...
Regards,
Edited by: Vishwanath Sreedharen on Jan 2, 2012 3:25 PM
01-02-2012 2:39 PM
Can you please explain it again with an example
Try with assign statement
Nabheet
Edited by: nabheetmadan09 on Jan 2, 2012 8:10 PM
01-02-2012 2:57 PM
Hi Nabheet,
Please consider the below example...
DATA: l_var(30) TYPE C.
CONCATENATE 'wa' '-' I_FIELD2-NAME INTO l_var.
The i_field2-name contains the name of a custom table field CP_CUSTOM_GRP. So now the l_var contains wa_cp_custom_grp.
Now consider the wa_cp_custom_grp has a value 'BA'.
Now my issue is the l_var contains wa_cp_custom_grp but not its value(too obvious)... Would like to know whether is there a way through which the value of this wa_cp_custom_grp 'BA' could be populated to the variable l_var...
01-02-2012 3:14 PM
I will take an example
Wa_itab1-field1 = 'BA'.
L_var = 'wa_itab1-field1'.
Field-symbols: <fs> type any.
Assogn ( l_var ) to <fs>
Write <fs> to l_var2 this will have your value
Nabheet