Skip to Content
0
Former Member
May 25, 2009 at 11:35 AM

MAX ID OF THE TABLE

15 Views

Don't use all CAPITALS in your subject

Hi,

suppose 15 entries in the z table exist and i want to add next one through dialog programming.

so what i am doing is that, i want max id of the table field customer_code that storing the value like

001

002

003

etc

in sequence

so i need a function module or select query so that customer_code 003 should return.

so that i can add another record by id 004.

tables: zfn_co_master.

data: w_comp_code type zfn_co_master-company_code.

SELECT MAX(COMPANY_CODE) w_comp_code from zfn_co_master.

i am using this code but this is not working.

well any suggestion will be much appreciated.

Thanks in advance

vijay

Edited by: Matt on May 25, 2009 1:37 PM