SAP QPRE_PREPARE_ALL_PHYS_SAMPLES Function Module for NOTRANSL: Probenermittlung und Vorbereitung der Prüfpunkte zu phys.
QPRE_PREPARE_ALL_PHYS_SAMPLES is a standard qpre prepare all phys samples SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Probenermittlung und Vorbereitung der Prüfpunkte zu phys. processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for qpre prepare all phys samples FM, simply by entering the name QPRE_PREPARE_ALL_PHYS_SAMPLES into the relevant SAP transaction such as SE37 or SE38.
Function Group: QPRE
Program Name: SAPLQPRE
Main Program: SAPLQPRE
Appliation area: Q
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function QPRE_PREPARE_ALL_PHYS_SAMPLES pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'QPRE_PREPARE_ALL_PHYS_SAMPLES'"NOTRANSL: Probenermittlung und Vorbereitung der Prüfpunkte zu phys..
EXPORTING
QALS_WA = "Inspection lot record
IMPORTING
QALS_WA_GESSTICHPR = "Sample Size
QALS_WA_LMENGEPR = "Quantity Actually Inspected
TABLES
QAMVTAB = "Characteristic Specifications
QASVTAB = "Sample specifications for inspection processing
QPPSVTAB = "DE-EN-LANG-SWITCH-NO-TRANSLATION
EXCEPTIONS
NOT_FOUND_PRNV = 1 NO_PROBTAB = 2 NO_POSTAB = 3 NO_PHYSTAB = 4 NO_QAPPTAB = 5 NUMBERS_NOT_GOT = 6 SIZES_NOT_CALCULATED = 7
IMPORTING Parameters details for QPRE_PREPARE_ALL_PHYS_SAMPLES
QALS_WA - Inspection lot record
Data type: QALSOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for QPRE_PREPARE_ALL_PHYS_SAMPLES
QALS_WA_GESSTICHPR - Sample Size
Data type: QALS-GESSTICHPROptional: No
Call by Reference: No ( called with pass by value option)
QALS_WA_LMENGEPR - Quantity Actually Inspected
Data type: QALS-LMENGEPROptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for QPRE_PREPARE_ALL_PHYS_SAMPLES
QAMVTAB - Characteristic Specifications
Data type: QAMVOptional: No
Call by Reference: No ( called with pass by value option)
QASVTAB - Sample specifications for inspection processing
Data type: QASVOptional: No
Call by Reference: No ( called with pass by value option)
QPPSVTAB - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: QPPSV_TABOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NOT_FOUND_PRNV - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_PROBTAB - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_POSTAB - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_PHYSTAB - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_QAPPTAB - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NUMBERS_NOT_GOT - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
SIZES_NOT_CALCULATED - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for QPRE_PREPARE_ALL_PHYS_SAMPLES Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lv_qals_wa | TYPE QALS, " | |||
| lt_qamvtab | TYPE STANDARD TABLE OF QAMV, " | |||
| lv_not_found_prnv | TYPE QAMV, " | |||
| lv_qals_wa_gesstichpr | TYPE QALS-GESSTICHPR, " | |||
| lt_qasvtab | TYPE STANDARD TABLE OF QASV, " | |||
| lv_no_probtab | TYPE QASV, " | |||
| lv_qals_wa_lmengepr | TYPE QALS-LMENGEPR, " | |||
| lt_qppsvtab | TYPE STANDARD TABLE OF QPPSV_TAB, " | |||
| lv_no_postab | TYPE QPPSV_TAB, " | |||
| lv_no_phystab | TYPE QPPSV_TAB, " | |||
| lv_no_qapptab | TYPE QPPSV_TAB, " | |||
| lv_numbers_not_got | TYPE QPPSV_TAB, " | |||
| lv_sizes_not_calculated | TYPE QPPSV_TAB. " |
|   CALL FUNCTION 'QPRE_PREPARE_ALL_PHYS_SAMPLES' "NOTRANSL: Probenermittlung und Vorbereitung der Prüfpunkte zu phys. |
| EXPORTING | ||
| QALS_WA | = lv_qals_wa | |
| IMPORTING | ||
| QALS_WA_GESSTICHPR | = lv_qals_wa_gesstichpr | |
| QALS_WA_LMENGEPR | = lv_qals_wa_lmengepr | |
| TABLES | ||
| QAMVTAB | = lt_qamvtab | |
| QASVTAB | = lt_qasvtab | |
| QPPSVTAB | = lt_qppsvtab | |
| EXCEPTIONS | ||
| NOT_FOUND_PRNV = 1 | ||
| NO_PROBTAB = 2 | ||
| NO_POSTAB = 3 | ||
| NO_PHYSTAB = 4 | ||
| NO_QAPPTAB = 5 | ||
| NUMBERS_NOT_GOT = 6 | ||
| SIZES_NOT_CALCULATED = 7 | ||
| . " QPRE_PREPARE_ALL_PHYS_SAMPLES | ||
ABAP code using 7.40 inline data declarations to call FM QPRE_PREPARE_ALL_PHYS_SAMPLES
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.| "SELECT single GESSTICHPR FROM QALS INTO @DATA(ld_qals_wa_gesstichpr). | ||||
| "SELECT single LMENGEPR FROM QALS INTO @DATA(ld_qals_wa_lmengepr). | ||||
Search for further information about these or an SAP related objects