Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
jrg_wulf
Active Contributor

Hi everybody, this is about how i got an SM30 maintenance tableview, to accept changes from multiple users at the same time.

It's my first ever blog, so don't expect too much.

Maybe I should start with the admittance that DDIC related development is not my field of experience – but nevertheless, I'd like to share the following, because a reasonably thorough search on SCN didn't bring any satisfying result.

Tableview V_T001B_COFI is a maintenace view that allows users, to assign timeslots for accepting posts, depending on various key values. The view features a subset of the table entries of table T001B.

When the request was brought to me, that the maintenance of posting periods in tableview V_T001B_COFI should be enabled for multiple users at the same time, I started to search SCN for similar threads. That's where I came across this one.

The outcome however, was not satisfactory, since any number of users could have made concurrent changes, leaving the lastone to press 'SAVE'  as the winner.

So I started to reanalyse the problem.

I would need to create key specified locks.

My first impulse was, to create a new maintenance dialog, complete with an enqueueing object, specifically taylored to my needs – that is, locking entries keyspecific.

The maintenance dialog would then have to ensure, that no two users could maintain the same entries. Thatwas the easy part, as far as the maintenance in my own dialog would go.

In addition it was necessary, that any maintenance started by using the standard view (V_T001B_COFI) would still prevent any other user from editing any entry - whilst on the other hand, the key specific  lock would have to prevent the standard maintenance as well.

I knew that I could achieve that, by cleverly combining the use of the FMs to be generated by the enqueueing object, together with FM 'ENQUE_READ'. But still it felt clumsy.

So I started to reanalyse the problem.

I didn't need to have control over every single tableline to be locked seperately – a subset, in this case by tablefield BUKRS would be completely sufficient.

And there it was – the keyword subset. I remembered coming across in DDIC, when building a maintenance tableview.

So my new aproach started by copying tableview V_T001B_COFI to Z_T001B_COFI, with the only difference , setting the maintenance attribut (RDONLY) for viewfield BUKRS to 'S'.

Following that, I created a maintenance dialog without any fancy stuff.

When I started the tableview Z_T001B_COFI, a popup dialog prompted me to provide the variant(BUKRS) and the next thing was a maintenance screen with only those entries, matching the variant.

A quick glance on the enqueued object showed the difference. Where the standard View had produced an entry, specified only by tablename, client and record type, there was now the variant as additional discriminator.

A little bit of testing revealed, that all my preliminary enqueueing requirements where fully met. Without any additional enqueueing object or  modification, the request was fullfilled.

  Mission accomplished :smile:

Sometimes, it pays to think twice before starting to code and for me, it signalled that I should get myself a bit more into DDIC.

30 Comments
rosenberg_eitan
Active Contributor
0 Kudos

Hi,

Thank you very much for sharing.

I was not aware that you can do that.

Regards.

matt
Active Contributor
0 Kudos

Good stuff.

jrg_wulf
Active Contributor
0 Kudos

Thanks Eitan,

isn't that always the problem? There is so much to know and only so much you can actually gather.

If it wasn't for the profane need to earn some money, i could spend days and days on reading, experimenting and collecting knowledge.

BR - Jörg

jrg_wulf
Active Contributor
0 Kudos

Thanks Matt,

and thanks again for your encouraging comments on my preview.

SuhaSaha
Advisor
Advisor
0 Kudos

I have seen this popup for many maintenance views, but never realised that this behaviour was due to the "subset" property :smile:


It's my first ever blog, so don't expect too much.


Now that the first blog is done & dusted, can we start expecting similar content? :wink:

jrg_wulf
Active Contributor
0 Kudos

Thanks Suhas,

As for the follow up, it depends.

If i happen to come across something, that i feel is not common knowledge, i will come again..

Jelena
Active Contributor
0 Kudos

Sometimes, it pays to think twice before starting to code


It always pays to think twice (or more!). :smile: Thanks for sharing, very interesting and educational.

Hey, and don't sell yourself short with "it's my first blog". Did Hemingway start his first novel with "it's my first novel, so don't expect much"? Don't think so. :smile:

