Restore Temporary Table to Not temporary Table using X++

Hi ,

I am having a Normal Table . In Coding i have changed the Table as Temporary as TableName.setTemp(), But how to Restore the Table to Normal Mode . . I mean From Temporary To Not Temporary…

Thanks in Advance

sorry temporary table behave as buffer either you have 3 table

from one table you are copying to your tmp table than to third table then it can be possible and if you want to restore the data than the data will be lost if you deleted because tmp table behaves like buffer once you remove or shutdown or stop sevices tmp table loses its data


Just use another table buffer, i.e. another variable of type of the permanent table.

setTmp() will not make the table temporary, only the current buffer will behave as temporary and any data manipulation through that buffer will not effect the data base(if that is handled properly). I suggest to use a different buffer for showing the temporary behavior.

HI Kranthi

I do the following method to insert data into tmp table but I am not getting data into tmp table . any clue please

private void setARG_SOCustReqRelationTmp()


ARG_SOCustReqRelation arg_SOCustReqRelation;




// Clear the data from the copy table

//delete_from arg_SOCustReqRelationTmp;

while select arg_SOCustReqRelation


arg_SOCustReqRelationTmp.SalesId = arg_SOCustReqRelation.SalesId;

arg_SOCustReqRelationTmp.ARG_CustReq = arg_SOCustReqRelation.ARG_CustReq;

info(strFmt("Inserted a row for ",arg_SOCustReqRelation.ARG_CustReq));






The code seems to be correct, supposing that insert() doesn’t fail. How did you test it?

By the way, you could copy values of all fields by