2015 Mar 16 9:36 PM
Hi guys,
I posted this question yesterday after weeks of online searching and not finding an answer to my question. Alas, this post was removed (for apparently being too simple a question) and I was pointed at the FAQ here which didn't answer my question either.
I am an SAP user and have requested from our ABAP team whether or not it is possible to get the 'User Profile - Own Data Prameters' populated into custom z t-codes when they are run.
They are telling me that it isn't and I would like verification of this as it seems to me that the relevant programming would just need to be added to the z-program (and provided the Parameter in question is in the TPARA table) then it should be an easy thing to do.
So please, is this possible or not....?
Thanks
Darrell.
2015 Mar 17 2:24 PM
'User Profile - Own Data Parameters' is used at start of session to initialize Parameters in the SAP Memory. And yes, Abap programmer should be are able to use those memorized value in their customer developments. This information is available in online documentation. (from own data parameter would require a small select code in initialization of screen, current memorized value, if not already affected thru ddic reference, thru addition of a MEMORY ID pid (selection-screen) or SPA/GPA attributes in field attributes (classic dynpro). And, yes, there are already many threads/discussion with this question, use search tool...
Regards,
Raymond
2015 Mar 17 1:05 AM
Hi Darrell
Just to understand your requirements better.
Each time a user goes into a Transaction you want that users, User Parameters to be recorded into a New Z Table.
How many Transactions would you want this applied to?
Regards
Arden
2015 Mar 17 1:20 AM
Hi Arden, thanks for the reply.
It's simply the population of the relevant field if it exists in the User Data. For example, mb51 populates the 'Plant' field (WRK) from these parameters when you navagate to it.
So, is it possible for a custom t-code (let's say for arguments sake it was zmb51) to do this as well..??
Regards
Darrell.
2015 Mar 17 1:29 AM
You're talking about defaulting a value based on the transaction the user goes into.
Taking a value from Parameters and placing into a particular field
2015 Mar 17 1:32 AM
Correct.
I can't see that it would be that difficult, however, I am being told it is not possible for custom t-codes.
2015 Mar 17 1:38 AM
I would say it is possible.
I'm just not sure on how to get the entries into TPARA.
Once you have that figured out the rest should be straight forward
2015 Mar 17 2:22 AM
2015 Mar 17 3:08 PM
Are you sure this is exactly what you want? Normally, using GET and SET, the transaction takes the most recent value entered by the user. Using this approach, the transaction will always take the same value from the user profile. Some users might find this annoying.
Rob
2015 Mar 17 7:26 PM
Hi Rob,
Well I am the end user, and I'm only after simple things like 'Plant' and 'Country' etc so I can't see how other users would find that annoying even if they do have these parameters set in their user profile.
Ultimately, all I need to know is if this is possible or not so that I can encourage our ABAP programmers to actually work on the issue.
Cheers
Darrell
2015 Mar 17 7:31 PM
Well, if you're the only user of the transaction then encourage away.
Rob
2015 Mar 17 2:41 AM
Hi Darrell,
The parameters of user profile stored in dbtable USR05, you can search it out by user name.
REPORT zmb51_report. (TCODE: ZMB51).
PARAMETERS: p_material TYPE matnr MEMORY ID 'MAT'.
INITIALIZATION.
SELECT * INTO TABLE it_param FROM ZMB51 WHERE bname = sy-uname
AND parid IN ('MAT', ..............).
LOOP AT it_param INTO wa_param.
SET PARAMETER ID wa_param-parid FIELD wa_param-parva.
ENDLOOP.
regards,
Archer
2015 Mar 17 2:24 PM
'User Profile - Own Data Parameters' is used at start of session to initialize Parameters in the SAP Memory. And yes, Abap programmer should be are able to use those memorized value in their customer developments. This information is available in online documentation. (from own data parameter would require a small select code in initialization of screen, current memorized value, if not already affected thru ddic reference, thru addition of a MEMORY ID pid (selection-screen) or SPA/GPA attributes in field attributes (classic dynpro). And, yes, there are already many threads/discussion with this question, use search tool...
Regards,
Raymond
2015 Mar 17 7:47 PM
Hi Raymond
Thanks for the reply. I have searched online documentation quite extensively actually and whilst you are correct, there is a lot of information that describes how it functions, none of the documentation I found mentioned that you can actually apply it to a custom transaction.
However, this all seems to have answered my question.
Cheers
Darrell.
2015 Mar 17 8:53 PM
Hi Darrell
If your question is answered, please mark as such.
Regards
Arden
2015 Mar 17 9:26 PM
Well, I would have preferred to have heard from his ABAPers just why they thought this couldn't be done. There may actually be a reason.
Rob
2015 Mar 17 10:14 PM
2015 Mar 18 1:48 PM
I think there's more to it than that. It's basic ABAP. The first thing I learned when ABAPing was that if you're not sure how to do something, ask the user to show you a standard SAP transaction with the needed functionality. Here we have an "ABAP team" that says it "isn't possible".
Rob
2015 Mar 18 10:35 PM
Hi Rob
My recommendation here is to do some more research in the SCN forums. Particularly ABAP Development, see if you can find similar posts on this requirement and then present that to your ABAP team.
You will not be the first person who has wanted to do this.
Someone is bound to have done it before.
If the ABAP team still say it cannot be done, they need to provide the technical reasons why?
Regards
Arden
2015 Mar 19 6:14 AM
Arden Stricke wrote:
My recommendation here is to do some more research in the SCN forums. Particularly ABAP Development, see if you can find similar posts on this requirement and then present that to your ABAP team.
You will not be the first person who has wanted to do this.
Someone is bound to have done it before.
This was why I rejected the first post. At least when it was reposted it was with additional information.
My response to the ABAP team would have been "Here - I can do it manually, so it must be possible programmatically, since the manual approach is itself using a program." The most likely reason in my view that the original poster got a response of "not possible" was simply the developers didn't understand the requirement.
2015 Mar 19 1:11 PM
Of course I know this is possible; that wasn't my point. Here we have an end user joining the ABAP forum, asking a question, having it rejected, asking it again in such a way so that it isn't rejected out of hand, but puts the reasons for the problem on his "ABAP team".
And then we have all the ABAP forum members in the world jumping all over the question trying to show that the user knows more about ABAP than his developers.
There are no technical reasons why this can't be done, but there may be systematic ones that the developers know about that the OP hasn't presented.
I'd like to hear what those developers have to say. That won't happen, but that was why I said there's more to this than we have heard.
On the other hand, maybe the ABAPers don't know their basics...
Rob
2015 Mar 19 8:58 PM
Well they never tend to give their reasons because, from my point of view, they hardly ever understand the end user's requirements in the first place and if they do, their first reaction is generally to say that it can't be done. It is frustrating to say the least. There have been many, many instances where I have had to tell them how to solve my problem for me after I've found out how to do things by searching online forums such as this one etc...
Information wise - In this case they were supplied with a document with loads of screen captures showing the t-codes, the specific fields required to be populated and the relevant Paramter IDs in the User Profile parameters list and an example of a standard t-code exhibiting the desired behaviour.
And no, I know nothing about ABAP development. I do some VBA programming now and then for projects here at work and have been using SAP on and off for about 20 years so if anything, that probably just makes me a bit more resistant to being told 'it can't be done'.
Anyway, thanks to everyone for their input, this certainly wasn't meant to be a conversation regarding the knowledge / motivation of our development team, just that I had litterally been researching for weeks, and not found anything definitive I could show to them to get them working on the issue. I certainly didn't join this forum and ask a question without searching - I'm on enough other forums to know how much that annoys people....
As it turns out, I've finally managed to find one custom transaction in our system which does what I require and have since relayed that to them for reference so with any luck, we can make some forward progress.
Cheers
Darrell.
2015 Mar 17 2:43 PM
Hi,
go as Dengyong Zhang said.
PARAMETERS: p_material TYPE matnr MEMORY ID 'MAT'.
add the ID behind the parameters and the transaction remember the last value of the data-element (in this case matnr), no matter if its a z-transaction or standard transaction.
regards
Stefan Seeburger