Application Development and Automation 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: 
Read only

Modifying batch characteristics value

Former Member
0 Likes
621

Dear Experts,

We have created batch characteristics named 'POTENCY','LOD','ASSAY'.

Now the value of POTENCY is calculated based on the formula, that is LOD * ASSAY. There are chances that the value is sometimes calculated more than 100%. Now I want to put a restriction that if the value increases more than 100 than the value of POTENCY should be automatically be 100.

What should I do to resolve this issue.

NOTE - POINTS WILL BE REWARDED.......

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
512

Hello,

You can write a specific FM called by the configurator (procedure which call a user FM). Input are your LOD andd ASSAY, output is POTENCY. Inside you can write your formula.

Parameters are given by std tables.

This is sample :

FUNCTION zsca_calcul.

*"----

-


*" IMPORTING

*" VALUE(GLOBALS) TYPE CUOV_00

*" TABLES

*" MATCH STRUCTURE CUOV_01

*" QUERY STRUCTURE CUOV_01

*" EXCEPTIONS

*" FAIL

*" INTERNAL_ERROR

*"----

-


************************************************************************

  • DATA : w_met_cmin_r LIKE cuov_01-atflv.

CLEAR : w_matnr_paracheve, w_instance .

BREAK-POINT.

  • lecture des données en entrée dans la table query

LOOP AT query WHERE atcio = 'I'. "input parameter

  • vérification type num

IF query-atfor NE 'CHAR'.

MESSAGE ID 'ZSCA_CONFIGURATEUR' TYPE 'W' NUMBER '000' RAISING fail

.

ENDIF.

CASE query-varnam.

WHEN 'MET_NUMART_MLAZ'. ' my single input characteristic

w_matnr_paracheve = query-atwrt.

PERFORM lire_mara. ' process the input parameter

PERFORM lire_carac.

WHEN OTHERS..

MESSAGE ID 'ZSCA_CONFIGURATEUR' TYPE 'W' NUMBER '000' RAISING fail.

ENDCASE.

ENDLOOP.

  • update of the output characteristic MET_CODEMAT (it is numeric and contains value 9

READ TABLE query WITH KEY varnam = 'MET_CODEMAT'.

match = query.

match-atfor = 'NUM'.

match-atflv = 9.

APPEND match.

ENDFUNCTION.

Regards.

3 REPLIES 3
Read only

Former Member
0 Likes
513

Hello,

You can write a specific FM called by the configurator (procedure which call a user FM). Input are your LOD andd ASSAY, output is POTENCY. Inside you can write your formula.

Parameters are given by std tables.

This is sample :

FUNCTION zsca_calcul.

*"----

-


*" IMPORTING

*" VALUE(GLOBALS) TYPE CUOV_00

*" TABLES

*" MATCH STRUCTURE CUOV_01

*" QUERY STRUCTURE CUOV_01

*" EXCEPTIONS

*" FAIL

*" INTERNAL_ERROR

*"----

-


************************************************************************

  • DATA : w_met_cmin_r LIKE cuov_01-atflv.

CLEAR : w_matnr_paracheve, w_instance .

BREAK-POINT.

  • lecture des données en entrée dans la table query

LOOP AT query WHERE atcio = 'I'. "input parameter

  • vérification type num

IF query-atfor NE 'CHAR'.

MESSAGE ID 'ZSCA_CONFIGURATEUR' TYPE 'W' NUMBER '000' RAISING fail

.

ENDIF.

CASE query-varnam.

WHEN 'MET_NUMART_MLAZ'. ' my single input characteristic

w_matnr_paracheve = query-atwrt.

PERFORM lire_mara. ' process the input parameter

PERFORM lire_carac.

WHEN OTHERS..

MESSAGE ID 'ZSCA_CONFIGURATEUR' TYPE 'W' NUMBER '000' RAISING fail.

ENDCASE.

ENDLOOP.

  • update of the output characteristic MET_CODEMAT (it is numeric and contains value 9

READ TABLE query WITH KEY varnam = 'MET_CODEMAT'.

match = query.

match-atfor = 'NUM'.

match-atflv = 9.

APPEND match.

ENDFUNCTION.

Regards.

Read only

0 Likes
512

Dear Lazli,

Thanks for the reply.

My problem is my input characteristics value is Potency & my output characteristics is also Potency.

Please help us

Regards

Ashish

Read only

Former Member
0 Likes
512

hi