Application Development 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: 

triggering a abap program

Former Member
0 Kudos

Dear all,

I had a doubt regarding triggering an abap program.

Situation is after updating a ztable from an rfc. The program will get trigerred automatically for every update and creation of arecord in the ztable.

How it is possible.

Please help me regarding this.

Thanks in advance,

Ravi

9 REPLIES 9

Former Member
0 Kudos

yes, use SUBMIT statement.

sameer

0 Kudos

SUBMIT is a key word used to call an exe report(program) inside a program .

the calling program may be a type 1,M,F etc except type I (include programs).

<SYNTAX> SUBMIT <program name>.

When you are updating the data base through the called program, then screen validation is necessary.

<SYNTAX> SUBMIT <program name> VIA SELECTION-SCREEN.

Former Member
0 Kudos

In RFC u might have written statement like MODIFY/ UPDATE or INSERT, Chk Sy-Subrc after this. If it is successful then use statement

Submit <Report Name>.

It should trigger ur report after each insert or update.

Regards

Sushil

0 Kudos

Hi,

After compelte your bapi run this fm.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

So that your bapi data stored to ztable.

Rewards points if is useful.

Former Member
0 Kudos

check if the updation is successful.

If sy-subrc is o.

then use SUBMIT <REPORT>.

0 Kudos

Dear all,

Thank u vvery much for ur response,

In RFC can we use SUBMIT statement?

I had a doubt Please clarify me.

Thanks and Regards,

0 Kudos

Hi Ravi,

At the time of creating table maintenance generater for the table, Use the following menu option Environment->Modification->Events and create and entry with maitenance event equals '05' and specify the FORM Routine and save the entry. In the form routine created call the program and for every new entry creation this routine will trigger.

Hope this helps

Thanks

Lakshman

0 Kudos

Thank you Lakshmanan,

Could you please explain me how and where we have to create form routine.

Thank you

0 Kudos

Hi Ravi,

1) Once the table maintenace screen is generated .

2)goto menu option Environment->Modification->Events.

3)Create and entry. From F4 choose '05' in the first column. In FORM routine specify some name for e.g. SAVE_DATA. Then clickon the Editor pushbutton which creates a new include program.

4)in the include program call the submit program within the form routine.

FORM SACE_DATA.

submit <>

ENDFORM.

5)Activate the code

Thanks

Lakshman