cancel
Showing results for 
Search instead for 
Did you mean: 

How does open_values[] get populated in FM MCV_STATISTICS_ORDER?

0 Kudos

When saving an order in tcode VA02, include MV45AF0Z_ZAHLUNGSKARTEN_AUTHOR executes form OFFENE_WERTE_ERMITTELN which executes function module MCV_STATISTICS_ORDER.

For most sales orders, itab open_values[] gets populated after FM MCV_STATISTICS_ORDER runs. But we're encountering a problem where open_values[] isn't getting populated here and this is preventing the updated sales order from authorizing in VA02.

The issue is open_values[] is not imported or exported to the FM, so I don't see how it is getting populated. When I debug and step into FM MCV_STATISTICS_ORDER, the open_values[] variable is not in scope, it shouldn't even be able to get populated because the debugger doesn't think its exists inside the FM.

Does anyone have experience with this? My only guess is there is a reference variable pointing to it somehow but looking at the global data I don't see anything. Been stuck on this for a week and no clue where to look next.

One thing i'm slightly leaning towards is the credit control area of the sales order with an empty open_values[] does not exist in table S066. The credit control area of the sales orders that have a populated open_values[] and that authorize when saving in VA02 do exist in S066 I'm not sure what not existing in S066 means or if i'm shooting in the dark but this is my only lead right now.

This is how form OFFENE_WERTE_ERMITTELN calls fm MCV_STATISTICS_ORDER, open_values[] is not exported or imported here so not sure how it gets populated:

CALL FUNCTION 'MCV_STATISTICS_ORDER'
EXPORTING TRTYP = T180-TRTYP
XVBAK = VBAK
YVBAK = YVBAK
XVBAK_UPDKZ = XVBAK_UPDKZ
YVBAK_UPDKZ = YVBAK_UPDKZ
MODUS = CON_MODUS_SIM "Simulation
SPROG = MCCONTROL-SPROG
SROUT = MCCONTROL-SROUT "Default 'OUT_S132'
POSITION = CHARX
TABLES XKOMV = XKOMV
XVBAP = XVBAP
XVBEP = XVBEP
XVBKD = XVBKD
XVBPA = XVBPA
XVBFA = XVBFA
XVBUK = XVBUK
XVBUP = XVBUP
YVBAP = YVBAP
YVBEP = YVBEP
YVBKD = YVBKD
YVBPA = YVBPA
YVBFA = YVBFA
YVBUK = YVBUK
YVBUP = YVBUP
VBAPF = XVBAPF
MCINF = MCINF
XFPLA = XFPLA
YFPLA = YFPLA
XFPLT = XFPLT
YFPLT = YFPLT.
View Entire Topic
prakashjasti
Contributor
0 Kudos

Hi Isaac,

These info structures will get updated based on the configuration done as per requirement.

From the above this seem to be an issue with authorization of user for credit control area.

Please check with security team once.

Thanks,

Prakash.

0 Kudos

Thanks for the response!

What configurations do we need to add to make these structures update? Are these SPRO configurations?

There are users who have access to the credit control area who are still having this problem, but I will double check with my security team