cancel
Showing results for 
Search instead for 
Did you mean: 

How to implement a General Ledger in Dynpro

Former Member
0 Kudos

Has anyone tried to implement a general ledger in Dynpro using a table?

In a general ledger, you want the time dimension going across the top in separate columns, and tracked items going down the left hand side.

The trouble is, the Dynpro table only binds context elements to a column rather than having the option of binding to a row. I can see why this is, but it is still makes life difficult for me.

Like the table, my data is coming in on a column by column basis with the first column being the date, followed by all the stock ledger items pertaining to that date.

I want to display a full fiscal year on one page so this means having twelve columns for each of the fiscal months, and one column for the line item names (units sold, inventory, value of sales ... etc)

One idea for implementing this was to create a generic structure containing twelve attributes. Each attribute would contain the values associated with a particular fiscal month. I would then create a node in my view context based on this structure and bind each column in my table to the corresponding fiscal month attribute in this structure.

Upon loading the stock ledger data, I would create a series of node instances for each one of my stock ledger items and copy the data into the appropriate attribute.

This procedure seems REALLLY complex and I am hoping there is someone out there who may have a simpler solution.

Any suggestions?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Sheldon,

I did same thing (recurring events calendar with events as rows and days as columns) and the sequence is almost the same as you described.

Yes, it is complex. However, seems to be the only way.

VS

Former Member
0 Kudos

Thanks Valery,

I'm so new to Dynpro that I really didn't want to proceed until I was certain I was going in the right direction.

Wish me luck

Former Member
0 Kudos

Just an adendum to this thread.

I have now got the display working correctly for this application ...ie. the fiscal periods are displayed in columns and the attributes for each fiscal period are displayed row by row.

Now I am faced with the challenge of update the data on the database once it is edited by the users.

I can check the .isChangedByClient flag to tell which rows were edited but I also need to know which column(s) were edited since they contain the data that needs to be passed to my update routine.

So far the only way I can think of implementing this is to maintain a parallel copy of the ledger and do a comparison of the "before" and "after". With this information I generate my own list of edited columns. YUCK!

Perhaps if there was a validation event that was fired whenever a cell was changed then I could hook into that and maintain my own "isChanged" list of columns but I don't see anything like that.

Any suggestions?

former_member182372
Active Contributor
0 Kudos

Hi Sheldon,

You can try to use JavaBean model as data source. And implement management of changes list inside the bean (add changed property to list in the property setter). Afetrwards you will be able to get list of changes before saving.

Best regards, Maksim Rashchynski.