08-23-2007 7:49 AM
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
08-23-2007 7:52 AM
08-23-2007 8:11 AM
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.
08-23-2007 7:52 AM
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
08-23-2007 7:57 AM
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.
08-23-2007 7:54 AM
check if the updation is successful.
If sy-subrc is o.
then use SUBMIT <REPORT>.
08-23-2007 7:57 AM
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,
08-23-2007 8:12 AM
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
08-23-2007 8:40 AM
Thank you Lakshmanan,
Could you please explain me how and where we have to create form routine.
Thank you
08-23-2007 9:20 AM
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