Skip to Content
0

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

Nov 27, 2016 at 03:56 AM

418

avatar image

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)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

5 Answers

Phanikumar Valiveti Nov 28, 2016 at 06:05 AM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded

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.

1
Jelena Perfiljeva
Nov 28, 2016 at 10:26 PM
0

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.

Show 3 Share
10 |10000 characters needed characters left characters exceeded

Hello Jelena!

Thank you for your reply!

I am currently using Function Module VC_I_GET_CONFIGURATION_IBASE to get the configuration from database, I need to find an internal table at runtime to compare it with.

0
Ricardo Resendiz Martinez

Debugger does not show the internal tables available at runtime?

0

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!

0
Phanikumar Valiveti Nov 29, 2016 at 04:27 AM
0

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

Show 4 Share
10 |10000 characters needed characters left characters exceeded

Hello Phanikumar!

If Sales Order is Canceled or Closed (VBAP-ABGRU = '07' or '08') changes to data shall be avoided.

Currently I am able to identify changes to XVBAP (Sales Order Item) and XKOMV (Pricing Conditions) successfully.

I am using Function Module VC_I_GET_CONFIGURATION_IBASE to get the "Item Details: Configuration" from database but I hadn't find any internal table at runtime to compare with.

0
Ricardo Resendiz Martinez

But what business purpose would this serve? If something is rejected then it's not going anywhere anyway. Why is it important to restrict specific changes? And what if someone just picks a different rejection reason? Then it's OK to make changes? Why? We use pricing conditions and VC and such requirement never even came up. IMHO your business is unnecessarily overcomplicating the process. I honestly don't see any logic or value added here.

0

Hello Jelena!

Even when the Sales Order is Canceled or Closed the users can still changing data. This is an issue because we have an interface which is receiving this data changes. I know we can do validations in the interface but unfortunately the Business insist in doing all validations in SAP side.

Thank you for your reply!

0
Ricardo Resendiz Martinez

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.

1
Kivanc Bilgin Nov 29, 2016 at 07:07 PM
0

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.

Share
10 |10000 characters needed characters left characters exceeded
Phanikumar Valiveti Dec 02, 2016 at 05:57 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded