Application Development 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: 

QM : qualitative characteristic

michael_teran
Participant
0 Kudos

Hi all.

I want to save the result of a qualitative characteristic, but this results depends of others characteristics.

I cann`t use a formula, how can I save this value??

thanks

1 REPLY 1

Former Member
0 Kudos

Hi Michael,

Please chek the code below.It was posted in another thread.

FUNCTION z_zqdb_qpmk_read_vers_plant_86.
*"----------------------------------------------------------------------
""Lokale Schnittstelle:
*" IMPORTING
*" VALUE(I_MKMNR) LIKE QPMK-MKMNR
*" EXPORTING
*" VALUE(E_QPMK) LIKE QPMK STRUCTURE QPMK
*" EXCEPTIONS
*" NO_ENTRY
*"----------------------------------------------------------------------

DATA:
l_qpmk_tab LIKE qpmk OCCURS 0 WITH HEADER LINE.

*-- QPMK lesen
LOOP AT g_qpmk_tab
WHERE mkmnr EQ i_mkmnr.
MOVE g_qpmk_tab TO e_qpmk.
ENDLOOP .

IF sy-subrc NE 0.
*-- ... dann DB-Zugriff

SELECT * FROM qpmk INTO TABLE l_qpmk_tab
WHERE mkmnr EQ i_mkmnr
AND loekz = '2' "nur freigegebene PMK's
AND gueltigab <= sy-datum
ORDER BY version DESCENDING.

IF sy-subrc EQ 0.

READ TABLE l_qpmk_tab INDEX 1.
IF sy-subrc EQ 0.
MOVE l_qpmk_tab TO g_qpmk_tab.
APPEND g_qpmk_tab.
MOVE g_qpmk_tab TO e_qpmk.
ENDIF.
ELSE.
RAISE no_entry.
ENDIF.
ENDIF.
ENDFUNCTION.

and in the coding:
MOVE wa_qpmk-steuerkz TO wa_qmkst.
wa_inspcharacteristic-quantitative_ind = wa_qmkst-quantitat.
****if it is 'X' then it is quantitative else it is qualitative.