04-23-2009 2:14 PM
Hi to all,
we have requiriment like below.
when ever post goods issue has been done from inbound delivery, we have to create sesion and we have to procees that session in back ground.
now my program is getting trigered.
but out put type has been configured to type 4.(But its workign fine with other types i mean like 8.........)
our program is callling in update task.
we are geting dump for this. its showing that "Statement "SUBMIT" is not allowed in this form.
" that menas in the form routine....
the detailed meaning for this is as shown belwo .
This program is triggered in the update task.
There, the following ABAP/4 statements are not allowed:
- CALL SCREEN
- CALL DIALOG
- CALL TRANSACTION
- SUBMIT
we have created RFC FM and called in SEPARATE TASK but still we are getting problem
can any one help me out to solve thsi problem.
04-23-2009 2:45 PM
what are you doing in that background function or RFC function. If you have any screen processing then it will certainly fail.
04-23-2009 5:54 PM
use SUBMIT VIA JOB . The example call:
DATA: number TYPE tbtcjob-jobcount,
name TYPE tbtcjob-jobname VALUE 'JOB_TEST',
print_parameters TYPE pri_params.
...
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = name
IMPORTING
jobcount = number
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc = 0.
SUBMIT submitable TO SAP-SPOOL
SPOOL PARAMETERS print_parameters
WITHOUT SPOOL DYNPRO
VIA JOB name NUMBER number
AND RETURN.
IF sy-subrc = 0.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = number
jobname = name
strtimmed = 'X'
EXCEPTIONS
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
OTHERS = 8.
IF sy-subrc <> 0.
...
ENDIF.
ENDIF.
ENDIF.
Edited by: Venkatesan Nagiah on Apr 23, 2009 6:55 PM