SuhaSaha
Advisor
Advisor
0 Kudos

Not many are as articulate as you, jelena.perfiljeva :wink: Atleast not me!

jrg_wulf
Active Contributor
0 Kudos

Well thanks anyhow Jelena,

there's hardly any more one can do, then give ones best. A Hemningway will certainly not result but i keep trying.

RJSA
Active Participant
0 Kudos

Very helpful! Thanks.

Former Member
0 Kudos

Wow - what a cool entry for a first blog post!

Great to see an old stalwart like SM30 still getting some love - no doubt this would be a really handy feature on lots of systems.

Cheers,

G.

jrg_wulf
Active Contributor
0 Kudos

Thanks Rafael.

jrg_wulf
Active Contributor
0 Kudos

Thanks Gareth,

speaking of old stalwarts - for those of us, who still remember the behaviour of old SM31 (no save, no cancel - press Enter and either all is well or the damage is already done) the introduction of SM30 was already a hint of paradise. Still, there's always room for improvement. :smile:

custodio_deoliveira
Active Contributor
0 Kudos

Hi Jorg,

As I can see you published this blog post more than 24 hours ago. Is there any reason why it's not featured on front page yet?

This is one of the best tips (sorry, it's obviously much more than a tip) I've seen in a long time. Until today my default answer for this problem would be "no can do, live with it" - although I can't really remember anyone asking me such thing in the last 10 years. Here's the lesson for me: review your certainties from time to time.

Thanks for sharing.

Cheers,

Custodio

jrg_wulf
Active Contributor
0 Kudos

Hi Custodio,

thanks for the praise.

You know that saying:

“Everyone knew it was impossible. Then came along a fool who didn’t know it, and he did it.”  — Marcel Pagnol

Well, nobody told me it couldn't be done :wink:

BR - Jörg

custodio_deoliveira
Active Contributor
0 Kudos

Jörg Wulf wrote:



Well, nobody told me it couldn't be done :wink:



Good thing that you didn't ask me! :cool:

nabheetscn
Active Contributor
0 Kudos

Back after long time...And reading this blog made my day. Till this time i know it can not be done... But conclusions are meant to be broken.

Well done and keep sharing your experience :smile:

Nabheet

jrg_wulf
Active Contributor
0 Kudos

Thanks Nabheet.

Jelena
Active Contributor
0 Kudos

I agree - this should be featured. We don't see many examples of fine "ABAP craftsmanship" (as thorsten.franz would say :smile: ) these days.

Florian
Active Contributor
0 Kudos

Hi Jörg,

nice blog. Thanks for sharing it.


Sometimes, it pays to think twice before starting to code and for me, it signalled that I should get myself a bit more into DDIC.


Some recommended Points everybody should remember when developing (ABAP)

You hit point 4 :cool:

~Florian

jrg_wulf
Active Contributor
0 Kudos
Aashish28
Contributor
0 Kudos

Very nice information jrg.wulfjrg.wulf, 6 months ago i'd same requirement and I used enque_read :sad: but it's really good info i'll use it future requirement  ......... keep exploring and share it on SCN :smile: we're waiting ..... :wink:

BR

Ashish

jrg_wulf
Active Contributor
0 Kudos

Thank Ashish.

sanjana_lingras
Active Participant
0 Kudos

nice blog!! Keep it up !!!

Regards,

Sanjana

Former Member
0 Kudos

Nice blog..

Former Member
0 Kudos

Very Helpful ,, I used to think the only way to do this is via custom code in TMG. Thanks for the tip

Former Member
0 Kudos
Hello Jörg
Very interesting. Thanks a lot.
Additional question though: what is the best way to add authoration check on top of this? I.e. to make sure that the current user is authorized to change the data of the chosen company code?
Thanks in advance for any clue.
Krgs - Tom
0 Kudos
 

I just wanted say Thank you! I could save a lot of time!
abdul_hakim
Active Contributor
0 Kudos
Very useful.

 

Thanks

Abdul Hakim
quimitoap
Discoverer
0 Kudos
Good work
Labels in this area