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

View Maintenance

Former Member
0 Likes
995

Hello all,

In custom table maintenance view I'm using a couple of events in PAI to format records to be inserted. I also have a program that inserts entries into that table. Is there a function call that I can use instead of regular insert statement that would also go through those events?

Thank you,

Leon

8 REPLIES 8
Read only

sridhar_k1
Active Contributor
0 Likes
912

You can call the event subroutines from ur external program using PERFORM statement.

Read only

Former Member
0 Likes
912

Hi Leon,

You can use PERFORM statement to call particular routine in a different program to go through the events.

perform function_name1(prog_name1) using param1 param2.

function_name1 routine will be called from prog_name1 which is external to your tbale maintenance module pool.

Cheers,

Vikram

Please reward for helpful replies!!

Read only

Former Member
0 Likes
912

Thank you for your replies but the routine I'm using is standard temporal_delimitation and there are no parameters that I can use.

Read only

sridhar_k1
Active Contributor
0 Likes
912

If u've declared TABLES statement for the table ur going to insert in the external abap program, the content of the work area is available to the event routines.

Another method to have access to data in ur external program from event routines is declare shared data area

using

DATA: BEGIN OF COMMON PART area1

<variables>

END OF COMMON PART area1.

the declaration should be same in both programs.

Regards

Sridhar

Read only

Former Member
0 Likes
912

Hi Leon,

Im not very clear with your requiremnt but if you have to use this routine, why dont you copy routine into new Z include program and modify the same to meet your requirements and then call it from your table maintenance program.

Cheers,

Vikram

Pls reward for helpful replies!!

Read only

Manohar2u
Active Contributor
0 Likes
912

Leon,

As per my knowledge,I don't think its possible to trigger those events.

My suggestion would be to do such checks/formats before updating to this table.

Regds

Manohar

Read only

Former Member
0 Likes
912

What about those functions: VIEWPROC_<view> and VIEWFRAME_<view> or VIEW_MAINTENANCE. Are those to accomplish what I need. the interface is confusing.

Read only

0 Likes
912

If you want to call subroutines created for table maintenance events from another abap program, you don't need to use VIEWPROC_<view> VIEWFRAM functions...

What are the Table maintenance dialog events (event numbers) did you use? I believe there are no insert statements in those subroutines, just formatting.. isn't it?

Ifur abap program and the subroutines process one record at a time, then here's the pseudo code of the external abap program for using the event subroutines.

report ZPROGRAM

tables ZTAB

select single * from ZTAB where ...

perform event_sub_routine(include_prog_name)

insert ztab.

******

Include program

form event_sub_routine

Do the required format changes to ZTAB.

Adjust the code to work for both table maintenance and the external program

endform