09-30-2008 11:09 AM
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.
09-30-2008 11:20 AM
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
09-30-2008 11:19 AM
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).
09-30-2008 11:20 AM
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
09-30-2008 1:15 PM
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.