‎2007 Apr 17 2:34 AM
Hi,
I declared a variable like this.
data: wa_stat type abc-xyz.
select-options: p_stat for wa_status OBLIGATORY.
Now I want to assign 5 values(Like Pending,rejected,approved etc) for the variable p_stat .
How to do that??
Points will be awarded for the useful answers.
Thanks,
Priya.
‎2007 Apr 17 2:41 AM
Use the FM : VRM_SET_VALUES.
This creates a drop down list with the values u needed. write this at the initialistaion event.
for ex :
value-text = 'Background Processing'.
value-key = 'N'.
APPEND value TO list.
*A for foreground
value-text = 'Foreground Processing'.
value-key = 'A'.
APPEND value TO list.
*E for error processing
value-text = 'Error Processing'.
value-key = 'E'.
APPEND value TO list.
*call the function module to set the value and id
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = name
values = list.
clear list.
Regards
Pratyu
‎2007 Apr 17 2:46 AM
Use this code..
initialization.
p_stat-sign = 'I'.
p_stat-option = 'EQ'.
p_stat-low = 'Pending'.
append p_stat.
p_stat-low = 'Rejected'.
append p_stat.
p_stat-low = 'Approved'.
append p_stat.
p_stat-low = 'Processed'.
append p_stat.
p_stat-low = 'Completed'.
append p_stat.~Suresh
‎2007 Apr 17 3:08 AM
Hi,
I want to display all the values in a dropdown list. And I want to choose what ever I want.
I tried your code.Its displaying only first option.
‎2007 Apr 17 3:24 AM
hi priya plz try my code this works for ur requirement as the FM creates a drop down list with the values appended in the LIST
‎2007 Apr 17 3:59 AM
Hi Prathu Usha,
I tried Like this.
data:
wa_status type zest1940_sfa_sta-status,
select-options: p_stat for wa_status OBLIGATORY.
perform z_prepare_list_box.(IN INITIALISATION)
Form z_prepare_list_box .
data: wa_stat type vrm_id,
list type vrm_values,
value like line of list.
clear list. refresh list.
wa_stat = 'P_STAT'.
clear value.
value-key = value-text = 'PENDING'. append value to list.
value-key = value-text = 'COMPLETE'. append value to list.
value-key = value-text = 'REJECTED'. append value to list.
value-key = value-text = 'INCOMPLETE'. append value to list.
value-key = value-text = 'IN REVIEW'. append value to list.
value-key = value-text = 'APPROVED'. append value to list.
Set the values
call function 'VRM_SET_VALUES'
exporting
id = wa_stat
values = list.
p_stat = ' '.
endform. " z_prepare_list_Box
But it's not working for me.
‎2007 Apr 17 2:46 AM
Hi,
On INITIALIZATION add code like this:
Clear: p_stat .
p_stat-SIGN = 'I'.
p_stat -OPTION = 'EQ'.
p_stat-LOW = 'PENDING'.
APPEND p_stat.
Clear: p_stat .
p_stat-SIGN = 'I'.
p_stat -OPTION = 'EQ'.
p_stat-LOW = 'rejected'.
APPEND p_stat.
Continue with all your value for p_stat.
Regards,
‎2007 Apr 17 3:58 AM
Priya,
INITIALIZATION.
p_stat-sign = 'I'.
p_stat-option = 'EQ'.
p_stat-low = 'Pending'.
append p_stat.
p_stat-low = 'Rejected'.
append p_stat.
p_stat-low = 'Approved'.
append p_stat.
p_stat-low = 'Processed'.
append p_stat.
p_stat-low = 'Completed'.
append p_stat.
don't forget ot reward if useful....