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

regarding table control

Former Member
0 Likes
472

i have one table ctrl one push button and matnr fld on screen 100.now my requirement is i need to show data in tab ctrl accd to field matnr from search help in screen 100 then relevent data shud be displayed in table ctrl .and even all value present in itab if we dont enter any value in matnr fld screen matnr .

plz suggest me regarding select query how to wirte query related this.

1 ACCEPTED SOLUTION
Read only

gautam_totekar
Active Participant
0 Likes
450

say your input field is Io_field the dtabse table is MARA and the internal table is ITAB then code goes like this

if IO_FIELD is initial.

select * from MARA into ITAB.

else.

select * from MARA into ITAB where matnr = IO_FIELD.

endif.

3 REPLIES 3
Read only

gautam_totekar
Active Participant
0 Likes
451

say your input field is Io_field the dtabse table is MARA and the internal table is ITAB then code goes like this

if IO_FIELD is initial.

select * from MARA into ITAB.

else.

select * from MARA into ITAB where matnr = IO_FIELD.

endif.

Read only

Former Member
0 Likes
449

Hi 12asad,

According to my understanding you have

one table ctrl one push button and matnr fld on screen 100.

Your I/O Field = p_matnr

Do not make the matnr field mandatory which takes even blank spaces.

Now go for the query

select * from dbtable into int_table where matnr = p_matnr .

Int table will have all the data fromthe db table with condition matbr = your i/o field on the screen.

pretty simple

Thanks and regards

Srikanth.P

Read only

Former Member
0 Likes
449

thnaks for support