cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Custom fields for flexible billing document numbering doesn't work

rickarda
Explorer
0 Kudos
2,673

We are implementing SAP S/4HANA 2020FPS02 and want to use Flexible Billing Document Numbering using Configurable Parameters and Formulas (CPF) to Implement Flexible Billing Document Numbering.

Using SAP delivered parameters, Sales org and Billing document type, it all works very well. We do however want to add a custom field but cant get it to work. The help text in SPRO says:

Before you can add a custom field to the parameter catalog, the custom field must exist in the extensibility business context Sales: Billing Document. Developers can create custom fields for all business contexts in the Custom Fields and Logic app. For more information, search for 'Custom Fields and Logic' in the relevant version of SAP S/4HANA on SAP Help Portal.

SAP Help portal: Custom Fields and Logic and How to create custom fields.

The field we want to add is Destination Country/Region.

The field is created in Custom Fields and Logic app. It is set up as text field, 3 chars long. This is the published.

Then in SPRO, it is added in the CPF Parameter Catalog as Referensed Data Type = LLAND - Data Element.

Then a formula is configured.

The following decision table is set up. The idea is that all invoices for destination country IN gets its own number range, and the rest gets another. We cant however not get that to work. What happens is that even invoices with Destination country IN gets number range assigned as per the last step. We have tried changing the sequence, changing the priority but we cant get the new field, Destination country, to have any impact.

What are we doing wrong and how do we fix it?

Accepted Solutions (0)

Answers (3)

Answers (3)

rickarda
Explorer
0 Kudos

After additional analysis, we discovered we didn't populate the new field properly. (The Fiori app for creating fields only add the field in the structure, populating it requires development.)

We added code on FORM USEREXIT_FILL_VBRK_VBRP in RV60AFZC to populate the new field and then number range determination using the new field works. Final solution might be to use a BADI but now we at least understand all steps required.

pranaw1987
Newcomer
0 Kudos

Hi Rickard, we you able to fix this issue? How did you achieve this. I am facing exactly the same issue.

Looking forward to your reply. Thanks

rickarda
Explorer
0 Kudos

Hi pranaw1987,

I dont have access to check that system now but we did as per my earlier comment:

"we added code on FORM USEREXIT_FILL_VBRK_VBRP in RV60AFZC to populate the new field and then number range determination works."

As I remember it, using above exit we filled a custom field and we could then successfully include this in number range determination.

georgia1
Advisor
Advisor
0 Kudos

Hello Rickard,

did you release your transports according to the following tip in the documentation?:

Always release transports containing extensibility items, such as custom fields to be used as parameters in a CPF formula, before releasing the standard configuration transports. This prevents errors and inconsistent transports.

It is necessary to follow this guide in order for the customizing to work.

Best Regards,
Gina

rickarda
Explorer

Thanks! That is the guide we have been using. We are doing the tests in a standalone Sandbox so I didn't think release of transports was a factor on this.

I've re-done the config a few times already but I can do it again and double check that steps are followed in the right order.

Lakshmipathi
SAP Champion
SAP Champion
0 Kudos

Have a look at OSS note 3083811

rickarda
Explorer
0 Kudos

Thanks! I’ve went through the note but can’t find anything in it that solves the issue. Regardless of prefix or other settings, we can’t get custom fields to work. It always works with the fields SAP includes but any fields we add are not considered.