Vous êtes sur la page 1sur 6

Getting Started Newsletters Store

Products Services & Support About SCN Downloads


Industries Training & Education Partnership Developer Center
Lines of Business University Alliances Events & Webinars Innovation
Log On Join Us Hi, Guest Search the Community
Activity Communications Actions
Browse
ABAP Development
Previous
post
Next
post
0 Tweet 9
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.

Enabling an SM30 maintenance view for multiple
users
Posted by Jrg Wulf in ABAP Development on Aug 5, 2014 9:41:46 AM
Share 1
0 Like
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.
Average User Rating
(19 ratings)
0 Tweet 9
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

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.
2340 Views Tags: sm30, ddic, tableview, enque
Share 1
0 Like
25 Comments
Like (0)
Eitan Rosenberg Aug 5, 2014 10:39 AM
Hi,

Thank you very much for sharing.

I was not aware that you can do that.

Regards.
Like (3)
Jrg Wulf Aug 5, 2014 10:53 AM (in response to Eitan Rosenberg)
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 - Jrg
Like (0)
Matthew Billingham Aug 5, 2014 10:47 AM
Good stuff.
Like (0)
Jrg Wulf Aug 5, 2014 10:54 AM (in response to Matthew Billingham)
Thanks Matt,
and thanks again for your encouraging comments on my preview.
Like (3)
Suhas Saha Aug 5, 2014 12:09 PM
I have seen this popup for many maintenance views, but never realised that this behaviour was due
to the "subset" property
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?
Like (0)
Jrg Wulf Aug 5, 2014 12:16 PM (in response to Suhas Saha)
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..
Like (6)
Jelena Perf iljeva Aug 5, 2014 5:38 PM
Sometimes, it pays to think twice before starting to code
It always pays to think twice (or more!). 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.
Like (0)
Suhas Saha Aug 5, 2014 5:50 PM (in response to Jelena Perf iljeva)
Not many are as articulate as you, Jelena Perfiljeva Atleast not me!
Like (0)
Jrg Wulf Aug 5, 2014 6:48 PM (in response to Jelena Perf iljeva)
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.
Like (0)
Raf ael S Aug 5, 2014 10:16 PM
Very helpful! Thanks.
Like (1)
Jrg Wulf Aug 6, 2014 11:06 AM (in response to Raf ael S)
Thanks Rafael.
Like (1)
Gareth Ryan Aug 6, 2014 10:57 AM
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.
Like (0)
Jrg Wulf Aug 6, 2014 11:07 AM (in response to Gareth Ryan)
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.
Custodio de Oliveira Aug 6, 2014 2:13 PM
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
Like (3)
Like (3)
Jrg Wulf Aug 6, 2014 2:29 PM (in response to Custodio de Oliveira)
Hi Custodio,
thanks for the praise.
You know that saying:
Everyone knew it was impossible. Then came along a fool who didnt know it, and he did
it. Marcel Pagnol
Well, nobody told me it couldn't be done

BR - Jrg
Like (0)
Custodio de Oliveira Aug 6, 2014 2:33 PM (in response to Jrg Wulf )
Jrg Wulf wrote:

Well, nobody told me it couldn't be done

Good thing that you didn't ask me!
Like (0)
Jelena Perf iljeva Aug 6, 2014 4:51 PM (in response to Custodio de Oliveira)
I agree - this should be featured. We don't see many examples of fine "ABAP
craftsmanship" (as Thorsten Franz would say ) these days.
Like (0)
nabheet madan Aug 6, 2014 2:35 PM
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

Nabheet
Like (0)
Jrg Wulf Aug 6, 2014 3:34 PM (in response to nabheet madan)
Thanks Nabheet.
Like (0)
Florian Henninger Aug 6, 2014 5:18 PM
Hi Jrg,

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
~Florian
Like (1)
Jrg Wulf Aug 6, 2014 5:44 PM (in response to Florian Henninger)
Thanks Florian,
Some recommended Points everybody should remember when developing
(ABAP)
BTW: that was a nice one too.
ASHISH AHIREAug 7, 2014 4:20 PM
Very nice information Jrg Wulf , 6 months ago i'd same requirement and I used enque_read
but it's really good info i'll use it future requirement ......... keep exploring and share it on SCN
we're waiting .....
Follow SCN
Site Index Contact Us SAP Help Portal
Privacy Terms of Use Legal Disclosure Copyright
Like (0)

BR
Ashish
Like (0)
Jrg Wulf Aug 7, 2014 4:25 PM (in response to ASHISH AHIRE)
Thank Ashish.
Like (0)
Sanjana Lingras Aug 20, 2014 3:34 PM (in response to Jrg Wulf )
nice blog!! Keep it up !!!

Regards,
Sanjana
Like (0)
Ashish Singhal Aug 21, 2014 12:02 PM
Nice blog..

Vous aimerez peut-être aussi