on 2023 Apr 18 9:25 AM
I need to check if QPRS table is getting filled at runtime when inspection lot is created. How can this be done? I am using RQDSES20 program which is used to trigger standard form. My requirement is if QPRS table has data, trigger custom form else trigger standard form. At which point or How can I check if QPRS table has data. Is there any structure that's being filled ? Any help is appreciated.
Dear Diana Cath,
thank you for the details provided.
I have done a check with transaction QA01. Please see the call stack, with a possible "entry point":
16 FORM QPRS_SICHERN SAPLQPRS LQPRSF20 518
15 FORM QPRS_INSERT SAPLQPRS LQPRSF10 610
14 FUNCTION QPRS_MASTER_SAMPLE_CREATE SAPLQPRS LQPRSU02 179
...
*-- Versorgen des Probenstammsatzes mit Customer-Include Feldern
CALL CUSTOMER-FUNCTION '008'
EXPORTING
i_qals = qals
i_qprn = qprn
i_qprs = qprs
IMPORTING
e_qprs_cust = l_qprs_cust
e_active = l_x_active.
IF NOT l_x_active IS INITIAL.
MOVE-CORRESPONDING l_qprs_cust TO qprs.
ENDIF.
*-- Probe anlegen
PERFORM qprs_insert.
...
13 FORM PHYS_PROBEN_ANLEGEN SAPLQPRE LQPREF10 262
12 FUNCTION QPRE_PREPARE_ALL_PHYS_SAMPLES SAPLQPRE LQPREU01 300
11 FORM PRUEFPUNKTE_PROBEN_VORBEREITEN SAPLQEEV LQEEVF10 394
10 FUNCTION QEEV_TABLES_GENERATE SAPLQEEV LQEEVU01 423
9 FORM MERKMALSSAETZE_ANLEGEN SAPLQPL1 LQPL1F12 92
8 FORM ST_RECHNE_571 SAPLQPL1 LQPL1F1L 21
7 FORM OK_PROBENBERECHNUNG SAPLQPL1 LQPL1F1W 21
6 FORM FCODE_BEARBEITEN SAPLV00F LV00FF0F 92
5 FUNCTION SCREEN_SEQUENCE_CONTROL SAPLV00F LV00FU02 44
4 FORM FCODE SAPLQPL1 LQPL1F2D 66
3 MODULE (PAI) FCODE SAPLQPL1 LQPL1I0P 9
2 PAI SCREEN 0200 SAPLQPL1 38
1 TRANSACTION QA01(QA01) 0
The table QPRS is prepared for later commit at stack level 16, but at stack level 14 there is a user exit, QPRS is known there already. You might check, whether this exit or any of the above stack levels can be utilized in your business scenario.
The exit details:
Enhancement QPRS0005
Function module EXIT_SAPLQPRS_008.
Remark: Above scenario is for automatic sample creation.
Have a nice day,
Albert
***
Read and follow the 'SAP Community Rules of Engagement' at
https://www.sap.com/community/about/rules-of-engagement.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Diana,
above code is triggered before the save, during task list assignment/sample calculation.
But data is there in the buffers before save. Whether any stack levels above can be utilized in your development process, it needs to be checked with the developers. I have not seen a similar request before, therefore, I could only search for you the place, where the QPRS is already known.
If you need a point, where the QPRS entry is already in the database, you need to find something after the COMMIT WORK (update module: QPRB_SAMPLE_DRAW_POST).
Have a nice day,
Albert
User | Count |
---|---|
113 | |
8 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.