Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Update AUDISP IW31

0 Likes
4,015

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

1 ACCEPTED SOLUTION
Read only

0 Likes
2,092

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!

5 REPLIES 5
Read only

RaymondGiuseppi
Active Contributor
0 Likes
2,092

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

Read only

NTeunckens
Active Contributor
0 Likes
2,092

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.

Read only

0 Likes
2,092

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

Read only

NTeunckens
Active Contributor
0 Likes
2,092

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

Read only

0 Likes
2,093

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!