2007 Mar 09 10:46 PM
Hi
We have a Condition Type which is a Group Condition.
We have created a Condition Value Routine to do some calculations to recalculate the Condition Value of the Condition Type.
The Routine is getting triggered from SAP from program ude LV61AA55 from following Location
*******************
if xkomv-kofrm ne 0 and wertformel eq space and komp-kposn ne 0.
rettkomv = xkomv.
xkwert = xkomv-kwert.
frm_kondi_wert-nr = xkomv-kofrm.
perform (frm_kondi_wert) in program saplv61a if found.
<b> xkomv = rettkomv.</b>
endif.
Problem is Inside the routine we are not able to access Structure rettkomv and Routine is not passing the calculated value.
Can someone please tell any solution OR Any other type of routine with which we can modify the Condition Value of the Cond Type having Type as Group Type.
Thanks in Advance
Hi
We have a Condition Type which is a Group Condition.
We have created a Condition Value Routine to do some calculations to recalculate the Condition Value of the Condition Type.
The Routine is getting triggered from SAP from program ude LV61AA55 from following Location
*******************
if xkomv-kofrm ne 0 and wertformel eq space and komp-kposn ne 0.
rettkomv = xkomv.
xkwert = xkomv-kwert.
frm_kondi_wert-nr = xkomv-kofrm.
perform (frm_kondi_wert) in program saplv61a if found.
<b> xkomv = rettkomv.</b>
endif.
Problem is Inside the routine we are not able to access Structure rettkomv and Routine is not passing the calculated value.
Can someone please tell any solution OR Any other type of routine with which we can modify the Condition Value of the Cond Type having Type as Group Type.
Thanks in Advance
2007 Mar 09 11:24 PM
Hm... you could do something like this in your condition routine:
field-symbols: <rettkomv> type KOMV_INDEX.
constants: c_rettkomv type char20 value '(SAPLV61A)RETTKOMV'.
assign (c_rettkomv) to <rettkomv>.
Then you should be able to access the individual fields of rettkomv with <rettkomv>-<i>fieldname</i>. You can even change it if that's what you need. Be careful though
Sort of a hack, but it should work.
You may have to change the field-symbol declaration to "type standard table of KOMV_INDEX" if you get a runtime error - experiment with this. Basically, the idea is to use a memory pointer to refer to the RETTKOMV content of program SAPLV61A.
2007 Mar 10 5:19 PM
Hi Tamas,
I tried all the options in this.
But Assign statement for the Field symbol is giving me Sy-subrc = 4.
I am not sure why I am not able to refer it to the
structure (SAPLV61A)RETTKOMV.
Can someone please help in this?
Thanks in Advance.
2008 Jul 07 6:15 PM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |