Skip to Content
avatar image
Former Member

How to know if the user is in change or display mode

Hello!

I created a user exit macro for my planning book. if the user is in display mode, i don't want him to be able to run the macro. He should only run the macro in change mode.

How to determine in an user exit macro (i.e in an abap programm) if the user is in change or display mode?

There is the FM /SAPAPO/DATA_IS_LOCKED with this parameters but it doesn't work.

Thanks in advance,

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    Dec 08, 2006 at 04:25 AM

    Hi Laurent,

    Can you use FM /SAPAPO/MSDP_PB_READ_DVIEW to determine if user is in change mode or not in the planning book. I am not at all good in ABAP but saw this FM in OSS note 403619. Line 240 onwards has a check for determining the user authorization for the planning book.

    Hope this helps.

    Thanks,

    Somnath

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 29, 2006 at 07:11 AM

    The planning book based upon the Planning Area. There no such direct method to know the exact status of planning book.

    Follow below logic ,

    First try to find the planning area of that planning book .since any update to planning book will directly affect underline planning area . If planning book is in change mode then planning area too will be in change mode.

    There is function /SAPAPO/TS_DM_LOCK which gives the status of planning book / area along with who has locked the planning book.

    you need to pass planning area name and if possible pass selection parameter and group parameter. if you don't then it is fine too.

    Paramater

    EV_SUCCESS = X ...Means no Lock.

    EV_USER = ...Blank indicate , no user has locked the planning area / book.

    If EV_USER is blank means , no one has locked the planning book / area , if it has value then it means the planning book/ area is locked .....here EV_SUCCESS would have blank value.

    You can test the this FM , by locking plannig book and passing planning area in FM ..and see the results

    Regards,

    Prashant

    Reward points if it helps.

    Reward pints if it helps

    Message was edited by:

    Prashant S

    null

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Techies,

      If any of you have got the solution to this problem, please share with me. As i Am also having exactly the same requirment.

      Thanks in advance.

      Surbhi

  • Nov 11, 2015 at 06:11 PM

    Hi

    try to look in the changing parameter c_s_actview

    c_s_actview-agc_child1-readonly

    0 = input mode

    1 = display mode


    i think child1 and child2 will be set similar.


    have fun ;-)

    Add comment
    10|10000 characters needed characters exceeded