‎2008 Jun 03 10:29 AM
Hi Guy's,
Please friends help me where i did mistake.
table1 contain 20 fields. using Function module want to updagte the table contain 12 fields.
In FM-importing parameters are 12 fields.
data : wa_output type table1.
move : field1 to wa_output-zfield1,
field2 to wa_output-zfield2. .......upto field12.
here using insert statement.
insert into table1 values wa_output.
But here wa_out contain values are not inserted into table1.
Why what is the reason.
please friends clarify my doubt.
Thanks,
Sai.
‎2008 Jun 03 10:32 AM
Try this:
data : wa_output type table1.
move-corresponding field1 to wa_output.
insert table1 from wa_output.
‎2008 Jun 03 10:32 AM
Try this:
data : wa_output type table1.
move-corresponding field1 to wa_output.
insert table1 from wa_output.
‎2008 Jun 03 10:42 AM
‎2008 Jun 03 10:37 AM
hi there...
wats hapening is that the table has 20 fields and so is ur workarea. but ur populating only 12 fields of the internal table. try to chk the code again and get back if still facing any problems.
‎2008 Jun 03 11:07 AM
Hi Sharma,
Still i am facing same problem. Pls tell me solution.
Thanks,
Sai.
‎2008 Jun 03 11:17 AM
Hi,
Does all the key fields of table1 are available in u r 12 fields of FM if not then u might need to use MODIFY rather than INSERT. Hope this helps
Thanks,
Jagadish
‎2008 Jun 03 1:43 PM
Hi,
table1 contain 20 fields, here FM using 12 fields. but these 12 fields are not order of table1 contain fields order.
Thanks,
Sai.
‎2008 Jun 03 1:52 PM
Hi,
First of all, your work area must have the fields in the same order as your table. Otherwise, you might be inserting character value against a number field. So, even if you have values for only 12 fields, try to put space for the remaining fields. Note: Work Area fields must be in the same order as table fields.
Thanks
Ramesh
‎2008 Jun 03 11:22 AM
HI Sai,
Check the sy-subrc value after INSERT, if it is 0 then write 'COMMIT WORK' statement in your code.
Rgds,
Bujji