cancel
Showing results for 
Search instead for 
Did you mean: 

Formula in Sample drawing procedure

SAPSupport
Employee
Employee
0 Kudos

We are using formula in Sample drawing procedure Master data to calculate the number of samples. We are facing following issues:
1.Unable to maintain formula if the length is more than 60 characters. Do we have any solution available?
2.Unable to use "Round up" arithmetic function in formula. For example, if the square root of 5 is 2.23 business would like to round up to 3. We didn't see such option available now. Please let us know if there is any solution available to use "Round up" function in SAP.


------------------------------------------------------------------------------------------------------------------------------------------------
Learn more about the SAP Support user and program here.

Accepted Solutions (1)

Accepted Solutions (1)

SAPSupport
Employee
Employee

Hi,

thank you for the details provided.

1.)

The field is QPRVP-FORMEL1 (Formula Field for the Number of Samples). It has reference to:

Data element QFORMELP and Domain QFORMEL. It have fix length: 60. It cannot be changed in the standard.

If you wish to influence SAP Software Development, check the possibilities in SAP Note 11.

A part from the documentation of the field:

"Formula Field for the Number of Samples

Use
Enter a formula in this field to calculate the number of samples. The formula is evaluated in the following places using the SAP formula interpreter:
- In the sample-drawing procedure for syntactical correctness
- At lot creation, if the number of material samples has to be calculated

..."

For the 2nd item (lot creation), see code section below.

- Call stack:
13 FUNCTION QPRE_GET_NUMBERS_FOR_SAMPTAB SAPLQPRE LQPREU04 100
12 FUNCTION QPRE_PREPARE_ALL_PHYS_SAMPLES SAPLQPRE LQPREU01 218
...

- Code:
...
IF NOT L_POS_WA-POS-FORMEL1 IS INITIAL.
* nach Formel
CALL FUNCTION 'EVAL_FORMULA'
EXPORTING
...

***

Nevertheless, it worth to take a look at exit EXIT_SAPLQEEV_001 of enhancement QEEV0001 too. Its documentation:
"The function module EXIT_SAPLQEEV_002 used in this enhancement (user exit '001') is called up in the module QEEV_TABLES_GENERATE. With this module, the system creates inspection characteristics for an inspection lot during the lot creation process.

The function module EXIT_SAPLQEEV_001 is called after the samples for the individual inspection characteristics have been calculated.

Note
Changes in the table for the inspection operation records (T_QAPO_TAB) are not saved in the database."

2.)

Please see the details in KBA

2991022.

Have a nice day,

SAP Support

Answers (1)

Answers (1)

AlbertSAP
Advisor
Advisor

Hi,

here are the link for the documents referred above:

SAP Note:

11 - Would you like to shape & influence future releases of SAP Products?

KBA:

2991022 - Number of samples calculated incorrectly using formula in sample-drawing procedure

I wish you a nice day too,
Albert
***
Read and follow the 'SAP Community Rules of Engagement' at
https://www.sap.com/community/about/rules-of-engagement.html