Supply Chain Management Blogs by Members
Learn about SAP SCM software from firsthand experiences of community members. Share your own post and join the conversation about supply chain management.
cancel
Showing results for 
Search instead for 
Did you mean: 
gurucharanscm
Contributor
0 Kudos
1,114

Users are facing the problem while trying to run some normal copy macros where we used ROW_INPUT function before the copy happens.


Below are some observations we have identified in regards to this case:


  • We have activated the KF lock on the planning area with no lock on the read-only KFs: so, if user A opens the data view, modifiable KFs of the view are locked.
  • We are modifying the attributes of one 'output only' KF to edit mode as part of the macro logic.
  • We are having a default macro in the same view which tries to close all the KFs (bring all the KFs to no-edit mode).


Suppose user A has first opened the view – he locks all the modifiable KFs of the view. If user B now opens the view and executes the macro, he is actually trying to bring one read-only KF to edit mode: this is because the macro first tries to bring the KF to edit mode before updating it. Mind you - when switching to edit mode, the data must be read again - this because: since this KF was previously not locked for user B, it could therefore have been changed by some other user (system thinks so!)...   

Since it is user B who tries to bring the KF in edit mode by a macro, system ideally has to lock this KF for user B. But again, it is user A who is authenticated for locking all the modifiable KFs as he was the first one to have opened the data view and have already locked all the modifiable KFs. The consequence: system cannot lock this KF for user B, and hence it cannot be modified. Hence is the error: “KF not locked, data not saved”...

Well, this is fine, but the error is still alive even if only one user tries to run the macro. And here, we have the default macro coming into action. The problem exactly happening here was:


  • I run my macro - the target KF gets updated,
  • I now have to save the results - so, I click the SAVE button, and then the error appears.

So, it is while SAVing that we are facing the error - meaning, the screen is getting regenerated; and our default macro doesn't allow the KF to go in edit mode.

Well, we have come across the consulting note 1649757 which recommended us to use CELL_INPUT instead of ROW_INPUT. Unfortunately, even this didn't work and is giving below error :sad:



After analyising further, it is understood that for CELL_INPUT to work correctly, we needed a minor change in the function module /SAPAPO/ADVF_CELL_INPUT as specified in the note 1328806. But the fact is: we are already in SCM702 and this note is seen implemented !

Where is the way now? we allowed SAP to look into the same, and they asked us to use CELL_INPUT instead of ROW_INPUT by explaining the cause of the issue as because of the default macro which doesn't allow the KF to go in edit mode.

I have finally tried to see only with the function written in the macro with no extra arithmetic.


And this is giving something as below:


I changed for CELL_INPUT( 1 ) in the above macro, and the error changes accordingly.

Finally, SAP has come back saying CELL_INPUT works correctly only with KF type being INPUT/OUTPUT - what we had is OUTPUT type KFs... hence was the problem - thanks to SAP :smile:

Labels in this area