Skip to Content
avatar image
Former Member

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Aug 22, 2007 at 08:03 AM

    hi

    first to selected data from zhr_pR_m into internal table itab_emp.

    again ur populating the same fields from internal table to db table ....

    may i know y?

    could u please b clear abt ur requirement.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      ya

      i m again putting the modified values

      i mean if i need to change fname field of my db table

      then the previous entry should be their and a new entry generated

      just for recording who and wen and wat records are being modified

      plz help me out

      With best Regards

      Ruby