2007 Dec 16 7:03 PM
Hiii
i have already write bdc code using batch input. The data is taken from an excel file .
How the program work now is it create a session in SM35 and i can decide to execute the session either in background or foreground.
The reson why i did batch input and not call transaction is because i am told that with call transaction you can't execute batch input program in background since the excel file will be loaded from the user desktop. With call transaction and background execution the file need to be loaded on server first and then take the file from the server to BDC tcode.
My problem is I need my program to execute automatically without passing though the SM35. I also need to give the option to user to either execute is in foreground or background.
BDC code look this:
**********************
Call function "OPEN_BDC"
group = "ztest" I use constant
keep = "X'
perform dynpro
perform fillfield
call fuction "CLOSE_BDC"
1) I am told to use the FM file_open / file_submit / file_close but I dont really know hat parameter to pass in those FM the file_submit is giving me exception error.
2) I tried to use submit program RSBDCSUB . it create a session in sm35 and have status background job but the session havent executed
3) All the No1 and No2 is to execute the BDC in background then what about the solution if user what to execute in foreground.
Please i need precise answer??
2007 Dec 16 7:07 PM
Hi,
If you are using BDC session method you need to process using SM35 only. If you want to process to done without using SM35 better to use Call Transaction Method.
Thanks,
Sriram Ponna.
Hiii
i have already write bdc code using batch input. The data is taken from an excel file .
How the program work now is it create a session in SM35 and i can decide to execute the session either in background or foreground.
The reson why i did batch input and not call transaction is because i am told that with call transaction you can't execute batch input program in background since the excel file will be loaded from the user desktop. With call transaction and background execution the file need to be loaded on server first and then take the file from the server to BDC tcode.
My problem is I need my program to execute automatically without passing though the SM35. I also need to give the option to user to either execute is in foreground or background.
BDC code look this:
**********************
Call function "OPEN_BDC"
group = "ztest" I use constant
keep = "X'
perform dynpro
perform fillfield
call fuction "CLOSE_BDC"
1) I am told to use the FM file_open / file_submit / file_close but I dont really know hat parameter to pass in those FM the file_submit is giving me exception error.
2) I tried to use submit program RSBDCSUB . it create a session in sm35 and have status background job but the session havent executed
3) All the No1 and No2 is to execute the BDC in background then what about the solution if user what to execute in foreground.
Please i need precise answer??
2007 Dec 16 7:07 PM
Hi,
If you are using BDC session method you need to process using SM35 only. If you want to process to done without using SM35 better to use Call Transaction Method.
Thanks,
Sriram Ponna.
2007 Dec 16 7:15 PM
But with call transaction the user can't execute in background since use won't be able to load file in directly from desktop. writing a program to load file in SAP server and reading that fiel from sap server is not what i want
2007 Dec 16 7:26 PM
2007 Dec 17 6:56 AM
Job_submit is not functioning plzzz ess sample code below because of invalid_jobdata = 3
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobgroup = Ztest //Session name in SM35
jobname = v_jobname
IMPORTING
jobcount = v_jobcount
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4
.
IF sy-subrc <> 0.
ENDIF.
CALL FUNCTION 'JOB_SUBMIT'
EXPORTING
authcknam = sy-uname
jobcount = v_jobcount
jobname = v_jobname
language = sy-langu
report = sy-repid
VARIANT = ' '
IMPORTING
STEP_NUMBER =
EXCEPTIONS
bad_priparams = 1
bad_xpgflags = 2
invalid_jobdata = 3
jobname_missing = 4
job_notex = 5
job_submit_failed = 6
lock_failed = 7
program_missing = 8
prog_abap_and_extpg_set = 9
OTHERS = 10
.
IF sy-subrc <> 0.
ENDIF.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = v_jobcount
jobname = v_jobname
sdlstrtdt = sy-uzeit
sdlstrttm = sy-datum
EXCEPTIONS
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
invalid_target = 8
OTHERS = 9
.
IF sy-subrc <> 0.
ENDIF.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |