2007 Jul 23 11:02 AM
friends
i had change screen where i want to display the data from databse first come in text boxes then i will update
so for retriving data first
i had written
data : begin of itab_final,
perid like zhr_peR_m-perid,
fname like zhr_peR_m-fname,
lname like zhr_peR_m-lname,
end of itab_final.
module USER_COMMAND_0011 input.
CASE SY-UCOMM.
when 'DISP'.
break-point.
perform get_data.
endcase.
endmodule. " USER_COMMAND_0011 INPUT
form get_data .
select perid fname lname from zhr_peR_m into corresponding fields of itab_final
where perid = zhr_peR_m-perid.
endselect.
itab_final-fname = zhr_per_m-fname.
endform. " get_data
zhr_peR_m-fname is name of input/output text box where i want to display the output
please me the error and the solution for same
With Best Regards
Ruby
2007 Jul 23 11:15 AM
hi ruby as u are moving data from itab to the screen field
u need to write zhr_per_m-fname = itab_final-fname
not itab_final-fname = zhr_per_m-fname.
probably that will be your mistake
reward if helpful
2007 Jul 23 11:07 AM
Hi,
Use
<b>form get_data .
select single perid fname lname from zhr_peR_m into corresponding fields of itab_final where perid = zhr_peR_m-perid.
if sy-subrc = 0.
zhr_per_m-fname = itab_final-fname.
endif.
endform. " get_data</b>
Regards,
Sesh
2007 Jul 23 11:14 AM
hi
try this....i have worked on this..this will work...
MODULE USER_COMMAND_0800 INPUT.
tables : zhr_peR_m.
gd_repid = sy-repid.
data : itab_final1 like zhr_peR_m occurs 0 with header line,
wa_final1 like line of itab_final1.
ok_code = sy-ucomm.
save_ok = ok_code.
clear ok_code.
case save_ok.
when 'DISP'.
select perid fname lname from zhr_peR_m into corresponding fields of itab_final
where perid = zhr_peR_m-perid.
endselect.
if sy-subrc = 0.
LEAVE TO LIST-PROCESSING.
write : zhr_peR_m-perid,
10 zhr_peR_m-fname,
30 zhr_peR_m-lname,
50 sy-subrc.
endif.
else.
call screen 0801.//error screen
endif.
REWARD IF USEFUL....
2007 Jul 23 11:15 AM
hi ruby as u are moving data from itab to the screen field
u need to write zhr_per_m-fname = itab_final-fname
not itab_final-fname = zhr_per_m-fname.
probably that will be your mistake
reward if helpful