cancel
Showing results for 
Search instead for 
Did you mean: 

No data transfer after enhancement IBAPI_ALM_ORD_MODIFY

Former Member

Hi,

I am a little hesitant to post this question as it is quite long and involved.

(Note: I have done A LOT of googling and debugging but have not been able to resolve this so if you can point me to a link or SAP note which helps with this issue it would be greatly appreciated.)

I will be creating operations with indirect costs using a PM Activity Type that is linked to an indirect. The thing is, an order could have say 300 notifications attached to it. We have external partners creating notifications (linked to orders) and changing them through custom enterprise services.

Because these indirect costs could be for say: "Traffic management" I need to be able to know which operation/cost is associated with which notification activity. The cost is not stored on the notification though. So if for noti 1234 the cost for activity group/code CO9001 changes from $200 to $300 I don't know which order operation to update as there could be multiple operations on that order with PM Activity Type CO9001. (I may modify this to store the objectkey which is notif+activity number but this is not the problem I am trying to solve with this post, it is more one of data transer. Once it is working I can change what I am storing to make the solution better.)

Also I don't get an order update from the partner, I get a notification/activity update and have to do the order operation update from that information. Hence the need to associate the notification number to the order operation. I haven't been able to ind a better solution to this but bear in mind I don't really have time to try many experimental solutions.

So this is what I have done:

I have added an append structure to AFVC with 1 field - ZZQMNUM.

I have added an append structure to AFVGD with 1 field - ZZQMNUM

I implemented an enhancement of IBAPI_ALM_ORD_MODIFY

I called the function BAPI_ALM_ORDER_MAINTAIN and pass the notification number in in the extension_in parameter.

In the "IF_EX_IBAPI_ALM_ORD_MODIFY~MODIFY_INPUT_DATA" method I pass the notification number into the table CT_OPERATION.

This all works but it does not get passed through to the final AFVC update.

I debugged down into:

BAPI_ALM_ORDER_MAINTAIN

IBAPI_PROC_METHOD_TABLE_EXEC

PERFORM order_maintain USING ls_proc_levelIBAPI_H_CREATE_INTERNAL

At this point table it_oper_tab contains the entries with the notification number in ZZQMNUM

IBAPI_H_CREATE_INTERNAL

(LIBAPI_HFE4) PERFORM operation_maintain USING ls_proc_level

IBAPI_ORDER_OPERATION_CREATE

PERFORM copy_appends_to_afvgd USING ls_afvgd_in "669370

The values are actually there until the final step in "copy appends", it is not passed across.

I am hoping to get some experienced ABAPers to help out here, if you have not solved this type of problem before then I don't mind suggestions but wild speculation isn't really going to help. I have had some of that in the past when I asked a question and someone might suggest something that they have never tried before. This often makes things less clear.

Note: I have also set the table CT_OPERATION with ZZQMNUM = "X".

So at subroutine OPERATION_MAINTAIN

the data is there in table it_oper_tab

Straight after this in the subroutine COPY_APPENDS_TO_AFVGD

But at this point the data is lost:

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member185414
Active Contributor

Ok, so I think I can offer a perspective. My project is having a similar problem but with MIGO transaction. Background of my problem - It seems the standard SAP behavior for MIGO transaction does not allow us to save fields other than four fields like header text, etc. when changing a material document. Having debugged thoroughly we have found that at multiple places checks are put to disallow saving any field apart from the original four fields. This effectively means that if we enhance the MATDOC table (we are on S/4 HANA, so no MKPF-MSEG directly) then also we cannot directly save the custom fields due to these checks.

Ultimately as of now we are planning to implement implicit enhancement. Will keep you updated in case of more information.