‎2008 Mar 06 10:47 AM
Hi Experts,
My question is how to update the fields in ztable.
I am creating a dailogue program to add entries to the z table. I am having more than 16 fields in that ztable. Please let me know with example on how to update all the fields in the ztable when i ciick on the update button in the dialogue screen.
Thanks in advance.
‎2008 Mar 06 11:13 AM
Hi Boopathy,
In the Screen painter place a button with function code UPD.
In the PAI declare a MODULE USER_COMMAND_1000.
In the program write the following code.
data tab like standard table of zord.
case sy-ucomm.
when 'UPD'.
update zord from table tab.
endcase.
Regards,
Charumathi.B
‎2008 Mar 06 10:53 AM
Hi,
You can do it in the At user command module in PAI of the screen.Ok Code can be used for this purpose.
case ok_code.
when 'UPDATE'
-
endcase
Hope this will help
Regards
Shibin
Edited by: Shibin on Mar 6, 2008 11:57 AM
‎2008 Mar 06 11:13 AM
Hi Boopathy,
In the Screen painter place a button with function code UPD.
In the PAI declare a MODULE USER_COMMAND_1000.
In the program write the following code.
data tab like standard table of zord.
case sy-ucomm.
when 'UPD'.
update zord from table tab.
endcase.
Regards,
Charumathi.B
‎2008 Mar 07 6:40 AM
Hi Experts,
Thanks for your reply..
Problem got solved. and more over i need some help on the same.
How do we clear the fields when we click the insert or update buttoon in the dialogue program.
Thanks for answers
‎2008 Mar 07 10:19 AM
Hi Boopathy,
Simply use the clear or refresh statements after the update command.
data tab like standard table of zord.
case sy-ucomm.
when 'UPD'.
update zord from table tab.
refresh tab.
endcase.
Regards,
Charumathi.B