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

regardig session method

0 Likes
847

hi to all,

in session method how to run session with out going to SM 35.give some sample code.

psurendarreddy.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
806

Hi,

If there is any error then you need to go to SM35 and need to process session there. There is no other way.

Regards,

Atish

7 REPLIES 7
Read only

Former Member
0 Likes
807

Hi,

If there is any error then you need to go to SM35 and need to process session there. There is no other way.

Regards,

Atish

Read only

Former Member
0 Likes
806

There is a SAP supplied program RSBTCSUB (or similar name) which can be used to run session in background job without going to SM35.

Andrew

Read only

0 Likes
806

how to use that program could you give me some sample code i tried but i am not getting.

Read only

0 Likes
806

how to submit session in back ground

Read only

Former Member
0 Likes
806

Go for background sheduling RSBDCSUB similar name and just give the session name which u have generated

Read only

Former Member
0 Likes
806

Hi

U should use the system function BDC_START_GROUP:

call 'BDC_START_GROUP' id 'GROUP' field mtab-groupid

id 'QUID' field mtab-qid

id 'DISPLAY' field amodus

id 'LOG' field lmodus

id 'EXPERT' field d0300-expert

id 'DYSIZE' field ldefsize.

See the program SAPMSBDC_CC

Max

regards

nagaraju

Read only

Former Member
0 Likes
806

hi,

There is a method call RSBDCSUB.

after bdc_close_group u write perform process_immediate.

FORM PROCESS_IMMEDIATE .

DATA : W_JOBNAME LIKE TBTCO-JOBNAME VALUE 'gouranga', " SESSION NAME

W_JOBCOUNT LIKE TBTCO-JOBCOUNT.

CALL FUNCTION 'JOB_OPEN'

EXPORTING

  • DELANFREP = ' '

  • JOBGROUP = ' '

JOBNAME = W_JOBNAME

  • SDLSTRTDT = NO_DATE

  • SDLSTRTTM = NO_TIME

  • JOBCLASS =

IMPORTING

JOBCOUNT = W_JOBCOUNT.

  • CHANGING

  • RET =

  • EXCEPTIONS

  • CANT_CREATE_JOB = 1

  • INVALID_JOB_DATA = 2

  • JOBNAME_MISSING = 3

  • OTHERS = 4

  • .

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

SUBMIT RSBDCSUB USER SY-UNAME

VIA JOB W_JOBNAME

NUMBER W_JOBCOUNT

AND RETURN

WITH MAPPE = 'gouranga'.

  • WITH FEHLER = SPACE .

*

CALL FUNCTION 'JOB_CLOSE'

EXPORTING

  • AT_OPMODE = ' '

  • AT_OPMODE_PERIODIC = ' '

  • CALENDAR_ID = ' '

  • EVENT_ID = ' '

  • EVENT_PARAM = ' '

  • EVENT_PERIODIC = ' '

JOBCOUNT = W_JOBCOUNT

JOBNAME = W_JOBNAME

  • LASTSTRTDT = NO_DATE

  • LASTSTRTTM = NO_TIME

  • PRDDAYS = 0

  • PRDHOURS = 0

  • PRDMINS = 0

  • PRDMONTHS = 0

  • PRDWEEKS = 0

  • PREDJOB_CHECKSTAT = ' '

  • PRED_JOBCOUNT = ' '

  • PRED_JOBNAME = ' '

  • SDLSTRTDT = NO_DATE

  • SDLSTRTTM = NO_TIME

  • STARTDATE_RESTRICTION = BTC_PROCESS_ALWAYS

STRTIMMED = 'X'

  • TARGETSYSTEM = ' '

  • START_ON_WORKDAY_NOT_BEFORE = SY-DATUM

  • START_ON_WORKDAY_NR = 0

  • WORKDAY_COUNT_DIRECTION = 0

  • RECIPIENT_OBJ =

  • TARGETSERVER = ' '

  • DONT_RELEASE = ' '

  • TARGETGROUP = ' '

  • DIRECT_START =

  • IMPORTING

  • JOB_WAS_RELEASED =

  • CHANGING

  • RET =

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.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

  • IF SY-SUBRC NE 0.

  • WRITE: / 'Error processing:', SY-SUBRC.

  • ENDIF.

  • MESSAGE S456(ZTTL).

ENDFORM. " PROCESS_IMMEDIATE

I HOPE U R LOOKING FOR THIS ANSWER.