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

adding domain description to dropdown

Former Member
0 Likes
452

hi all,

i have a dropdown, i wan to fill the dropdown with the domain description.

Then using the domain description extract the datatype, length and decimals to fill the 3 textbox separately.

How can i do this?

Thks in advance!

<b><REMOVED BY MODERATOR></b>

Message was edited by:

Alvaro Tejada Galindo

2 REPLIES 2
Read only

Former Member
0 Likes
422

Here is a small program that illustrates dropdown (listbox) functionality in a transaction

Now using DD01L & DD02L you can populate in the required way.

PROGRAM yktest3 .

*----


GLOBAL DECLARATIONS

DATA: BEGIN OF vrm_value OCCURS 0,

key(40) TYPE c, " THE FIELD

text(80) TYPE c, " FIELD TEXT

END OF vrm_value.

&----


*& Module USER_COMMAND_0100 INPUT

&----


MODULE user_command_0100 INPUT.

CASE sy-ucomm.

WHEN 'BACK'.LEAVE TO SCREEN 0.

ENDCASE.

ENDMODULE. " USER_COMMAND_0100 INPUT

&----


*& Module STATUS_0100 OUTPUT

&----


  • text

----


MODULE status_0100 OUTPUT.

SET PF-STATUS 'A1'.

IF vrm_value[] is initial.

PERFORM select_data.

ENDIF.

ENDMODULE. " STATUS_0100 OUTPUT

&----


*& Form SELECT_DATA

&----


FORM select_data.

SELECT kunag FROM vbrk UP TO 10 ROWS INTO TABLE vrm_value.

IF sy-subrc = 0.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

id = 'VRM_VALUE-KEY'

values = vrm_value[]

EXCEPTIONS

id_illegal_name = 1

OTHERS = 2.

ENDIF.

ENDFORM. " SELECT_DATA

Screen part.....

****************************************************************

  • THIS FILE IS GENERATED BY THE SCREEN PAINTER. *

  • NEVER CHANGE IT MANUALLY, PLEASE ! *

****************************************************************

%_DYNPRO

YKTEST3

0100

46C

40

%_HEADER

YKTEST3 0100 0100 3 23192 35 0 0 27120 0G E 20040130155707

%_DESCRIPTION

test

%_FIELDS

ASD CHAR 80000003000 3 2 0 0 0 8 0 0 Customer X

VRM_VALUE-KEY CCHAR 108000800000 3 13 0 0 0 12 0 0 __________ DL

CHAR 208010000000255 1O 0 0 0 0 0 0 ____________________

%_FLOWLOGIC

PROCESS BEFORE OUTPUT.

MODULE STATUS_0100.

*

PROCESS AFTER INPUT.

MODULE USER_COMMAND_0100.

%_PARAMS

Upload program part first... use same program name

then go to se51 - layout editor, upload the screen part.

activate it & create a transaction code, execute the tcode, you see how this listbox works, then selecting data is like easy...

Read only

0 Likes
422

Thk for the reply.

I see the code. Think is too difficult for me as a beginner.

Do you have some simple way to do that, retrieving the domain description and populated in the dropdown