‎2008 Aug 26 7:20 AM
Hi Experts,
I am new to this community and hope that i can explain my problem.
The problem :-
i am developing an interface for the end users were in they put the material number(matnr).
now what i want to do is when the user hits the "Enter" button of the key board than the description and the data i require should be displayed on to the screen fields .
Regards,
Nishant
‎2008 Aug 26 7:26 AM
‎2008 Aug 26 7:25 AM
Hi nishant,
Create one internal table of your fields.
Create different work areas for your internal table fields on to the screen.
create one push button for Enter & give a function code for the same.
Write a select query in the PAI of the screen.
like
Case sy-ucomm.
when' Enter'.
select * from "your table" into "internal table" where matnr = itab-matnr.
endcase,
regards
mudit
‎2008 Aug 26 8:00 AM
Hi Experts,
Thanks for all those answers. I am asking for when the user hits the "Enter" button of the key board than the description and the data i require should be displayed on to the screen fields .
Regards,
Nishant
‎2008 Aug 26 7:26 AM
‎2008 Aug 26 8:00 AM
Hi Experts,
Thanks for all those answers. I am asking for when the user hits the "Enter" button of the key board than the description and the data i require should be displayed on to the screen fields .
Regards,
Nishant
‎2008 Aug 26 8:51 AM
Hi,
Your requirement is to get material description on corresponding field basing on material number in the screen after pressing enter by the user. if that is the case first check for sy-ucomm in PAI event if that is equal to SPACE ( function code for enter ) then call a perform which performs your required action. In that perform Write select statement from desired table into desired table basing on material number given by the user. to check the material number in where condition you can directly use screen I/O field for the corresponding material number field. If the select statement is successful then push the corresponding value form the table into desired screen I/O field ( i.e., material description field).
Hope this will give you some idea,
Regards,
Aswini.
‎2008 Aug 26 7:26 AM
Hi,
In AT SELECTION-SCREEN
*Get Material description
SELECT SINGLE
Maktx
FROM
MAKT
INTO p_maktx
WHERE spras = sy-langu
AND
matnr = p_matnr.
P_matnr,p_maktx are slection screen parameters
if you need more info reply, otherwise
Regards
jana
Edited by: Janardhan Reddy on Aug 26, 2008 11:59 AM
‎2008 Aug 26 8:01 AM
Hi Experts,
Thanks for all those answers. I am asking for when the user hits the "Enter" button of the key board than the description and the data i require should be displayed on to the screen fields .
Regards,
Nishant
‎2008 Aug 26 8:12 AM
Hi Nishan,
I have posted answer for same your requirement check once,
Regards
jana
‎2008 Aug 26 7:38 AM
hi Nishant,
According to matnr no mentioned by the user fetch material description(maktx) from the mara table.
Write this select query in PAI module of that screen.Create an internal table corresponding to the values you need to fetch from the table.
case sy-ucom.
when 'ENTER'.
select maktx from mara into table itab where matnr = zmatnr.
similary write selct query for fetching data from other tables.
Fetch these values into the workarea n it will be displayed on next screen.Make sure to use same screen fields name as given in ur internal table.
thanks, Payal
‎2008 Aug 26 8:00 AM
Hi Experts,
Thanks for all those answers. I am asking for when the user hits the "Enter" button of the key board than the description and the data i require should be displayed on to the screen fields .
Regards,
Nishant
‎2008 Aug 26 7:52 AM
Hi Experts,
Thanks for all those answers. I am asking for when the user hits the "Enter" button of the key board than the description and the data i require should be displayed on to the screen fields .
Regards,
Nishant
‎2008 Aug 26 8:15 AM
HI Nishant,
Just go through this code snippet. It will work..(Let zvbap_101941 is a z table, itab is an internal table and make corresponding i/o fields on layout also)
PUT THIS CODE IN TOP INCLUDE.
Data: begin of itab occurs 0,
zmatnr type zvbap_101941-zmatnr,
zmaktx type zvbap_101941-zmaktx,
end of itab.
AND PUT THIS CODE IN PAI.
IF sy-datar eq 'X'.
select single zmaktx from zvbap_101941 into itab-zmaktx
where zmatnr eq itab-matnr.
ENDIF.
Thanks.
Nitesh
‎2008 Aug 26 8:43 AM
Hi Nishant,
You mean pressing 'ENTER' on the keyboard without using any push button in the screen, description and other field's data should get display on the same screen and I hope you dont have next screen.
Please ensure this?
Regards.
Ahmed.
‎2008 Aug 26 9:03 AM
In PAI Module...
module get_texts.
in this module write this code.
select single maktx into txtmaktx from makt where matnr = txtmatnr.
note the txtmaktx is a screen field.
‎2008 Aug 26 9:51 AM
Hi Nishant,
Hope you have created material number and material description screen fields on screen..
suppose material number is MATNR and description is MAKTX.
then write below code in your screen flow logic.
process after input.
field MATNR module get_desc.
then in module get_desc write below code.
module get_desc input.
if matnr is not initial.
select single maktx form makt where matnr = matnr.
else.
clear maktx.
endif.
end module.
hope it will help you..
Regards,
Meet