on 03-25-2013 3:16 AM
Summary
1. Created new condition record ZPMF
2. Added new Requirement Routine 996
*DATA : lt_komfkko LIKE komv OCCURS 1000 WITH HEADER LINE.
data : xkomv TYPE TABLE OF komv,
wa_xkomv LIKE LINE OF xkomv.
data : wa_amt_pi01 type kbetr, "kwert.
wa_amt_ypi1 type kbetr, "kwert
wa_amt_zpml type kbetr, "kwert
* wa_amt_zpmf type kbetr,
wa_amt_both type kbetr, "kwert
wa_rec_exist type i.
clear : wa_rec_exist.
loop at tkomv into wa_xkomv where kschl eq 'PI01' or kschl eq 'YPI1' or kschl eq 'ZPML'. "'ZPML'.
wa_rec_exist = wa_rec_exist + 1.
if wa_xkomv-kschl eq 'PI01'.
wa_amt_pi01 = wa_xkomv-kbetr. "kwert.
elseif wa_xkomv-kschl eq 'YPI1'.
wa_amt_ypi1 = wa_xkomv-kbetr. "kwert.
elseif wa_xkomv-kschl eq 'ZPML'.
wa_amt_zpml = wa_xkomv-kbetr. "kwert.
* wa_amt_zpmf = wa_xkomv-kbetr. "kwert.
endif.
endloop.
if wa_rec_exist ne '0'. "record exist
* sy-subrc = 0.
wa_amt_both = wa_amt_pi01 + wa_amt_ypi1.
if wa_amt_zpml le wa_amt_both.
sy-subrc = 4.
elseif wa_amt_zpml gt wa_amt_both.
sy-subrc = 0.
* WAIT UP TO 2 SECONDS.
endif.
else. "record not exist.
sy-subrc = 4.
endif.
ENDFORM.
FORM KOBEV_996.
sy-subrc = 0.
*} INSERT
ENDFORM.
Basically what is says in 996 is
If PI01 + YP1 = A
if ZPML > A
then ZPMF will be active in SO
If ZPML <= A
then ZPMF inactive
Problem
When Line Item 10 is entered, the ZPMF does not exist
In pricing analysis is says "message saying condition record exists (removed manually)."
Unless we press the update price button and choose B, then you will see ZPMF there
But if we enter item 20, the ZPMF will be there without need to press the update button
It seems like inside routine 996,
After enter 1st line item then enter, it will trigger to 996 routine but for the first time no value in TKOMV internal table
After complete the 996, the table gets values, that is why after the Price Update for LIne 10 condition record is picked up and for Line 20 condition is picked up even without price update.
Question
What other table to use besides TKOMV?
How to make TKOMV pick up value at the 1st check itself.
yes tried
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear
Have you tried in TKOMP and TKOMK?
Thank$
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Does TKOMV cantain any condition data?
Regards
Waza
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.