cancel
Showing results for 
Search instead for 
Did you mean: 

Locking a session

Former Member
0 Kudos

Hi,

How a batch input session can be locked programmatically. Suppose I have a program which creates a Batch input session. Based on the input data that I pass to the session, For Eg. If in the input data, I get an invalid sales order number, I want to lock the session for further processing.

Thanks & Regards,

Vishnu Priya

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

HI Priya,

Check this Out....

CALL FUNCTION 'BDC_OPEN_GROUP'

EXPORTING

  • CLIENT = SY-MANDT

  • DEST = FILLER8

  • GROUP = FILLER12

<b> HOLDDATE = '20060421' " Session locked until specified date</b>

  • KEEP = FILLER1

  • USER = FILLER12

  • RECORD = FILLER1

PROG = SY-CPROG

  • IMPORTING

  • QID =

EXCEPTIONS

CLIENT_INVALID = 1

DESTINATION_INVALID = 2

GROUP_INVALID = 3

GROUP_IS_LOCKED = 4

HOLDDATE_INVALID = 5

INTERNAL_ERROR = 6

QUEUE_ERROR = 7

RUNNING = 8

SYSTEM_LOCK_ERROR = 9

USER_INVALID = 10

OTHERS = 11

.

IF SY-SUBRC <> 0.

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

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

ENDIF.

Regards,

Santosh

Former Member
0 Kudos

HI,

I THE FM BDC_OPEN_GROUP THERE IS A PARAMETER HOLDDATE

THIS U CAN USE..i.e depending upon ur condition u can call this fm set the parameter to 'x'.

hope this helps,

priya