Skip to Content
0
Aug 28, 2006 at 11:59 AM

updating the database using z bapi without deleting existing data

17 Views

hi every body,

i am using a zbapi in that i am updating a table which is having 40 fields but i am modifying the only four fields but it is deleting the remaining field entries

i am now attaching the code what i have used

ZMPETS_SHIPHDR-SHIPDOCNO = wf_shipdocno.

ZMPETS_SHIPHDR-VENACCEPTIND = VENACCEPTIND.

ZMPETS_SHIPHDR-LASTCHANGEDT = SY-DATUM.

ZMPETS_SHIPHDR-LASTCHANGEBY = SY-UNAME.

ZMPETS_SHIPHDR-LOEKZ = ' '.

CALL FUNCTION 'Z_MPETS_SAVE_SHIPHDR'

EXPORTING

zmpets_shiphdr_save = ZMPETS_SHIPHDR.

*COMMITING THE UPDATION.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

IMPORTING

RETURN = RETURN.

  • UPDATING THE SHIPMENT ACTIVITY TABLE.

ZMPETS_SHIPACTIV-PETSDOCNUMBER = wf_shipdocno.

ZMPETS_SHIPACTIV-LOEKZ = ' '.

ZMPETS_SHIPACTIV-ACTIVITY = '20'.

CALL FUNCTION 'Z_MPETS_SAVE_SHIPACTIV'

EXPORTING

zmpets_shipactiv_save = ZMPETS_SHIPACTIV.

in the upper function module the code

is

modify zmpets_shipactiv from zmpets_shipactiv_save.

we have to use this compulsory as it is client's standard

*COMMITING THE UPDATION.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

IMPORTING

RETURN = RETURN.

kindly give me reply

i will reward the points for a best reply