Customer screen using BADI : ME_GUI_PO_CUST
Hi
I am implementing BADI : ME_GUI_PO_CUST to create custom screen at item level.
Pls tell me the steps to be followed to get custom screen using BADI
Thanks
Vinay.
Hi Vinay,
go to transaction SE18, then enter your BADI.The in menu go to Goto -> Sample Code -> Display. You will see example of implementation of this BADI. All these examples are very well commented. Basically you will have to create your own function group with your new screen and call this screen from methods of BADI.
Cheers
Similar Messages
-
Custom Screen using BADI seen in ME23N, ME22N Display, but not in ME21N
Hi,
I have developed a custom screen for purchase order using badi ME_PROCESS_PO_CUST and ME_GUI_PO_CUST.
But, its not visible in ME21N, whereas its dipalyed in ME23N, ME22N .
Please advise.
Thanks,
Shivaa....In TC CMOD you can create a new proyect and use the component MEREQ001 with this component you can see adicional tab in those TC.
-
Hi All,
I have added custom screen with two z fields at item level using BADI ME_GUI_PO_CUST and ME_PROCESS_PO_CUST i can see my screen in tcodes ME21N , ME22N , ME23N but I am not able to save data.
and also screen is coming in change mode even in ME23N .
thanks.Hi,
I have added two xfields at item level.
This is the code i have added in zimplementation ZME_GUI_PO_CUST .
IN Zimplementation ME_PROCESS_PO_CUST I have added code only in method FIELDSELECTION_ITEM . after doing this I can see only screens in ME21N, ME22N, ME23N but when enter data in zfields and trying to save it is giving me message no data has changed.
method IF_EX_ME_GUI_PO_CUST~SUBSCRIBE.
DATA: ls_subscriber LIKE LINE OF re_subscribers.
we want to add a customer subscreen on the item detail tab
CHECK im_application = 'PO'.
CHECK im_element = 'ITEM'.
each line in re_subscribers generates a subscreen. We add one subscreen in this example
CLEAR re_subscribers[].
the name is a unique identifier for the subscreen and defined in this class definition
ls_subscriber-name = subscreen1.
the dynpro number to use
ls_subscriber-dynpro = '0001'.
the program where the dynpro can be found
ls_subscriber-program = 'SAPLYMEPOBADIEX'.
each subscreen needs his own DDIC-Structure
ls_subscriber-struct_name = 'MEPO_BADI_STRUCT'.
a label can be defined
ls_subscriber-label = text-001.
the position within the tabstrib can be defined
ls_subscriber-position = 4.
the height of the screen can be defined here. Currently we suport two screen sizes:
value <= 7 a sevel line subscreen
value > 7 a 16 line subscreen
ls_subscriber-height = 7.
APPEND ls_subscriber TO re_subscribers.
ENDIF.
method IF_EX_ME_GUI_PO_CUST~TRANSPORT_FROM_MODEL.
DATA: l_item TYPE REF TO if_purchase_order_item_mm,
ls_mepoitem TYPE mepoitem,
ls_customer TYPE mepo_badi_exampl.
system asks to transport data from the business logic into the view
CASE im_name.
WHEN subscreen1.
is it an item? im_model can be header or item.
mmpur_dynamic_cast l_item im_model.
CHECK NOT l_item IS INITIAL.
transport standard fields
ls_mepoitem = l_item->get_data( ).
transport customer fields
CALL FUNCTION 'YMEPOBADIEX_GET_DATA'
EXPORTING
im_ebeln = ls_mepoitem-ebeln
im_ebelp = ls_mepoitem-ebelp
IMPORTING
ex_data = ls_customer.
store info for later use
MOVE-CORRESPONDING ls_mepoitem TO dynp_data_pbo.
MOVE ls_customer-badi_bsgru TO dynp_data_pbo-badi_bsgru.
MOVE ls_customer-badi_afnam TO dynp_data_pbo-badi_afnam.
WHEN OTHERS.
ENDCASE.
endif.
method IF_EX_ME_GUI_PO_CUST~TRANSPORT_TO_DYNP.
CASE im_name.
WHEN subscreen1.
CALL FUNCTION 'YMEPOBADIEX_PUSH'
EXPORTING
im_dynp_data = dynp_data_pbo.
WHEN OTHERS.
ENDCASE.
ENDIF.
endmethod.
method IF_EX_ME_GUI_PO_CUST~TRANSPORT_FROM_DYNP.
CASE im_name.
WHEN subscreen1.
CALL FUNCTION 'YMEPOBADIEX_POP'
IMPORTING
ex_dynp_data = dynp_data_pai.
IF dynp_data_pai NE dynp_data_pbo.
something has changed therefor we have to notify the framework
to transport data to the model
re_changed = mmpur_yes.
ENDIF.
WHEN OTHERS.
ENDCASE.
ENDIF.
endmethod.
method IF_EX_ME_GUI_PO_CUST~TRANSPORT_TO_MODEL.
DATA: l_item TYPE REF TO if_purchase_order_item_mm,
ls_mepoitem TYPE mepoitem,
ls_customer TYPE mepo_badi_exampl.
data have to be transported to business logic
CASE im_name.
WHEN subscreen1.
is it an item? im_model can be header or item.
mmpur_dynamic_cast l_item im_model.
CHECK NOT l_item IS INITIAL.
ls_mepoitem = l_item->get_data( ).
standard fields changed?
IF dynp_data_pbo-matkl NE dynp_data_pai-matkl OR
dynp_data_pbo-plifz NE dynp_data_pai-plifz OR
dynp_data_pbo-webaz NE dynp_data_pai-webaz.
update standard fields
ls_mepoitem-matkl = dynp_data_pai-matkl.
ls_mepoitem-plifz = dynp_data_pai-plifz.
ls_mepoitem-webaz = dynp_data_pai-webaz.
CALL METHOD l_item->set_data( ls_mepoitem ).
ENDIF.
CALL FUNCTION 'YMEPOBADIEX_GET_DATA'
EXPORTING
im_ebeln = ls_mepoitem-ebeln
im_ebelp = ls_mepoitem-ebelp
IMPORTING
ex_data = ls_customer.
ls_customer-badi_bsgru = dynp_data_pai-badi_bsgru.
ls_customer-badi_afnam = dynp_data_pai-badi_afnam.
CALL FUNCTION 'YMEPOBADIEX_SET_DATA'
EXPORTING
im_data = ls_customer.
ENDIF.
WHEN OTHERS.
ENDCASE.
ENDIF.
method IF_EX_ME_PROCESS_PO_CUST~FIELDSELECTION_ITEM.
DATA: l_persistent TYPE mmpur_bool.
CONSTANTS:
FIELD-SYMBOLS: <fs> LIKE LINE OF ch_fieldselection.
l_persistent = im_item->is_persistent( ).
*IF l_persistent EQ mmpur_yes.
READ TABLE ch_fieldselection ASSIGNING <fs> WITH TABLE KEY
metafield = MMMFD_YYMAN_NUM."fd_cust_01.
IF sy-subrc IS INITIAL.
<fs>-fieldstatus = '*'. " Display <-- this one was as per the sample code given.
<fs>-fieldstatus = '+'. " Input <-- this i added to make the field mandatory.
ENDIF.
READ TABLE ch_fieldselection ASSIGNING <fs> WITH TABLE KEY
metafield = MMMFD_YYMAN_DES."fd_cust_01.
IF sy-subrc IS INITIAL.
<fs>-fieldstatus = '*'. " Display <-- this one was as per the sample code given.
<fs>-fieldstatus = '+'. " Input <-- this i added to make the field mandatory.
ENDIF.
*ENDIF.
ENDIF.
endmethod. -
Custom screen using BBP_CUF_BADI
Hi,
I am trying to call a custom screen using implementation of BADI, BBP_CUF_BADI.
I have written the following code in the implementation of the PUT_DATA method.
EV_REPID = 'Z_SCREEN'.
EV_DYNNR = '8888'.
The screen is not displayed. Also if you could tell me if the displayed screen will have the look and feel of GUI screen or the look and feel will be similar to the SRM screen in the web?
Thanks,
MickHi Yann,
John is doing a call screen in code. But when you do that you start a different memory process. Also with the code that I have written in the badi
EV_REPID = 'SAPLZCUST_SCREEN'.
EV_DYNNR = '8888'
the PBO of the screen gets executed but the screen is not displayed.
Please help!!!!!
Thanks,
Mick -
I want to enhance screen using BADI
hello sap guru
i want to enhance screen using BADI.can i enhace screen with out using SPRO transaction? is abap consultant have authorization for SPRO trasaction?Hi Swamy,
You can do the same without SPRO configuration.
For example for purchase order screen exit there will be no configuration required in SPRO.
Basically the main difference in scenarios come depending on the type of transactions using.
For example when using master data transactions such as MM01,XD01 etc we do have configurations do be done in SPRO.
But while using transactional data transactions such as VA01,ME21 etc we can do directly without any configurations by using customer exits such as MM06E005(for me21n).
Why this difference occurs i also dont know.I thought it would be of some useful to you to some extent.Do share if you find why this difference occurs.
Have a nice day.
Thanks,
Surya -
Custom screen not displaying using BADI ME_GUI_PO_CUST
Hello Experts,
I was working on BAD ME_GUI_PO_CUST to add custom subscreen on header
I have created a subscreen ZNRD_SAPMEGUI_PO with number 9999.
I have created implementation of ME_GUI_PO_CUST as ZME_GUI_PO_CUST.
I have added screen details to the BADI.as follows
CALLPROGRAM = SAPLMEGUI.
Scr No = 1102
Subscreen area = TABSTRIPCONTROL2SUB
Program called = ZNRD_SAPMEGUI_PO
Scr no = 9999.
Now to the method SUBSCRIBE to the implemented BADI ZME_GUI_PO_CUST
I have wriiten the following codes.
method if_ex_me_gui_po_cust~subscribe.
data: ls_subscriber like line of re_subscribers.
if sy-tcode eq ' ME21N' or sy-tcode eq 'ME22N' or sy-tcode eq 'ME23N'.
check im_application = 'PO'.
check im_element = 'HEADER'.
* CLEAR re_subscribers[].
ls_subscriber-name = 'ZNRD_SAPMEGUI_PO'.
ls_subscriber-dynpro = '9999'.
ls_subscriber-program = 'SAPLMEGUI'.
*ls_subscriber-struct_name = 'MEPO_SUBSCRIBERS'.
ls_subscriber-label = 'Customer Data'.
ls_subscriber-position = 10.
ls_subscriber-height = 7.
append ls_subscriber to re_subscribers.
endif.
endmethod.
BADI is active
Now when irun ME21N i dont see the additional custom tab on header coming up.
Please guide will be appreciated.
Regards,
RanjithHi
I have been through the documentation friends still I am unable to go ahead thats the I am seeking your help.
Please guide.
Shailaja could you please explain why do i need to use the user-exit MM06E005 when I am using the BADI.
Regards,
Ranjith N -
How to get a field description on custom screen used in enhancement
Hi all,
I am working with transaction cj20n. It is having an enhancement and a custom screen is used in it. I have modified the screen by adding a text label ahead of field FUND. I want to get the description of that field on that text label. How can i achieve this? I have the table field where the description is available. How to get it on the screen?
Thanking you in advance.When you refer your field to the DD table field, the domain will contain the text, it will automatically fetch the description. But you can also Hard code them since its a label in the screen.
Regards,
Anita -
How to add 1 field in T-code FB03 screen using badi???
hi~
I need advice...
How to insert a field in standared screen by BADI??
I want insert a segment field in AP/AR screen when user create post document(or park document)..
is it possible??
AP/AR screen are not using IMG...( right??? )
please help me...
thanks...Hi Lee,
Good!
First we need to find out whether is there any screen exit for that particular screen or not?
If not we could go for BADI
Thanks
Sunil -
Unable to add custom tab in ME21N using BADI ME_GUI_PO_CUST
Dear All,
I need one extra tab in Item Details of ME21N.
This extra tab should have two fields of my own.
I have put the coding in the SUBSCRIBE method of the implementation of the BADI ME_GUI_PO_POST as follows:
data: ls_subscriber like line of re_subscribers.
we want to add a customer subscreen on the item detail tab
check im_application = 'PO'.
check im_element = 'ITEM'.
each line in re_subscribers generates a subscreen. We add one subscreen in this example
clear re_subscribers[].
the name is a unique identifier for the subscreen and defined in this class definition
ls_subscriber-name = 'Event Details'.
the dynpro number to use
ls_subscriber-dynpro = '0001'.
the program where the dynpro can be found
ls_subscriber-program = 'SAPLMEPOBADIEX'.
each subscreen needs his own DDIC-Structure
ls_subscriber-struct_name = 'ZSM_PO_STRUC'.
a label can be defined
ls_subscriber-label = 'Event ID'.
the position within the tabstrib can be defined
ls_subscriber-position = 5.
the height of the screen can be defined here. Currently we suport two screen sizes:
value <= 7 a sevel line subscreen
value > 7 a 16 line subscreen
ls_subscriber-height = 7.
append ls_subscriber to re_subscribers.
I put breakpoints in the implementation of the method, and it is going into it, yet the extra tab is not getting displayed on the screen.
Please give your suggestions on this.
Regards,
Prosenjit.Hi Prosengit,
I am not aure about u r BADI,
BUt last week i have custom tab in the PO header data using this enahncement 'MM06E005'.
IN thi senhancement u have thrre screen exits.In this enhancement
SAPMM06E 0111 CUSTSCR1 SAPLXM06 0111 Subscreen: PO item
u can add subscreen and u can add u r own fields here .
and u can write u r code in 'EXIT_SAPMM06E_006'.
if u want to change the title of the program.
Go to program SAPLXM06 then go to text element give text symbol no as '111' and u can change the title of u r tab.
I hope this solves u r problem. -
Create new tab in header using badi ME_GUI_PO_CUST for tcode ME21N
Dear all,
i have implemented method SUBSCRIBE in ME_GUI_PO_CUST to create new tab in ME21N,
but the tab is not coming
following is the code snips, please tell where is the error, or some setting needs to be done
method IF_EX_ME_GUI_PO_CUST~SUBSCRIBE.
DATA: ls_subscriber LIKE LINE OF re_subscribers.
if sy-tcode eq ' ME21N' OR SY-TCODE EQ 'ME22N' OR SY-TCODE EQ 'ME23N'.
CHECK im_application = 'PO'.
CHECK im_element = 'HEADER'.
CLEAR re_subscribers[].
ls_subscriber-name = 'Customer-Data'.
ls_subscriber-dynpro = '0101'.
ls_subscriber-program = 'SAPLMEGUI'.
ls_subscriber-struct_name = 'MEPO_SUBSCRIBERS'.
ls_subscriber-label = 'Customer Data'.
ls_subscriber-position = 10.
ls_subscriber-height = 7.
APPEND ls_subscriber TO re_subscribers.
ENDIF.
endmethod.
Regards
SumodhHi...I hv similar requirement.
I need to show a custom field in the screen for the items.
I tried using the methods "SUBSCRIBE" and "MAP_DYNPRO_FIELDS" as explained in the sample code.
Below is my code. I have copied the sample code and changed it lil.
Method "SUBSCRIBE":
DATA: ls_subscriber LIKE LINE OF re_subscribers.
we want to add a customer subscreen on the item detail tab
CHECK im_application = 'PO'.
CHECK im_element = 'ITEM'.
each line in re_subscribers generates a subscreen. We add one subscreen in this example
CLEAR re_subscribers[].
the name is a unique identifier for the subscreen and defined in this class definition
ls_subscriber-name = subscreen1.
the dynpro number to use
ls_subscriber-dynpro = '9000'.
the program where the dynpro can be found
ls_subscriber-program = 'SAPLZMMPO1'.
each subscreen needs his own DDIC-Structure
ls_subscriber-struct_name = 'ZMM_PO_CUST_SCREEN'.
a label can be defined
ls_subscriber-label = text-t01.
the position within the tabstrib can be defined
ls_subscriber-position = 13.
the height of the screen can be defined here. Currently we suport two screen sizes:
value <= 7 a sevel line subscreen
value > 7 a 16 line subscreen
ls_subscriber-height = 7.
APPEND ls_subscriber TO re_subscribers.
method "MAP_DYNPRO_FIELDS":
FIELD-SYMBOLS: <mapping> LIKE LINE OF ch_mapping.
*- customer fields
CONSTANTS: mmmfd_cust_01 TYPE mmpur_metafield VALUE 90000000.
LOOP AT ch_mapping ASSIGNING <mapping>.
CASE <mapping>-fieldname.
WHEN 'CLMNO'. <mapping>-metafield = mmmfd_cust_01.
ENDCASE.
ENDLOOP.
I created a function group - "ZMMPO1" and created the subscreen 9000 in that. I placed the custom field in that screen. Tha main program of ZMMPO1 is "SAPLZMMPO1".
I created a structure also - "ZMM_PO_CUST_SCREEN".
I want to know whether this is sufficient to display the tab on the screen or am I missing something.
It is mentioned that the implementation of "ME_PROCESS_PO_CUST" is a pre-requisite.
could you lemme know the process please.
Thanks,
Ram. -
Custom screen using MB_MIGO_BADI in MIGO transaction
Using MB_MIGO_BADI i have cretaed a subscreen in MIGO transaction.WHen i select a particular item in MIGO transaction that particulra item value,i have to get into my custom code to make some validations.In which method i have to use set& get parameters.
Hi sashi,
Check the pbo and pai of that screen.
Regards,
Madhu. -
At Selection-screen using BADI
I have to add validation logic to some fields (for user inputs ) on the selection screen in transaction MEAN.
There is a BADI (ADDRESS_UPDATE)which can be used to add something while address update.
Is it possible in a BADI in general to achive the AT selection Screen functionality.
let me know if u have any inputs.
Regards
Alok PathakHi Alok,
In the BADI-ADDRESS_UPDATE, there are 4 methods. You have to find out which method saves the fields for which validation is required. In that method you can write code for the validation. If the validation fails you can give a message like
MESSAGE <message type> <message number>(<message class)>.
Hope this is helpful
Regards,
Sameena -
Hiding fields in a screen using BADI
Hi Experts
I want to invisible certain fields in the screen for certain users and it should be made visible for certain users,the requirement is to do with badi.Can anyone help me regarding this issue.
Thanks & Regards
PravithaUse (or Create) authorization [field|http://help.sap.com/saphelp_nw04/helpdata/en/52/67168c439b11d1896f0000e8322d00/frameset.htm] and [object|http://help.sap.com/saphelp_nw04/helpdata/en/52/6716a6439b11d1896f0000e8322d00/frameset.htm], in the BAdI [check this authorization|http://help.sap.com/abapdocu_70/en/ABAPAUTHORITY-CHECK.htm] and change the INVISIBLE field and not the ACTIVE field in SCREEN structure.
- [Programming Authorization Checks|http://help.sap.com/saphelp_nw04/helpdata/en/52/6712ac439b11d1896f0000e8322d00/frameset.htm]
Inform system admin to manage those new object and field in the user roles. ([SAP Authorization Concept Modules|http://help.sap.com/saphelp_banking463/helpdata/en/5c/deaa74d3d411d3970a0000e82de14a/frameset.htm])
Regards,
Raymond
NB: The "d" of BAdI should always been in lowercase, except in statement GET BADI... -
Could not get Custom screen in me21n after implementing Badi ME_GUI_PO_CUST
Hi.,
I created implementation for the badi ME_GUI_PO_CUST... but i could not get the Tab and screen in header tab.
also used below link in the forum to correct the issue ....but dint help me .
Custom screen not displaying using BADI ME_GUI_PO_CUST
Pls help me how to go abt...
Thanks,
Ranjitha.Hi ....
Now the tab is reflecting in me22n & me23n but not in me21n ......can anybody tell what could be the reason?
thanks
ranjitha -
BAdI: ME_GUI_PO_CUST add customer field to item level
Hi Experts,
I want to add a customer field to PO item level, how to do that? the functional consultant told me to first implement the BAdI: ME_PROCESS_PO_CUST before I can use BAdI: ME_GUI_PO_CUST, can anyone show me the procedure on how to implement this? thanks in advance.
Kind regards
DawsonHi Dawson,
Those BADIs are having good documentation and sample code. Once gone through the documentation, you can refer below thread.
Re: ME_GUI_PO_CUST & ME_PROCESS_PO_CUST - ME21N/ME22N/ME23N
Reddy
Maybe you are looking for
-
Can't use iCloud or restore my iPhone because of old apple ID
I recently changed the email address on my apple ID. When I updated to iOS 7, iCloud decided it wanted to use my old email address. I don't think there is any way to simply log into a different iCloud account. When I try to delete the account, it ask
-
Router turns security on for no reason
I have a BEFW11S4 V2 router, with latest firmware, and no security set up in a household of one wired wesktop and four laptops (including an additional WUSB11S4 v2 connected new HP desktop) For no reason I can see, it sometimes turns its security on,
-
Hi, i have just recently started experiencing a slow adsl connection. For 5 years i have had no real problems except random diconnections, until recently.For the last week my connection has dropped from a 1500kb/s connection to roughly a 256k connect
-
LMS 3.2 Syslog purge job failed.
We installed LMS 3.2 on windows server 2003 enterprise edition. RME version is 4.3.1. We have created daily syslog purge job from RME> Admin> Syslog> Set Purge Policy. This job failes with the following error. "Drop table failed:SQL Anywhere Error -2
-
Cost Center Utilization and Billing
\Here is the issue, As we know for FOC orders the COST CENTER field can be utilized but billing cannot be done. Is there any possiblity in SAP to have a cost centre in order and billing is akllowed. Or it is logically incorrect?Please give me an anwe