‎2008 Feb 23 12:13 PM
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.
‎2008 Feb 23 12:23 PM
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
‎2008 Feb 23 12:46 PM
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.
‎2008 Feb 23 1:01 PM
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:)
‎2008 Feb 23 2:05 PM
‎2008 Feb 25 4:26 AM
HELLO,
TRY THE FOLLOWING,
READ TABLE ITAB INDEX TABCTRL2-CURRENT_LINE.
‎2008 Feb 25 6:51 AM
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