problem with move_field_to_vbap

Development (ABAP Development WorkBench, ABAP/4 programming)

Moderators: Snowy, thx4allthefish, YuriT, Gothmog

Post Reply
phillipm
Posts: 376
Joined: Fri Oct 25, 2002 3:54 am
Location: Lyon, France

problem with move_field_to_vbap

Post by phillipm » Mon Oct 09, 2006 9:42 am

I am using move_field_to_vbap to check item quantity. Based on my test I show a popup to require the user to chose a preset quantity from a list.
If the user modifies the quantity again, the test is performed again.
Problem is that if the user modifies the reason for rejection (ABGRU), program flow does not go through the exit again. I need this because the order may have come from EDI where, if the quantity is not a multiple as required, a rejection code is set. A user then opens order, resets rejection code, then should modify quantity. If he doesn't system lets him save anyways.
How can I force the system to go through the exit after code modification?
Any other ideas?

Thanks,

phillip
(ehm... now, a word from our sponsor...)

hognoxious
Posts: 1398
Joined: Thu Dec 04, 2003 8:16 am
Location: Stuck in a pagoda with Tricia Toyoda

Post by hognoxious » Mon Oct 09, 2006 10:05 am

One, since what you're doing is mostly checking, I'd try using userexit_check_vbap.

Two, it's possible that abgru is treated specially - it's really more of a soft delete than an approval flag. If so, look at using something else - completion, delivery block ...
How can I force the system to go through the exit after code modification?
That's generally not a good idea. Let the standard call them where it chooses, and fit your code in, not the other way round.
First he pinches my sig, Now he's cribbing my posts too!

ssii

Post by ssii » Mon Oct 09, 2006 10:07 am

why you dont use form USEREXIT_CHECK_VBAP ?

phillipm
Posts: 376
Joined: Fri Oct 25, 2002 3:54 am
Location: Lyon, France

Post by phillipm » Tue Oct 10, 2006 3:57 am

thank you both.
this exit gives me the possibility to check if the rejection code on specific document is changed and act upon this info.
Now the problem is I want to change the quantity, and I do it. But if I change the rejection code back manually, it resets the quantity too.
I change vbap and xvabp. I don't want to change yvbap as it should be the picture of record before change.
I know SAP does not encourage changing data here, but I have no alternative.
What else can I do?

hognoxious
Posts: 1398
Joined: Thu Dec 04, 2003 8:16 am
Location: Stuck in a pagoda with Tricia Toyoda

Post by hognoxious » Tue Oct 10, 2006 8:52 am

Seems strange, perhaps you're changing vbap, xvbap and ybvbap incorrectly? See oss note 178328

Is it just if you change ABGRU, or any other feild manually?
First he pinches my sig, Now he's cribbing my posts too!

phillipm
Posts: 376
Joined: Fri Oct 25, 2002 3:54 am
Location: Lyon, France

Post by phillipm » Tue Oct 10, 2006 9:50 am

Well, right now I put my routine in save_document_prepare.
There I cannot seem to update either so I am outputting a message.
That note is in my favorites on my OSS page, but I have not been able to update the quantity.
this is funny because I am sure I have done it before.
I have been on it too long so I'm moving on.

Thanks,

phillip

Rich
Posts: 7116
Joined: Thu Oct 31, 2002 4:47 pm
Location: Liverpool
Contact:

Re: problem with move_field_to_vbap

Post by Rich » Tue Jun 10, 2008 5:17 am

You may support his view, but since the post is almost 2 years old I would think he doesn't give two figs for your opinion. Neither do we. If you want to support someones opinion, at least stop being a prat and support current posts.
Regards

Rich

Image
Abap KC:http://www.richard-harper.me.uk/Kb
SFMDR:http://www.se37.com

m@t
Posts: 4119
Joined: Thu Sep 04, 2003 7:37 am
Location: Switzerland

Re: problem with move_field_to_vbap

Post by m@t » Tue Jun 10, 2008 9:13 am

TULY Image The quality of answers is roughly proportional to the quality of the question.

The downside of being better than everyone else is that people tend to assume you're pretentious.

abap_doctor
Posts: 6955
Joined: Thu Mar 25, 2004 11:29 am
Location: Airstrip One

Re: problem with move_field_to_vbap

Post by abap_doctor » Tue Jun 10, 2008 9:25 am

Rogue post deleted.... :twisted:
The Doc
Tuly Idiot Magna Grand Docot Image

Post Reply