2008 Apr 29 7:11 AM
Hi all experts,
Do anyone knows how to use this FM? What parameters should I provide in order to calculate the formula profile?
In X_FUNCTION, i was putting CALC_SYNC.
In XY_OBJ = i was putting some values inside namely
a) profile instance
b) dateto, datefrom
c) save_okcode
I wasn't really sure how to make it work.
Do any mind to share with me.
Thanks in advance.
2008 Apr 29 7:23 AM
You can try passing data in the XY_OBJ-header-instance. This field can be poulated with one of the entries in table EFORMULAINST.
Rest of the data that you are passing looks fine to me.
Do let me know if this worked.
Pranjal.
2008 Apr 29 7:32 AM
Hi Pranjal,
Thanks for the prompt reply.
Basically I have put the below parameters:
xy_obj-header-INSTANCE_NUMBER = w_profin-instance_number.
xy_obj-header-datefrom = lv_from.
xy_obj-header-timefrom = '001500'.
xy_obj-header-dateto = '99991231'.
xy_obj-header-timeto = '235959'.
xy_obj-header-STAT_HIER = 'S'.
xy_obj-header-STAT_INTV = 'S'.
xy_obj-header-STAT_CALC = 'S'.
xy_obj-control-wmode = '2'.
xy_obj-control-open_wmode = '2'.
xy_obj-control-upd_online = 'X'.
xy_obj-control-enq_done = 'X'.
xy_obj-control-save_okcode = co_calc_sync.
xy_obj-control-db_update = 'X'.
Sometimes after i run the FM...the dateto and datefrom is autopopulated. Sometimes it doesnt. Maybe the data that i used is wrong.
Can you guide me on how to find the correct data to be used, mainly the correct profile instance that i can use.
Thanks alot
2008 Apr 29 7:37 AM
Hi,
I am tryin to get the code, in the meanwhile you can execute the transaction EEDMCALCWB , put a break point on the F/M that you want and then when the control stops there, check wat values are passed and how.
Thanks,
Pranjal.
2008 Apr 29 11:45 AM
Here are my findings :
1) The calculation from and to dates have to be such that the profile mentioned in the instance_number has values maintaned for the specified period, else no calculation will take place.
2) The ok code that is getting passed is EXEC_CALC.
3) The actual calculation takes place with the transaction EEDMFICALC01 of program REEDMFICALCULATE.
Hence I guess you will need to call this transaction as well.
Was this helpful?
Thanks,
Pranjal.
2008 Apr 29 4:16 PM
Hi,
Thanks for the answer.
I still could not make it work because of the error.
*Formula allocation 73 cannot be calculated; parameter 01 has no values *
I make a check on the profile. In the details tab in EEDM08, I check the profile has some value in the constant value field.
Is that the value that i shud be referring to?
Thanks for your help.
Kevin
Edited by: Kevin Ng on Apr 29, 2008 5:32 PM
2008 Apr 30 6:08 AM
Oh if thats the error message you are getting, it means that you have to check your formula profile.
As you already must b aware, ther are 2 profiles involved in this process :
1) A formula profile, which has the formula which is used to calculate its values.
2) A consumption profile, whose values will be used to calculate the values of the above formula profile.
If you are gettin this error means that theres no consumption profile attached in the DETAILS -> Formula Allocation tab of the formula profile.
OR
The formula attached to the Formula Profile expects some input parameters, in your case, parameter number 01. Goto transaction EEDM08 -> DETAILS -> Formula Allocation tab of your formula profile.
Did I confuse you?
Pranjal.
2008 Apr 30 8:11 AM
Hi,
I did a check there. For the profile in EEDM08, there are two input parameters, 01(synthetic profile) and 02(consumption profile).
The consumption profile has constant value of 500 also.
For this profile, it has a validity date from 01/01/2007 till 12/31/9999.
So for my calculation, I did put some dates in between that interval.
What it does for the 1st time is that the calculation is successful. But then when I click back, the status changed to "to be calculated". Since then, I tried to recalculate that entry and the error "Parameter 01 does not have value" crop up.
Thanks for your patient and time for analyzing the problem.
I appreciate it very much.
Kevin Ng