cancel
Showing results for 
Search instead for 
Did you mean: 

VF04 User exits for validating if user selected right combination

Former Member
0 Kudos

Dear Friends,

I am using VF04 transaction to create collective invoice from sales orders. (Order Related Invoice)

there is a functionality of creating two sales order after done a job

like wise we have multiple jobs, each job has two sales orders.

here, user is confusing which sales orders he has to select and process, for this i am looking for a user exit to validate if the user is selected two sales orders, whether he has selected rightly or , system has to pop up a error message

Please advice me

Regards,

Pratheep

Accepted Solutions (0)

Answers (3)

Answers (3)

Hi Pratheep

With VF04/VF06 the system uses function module SD_COLLECTIVE_RUN_EXECUTE.
If you go to this function module in SE37 you will see there are 2 user exits which can be used
to handle how the documents are processed (MAX_DOCs) and the sorting order that the billing

due entries are processed. ( EXIT_SAPLV60P_009 & EXIT_SAPLV60P_010)

These will provide you with the possibility to arrange the documents internally so that they would be processed in your preferred order by RV_INVOICE_CREATE.

Hope it helps you further
Kind regards
Brian 

Former Member
0 Kudos

Thanks Brain, let me try this possibility and update you

Regards,

Pratheep

Lakshmipathi
Active Contributor
0 Kudos

There is no specific user exit for VF04.  Moreover, you have not explained on what logic, you are going to validate.  Probably, you can try with USEREXIT_FILL_VBRK_VBRP in program RV60AFZC

G. Lakshmipathi

Former Member
0 Kudos

Dear G. Lakshmipathi


Thanks for your advice


A Job has two sales orders


Example


I have two Jobs, 

Job-225 has two sales orders are 100001 &100002

Job -226 has two sales orders are 100003 & 100004


in actual scenario, business wants to combine two sales orders into one invoice since two sales orders belong to one Job


If user has selected 100001 & 100004 and click collective invoice , then it is wrong


for this purpose i want give a validation on this process


NOTE : Job is nothing but the Pre-sales order, which calculate some estimation and pass that values into sales order through BAPI


Please advice me


Regards,

Pratheep

Former Member
0 Kudos

Hi,

try to see if you can do it throught copy controls and split logic.

BR

Shiva_Ram
Active Contributor
0 Kudos

Check OSS 63523 - User exits for billing index as of Release 3.1G

Per this note, you can check with user exit EXIT_SAPLV05I_001 (billing index for order reference)

Regards,

naveen_kaluti
Active Participant
0 Kudos

Hello Pratheep,

What is the difference between the 2 jobs?

Like are they run separately for different customer? and is the job number stored in order some were?

If run for different customer number then system will automatically split the invoice, as you can not generate a single invoice for different customers.

If there is no difference between the orders of different job, then add a custom filed in the order which will store the job number and develop a copy control routine which will split invoices based on this job number. Assign the custom routine as stated below

You can add the routine in the field Data VBRK/VBRP in copy control.

Regards,

Naveen K.

Former Member
0 Kudos

Dear Naveen,

thanks for the update

please find the details of the job

the material and the quantity which the sales order going to accommodate is based on the job calculation

so each job consist of two two different categorization , that is taken care by two sales orders

Like wise one customer can have multiple job and respective sales orders

to invoice, i have to select the appropriate two sales orders which belong to Job

so , in split criteria, is it possible to create a new routine with the job number as a criteria

your help is appreciated

Regards,

Pratheep

naveen_kaluti
Active Participant
0 Kudos

Hello Pratheep,

Yes it is provided you have the job number stored in you sales order in a custom field.

One more question, how frequent is this job run? if daily all the sales order should have same billing date, in this case you can split based on billing date without any customization.

Regards,

Naveen K.

Former Member
0 Kudos

Yes Naveen, there are 10 jobs can be performed a day , So 20 sales orders will be there at VF04, while selecting two sales orders, i should not be select two sales orders which belong to two different jobs at any cost

Regards,

Pratheep

naveen_kaluti
Active Participant
0 Kudos

Hello Pratheep,

In this case you can go ahead with my initial solution of adding a custom filed in the order which will capture the job number (hope each job run has a unique identification number) and develop a custom routine which will split or combine the sales order during invoice generation based on the job number.

Please try it and let us know if it works.

Regards,

Naveen K.

naveen_kaluti
Active Participant
0 Kudos

Hello Pratheep,

A quick question, how do you identify which order is from which job?

If there is something by which you can already identify then you can use that in the logic while coding for copy control routine, instead of adding a new custom field at order level.

Regards,

Naveen K.

Former Member
0 Kudos

Hi

you can include your validations in include V05HZZMO (run SE38 program LV05HFMO and double click on perform move_userfields).

Regards,

JM