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

Add Custom Function Module in Tcode VF01

Former Member
0 Likes
995

Hi All,

As per my requirement, I need to develop a FM XX with Inputs either SHIPMENT NUMBER or INVOICE NUMER. Using this I need to generate a FILE which needs to be sent to the other system. I have developed the FM which captures all the details of either SHIPMENT NUMBER or INVOICE NUMER.

For shipment I am aware where to call the FM. i.e. 'BAPI_SHIPMENT_CREATE' 'BAPI_TRANSACTION_COMMIT' FM 'XX'

But for the Invoice am unable to find user exit or BADI when billing document is saved in the standard tables. The T-Code is VF01 and VF04. We need to call the FM once the invoice is created as invoice will be input for my FM.

Please advise..

Regards,

Hari

6 REPLIES 6
Read only

eduardo_hinojosa
Active Contributor
0 Likes
916

Hi

Check Note 301077 - User exits for the interface to accounting. For this enhancements you have the VBELN number in invoice document.

Regards

Eduardo

Read only

0 Likes
916

Thanks for your information.

But it would be great if you can expain it in detail.

BR,

Hari

Read only

0 Likes
916

Hi

For instance, as I think that you can that it will be called once by invoice, try with EXIT_SAPLV60B_008 or EXIT_SAPLV60B_001 (if you use other related with items and the document have more than 1 item, you could call your FM more than once). For instance, in EXIT_SAPLV60B_008 you must have CVBRK-VBELN the number of invoice. I suggest to set a break-point to check the number of times that the exit is called. Other good pratice is call this type of functions with option IN UPDATE TASK, if it's possible.

I hope this helps you

REgards

Eduardo

Read only

brad_bohn
Active Contributor
0 Likes
916

Why don't you do that with output determination? You don't need (and shouldn't use) a user exit for that. You can do that with IDOC/ALE processing to a file port (even in a non-IDOC file format) or you can do that with the special processing mode...

Read only

Former Member
0 Likes
916

Thanks !!!

But if we have output type for this, we need to maintain output type record for customers that one BIG disadvantage...

BR,

Hari

Read only

brad_bohn
Active Contributor
0 Likes
916

Why is that a "BIG" disadvantage? That's exactly what output determination is there for. It's not true that you need to maintain a record. You don't need to maintain records at all if you're doing it for all customers OR you can maintain a single condition record that is non-customer specific. I would opt for using a field that allows you to turn on/off the functionality easily.