Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Listbox value selection screen into dbtable

Former Member
0 Likes
765

Hi frnds,

I have 7 list box , i m select the listbox value in selection screen

and click insert radio button all the listbox value r stored in DB..

param2 = 'P_PARAM2'.

value-key = '1'.

value-text = 'YES'.

APPEND value TO values2.

param1 = 'P_PARAM2'.

value-key = '2'.

value-text = 'NO'.

APPEND value TO values2.

i complete the pgm but that " value-key = '2'." value only saved.

I want to save the "value-text = 'YES'." .

Any one can help me.

Thanks in advance.

1 ACCEPTED SOLUTION
Read only

former_member194669
Active Contributor
0 Likes
742

After getting the value


read table values2 with key key = value-key.  " ie 2
if sy-subrc eq 0.
  move values2-text to v_text.
endif.

a®

6 REPLIES 6
Read only

former_member194669
Active Contributor
0 Likes
743

After getting the value


read table values2 with key key = value-key.  " ie 2
if sy-subrc eq 0.
  move values2-text to v_text.
endif.

a®

Read only

0 Likes
742

hello frnd,

use that code,

error s occur.

The internal table "VALUES2" has no header line - explicit

specification of an output area with "INTO wa" or "ASSIGNING <fs>" is required.

Any one can help me.

Thanks inadvance.

Edited by: YUMKUMAR on Aug 20, 2010 9:47 AM

Read only

0 Likes
742

Hi,

Declare a work area or field symbols for this case:


data: wa_value like line of value2.

read table value2 into wa_value....

hope it help,

Read only

0 Likes
742

Thank ur reply,

Give me sample coding.

Thanks in advance.

Read only

0 Likes
742

hi,

Just try


data: wa_values like line of values2,
         v_text type text50. "replace by your fields

read table values2 into wa_values with key key = value-key.  " ie 2
if sy-subrc eq 0.
  move wa_values-text to v_text.
endif.

hope it works,

regards,

Read only

0 Likes
742

Thanks ur reply.

I got result.