Skip to Content
0

Update AUDISP IW31

Dec 14, 2016 at 06:20 PM

291

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

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

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!

Share
10 |10000 characters needed characters left characters exceeded
Raymond Giuseppi
Dec 15, 2016 at 07:50 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Nic Teunckens Dec 15, 2016 at 08:07 AM
0

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.

Show 1 Share
10 |10000 characters needed characters left 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

0
Nic Teunckens Dec 16, 2016 at 10:52 PM
0

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 ...

Share
10 |10000 characters needed characters left characters exceeded