Skip to Content
author's profile photo Former Member
Former Member

Locking reservation number using ENQUEUE_EMRKPF

Hi Experts,

I am using FM CO_WB_MAINTAIN_GOODS_MOVEMENTS to update the goods movement.

Before that I want to lock the reservation number so that other users dont access the same one.

I found FM ENQUEUE_EMRKPF which can do this .

I am not sure which import parameters should I pass to it. Could anyone please suggest me the same ?

Also ,suggest me if there is any better way for it. 😊

Thanks in advance !

Regards,

Anshuman.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jul 25, 2012 at 12:25 PM

    Thanks for the help the issue was resolved using the code

    CALL FUNCTION 'ENQUEUE_EMRKPF'

    EXPORTING

    * MODE_RKPF = 'E'

    * MANDT = SY-MANDT

    RSNUM = pt_gm_tab-rsnum

    * X_RSNUM = ' '

    * _SCOPE = '2'

    * _WAIT = ' '

    * _COLLECT = ' '

    EXCEPTIONS

    FOREIGN_LOCK = 1

    SYSTEM_FAILURE = 2

    OTHERS = 3

    .

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 12, 2012 at 10:05 AM

    Hi Barua,

    You can try with this.

    LOOP AT DRKPF.
    CALL FUNCTION 'ENQUEUE_EMRKPF'
    EXPORTING
    RSNUM = DRKPF-RSNUM
    EXCEPTIONS
    FOREIGN_LOCK = 2
    SYSTEM_FAILURE = 3.
    CASE SY-SUBRC.
    WHEN 2.
    IF SY-PFKEY NE 'FEHLER'.
    SET PF-STATUS 'FEHLER'.
    MOVE 'STANDARD' TO PF_ALT.
    MOVE X TO XFEHLER.
    DELETE DRKPF.
    ENDIF.
    * xclose = x.
    * perform next_row using 2 space.
    WRITE 02 DRKPF-RSNUM.
    WHEN 3.
    MESSAGE E110.
    ENDCASE.

    For reference please refer the standard report RM07RVER (Manage reservations).

    Regards,

    Ramya R

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.