07-26-2010 2:58 AM
Hi friends,
I have created a customer table, in which I will be having the fields like MAND VKORG,and AUART.
auart has a value table.but customer wants to see those values in SM30( TABLE MAINTAINCE GENERATOR) when creating the values in Drop down instead of in a F4. please help to achive the requirement.
I have gone to SE 51 and changed the AUART to list box. I am getting the drop down but I am not able to see the F4 values in drop down. Please help me incase I need to write the code,procedure by step wise
Thanks& regards,
Xavier
07-26-2010 5:58 AM
Hi Xavier,
Provide fixed values to the domain that you have used for the field AUART and if this doesn't work then establishing a foreign key relationship to the field AUART in your table will definetely solve the issue.
07-26-2010 6:31 PM
Hello,
Go to maintenance screen of your table,
create a new module on PBO,
and call function VRM_SET_VALUES in this module
I've an exmaple for it :
REPORT ZBB_DENEME2 .
DATA BUKRS LIKE BSIS-BUKRS. <--BUKRS is the field screen 9000 no matter it is in a table control or not
TYPE-POOLS : VRM.
DATA :
LIST TYPE VRM_VALUES,
VALUE LIKE LINE OF LIST,
NAME TYPE VRM_ID.
START-OF-SELECTION.
CALL SCREEN 9000.
&----
*& Module STATUS_9000 OUTPUT
&----
text
----
MODULE STATUS_9000 OUTPUT.
VALUE-KEY = '001'.
VALUE-TEXT = 'VALUE1'.
APPEND VALUE TO LIST.
VALUE-KEY = '002'.
VALUE-TEXT = 'VALUE2'.
APPEND VALUE TO LIST.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = 'BUKRS'
VALUES = LIST.
ENDMODULE. " STATUS_9000 OUTPUT
I hope it helps.
Edited by: Bulent Balci on Jul 26, 2010 7:32 PM
07-27-2010 5:49 AM
Hi,
You need to get the values in the Internal Table and then with minimal coding effort you can provide the F4 Value help.
Have a look at the demo code for how to populate the F4 value help.. DEMO_DYNPRO_DROPDOWN_LISTBOX
You need to use your own PBO module which will have your own customized coding.
Hope this helps.
Thanks,
Samantak.
07-27-2010 8:17 AM
Hi,
Use below code to fill dropdown(listbox) field of screen
with value attribute of screen filed as 'A'.
Below code to be placed In PBO.
TYPE-POOLS : VRM
DATA : field_id TYPE VRM_ID ,
values TYPE VRM_VALUES,
value LIKE LINE OF values.
PROCESS BEFORE OUTPUT
MODULE list_fill_100
MODULE list_fill_100 OUTPUT
SELECT f1 f2 f3 FROM tab WHERE <condition>.
value-KEY = f1.
value-TEXT = f2
APPEND value TO VALUES
sort VALUES.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'i/o screen field' " In which you want dropdown to be displayed on screen.
values = values[].
ENDMODULE.
NOTE: value-KEY will be sent back to screen field.
Cheers,
Dep
07-27-2010 12:26 PM
Hi deepa,
The given code is working and thank you.
when I am saving the value it is getting save along with Descriptions.
But I want save only key. so that when the program reads ,reads only key not description.
Please advise me.
Thank you.
Regards,
Xavier.P