Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

User exit issue

Former Member
0 Likes
1,033

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

5 REPLIES 5
Read only

Former Member
0 Likes
889

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

Read only

0 Likes
889

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

Read only

Former Member
0 Likes
889

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.

Read only

0 Likes
889

>

> 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

Read only

Former Member
0 Likes
889

NA