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

Dialog Programming problem

Former Member
0 Likes
1,397

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,377

hi ,

write the logic in the PAI part of the flow logic.

15 REPLIES 15
Read only

Former Member
0 Likes
1,377

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

Read only

0 Likes
1,377

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

Read only

Former Member
0 Likes
1,378

hi ,

write the logic in the PAI part of the flow logic.

Read only

0 Likes
1,377

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

Read only

0 Likes
1,377

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.

Read only

Former Member
0 Likes
1,377

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

Read only

0 Likes
1,377

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

Read only

0 Likes
1,377

Hi Nishan,

I have posted answer for same your requirement check once,

Regards

jana

Read only

Former Member
0 Likes
1,377

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

Read only

0 Likes
1,377

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

Read only

Former Member
0 Likes
1,377

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

Read only

Former Member
0 Likes
1,377

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

Read only

Former Member
0 Likes
1,377

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.

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,377

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.

Read only

Former Member
0 Likes
1,377

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