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

Problem in VF01 Exit.

Former Member
0 Likes
799

Hi all,

Requirement:

If billing date is > PGI date, otherwise not allow to post the document within same fiscal period.

I know that the user-exit : USEREXIT_FILL_VBRK_VBRP can let me to check the billing date.

But if i output the error message, it just hold on the screen and not allow user to input again.

Can anybody know that and better method that i can allow user to input the correct billing date?

Regards,

Luke

Hi all,

Requirement:

If billing date is > PGI date, otherwise not allow to post the document within same fiscal period.

I know that the user-exit : USEREXIT_FILL_VBRK_VBRP can let me to check the billing date.

But if i output the error message, it just hold on the screen and not allow user to input again.

Can anybody know that and better method that i can allow user to input the correct billing date?

Regards,

Luke

4 REPLIES 4
Read only

Former Member
0 Likes
717

Hi All,

Is it any new method to do this?

Regards,

Luke

Read only

Tamas_Hoznek
Product and Topic Expert
Product and Topic Expert
0 Likes
717

You could implement the BAdI BADI_SD_BILLING.

This has a method called INVOICE_DOCUMENT_CHECK. You can perform your validation there and issue a message if necessary (if error causes problem, try an 'S'-type message). Then set the CHANGING parameter FBAD_DATA to 'X'.

Read only

brad_bohn
Active Contributor
0 Likes
717

Your requirement isn't very clear other than wanting to change the date at billing time. This isn't a very effective approach, especially in scenarios where the billing due list is involved. You can set an initial billing date in the order at the header or item level and carry that over via delivery and billing copy control. However, SAP is still going to override the date at PGI time so you can use the delivery BADI to reset the date. You can detect the PGI and set the correct date (from the order or using some logic of your own) in IF_EX_LE_SHP_DELIVERY_PROC~SAVE_DOCUMENT_PREPARE. This would be a better approach than stopping the invoice create process with a hard error every time.

You might also consider a billing copy requirement if you need some additional logic to stop deliveries from billing on certain dates.

BADI_SD_BILLING is for internal use only - it mostly mirrors the existing user exits...

Read only

Former Member
0 Likes
717

Hi,

Could you mind give more explicit solution to me? Because i 'm not the expert in the Business Add-in?

Regards,

Luke