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

table control

Former Member
0 Likes
556

I am trying to implemet the following functionality:

i have a table control and it has a field matnr.when i enter a value for matnr in the table control and press enter then the data corresponding to this matnr should be fetched from the table zprice and populated into the fields of the control table.

when i type the following code then this read query is not being executed.in debugging mode value of sy-subrc is 4.

read table itab_price with key matnr = itab_LINE-matnr.

*

if sy-subrc EQ 0.

itab_line-netpr = itab_price-netpr.

itab_line-waers = itab_price-waers.

itab_line-meins = itab_price-meins.

modify ITAB_LINE

from ITAB_LINE

index TABLE_LINE-current_line.

looking forward to ur help.

6 REPLIES 6
Read only

Former Member
0 Likes
537

Hi Pranjal

Please let me know 2 values in the internal table itab_price.

Please check if itab_price has the correct set of values.

Also let me know what is the value of itab_line-matnr for which it is returning sy-subrc = 4.

If itab_price-matnr = 0000123

and if itab_line-matnr = 123

pad itab_line-matnr with zeros

using Function module

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = itab_line-matnr

IMPORTING

output = itab_line-matnr.

Thanks

Sriram

Read only

0 Likes
537

i have entered matnr as 967 in the zprice table(i m fetching this in the internal table itab_price) and i enter the same value 967 in the table control.

Read only

Former Member
0 Likes
537

i did what u said and used that module.now sy-subrc is 0 but still the fields corresponding to matnr in the table control are not being populated from the internal table itab_price.

thanks in advance:)

Read only

0 Likes
537

Debug and check the place where it goes into table control.

Read only

Former Member
0 Likes
537

HELLO,

TRY THE FOLLOWING,

READ TABLE ITAB INDEX TABCTRL2-CURRENT_LINE.

Read only

Former Member
0 Likes
537

Select the fields u want to display take it into itab aggign that itab to table control u will get the data

for further u call me at 9322468903

regards

Shashi