‎2008 Mar 15 10:31 PM
Hey,
Need to make a correction to FBL5n so that when details are displayed the fields bkpf-xref1_hd and bkpf-xref2_hd are populated with values from vbrp for sales order no and delivery no (vbrp-aubel and vbrp-vgbel).
For this purpose I used exit_saplv60B_001 and include ZXVVF01.
the code is:
&----
*& Include ZXVVFU01
&----
data: XREF1_HD LIKE vbrp-aubel,
XREF2_HD LIKE vbrp-vgbel,
XBELNR LIKE XACCIT-BELNR,
XAUBEL LIKE VBRP-AUBEL,
vbeln like vbrk-vbeln.
SELECT AUBEL VGBEL FROM VBRP INTO (xREF1_HD , XREF2_HD) WHERE vbeln ne ' '.
IF XREF1_HD ne ' '.
MOVE xaubel TO XREF1_HD.
ENDIF.
ENDSELECT.
exit.
I have not completed the code as I was tesitng whether or not the data was populated in the first field.
What I need to know is 1) am I using the correct user exit and 2) does my code look alright?
Thx for the help
Ryan
‎2008 Mar 16 5:30 AM
Hi,
(1) am I using the correct user exit
**********************************************
I believe the exit used may not suit your purpose since the export/import /tables parameter does not directly map to the fields you require(just a guess) but please do the following to confirm the same
(a) put a break point and see if the exit is triggered at the pbo after the transaction is called so that the select query can fetch data and pass it to the required fields
2) does my code look alright
***************************************
Please do the following
(a)Always try to pass the maximum key fields to the selecting table
(b)Avoid select---endselect
reward if useful
Regards
Byju
‎2008 May 30 9:53 AM
Hi Byju
the value is being read from the user exit to the invoice but just not all invoice types. As I mentioned it works as supposed if I carry out a Z2 invoice but not when its a F2 invoice.
Why not use select - endselect statement?
Ryan
‎2008 Mar 17 9:30 AM
Hi,
First once you have decided upon using a User exit, please check whether this particular Enhancement is getting triggered for the Transaction being used for.
Once you have ensured that, the User Exit is correct, then check in the "Import" parameters, what values you were getting inside the Function Module Exit. ( this may to be use a particular value from the transaction input values, for your Business Logic ).
Then, write your Business logic statement and retrieve data and then, you use some checking options for the the fields for the Validation purposes.
Please check with the above and let me know how it worked for you now.
Thanks,
Vishnu.
‎2008 May 30 9:59 AM
>
> First once you have decided upon using a User exit, please check whether this particular Enhancement is getting triggered for the Transaction being used for.
Hi Vishnu
How does one check for the transactions attached to the enhancements?
It works with VF01 but only if I create a Z2 invoice. If F2 then it does not work.
Via VF04 it creates F2 invoices and thus user exit is for some reason not performed.
Ryan
‎2008 Dec 09 10:36 AM