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

User exit for order attachment

former_member647955
Participant
0 Likes
906

Hi ABAPers,

I receive requirement to auto populate Order status ATTC if there is there is attachment in work order, IW31/32. I looking for the best user exit that can be used for this modification. I am looking for SAP enhancement in SMOD for IW* but can't find the correct one. Have anybody ever done that? Could you give a clue, what user exit (SAP enhancement) I could use?

Thanks a lot

Regards

Hadi

Hi ABAPers,

I receive requirement to auto populate Order status ATTC if there is there is attachment in work order, IW31/32. I looking for the best user exit that can be used for this modification. I am looking for SAP enhancement in SMOD for IW* but can't find the correct one. Have anybody ever done that? Could you give a clue, what user exit (SAP enhancement) I could use?

Thanks a lot

Regards

Hadi

4 REPLIES 4
Read only

Former Member
0 Likes
682

Hi,

Please check the BADI : WORKORDER_UPDATE.

Regards,

Srini.

Read only

0 Likes
682

Hi Srini,

Thanks alot for the suggestion.

I have check the BADI but can't find fine method that is executed after attachment added.

There is several method there but I am not pretty understand where it's hooked in the program or what even will trigger this method:

ARCHIVE_OBJECTS

AT_DELETION_FROM_DATABASE

AT_SAVE

CMTS_CHECK

INITIALIZE

IN_UPDATE

NUMBER_SWITCH

BEFORE_UPDATE

AT_RELEASE

REORG_STATUS_ACT_CHECK

REORG_STATUS_ACTIVATE

REORG_STATUS_REVOKE

I do experiment by put break point in all method and try to run IW32. But I only find 2 method executed: AT_SAVE & IN_UPDATE, which are executed when I push 'Save' button. I don't think it's right event to put status ATTC as required.

Do you have more advice Srini?

Thanks alot

Regards

Hadi

Read only

Former Member
0 Likes
682

You can work in of the user exit which populate the Order status ATTC values. put a small query on tables like SOOD or SOFM with giving the object information. if sy-dbcnt ge 0 then the attachement exist for your work order. based on this situation you might want to poplate the values in order status.

Cheers

Read only

0 Likes
682

Hi Amit

Thanks alot for the logic. Could you suggest the name of user exit.

Regards

Hadi