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

BDC issue background and foreground

Former Member
0 Likes
913

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 don’t 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 haven’t 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??

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
737

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 don’t 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 haven’t 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??

4 REPLIES 4
Read only

Former Member
0 Likes
738

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.

Read only

0 Likes
737

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

Read only

Former Member
0 Likes
737

Can anyone helppppp plzzzz

Read only

Former Member
0 Likes
737

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.