Skip to Content
avatar image
Former Member

Update AUDISP IW31

Hi!

I am having the same problem, but I can not get the memory operations, I tried with field symbol with (SAPLCOIH) AFVGD 'but it did not work. Can you help me please?

Aline Silva

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Dec 28, 2016 at 12:52 PM

    Hello!

    After several unsuccessful attempts, was created a ENHANCEMENT In include LCOMKFZF

    Which allows updating the audisp field in the cs_resbd_new structure.

    I tried on EXIT_SAPLCOMK_014 Which is executed before in the magnification created, but it does not allow updating of the structure.

    Thank you for your help!

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 15, 2016 at 07:50 AM

    First did you look for exit, BAdI or enhancement options? (Look in package COBADI or XWOC for example or try the debug search.) Only if unsuccessful, try assignment to CAUFVD Table work area structure.

    Regards,
    Raymond

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 15, 2016 at 08:07 AM

    When implementing the BAdI "WORKORDER_UPDATE", you should be able to access the 'AFVGD' structure.

    For instance, when implementing this in a Z-class for "IF_EX_WORKORDER_UPDATE~AT_SAVE", it should work ...

    Or you could implement some code in UserExit "EXIT_SAPLCOIH_009" ...

    FIELD-SYMBOLS <afvgd> TYPE afvgd.
    
    UNASSIGN <afvgd>.
    ASSIGN ('(SAPLCOIH)AFVGD') TO <afvgd>.

    Another option should be the use of FM "CO_BO_OPR_OF_ORDER_GET", or search likewise Functions :

    DATA lt_opr TYPE TABLE OF afvgdget.
    
    CALL FUNCTION 'CO_BO_OPR_OF_ORDER_GET'
     EXPORTING
       aufnr_imp     = caufvd_imp-aufnr
       check_deleted = ' '
     TABLES
       afvgd_get = lt_opr.

    When reading your Question-title, I'm assuming you want to explicitely update the "AUDISP"-field. I can't advise / promote on that (even though there are Update Functions that can do that). There has to be a good reason to do this in such a direct way, however!

    Kind regards

    Nic T.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello Nic Teunckens!

      Whenever the order is PM01 and the control key is PM03 for the Reserve / ReqComp (AUDISP) field, it should be 'Never', this is because the user can forget to change! I'm trying these options you suggested, but nothing works out.

      Thanks

  • Dec 16, 2016 at 10:52 PM

    Hi Aline

    What about using the assignment through 'SAPLCOBP'?

    FIELD-SYMBOLS <afvgd> TYPE afvgd.
    
    UNASSIGN <afvgd>.
    ASSIGN ('(SAPLCOBP)AFVGD') TO <afvgd>.

    I saw in the BADI for 'WORKORDER_UPDATE', Method 'SAVE', that the "IS_HEADER_DIALOG"-field holds 'AUDISP'-field as well ...

    Another option might be the use of UserExit "EXIT_SAPLCOMK_014".

    Note that in the mentioned BAdI / UserExit, these are all data-structures that are not intended to be changed. Further, it would make more sence to me to Notify the User that he has to make this change (Raise Message). This is my personal opinion ofcouse, but it would be more sensible to educate / warn people, hoping they will make a correction and understand their processes better ...

    As a last resort, you could always create a custom Function / Method to update the 'AFVGD'-Structure when the Order was succesfully created ...

    Add comment
    10|10000 characters needed characters exceeded