2014 Sep 23 1:48 PM
Hi Experts,
I have a question regarding EDM.
As per our requirements, we need to create a web service that retrieves the information from an invoice (IS-U print document), even if that invoice has been reversed. This information includes the profile values used during the billing of that invoice.
The problem we are facing is that we can have rebills during which a new profile version is used for billing and invoicing, so if webservice checks the profile values, it will find only the newest version. This means that if webservice is used to retrieve information of the previous invoice for that billing period, it won´t be able to retrieve the previous profile values (version 1).
Has anyone faced a similar issue?
Thanks in advance for your help!
Regards
Rafael
2014 Sep 25 6:58 AM
Hi Rafael,
Though not the exact problem, I had used IDocs to get me out of a similar situation.(It was needed for Reconciliation not in Billprint.)
I would suggest to look into the below tables in ECC.
EPROFVERSHEAD (Primary Key is the Profile number)
EPROFVERSSTAT (Primary Key is the Profile Version Number which is in the above table)
EPROFVERSVALUE (Primary Key is the Profile Version Number which is in the First table)
This should help in extracting the values. Issue would be in aligning with the 'Billing Period' i.e. Net Consumption from the profile values matched to the Billed Consumption.
Hope this helps. Anyways it would be interesting to know more about the Business process and how you resolve it.
Cheers,
Rakesh..
sapisurdg.wordpress.com
2014 Sep 25 8:50 AM
Hi Rakesh,
Thanks a lot for your answer.
I had checked these tables, but my issue is that I don’t see how to link the profile
version with the billing document.
Let me explain it with an example:
I have a billing document with RTP interface to calculate amounts using hourly
consumptions. I bill it and invoice it. Then I reverse it and I change half of its values:
- EPROFVERSHEAD is updated with an entry with the version number and EPROFVERSSTAT is updated
with its status
- EPROFVERSVALUE is updated to save the original values for the modified hours.
A new bill document is generated and invoiced it.
From the webservice, the client wants to check the hourly consumptions assigned to the
original invoice.
Here is my problem. How do I link the invoice number with the original profile values.
Using the creation date of EPROFVERSHEAD I can see when the entry was added to compare it against the different bill documents creation dates and see if the entry is related to the original bill doc or the new bill doc, but I hope there is a more standard way to make this link (because it can be confusing when we have several rebills and profile versions over the same billing period).
In your opinion, what should be a good approach to solve this issue?
Thanks a lot
Regards
2014 Sep 25 11:55 AM
Hi Rafael,
Thanks for the detailed info.
As you have correctly pointed out there is actually no link between the billing document and the profile versions. If you check out the profiles in a reversed Billing document , we see the active version of the profile. This is an issue which I guess has been raised to SAP.
Anyways for your issue probably an enhancement should be done to fill in a ztable with the Billing Document ,Profile number and the active version number(EPROFHEAD-LASTVERSNO) at the time of Billing. This version number could be used in the below manner.
> The main table is EPROFVERSHEAD in which field CVERSNO and PROFVERSNO is important.
> Check with the CVERSNO field which should less than current active version number and more than equal to the version in the ztable.
> Get the table contents which fall in this range in an internal table (lets name it IT01) sorted on the basis of CVERSNO in decending order.
> In another workspace fill in the profile values of the current active version (IT02).
> Once done select the first row from IT01 and get the values from table EPROFVERSVALUE based on the PROFVERSNO into another internal table IT03. Merge(superimpose) this with IT02. Repeat this step for all the rows in IT01.
Sounds like lot of work.
Let's see if anyone has any other approach.
Cheers,
Rakesh..
sapisurdg.wordpress.com
2014 Sep 25 1:20 PM
Thanks a lot for your answer.
We will analyze in detail the solution you suggest.
Regards
2015 Jan 07 7:15 AM
Hi,
We configured "Reasons for creating profile versions". As per our requirement, we need to keep different versions of profile values depending on the reasons for creating profile version. If the same bill is again reversed for uploading a modified set of profile values, the same should be captured against a particular reason for creation at the time of profile value upload.
Now, is it possible to upload profile values against a particular reason for creating profile version and if this is possible, how do we do it ?
Also each time the bill is generated, the corresponding profile values used at the time of billing should be captured.
Can anybody give some guidance ?
Felix
2015 Jan 07 8:22 AM
Hi,
Have a look into the FM 'ISU_EDM_PROFILE_CREATE_VERSION'.
This creates the profile versions. You can put a break-point here and then check your business process on when it hits this and if you can adapt the reason accordingly.
Also as has been mentioned earlier billing document and profile versions have no direct linkage. You have to play with the table entries to find the alingment.
Hope this helps.
Cheers,
Rakesh..
sapisurdg.wordpress.com
2015 Jan 20 10:10 AM
2015 Jan 27 10:50 AM
Hi Felix,
Give the inputs for version reason (Eg. MANCHANGE) , index first and index last.(Eg. if its a 60 min profile so first is 1 and last is 24).
For xy_profile you would have to give entries via code for fields : PROFHEAD_DATA, PROFVALUES,PROFVALUES_UTC,PROFSTATUS,PROFSTATUS_UTC.
You can check its working by executing EEDM01, change a value and then saving. this FM would be triggered.
Hope this helps.
Cheers,
Rakesh..
sapisurdg.wordpress.com