Field restriction for ME22N using BADI
Dear All,
i had a requirement in which i had to restrict ME22N transaction for a particular user for a particular document type
so i used BADI ME_PROCESS_PO_CUST now the requirement has changed and the user wants the restriction only on three fields rather than entire transaction.
is there any provision in BADi by which i can prevent changes made to a particular fields the fields are QUANTITY,RATE PER UNIT & PAYMENT TERMS fields,by throwing error message if changes are done and for other fields changes should be allowed .
my code is as below
method IF_EX_ME_PROCESS_PO_CUST~CHECK.
IF SY-TCODE = 'ME22N'.
DATA: IT_MEPOHEADER TYPE MEPOHEADER.
IT_MEPOHEADER = IM_HEADER->GET_DATA( ).
IF IT_MEPOHEADER-BSART = 'ZLNB' OR IT_MEPOHEADER-BSART = 'ZLUB' OR IT_MEPOHEADER-BSART = 'ZLS'
OR IT_MEPOHEADER-BSART = 'ZLC' OR IT_MEPOHEADER-BSART = 'ZLFO' OR IT_MEPOHEADER-BSART = 'ZLLN'
OR IT_MEPOHEADER-BSART = 'ZLDB'.
IF SY-SUBRC = 0.
IF SY-UNAME = 'ABAP05' .
Message 'You are not authorized to use ME22N for the given document type' type 'E'.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
endmethod.
can anyone plz help me
Thanks in advance,
Ronak
Dear All,
plz let me know if there is any other alternative (other than BADI) to restrict based on filteration for user , document type , and the three fields i have mentioned..
Regards Ronak
Similar Messages
-
Restriction for the use of last_record in 10g forms
Hi,
When I was working on Forms 6i with the query in the trigger When_new_form_instance:
go_block('ABC');
execute_query;
last_record;
first record;
go_block('DEF');
execute_query;
last_record;
first record;
It worked and gave correct data on frontend.
When the same was used in 10g forms, it gave incorrect data.When we removed last_record from the query, it worked.
Could somebody tell me is there some kind of restriction for the use of last_record in 10g forms? If yes, what kind of?
Thanks,
NehaWhen I set Query All records to Yes.
Surprisingly it gives incorrect data.
This is what is bothering me.
As i said earlier i was using last_record for
navigation purpose to fetch all the records from the
database and then first_record to highlight the first
record.
You don't need to do that, that is poor programming logic. Instead change the block property Query All Records and set it to Yes.
This will fetch all the records from the database and the highlight will be on the first record;
Regards,
Tony -
Restrictions for the use of MapKit in a paid iOS6 app that caches map tiles.
Can anybody advise what restrictions exist for the use of MapKit for a paid app that caches map tiles for off-line use. The app is targetted at iOS6 and above. I haven't found any clear answers on this,
Is there a cost associated with using map tiles if you charge more than $0 for the app? I understood that this could not be done for free in iOS 5 due to Google licence terms.
Also, under the iOS6 Apple Maps licence, can map tiles be cached for off-line use?
Many thanks to anyone who has the answer to these questions. A link to a document from Apple would be fantastic.
GeoffJust in case you didn't already go there and see it, there is a specific developer forum for discussing MapKit and some other things I can't talk about in a public place. Look for a developer forum that mentions maps in the name and that'll be it. The people there can answer your question if it hasn't already been answered.
-
Field symbols for tables used under tables tabstrip in bapi
Hi all,
I am created a bapi and under tables tabstrip i have given 3 tables,
Inside the bapi , i have written a perform statement which returns these 3 tables .
PERFORM bapi_sales TABLES it_valid it_error it_errorc USING testrun.
how can we create field symbols for these tables ?
Regards
Nagarahhi,
goto: system-utilities- debug system
A.
Message was edited by: Andreas Mann -
Screen-exit for xk01 using badi
Hai.. all.
i want to add customized screen for xk01.
by using badi i hav tried it its working and whatever the value am giving into screen is also updating into table .but my problem is while adding this screen in xk01 it is also updating xk02, xk03.
but in xk03 it should be in dispaly mode . in which method it hav to write code for diaplay mode screen
can anybody suggest me how to write it .........................
tanx in advance..............Modify the screen attributes to make them display only for transaction XK03. Write code in PBO of custom screen by using Loop at screen.....if sy-tcode = 'XK03'.....Endif......Endloop.
Thanks
Amol Lohade -
How to set screen properties for Customer fields in PO(Enhanced using BADI)
Hi All,
I have added one custom tab with seven fields in the PO item level using the BADI 'ME_GUI_PO_CUST and ME_PROCESS_PO_CUST'.
Now i want to change the screen property dynamically. According to some calculation i need to change the customer fields in display mode and change mode. when ever it is in change mode i need to set the fields as mandatory.
How can i implement this logic using this BADI. Please help in solving this issue.
Best regards,
Kannan. BHi,
Try adding the code in the PBO part of your custom program used for the custom screen which you have created and added inside the BADI.
Regards,
Harish -
During PO creation vendor material no field should be populated using BADI
Hi,
I have created on PR and using PR I am trying to create PO. But one field vendor material no remains blank when giving vendor at the top vendor field.
So my requirement is the vendor material no field in item overview should be populated regardless filling vendor field at the top.
So this functionality can be achieved by BADI or User exit.
So any one give the proper suggestion to get the value in the vendor material no field while creating PO.
Waiting for quick response.
Best Regards,
BansiHi,
use the badi ME_PROCESS_PO_CUST in that method PROCESS_ITEM....
use GET_DATA method like im_item->get_data.
and modify the value anduse set_data ...
Thanks,
Shailaja Ainala. -
Make a field of transaction mandatory using badi/exits.
Hi ,
I'm asked to make a field of transaction CO11 mandatory.when the user enters a value into scrap/rework field, a message has to be displayed saying that reason for variance is mandatory and should allow the user to enter the value into this without exiting from the transaction.
Please give me the solution other than creating transaction variant thruogh SHD0.hai krupa, go to se24 and type CL_EXITHANDLER in this class go to method GET_INSTANCE and put break poitn at CALL METHOD cl_exithandler=>get_class_name_by_interface and u enter the transaction and ur debug will stop at this point and see the exti name in exit_name field , this is the badi used in particual screen , and where u want to get the message find the badi definition , and go to transaction se19 and implemetn it and here u cna check the condtion and put the message
afzal -
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... -
Validate a field entered in infotype using BADI
I am writing code in PAI method of BADI HRPAD00INFTY for implemetation class CL_PT_P2012_IF to capture the number the hours entered in infotype 2012 and validate that it is not more than 40. I am not able to field any field in the parameters which corresponds to number of hours entered by the user. Can anyone please suggest me a way to get them.
Regards,
SaurabhIn The PAI
FIELD <DATEFIELDNAME> MODULE CHECK_DATE ON INPUT.
In Proram
MODULE CHECK_DATE.
<Your Check here>
ENDMODULE.
The above module will be triggered only on an entry or change in the date field
Cheers -
Changing Exchange Rate for MIGO using BADI
Hi all,
While processing <b>IMPORTS GR</b>.....
How can I change the Exchange Rate by using <b>BADI</b>
Regards
RajkumarHi,
While creating Purchase order we mention the Exchange Rate there in Header Detail for Delivery/Invoice Tab. To do excahange rate before GR means Change the exchange rate in PO.B ecause in mIGO the excahnge rate will be taken from PO. u can change the exchange rate in Me21n or in OB08.I f the excahange rate selectedas fixed you can't change the excahange rate keep as it is and fix the indactor as fixed. Hope it works. Thanking you. -
Screenexit for xk01 using badi
Hai experts..
how can we find the screen exits for a parricular transaction.
in ecc6.0 : in xk01 how can we ffind the screen exits which was activated.
for example : i think in xk01 after enerting into xk01 goto-enhancements ther we can find.
but it is not in activate state but while going to spro : some screen-exits are found
how can we active that that enhamcements ..
in ecc6.0 am not getting that enahcemnt screens to toHi,
Using SE84 you can find the User exit and BADI.
Another process is Open the Class CL_EXITHANDLER.
Open the method get_Instance
and put braek point in CALL METHOD cl_exithandler=>get_class_name_by_interface.
then run the transaction.
It will give you all the BADI.
Search in the Forum and you will get some more thread on this.
Regards
Sandipan -
Do the fonts in Photoshop CS4 have any restrictions for commercial use?
I am a designer and I wanted to know if there were any restrictions in the Photoshop CS4 Extended version concerning font usage? I have read all the terms but I got confused after awhile. I wanted to make sure there are no restricted usage if I use any of the fonts incorporated into my designs which are then resold? Thank you in advance!
Thank you for your response. Just to be clear: essentially I can use the fonts in my designs for say cell phone skins and music album covers but cannot not ( of course) resell the original fonts correct? Thanks again for your help! I have tried calling and been on hold forever, then tried emailing support and they said I had to call because it is a technical issue. Lawyer speak in the terms confuses me easily:)
-
Restrictions for Queries using Convert to Formula
Hi all,
When I want to <b>use the "Convert to Formula" Function in a query are there any restrictions</b>? I.e. are there any <b>restrictions in the way the underlying query needs to be built to be able to use this function properly</b>?
Do you know any documentation referring to this?
Thanks
Christian
Message was edited by: Christian TauberPrakash,
Thanks for the response. You are right about the cell editor and the need for two structures. Also you are right about the "convert formula" option in BEX runtime and one structure. However, I thought that in order for you to be able to use the refernce in additional calculations locally in BEX workbook two structures are required for the reference to be known. That is the experience that we had while working on a scenario here at our client site.
Regards,
Farzad -
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.
Maybe you are looking for
-
New field catalog VOLEH does not display while creating a new table
Dear Gurus, I added new field as VOLEH in field catalog. However while I am creating a new table, new field (VOLEH) does not showed in field catalog... How can I fix this error? Kind Regards,
-
i HAVE AN iPad iii. iT HAS about 4000 photos on it. I just bought a new PC and the IT people did not copy all the photos from the old computer but they are all on my Ipad. Is there a way to upload those photographs to ITUNES and have them stored on
-
Hi, We have File(NFS) -> File(FTP) scenario in production environment. We have developed only ID part for this scenario. Sender is sending file in increasing order 1,2,3..... Sender File adapter - EO Receiver file adapter mode - Create Issue - Many t
-
Menu button text disappears only on some players
I built and formatted a project using DVDSP 3.0.2. Menus were created in DVDSP. The main menu and scene selection menus look correct on all software players and most set top players I tested. However, on some set top players, including a Sony I tried
-
Mc book pro 15 inch retina display
I am ordering a 256 GB flash storage 15 inch retina display mc book pro. Could you please tell me, what the actual usable storage i will get - 256 or lesser?