2013 Mar 11 6:05 AM
1-hi
I want to Modify the data into the Z data base through module pool programming. I am taking the fields Primary key from Z table , of behalf of primary . I want to modify data , I need sample code ,please help me
, I need sample code ,please help me
thanx
puneet
2013 Mar 12 6:18 AM
Hi Puneet ,
Regarding your first query do a bit of search on UPDATE and MODIFY command .
Take all your screen field's values in a Work Area ( fill respective fields ) of same type as that of table to be updated. And after that Call UPDATE or MODIFY table.
Now your second query .
I guess there may be more than one technique to accomplish that task.
For eg ,
Use SELECT MAX statement to select the current entry of your SR No. and after that add 1 to get the next SR No.
eg :
IF VAR_REFSERVICEID IS INITIAL.
SELECT MAX( SERVICEID ) FROM ZSERVICEDET INTO TEMP_SERVICEID WHERE CUSTID = VAR_CUSTID
AND DEVID = VAR_DEVID.
ZSERVICEDET-SERVICEID = TEMP_SERVICEID + 1.
ZSERVICEDET-CUSTID = VAR_CUSTID.