Application Development 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: 

Display Description for a field in a screen

Former Member
0 Kudos

Hi Gurus,

I have created a screen which has 2 fields, Material no and Material description.My requirement is that, If I select the material description, the corresponding material should display.

But I can't select from the F4 help of material description as two or more materials may have the same description.

How to proceed in this case?Please help..

Thanks in advance,

Raj.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hai,

make the coding such away

screen fields smatnr and matdes.

select the description u want , u will be having description in matdes(i/o field).

take that value and pass it to next select query to select the corresponding material no, now populate the matnr to smatnr.

smatnr(i/o field) = imara-matnr.

shan.

Edited by: shan palani on Sep 30, 2008 3:51 PM

3 REPLIES 3

former_member188685
Active Contributor
0 Kudos

Once you select the material from the F4 , you may have to press the enter, in the PAI of the screen you have to handle the ENTER command. There you have to populate the material description field based on the material.

some action Required for this(in case you are using the standard material search help).

Former Member
0 Kudos

hai,

make the coding such away

screen fields smatnr and matdes.

select the description u want , u will be having description in matdes(i/o field).

take that value and pass it to next select query to select the corresponding material no, now populate the matnr to smatnr.

smatnr(i/o field) = imara-matnr.

shan.

Edited by: shan palani on Sep 30, 2008 3:51 PM

Former Member
0 Kudos

use this function module

here pass selected matnr no need to press enter

CALL FUNCTION 'DYNP_VALUES_UPDATE'

EXPORTING

DYNAME = PROG_name

DYNUMB = screen_no

TABLES

DYNPFIELDS = (Material No.)

EXCEPTIONS

INVALID_ABAPWORKAREA = 1

INVALID_DYNPROFIELD = 2

INVALID_DYNPRONAME = 3

INVALID_DYNPRONUMMER = 4

INVALID_REQUEST = 5

NO_FIELDDESCRIPTION = 6

UNDEFIND_ERROR = 7

OTHERS = 8.