Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Table maintenance events - Before Saving (01)

Former Member
0 Likes
1,146

Dear Friends,

I'm trying out one of the events of table maintenance, Before saving the data in DB.

I'm finding lots of problem in retireving data from TOTAL table. I have defined a work-area of a type with Includes Structures as table and VIMTBFLAGS. I have tried MOVE TOTAL TO WA, doesn't work. I tried retireving using substring, it gives an error in case of an amount field. Please suggest something.

Also friends I have gone through the documentation available in http://help.sap.com/saphelp_47x200/helpdata/en/91/ca9f4da9d111d1a5690000e82deaaa/frameset.htm. Please suggest a way out.

Regards,

Deva.

Dear Friends,

I'm trying out one of the events of table maintenance, Before saving the data in DB.

I'm finding lots of problem in retireving data from TOTAL table. I have defined a work-area of a type with Includes Structures as table and VIMTBFLAGS. I have tried MOVE TOTAL TO WA, doesn't work. I tried retireving using substring, it gives an error in case of an amount field. Please suggest something.

Also friends I have gone through the documentation available in http://help.sap.com/saphelp_47x200/helpdata/en/91/ca9f4da9d111d1a5690000e82deaaa/frameset.htm. Please suggest a way out.

Regards,

Deva.

3 REPLIES 3
Read only

Former Member
0 Likes
720

Hello Deva,

What is the problem that u are facing?

data: begin of i_tab occurs 0.

INCLUDE STRUCTURE zemp.

data:end of i_tab.

loop at total.

move total to i_tab.

endloop.

This is just a sample. Give us details and we can work out.

Read only

0 Likes
720

Dear Friends,

Sorry that I didn't give complete details of my ABAP component and others.

This MOVE TOTAL TO WA works fine on my R/3 with component-SAP_ABA, Release-620 and Level-0054 but its same thing is not working and giving dump on my SRM 5.0 with component-SAP_ABA, Release-700 and Level-0006.

Please give some way out. Thanx for helping me out in finding the solution.

Regards,

Deva.

Read only

Former Member
0 Likes
720

Hey Jyoti,

Rather than using total, you can use the table Extract for your purpose.

Detailed Description :

Basic form

EXTRACT fg.

Effect

Writes all fields of the field group fg (see FIELD-GROUPS) as one record to a sequential dataset (paging). If a field group HEADER has been defined, its fields prefix each record to form a sort key. You can then sort this dataset using SORT and process it with LOOP ... ENDLOOP. After this, EXTRACT cannot be executed again.

Notes

General:

As soon as the first dataset for a field group has been extracted with EXTRACT, the field group cannot be expanded using INSERT. The field group HEADER, in particular, cannot be expanded after the first EXTRACT (regardless of field group).

Large extract datasets are not kept in main memory; instead, they are written to an external help file. You can specify the directory in which this file is to be stored using the SAP profile parameter DIR_EXTRACT. By default, the system uses the SAP file directory SAP profile parameter DIR_DATA).

Hope it solves.

Regards,

Kunal