08-11-2015 5:23 PM
Hiya,
I have this field in ME54n for "source determination"(MEREQ_PROP-KZZUO) that is accessed via the 'Personal setting' button:
Would anyone know how to make it default to 'unchecked' when certain criteria are met?
It doesn't have a Parameter ID...
Is there a user-exit/Badi that i could use?
Thansk in advance!
08-17-2015 2:37 PM
You could also check value of parameter Id EVO for your user, this flag can force this value to 'X' (key of table T160V) .
Hint: Else try with BAdI ME_PROCESS_REQ_CUST to reach occurence of CL_USER_SETTINGS_MM with GET_INSTANCE method.
Regards,
Raymond
08-11-2015 5:27 PM
These values from the personal settings are stored in ESDUS table.
Have a look into this table, it is per user id. make a screenshot of all entries for your user, then change the setting in ME21N and check again in ESDUS to know what value was changed.
08-17-2015 11:33 AM
Thanks Jurgen!
Following your advice I found the field and it is 'ReqProposer KZZU0':
I'm now a little stuck on what to do next?
Is there a way I can default this value in via a user exit in ME54n?
Ideally that's what I'd like to do when certian conditions are met but I'm not sure if that's possible?
You see we have a BDC that calls ME54n and it seems to ignore the default values the user has for 'Personal settings'. Hence why I'm trying to find a programatic way to default it in.
Thanks in advance!
08-17-2015 2:37 PM
You could also check value of parameter Id EVO for your user, this flag can force this value to 'X' (key of table T160V) .
Hint: Else try with BAdI ME_PROCESS_REQ_CUST to reach occurence of CL_USER_SETTINGS_MM with GET_INSTANCE method.
Regards,
Raymond
08-19-2015 10:44 AM
Hi Raymond,
That's very helpful thanks.
I was also looking at BADI ME_PROCESS_REQ_CUST with Method OPEN and I was using this code - but it didn't seem to change anything (probably becasue the OPEN method has no changing parameters)
Method IF_EX_ME_PROCESS_REQ_CUST~OPEN
DATA: ex_data TYPE mereq_header,
new TYPE mereq_header,
data1 TYPE mereq_header,
datax TYPE mereq_headerx.
CALL METHOD im_header->get_data
RECEIVING
re_data = new.
MOVE-CORRESPONDING new TO data1.
IF new-kzzuo NE 'X'.
data1-kzzuo = 'X'.
datax-kzzuo = 'X'.
CALL METHOD im_header->set_datax
EXPORTING
im_datax = datax.
CALL METHOD im_header->set_data
EXPORTING
im_data = data1.
ENDIF.
endmethod. "IF_EX_ME_PROCESS_REQ_CUST~OPEN
Your GET_INSTANCE method sounds promising but I can't seem top locate it?
I can only see these methods
Sorry, am I missing something obvious?
Thanks in advance!
08-19-2015 12:48 PM
The method(s) to find are not attached to class directly referenced by the BAdI, you have to navigate into the class provided, e.g. IM_HEADER is reference of IF_PURCHASE_ORDER_MM which itself carry some methods and interfaces, so you have to find a way to reach an instance of a class as CL_PERSONALIZATION_MM or CL_ESDUS_CONNECTOR_MM_2 and then analyze available methods.
Hint: Try to set some break-points in constructor methods of those class to analyze. If you suspect some field to change, also add a watchpoint.
Regards,
Raymond
08-19-2015 1:32 PM
Thanks again Raymond!
To be honest these OO Badi's in MM have always confused me, sure doing simple OO is fine and doing basic things in the BADI like looping through items and checking things is fine but anything beyond that (like what I'm doing now) is so confusing to me, and so its really great having someone, as good as you, suggest things.
Okay here's what I've figured out so far:
IF_EX_ME_PROCESS_REQ_CUST and Method OPEN has IM_HEADER which references (via its Parameters) IF_PURCHASE_REQUISITION, which in turn references loads of thigns which each refrence even more things!
Would I have to manually search through all of these?
Or am I being a dumb dumb?
I've tried looking for constructors but couldn't locate any in IF_EX_ME_PROCESS_REQ_CUST.
I've tried searching back from CL_PERSONALIZATION_MM (via 'where used') but that's just as confusing.
Is there any reading I could do to understand all this MM OO stuff better?
I bought "ABAP Development for materials management" from SAP Press but that didn't go into this type of info which is what I'd really like to learn more about.
Thanks in advance.
08-19-2015 2:05 PM
I don't know such technical book (OO for MM enhancement) with a list of related classes with inheritance, shared attributes or interfaces, etc.
So I would search with debug (some break-points in create method of class identified thru where-used, e.g. from ESDUS) then analyze where and how SAP use those, and try to replicate their methods.
Regards,
Raymond
08-19-2015 2:39 PM
So you learnt everything through debugging?!
Impressive!
So I suppose debugging is the way for me to go too then.
Last dumb question:
Is attribute MY_STATE the one that holds all the goodies abou the document in MM?