Skip to Content
avatar image
Former Member

Locking a session

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Apr 21, 2006 at 10:06 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 21, 2006 at 10:20 AM

    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

    Add comment
    10|10000 characters needed characters exceeded