2006 Jul 03 10:57 AM
Hi All!
I have a program which updated the Z table with certain rows every time it runs.I want to add a version number to the z table by adding a extra column which will distinguish me between program runs.
I mean if the program runs for the first time the version number will be 1 for the all the rows it updates the ztable.If it runs for a second time the version number will be two and so on...
Please advise how to achieve this..
Regards
Praneeth
2006 Jul 03 11:00 AM
Hi Praneeth,
Add a column to the ztable for the serial number also.
Then maintain it using the function module NUMBER_GET_NEXT in the pai section .
Regards,
Ravi
Hi All!
I have a program which updated the Z table with certain rows every time it runs.I want to add a version number to the z table by adding a extra column which will distinguish me between program runs.
I mean if the program runs for the first time the version number will be 1 for the all the rows it updates the ztable.If it runs for a second time the version number will be two and so on...
Please advise how to achieve this..
Regards
Praneeth
2006 Jul 03 10:59 AM
Hi,
Instead of Version, you can think of having a date & time stamp which would help you to identify the latest run from the time & date,
Rgds,
2006 Jul 03 11:02 AM
You can maintain a field for Version in your Z table and use the internal table in the program (which updates all other fields in this table) to update this field each time the program runs.
You can give:
Itab-version = itab-version + 1.
Do this for each of the modified records and update to the table along with the other records.
The timestamp is also a good suggestion.
Hope this helps.
Sudha
2006 Jul 03 11:00 AM
change the in SE11 to add the column. You can adjust the table using SE14.
After the alter the code wherever you inserting rows into the table, to update the new column as well.
Regards,
Ravi
Note :Please mark the helpful answers
2006 Jul 03 11:00 AM
Hi Praneeth,
Add a column to the ztable for the serial number also.
Then maintain it using the function module NUMBER_GET_NEXT in the pai section .
Regards,
Ravi
2006 Jul 03 11:01 AM
You can acheive this by creating a change document object for your custom table.
After creating the change document object you need to call the change document function module(generated when you create the change document object) with proper parameters in you application which updates the custom table.
Please refer SAP documentation for change document objects.
-Kiran
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |