Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Edit Code

friends

i had a db table name zhr_pr_m

in screen i had displayed all the values from db to the textboxes of module

DATA:BEGIN OF ITAB_EMP.

INCLUDE STRUCTURE ZHR_PR_M.

DATA: END OF ITAB_EMP.

form get_data .

select * from zhr_pR_m into corresponding fields of itab_emp

where perid = zhr_pR_m-perid.

endselect.

zhr_pr_m-FNAME = itab_emp-fname.

zhr_pr_m-MNAME = itab_emp-mname.

zhr_pr_m-LNAME = itab_emp-lname.

zhr_pr_m-DOFJO = itab_emp-dofjo.

zhr_pr_m-STWEF = itab_emp-stwef.

endform. " get_data

module USER_COMMAND_0012 input.

CASE SY-UCOMM.

when 'DISP'.

break-point.

perform get_data.

WHEN 'MOD'.

data: perid like itab_emp1-perid.

if itab_emp1 is initial.

append itab_emp1.

BREAK-POINT.

read table itab_emp1 with key perid.

itab_emp1-inact = 'X'.

modify itab_emp1 index 1.

endif.

endcase.

endmodule. " USER_COMMAND_0012 INPUT

Basically with 'DISP' i m displyaing data

'MOD' i want to modify the table by appending the current value

i mean the prebious value should also be their along with a mark 'X' and new value append inthe db table

Please edit the above code as per the requiremnt

Hope anybody of u genius will help out

With Best Regards

Ruby

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question