2008 May 05 11:45 AM
HI All,
In table control how to identify the record inserted and save it?
Thanks,
Rakesh.
HI All,
In table control how to identify the record inserted and save it?
Thanks,
Rakesh.
2008 May 05 1:03 PM
Rakesh
Generally, I have a table for the display and a copy of it in a sv_ table.
My normal procedure for this type of thing is once you are ready to save it, is to delete all the table entries from the sv_ table
and then insert all of the new table. This will handle deletes as well.
Something similar to this
DELETE FROM zlmcont CLIENT SPECIFIED
WHERE mandt = sy-mandt
AND leadid = zlmlead-leadid.
SORT it_zlmcont.
LOOP AT it_zlmcont INTO wa_zlmcont.
IF wa_zlmcont-leadid IS INITIAL.
wa_zlmcont-leadid = zlmlead-leadid.
ENDIF.
PERFORM build_search_fields USING wa_zlmcont-lname
wa_zlmcont-fname
wa_zlmcont-mname
wa_zlmcont-city
wa_zlmcont-name_search
wa_zlmcont-city_search.
MODIFY it_zlmcont FROM wa_zlmcont.
IF wa_zlmcont-apptyp = 'A'
AND wa_zlmcont-seqno = 1.
a1_zlmcont = wa_zlmcont.
ENDIF.
ENDLOOP.
INSERT zlmcont FROM TABLE it_zlmcont.
sv_zlmcont = it_zlmcont.
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |