Skip to Content
avatar image
Former Member

VA02: How can I get "Item Details: Configuration" and "Item Batch determination"?

Requirement: To validate changes to Sales Order. Find any change done to the Sales Order before saving (using User Exit: USEREXIT_SAVE_DOCUMENT_PREPARE).

Current approach: I am comparing runtime structure XVBAP with data from VBAP (Item data), and runtime structure XKOMV with data from Function Module RV_KONV_SELECT (Pricing Conditions). Both comparisons are working as expected.

Question: How can I get "Item Details: Configuration" and "Item Batch determination"? (Please look at the screenshot for highlighted buttons). I need both runtime (screen) and database data in order to compare them. I need to detect any change done.

Thank you in advance!

va02.jpg (120.5 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Nov 28, 2016 at 06:05 AM

    Have you tried Standard Program RVSCD100.(VA02>>ENTER>>Environment>>Changes)

    Can you please tell us why you want to track the changes related Item: Configuration & Batch determinations..(business reasons/issues if any)

    Phanikumar

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello Phanikumar!

      Thank you for your suggestion!

      Unfortunately, Program RVSCD100 provides the changes after Document was saved and we need them before saving.

      The user wants to block all changes if certain conditions around VBAP-ABGRU (Reason for rejection) are met. That's why we need to identify the changes at runtime.

  • Nov 28, 2016 at 10:26 PM

    You need a function to read VC data. Google -> "function module variant configuration site:sap.com" -> https://archive.sap.com/discussions/thread/506254

    We don't use batches so can't speak to that, but I guess Google can find that too. There is batch ID field in VBAP. In the debugger we can easily see what data is available in a specific user exit.

    You might also want to look into other user exits (e.g. USEREXIT_CONFIGURATION_MODE in MV45AFZF) or even some totally different functionality (e.g. user status) based on what exactly you're trying to achieve.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Jelena Perfiljeva

      Hello Jelena!

      It does, but I hadn't been able to find any iternal table with the same data I am getting from Function Module VC_I_GET_CONFIGURATION_IBASE in order to compare them.

      Thank you for your reply!

  • Nov 29, 2016 at 04:27 AM

    Oh-Sorry-I missed the first two lines.Thank you for correcting me.

    Small suggestion-why we cant make the effecting fields into display mode rather than changing all the standard FMs.

    Also Can you give us more insight on **The user wants to block all changes if certain conditions around VBAP-ABGRU (Reason for rejection) are met**-What are those conditions (business reasons)- can give us better clarity here.

    Phanikumar

    Add comment
    10|10000 characters needed characters exceeded

    • This is a very wrong approach. It should be done in the interface. And it should not be business decision, it's for IT to decide specific implementation. Adding IF... condition in the interface would take a lot less time and effort then inventing this custom code as you're trying to do. I'd suggest to take this up with the IT management.

  • Nov 29, 2016 at 07:07 PM

    You've already gotten your answer from Jelena; take a look at Mv45afzf where you can disable configuration, which is much easier than trying to conpare runtime values of configuration to char values of instance in the database.

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 02, 2016 at 05:57 AM

    Why changing standard FMs -instead restrict the user completely in VA02.

    Once a sales order saved with some rejection key store this into one custom table in USEREXIT_SAVE_DOCUMENT.(SO number, rejection key etc as example columns) in MV45AFZZ.

    If user trying to change this order through VA02-just simply restrict this- with this custom table comparisons in USEREXIT_READ_DOCUMENT.

    We also have the problem like this at our client. In brief-sharing our process for better clarity:

    Once SO saved -a CSV will go to BCIL Central server(for some specific materials only). From BCIL central server will reach the respective local server based on the Plant code in SO level-Once a godown user sees this order in HHT gun-Completes scanning-will save this order in HHT gun-a return file will come back to ECC server with this scanned details & delivery will be created.(We are using Customized RFCs here)-So while saving the delivery we will save this SO number & delivery number into a custom table. we observed that user is changing this SO again after delivery creations-so mismatch between return order and Barcode scanning.So We used the above exit to restrict the changes at Return order.

    Hope this helps.

    Phanikumar

    Add comment
    10|10000 characters needed characters exceeded