cancel
Showing results for 
Search instead for 
Did you mean: 

CJ20N - Get Operation table in badi

former_member243716
Active Participant
0 Kudos

Hi,

I'm in IF_EX_WORKORDER_UPDATE~AT_SAVE for check operations in CJ20N.

How can I have internal table of ALL Operations updated?

With "ASSIGN ('(SAPLCONW)AFVGD') TO <afvgd>." I've last operation modified...

Thanks a lot

cv

FredericGirod
Active Contributor
0 Kudos

If you have a user exit with all the operations, called before your user-exit, you can create a SINGLE TON class to share this information

(and stop reading memory, it is bad !)

https://wiki.scn.sap.com/wiki/display/ABAP/ABAP+Objects+Design+Patterns+-+Singleton

View Entire Topic
former_member243716
Active Participant
0 Kudos

Thanks Simone...

The process in debug is:

1 AT_SAVE

2 BEFORE_UPDATE

I try to exec AT_SAVE method from BEFORE_UPDATE:

method IF_EX_WORKORDER_UPDATE~BEFORE_UPDATE.

data wa1_operation type COBAI_s_OPERATION.

data ishd Type COBAI_S_HEADER_DIALOG.

clear me->ERROR1.

loop at IT_OPERATION into wa1_operation.

if ....

me->ERROR1 = '1'.

exit.

endif...

endloop.

if not me->ERROR1 is initial.

move-corresponding wa1_operation to ishd.

call method me->IF_EX_WORKORDER_UPDATE~at_save

exporting IS_HEADER_DIALOG = ishd

exceptions ERROR_WITH_MESSAGE = 99.

endif.

endmethod.

method IF_EX_WORKORDER_UPDATE~AT_SAVE.

check not me->error1 is initial.

MESSAGE e162(00) RAISING error_with_message.

endmethod.

The problem is the process continue... that's why I'm trying to import the operations table into AT_SAVE

Thanks a lot,

cv