‎2012 Dec 08 1:57 PM
i have a requriement like in me51n transacton screen for a particular material the SHORT TEXT field should be editable.
pls help me out regarding this.
‎2012 Dec 08 2:53 PM
Hello Chinmaya,
I don't understand why do you have such a requirement. Normally, short text (for material or other entities) is something that is automatically fetched by the system and displayed. Why would you want to make it editable? Plus, let's say it is made editable. Then, what if the short text has no connection whatsoever with the material?
If you still want to go ahead and would like to find an exit, you can set a breakpoint in method GET_INSTANCE of class CL_EXITHANDLER and then execute your transaction. The method will be called whenever there is an exit called during the transaction and it will return the name of the exit.
Regards,
KA
‎2012 Dec 08 2:53 PM
Hello Chinmaya,
I don't understand why do you have such a requirement. Normally, short text (for material or other entities) is something that is automatically fetched by the system and displayed. Why would you want to make it editable? Plus, let's say it is made editable. Then, what if the short text has no connection whatsoever with the material?
If you still want to go ahead and would like to find an exit, you can set a breakpoint in method GET_INSTANCE of class CL_EXITHANDLER and then execute your transaction. The method will be called whenever there is an exit called during the transaction and it will return the name of the exit.
Regards,
KA
‎2012 Dec 10 5:32 AM
ya thnx akshat!! but mm consultant is saying for a particular material suppose material no-500000.
for this material in the item overview screen SHORT TEXT field should be editable.
i tried to find the user exit but i am unable to do it.pls help me regarding dis.
‎2012 Dec 10 7:06 AM
i had tried and find the badi ME_PROCESS_PO_CUST.NOW just let me kno how to add the coding for the above req?
‎2012 Dec 10 12:03 PM
Hi Chinmaya,
I just checked the BAdI interface. In the method PROCESS_ITEM, I see the input to the method is an object of type IF_PURCHASE_ORDER_ITEM_MM. This interface has methods like GET_DATA and SET_DATA. You can check if using these you are able to set the short text at the item level.
‎2012 Dec 11 3:50 AM
its not working out akshat.can u pls chk the badi CACL_CHARACTER_INPUT.wenever i put the break point it hits .so i hope its the perfect badi and if u find it then pls let me know the coding also for the particular material 500000 the SHORT TEXT filed should be editable since for all material this field is not editable.
‎2012 Dec 11 3:54 AM
its not working out akshat.can u pls chk the badi CACL_CHARACTER_INPUT.wenever i put the break point it hits .so i hope its the perfect badi and if u find it then pls let me know the coding also for the particular material 500000 the SHORT TEXT filed should be editable since for all material this field is not editable.
‎2012 Dec 11 5:14 AM
the following badi's i had found...i am not sure which badi ll work out??
ME_PROCESS_PO
ME_PROCESS_PO_CUST
MEGUI_LAYOUT
GOS_SRV_SELECT
BADI_LAYER
ME_PROCESS_REQ
ME_PROCESS_REQ_CUST
ME_MEREQ_PARKING
ME_REQ_HEADER_TEXT
BADI_MATN1
ME_CCP_ACTIVE_CHECK
ME_REQ_NEW_VERSION
ME_CHECK_SOURCES
CACL_CHARACTER_INPUT
‎2012 Dec 11 5:27 AM
I had another look at BAdI ME_PROCESS_PO_CUST. It has a method called IF_EX_ME_PROCESS_PO_CUST~FIELDSELECTION_ITEM. It has a changing parameter CH_FIELDSELECTION which apparently will contain metadata for the various fields. In this table, there is a field called FIELDSTATUS. I think you can try changing the value of this field. An asterisk '*' means display. You can check the correct value for editable (maybe '+'). Have a look at the method implementation in the example class CL_EXM_IM_ME_PROCESS_PO_CUST and it should give you a good idea about what code to write.
Do let me know if it still does not work.
‎2012 Dec 12 1:30 PM
akshat m in a great mess.in every badi under method wen i put the break point its not getting triggered.
can you please find the exact badi for me.
‎2012 Dec 12 2:05 PM
‎2012 Dec 12 3:04 PM
Hey,
You are working with purchase requisitions. BAdI ME_PROCESS_PO_CUST is meant for purchase order. I think that's why it's not triggering in your case. There is a very similar BAdI for purchase requisition. It's called ME_PROCESS_REQ_CUST. It has the same method I mentioned above - FIELDSELECTION_ITEM. I just put a breakpoint in FM MEREQBADI_FS_ITEM from which this BAdI is called and the control did stop. Try with this BAdI.
Also, for some reason, in my system, the SHORT_TEXT field remains editable even after I enter the material.
‎2012 Dec 13 3:31 AM
‎2012 Dec 13 4:42 AM
You can refer the following code and do something similar...
FIELD-SYMBOLS: <fs> LIKE LINE OF ch_fieldselection.
READ TABLE ch_fieldselection ASSIGNING <fs> WITH TABLE KEY metafield = mmmfd_cust_01.
IF sy-subrc IS INITIAL.
<fs>-fieldstatus = '*'. " Display
ENDIF.
Basically, look for the short text field in CH_FIELDSELECTION and set the value of FIELDSTATUS to editable for it. * is for display, you will need to find out the value for editable. Maybe it's + as I mentioned earlier.
‎2012 Dec 13 5:40 AM
i got it but when i put the break point in fm its trggered but if i put brek point inside badi its nt triggered.should i add any im enhancement to the fm or i can directly add the code in badi?
‎2012 Dec 13 6:03 AM
Where exactly are you setting a breakpoint in the BAdI? First, you need to create a BAdI implementation which would lead to the creation of an implementation class. Once you activate the BAdI implementation, you can put a breakpoint in the class.
By the way, have you checked with any functional colleagues why the short text field is not editable in your system? As I had written before, in my system, it remains editable. You should make sure that it's not a configuration issue.
‎2012 Dec 13 6:15 AM
for testing purpose i had gone to se19 den to classic badi.i had put me_process_req_cust.and under that i had dn an implementation zmm15. and then i had gone to method filedselection_item.and by clicking that inside the class zcl_im_mm15 i put the break point or else code.but its not triggered.
i asked the functional guy that smart fellow in spro he made short text field non editable for all the material.but nw he wants for a particular material like 500000 the short text field should be editable.
‎2012 Dec 13 6:16 AM
but if i put the break point inside the fm as u had told its exactly triggered in short text field.
‎2012 Dec 13 6:22 AM
Hi Kumar,
He is playing with sap or what.Through configuration we can filter like not applicable for few materials.
Regards,
Madhu.
‎2012 Dec 13 6:25 AM
..i already had fight with that guy but he is eating my mind.i told him to make it editable for all material.but he is not listening.
‎2012 Dec 13 6:25 AM
Hi Madhu,
Do you know how to resolve this problem through configuration? If yes, please share.
‎2012 Dec 13 6:28 AM
‎2012 Dec 13 6:29 AM
akshat i think as per my knowledge you can do it for all material editable or non editable but in spro you can't do it for a particular material.
‎2012 Dec 13 6:31 AM
Hi Akshat,
Looks i may type wrongly.I want to tell you like it is not possible to filter through config.If get any idea let see.
Regards,
Madhu.
‎2012 Dec 13 6:33 AM
Ohk..did you make sure that the BAdI implementation is active? If yes, then maybe what you can do is debug the FM and see why it's not calling the BAdI.
‎2012 Dec 13 6:33 AM
m totally gone now.i dnt know what to do now.pls help me gurus!!
‎2012 Dec 13 6:41 AM
‎2012 Dec 13 6:47 AM
‎2012 Dec 13 6:51 AM
ya actually m nt that exp in badi..so i cnt find out after debugging also.
‎2012 Dec 13 7:09 AM
I tried to understand the logic in FM MEREQBADI_FS_ITEM. I think it is not calling the BAdI because it looks for particular customer fields in ch_fieldselection and only on finding them does it call the BAdI. Since your field is not among those customer fields, the BAdI is not called.
An alternative would be to do an implicit enhancement at the end of the above FM. Again, the logic would essentially be to look for the short text field in ch_fieldselection and change fieldstatus. You will need to find out the metafield value for short text.
‎2012 Dec 16 7:42 AM
Another user had a similar problem as yours. He adopted the implicit enhancement approach. He was kind to share his code. If you are still having problems with the code, you can refer the extract below. Note that his requirement was to grey-out a field while yours was to make a field editable.
Code to be copied is
DATA: WA_ITEM TYPE MEREQ_ITEM,
WA_header TYPE MEREQ_header.
*
FIELD-SYMBOLS: <fs_sakto> like line of CH_FIELDSELECTION.
*
CLEAR: WA_ITEM.
CALL METHOD IM_ITEM->GET_DATA " Get PR items
RECEIVING
RE_DATA = WA_ITEM.
CALL METHOD IM_header->GET_DATA " Get PR items
RECEIVING
RE_DATA = WA_header.
IF NOT wa_item-MATNR IS INITIAL .
READ TABLE CH_FIELDSELECTION ASSIGNING <fs_sakto> WITH TABLE KEY METAFIELD = 551.
IF SY-SUBRC IS INITIAL.
<fs_sakto>-fieldstatus = '*'. "Field is purely a display field
ENDIF.
ENDIF.
‎2012 Dec 12 5:14 PM
Hi,
Go to me52n and change.Check this link.it may be useful.
http://scn.sap.com/thread/1684026
Regards,
Madhu.