Function Module/BADI
Hi,
We are implementing ESS for US.
Our client wants the employee to create the Benefit adjustment reason in ESS itself wherein standard SAP does not have this provision.
Hence kindly let me know the RFC Function module/BADI to create Adjustment reason and then follow the enrolment.
I want the input parameters like employee number, date, adjustment reason.....
3 input field
check BAPI "EmployeeBenAdjReason.Create" or function module "HR_BEN_BENADJREAS_CREATE".
it creates an adj. reason (IT0378) based on: Employee number, date of validity and adj. reason.
note: you need to pass the adj. reason as a BOR object to the function module.
Tiberiu
Similar Messages
-
Function modules, BADI's
Hello experts,
Is a SAP CRM Service/Sales functional consultant expected to make changes to the code in a BADI/FM ? What is his/her role when it comes to BADI/FM?Hi King,
As a functional consultant you are supposed to be a bridge between the customer and consulting organization where in you undersatnd the business scenarios and map them onto SAP. There will be few scenarios which a standard product will not have and they have to be developed.
These have to be explained to the development team of what and how you want things to happen. The Development Team will not be specialists as a functional consultant in a specific area like ABAPers can work on R/3, CRM, APO etc and they do not understand module specific BADI and BAPI or FM. They need some initial handholding and that is where a functioanl consutlant will help them to invstigate further into some BAPI, BADI and they will do the code changes and you need not be a hard core ABAPer or learn ABAP for this.
Thanks
Srini -
Function Module/Badi to change internal order
Hi All,
Can any one please let me knw the FM or BADI to change an internal order.Hi Shilpa.
I would like to suggest a few,
BAPI_INTERNALORDER_CREATE - Create Internal Order From Transferred Data.
BAPI_INTERNALORDER_GETDETAIL - Delivers master data, statuses, and allowed transactions for internal orders
BAPI_INTERNALORDER_GETLIST - Delivers lists of internal orders according to various criteria.
BAPI_INTERNALORDER_SAVEREPLICA - Replicate Individual Internal Order (ALE).
A few more apart from BAPIs are -
ALE_INTERNALORDER_CREATE
ALE_INTERNALORDER_DB_CHANGE
ALE_INTERNALORDER_SAVEREPLICA
IDOC_INPUT_INTERNAL_ORDER
IDOC_INPUT_INTERNAL_ORDER_CREA
Hope that's usefull.
Good Luck & Regards.
Harsh Dave
Edited by: Harsh Dave on Jul 14, 2008 2:37 PM
Edited by: Harsh Dave on Jul 14, 2008 2:40 PM -
Function module expression for dynamic value for Cost center in BRF
Hello Experts,
We are in SRM 7.0 and our business object is shopping cart using BRF.
Right now we have Cost Center Approver and its evaluation id ()zev_sc_**_*) has expression zc_sc_*_** that checks whether overallvalue >= 5000. It initiates cost center approver only if value is greater than or equal to 5000. But this is static expression. We want it in a dynamic way so that we don't have to modify this value frequently. Therefore we have set approach to use an expression of Function Module BAdI as expression. We have a new z table which contains value field zval. Now I want to know how or what should be the process so that this FM knows the corresponding value from a z table that user might select in the SC.How it should be linked to this. I am using /SAPSRM/WF_BRF_0EXP000 function module. Please advise where should the code be written ? Any method ? And what should be the exporting and importing parameters for this ?
Right now I can see EV_VALUE, EV_TYPE, EV_CURRENCY etc as exporting paramters. Looking for your suggestions experts.
Thank you.
Best regards.Dear abhijeet,
just follow the steps.
i) I believe you have created the event as Zev_*** with implememt Class 0EVENT.
ii) copy the std fm /SAPSRM/WF_BRF_0EXP000 to z custom fm
iii) since you want to have an expression as function module procurement type create expression with
expression type 0CF001
result type B ( boolean)
Buffering as event-controlled buffering
and very important procurement type as function module.
iv) immediatly you may find written as AccessFM where pass your custom z function module.
v) finally link this expression to your event.
In the custom function module the exporting parameter EV_VALUE is solely responsible for identifieng the approval based upon the approval criteria. If the field EV_VALUE = 'X' this notify that the approval is required for current process level, otherwise if it is initial then it will skip the current level and continue with the next level.
whatever your coding should be written in FM.
just look into below code
DATA LO_WF_BRF_EVENT TYPE REF TO /SAPSRM/CL_WF_BRF_EVENT.
DATA LO_CONTEXT_PROVIDER TYPE REF TO /SAPSRM/IF_WF_CONTEXT_PROVIDER.
DATA: LV_HEADER LIKE BBP_PDS_SC_HEADER_D.
DATA: LT_ITEM TYPE STANDARD TABLE OF BBP_PDS_SC_ITEM_D.
LO_WF_BRF_EVENT ?= IO_EVENT.
LO_CONTEXT_PROVIDER = LO_WF_BRF_EVENT->GET_CONTEXT_PROVIDER( ).
CALL METHOD LO_CONTEXT_PROVIDER->GET_DOCUMENT
IMPORTING
EV_DOCUMENT_GUID = LV_DOCUMENT_GUID
EV_DOCUMENT_TYPE = LV_DOCUMENT_TYPE.
pass this guid in the below function module in order to get the SC details.
GET SC DETAILS
CALL FUNCTION 'BBP_PD_SC_GETDETAIL'
EXPORTING
I_GUID = LV_DOCUMENT_GUID
IMPORTING
E_HEADER = LV_HEADER
TABLES
E_ITEM = LT_ITEM
After that loop the internal table LT__ITEM and you decide based upon your approval criteria for each line item level wheather the gross price of line item is exceed 5000k or not.
you should decide the value for field EV_VALUE within the loop so that each line item will be verified for approval.
Pls contribute if this helpfull.
regards
sahil purushan -
Enhancement points option: Function modules or BADI
Hi, I am on ECC 6.0 and I need to validate and set some requirement in customer sales area data when user input the document output message in Documents tab strip screen 7003 of sapmf02d in transaction XD01 or XD02.
I found that there is function module EXIT_SAPMF02D_001 that I probably can use to create an implicit enhancement point to validate table T_KNVD or I can use BADI customer_add_data. Can someone suggest which way is better and why? I am new to this so could someone show me screen by screen on how to create and implement BADI.
I am confusing about should I create a ZBADI or using existing BADI customer_add_data. If I use existing BADI how can I add my own method with my own code.
Thanks.Thanks. Could you explain to me how does the custom BADI get call to execute my code? Say
I have a customer document screen 7326 (Customer Master Subscreen SD Documents in program SAPMF02D). What I want is when user click save, I want to do some validation on the output message that they enter and issue some warning or error messages.
I am on ECC 6.0 so I can create a BADI from Enhancement spot not from SE18. SAP has a BADI called CUSTOMER_ADD_DATA with class CL_EX_CUSTOMER_ADD_DATA and interface IF_EX_CUSTOMER_ADD_DATA.
When I create a ZBADI_CUST, which interface class I put in the IF_EX_CUSTOMER_ADD_DATA
or a ZIF_EX_XX so that I can create my own method? How does the BADI get called when I am in transaction XD02 and click the save button? Could you kindly show me step by step the procedure.
Thanks. -
Function module (FM) to read budget to be used in n-step approval badi
We have SRM 5.0 with ECC 6.0 (extended classic). For capital expenses we are going to have budget check in SRM based of account assignment internal orders in R/3. In shopping cart line item approval workflow, it is required to read the budget available for that internal order and compare with shopping cart value...what is the function module to read budget assigned to that internal order, that will used in n-step approval badi at every step??
Thanks,
Kim r.Hi
<b>Please try the related SRM function modules, which will definitely help -></b>
B470_BUDGET_READ
BBP_PD_USER_BUDGET_AMOUNTSPENT
BBP_PD_USER_BUDGET_CHECK
BBP_PD_USER_BUDGET_DEFINED_GET
BBP_PD_USER_BUDGET_SAVE
BBP_PD_USER_BUDGET_SCVALUE_GET
BBP_REQREQ_CHECK_BUDGET
META_BUDGET_READ
META_BUDGET_READ Function module in turn calls RFC-enabled 'BBP_BUDGET_READ' Function module in the R/3 or the ECC System.
Hope this will definitely help.
Do let me know.
Regards
- Atul -
Function Module for creation of variant in BADI
I need to create a variant to store shipment no's which are coming in BADI. And variant need to be passed to a report which has to be run Background. can anyone help me out how to do it. Can anyone know the function module for this.
Hi Anirban,
Use the bapi BAPI_BUSPROCESSND_CREATEMULTI to achieve the same.
<b>Reward points if it helps.</b>
Regards,
Amit Mishra -
BADI or function module for updating open purchase orders
Hi all,
Does anyone know of a BADI or function module which can be used for updating item prices in open purchase orders?
All helpful answers are highly appreciated!
Regards,
MV1 ) execute this program in se38 .enter the input as transaction code for which you want list of User
Exit.
REPORT z_find_userexit NO STANDARD PAGE HEADING.
*& Enter the transaction code that you want to search through in order
*& to find which Standard SAP® User Exits exists.
*& Tables
TABLES : tstc, "SAP® Transaction Codes
tadir, "Directory of Repository Objects
modsapt, "SAP® Enhancements - Short Texts
modact, "Modifications
trdir, "System table TRDIR
tfdir, "Function Module
enlfdir, "Additional Attributes for Function Modules
tstct. "Transaction Code Texts
*& Variables
DATA : jtab LIKE tadir OCCURS 0 WITH HEADER LINE.
DATA : field1(30).
DATA : v_devclass LIKE tadir-devclass.
*& Selection Screen Parameters
SELECTION-SCREEN BEGIN OF BLOCK a01 WITH FRAME TITLE text-001.
SELECTION-SCREEN SKIP.
PARAMETERS : p_tcode LIKE tstc-tcode OBLIGATORY.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN END OF BLOCK a01.
*& Start of main program
START-OF-SELECTION.
Validate Transaction Code
SELECT SINGLE * FROM tstc
WHERE tcode EQ p_tcode.
Find Repository Objects for transaction code
IF sy-subrc EQ 0.
SELECT SINGLE * FROM tadir
WHERE pgmid = 'R3TR'
AND object = 'PROG'
AND obj_name = tstc-pgmna.
MOVE : tadir-devclass TO v_devclass.
IF sy-subrc NE 0.
SELECT SINGLE * FROM trdir
WHERE name = tstc-pgmna.
IF trdir-subc EQ 'F'.
SELECT SINGLE * FROM tfdir
WHERE pname = tstc-pgmna.
SELECT SINGLE * FROM enlfdir
WHERE funcname = tfdir-funcname.
SELECT SINGLE * FROM tadir
WHERE pgmid = 'R3TR'
AND object = 'FUGR'
AND obj_name = enlfdir-area.
MOVE : tadir-devclass TO v_devclass.
ENDIF.
ENDIF.
Find SAP® Modifications
SELECT * FROM tadir
INTO TABLE jtab
WHERE pgmid = 'R3TR'
AND object = 'SMOD'
AND devclass = v_devclass.
SELECT SINGLE * FROM tstct
WHERE sprsl EQ sy-langu
AND tcode EQ p_tcode.
FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
WRITE:/(19) 'Transaction Code - ',
20(20) p_tcode,
45(50) tstct-ttext.
SKIP.
IF NOT jtab[] IS INITIAL.
WRITE:/(95) sy-uline.
FORMAT COLOR COL_HEADING INTENSIFIED ON.
WRITE:/1 sy-vline,
2 'Exit Name',
21 sy-vline ,
22 'Description',
95 sy-vline.
WRITE:/(95) sy-uline.
LOOP AT jtab.
SELECT SINGLE * FROM modsapt
WHERE sprsl = sy-langu AND
name = jtab-obj_name.
FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
WRITE:/1 sy-vline,
2 jtab-obj_name HOTSPOT ON,
21 sy-vline ,
22 modsapt-modtext,
95 sy-vline.
ENDLOOP.
WRITE:/(95) sy-uline.
DESCRIBE TABLE jtab.
SKIP.
FORMAT COLOR COL_TOTAL INTENSIFIED ON.
WRITE:/ 'No of Exits:' , sy-tfill.
ELSE.
FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
WRITE:/(95) 'No User Exit exists'.
ENDIF.
ELSE.
FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
WRITE:/(95) 'Transaction Code Does Not Exist'.
ENDIF.
Take the user to SMOD for the Exit that was selected.
AT LINE-SELECTION.
GET CURSOR FIELD field1.
CHECK field1(4) EQ 'JTAB'.
SET PARAMETER ID 'MON' FIELD sy-lisel+1(10).
CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
2) Second way is to go to transaction code SE93 .enter transaction code click on display.
There you will see the package. Copy that package name.
Go to transaction code se84
Enhancements -customer exits-enhancementsu2014enter package there and execute.
You will get list of exits.
3) BAPI for PO change is
BAPI_PO_CHANGE -
Hi BW gurus
I have a datasource 0CRM_SRV_PROCESS_H and i need to enhance it where the table is BUT000 source field is PARTNER
in the datasource im taking ZZENDCUST as the enhanced field for that i have a pseudo code like (Use FM CRM_ORDER_READ. Pass Transaction number GUID and get Partner from the table ET_PARTNER (Field: PARTNER_NO) where PARTNER_FCT = u2018ZECu2019.).This pseudo code is for my reference .My requirement is that i need to use a standard BADI RSU5_SAPI_BADI for this .how to go with this requirement.I need to know that how the BADI and function module can be linked.
Regards,
SivaHi Siva:
You need to look for "Enhancing datasources". Basically, in the source system, go to
t-code: SE18
Select: BADI NAME: RSU5_SAPI_BADI
In the Menu: Enhancement Implementation, select: Create.
You can also display the BADI and click on the documentation, there is good information there.
See this link for more information:
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/3001894b-b1fb-2910-77ba-e80b6f2053b7?QuickLink=index&overridelayout=true -
Use of function module : NUMBER_GET_NEXT in BADI TRIP_WEB_NUMBER
Hi All,
I am implementing BADI TRIP_WEB_NUMBER and using function module NUMBER_GET_NEXT to get the next number from a number range when the function module throws an exception how can i pass the exception to the exporting parameter
of the BADI 'RETURN' which is of table type BAPIRETTAB.
Do i need to handle exception as below?
Case sy-subrc
When '1'
ls_return- MESSAGE = 'error message 1'
When 2
ls_return- MESSAGE = 'error message 2'
What should i pass in the other fields of ls_return i mean like TYPE,ID,NUMBER etc??Hi
You have to pass the message in the proper structure in the RETURN parameter
Exampple
return-type = 'E'.
return-number = '12'.
return-message = 'number generation error'
Regards
Vijay V -
Regarding the usage of HR_INFOTYPE_OPERATIONS function module in ECM badi i
Hi All,
We have requirement where we need to update the infotype 0015 while implementing the badi 'HRECM00_ACTIVATION'.
To achieve this functionality we are calling the HR_INFOTYPE_OPERATION function module to update the infotype 15. But we are getting the runtime error.
Can some one suggest how to solve this issue.
Thanks & Regards,
Sreelatha Gullapalli.thanx for ur reply...
But i want to use Transmission Medium 5 only as i have the requirement to Send the data as an EMAIL or FAX depending on the Communication Method specified in the Partner Number.
Actually SAP Help also explains the usage of this medium using the same requirement as mine... but then it never anywhere specified on how the Print Program will be...
I also checked the standard output type CPAC used in Application V7 to which transmission medium 5 is assigned. And the print program assigned to this output type has no coding on sending the email using the FM. So i am very very confused.... I have seen few postings in this forum on this topic.. but not clear enuf to clarify my confusion...
Kind Regards,
Tanuja -
Hi,
Anyone know of any BADI or function module for amending Account Assignment in Purchasing Document (PR, PO)?Go to se18,
Check both BADI names:
ME_PROCESS_PO_CUST and
ME_PROCESS_PO_CUST.
If you want to use it at save: you can select the method: Post,
if you want to code after save( after completion of transaction) then go for method: CLOSE.
Reward point if helpful,
Rgs,
Ashok -
Issue with function module HR_INFOTYPE_OPERATION in badi HRPAD00INFTY
Hello All,
I have a business scenario wherein, when user saves data for infotype 0002 from tcode PA30, i have create a new record for infotype 0105 by copying existing record and just changing the date.
For the same I am using funtion module HR_INFOTYPE_OPERATION inside badi HRPAD00INFTY method AFTER_INPUT.
When I am running the same function module in a independent program, its running fine. But when I run it inside the badi method, it runs with sy-subrc = 0 and no error, but later in the standard program MP000200,in pai module PRE_INPUT_CHECK, it tries to execute this statement MOVE <namst> TO <subty> and gives dump, with runtime error MOVE_TO_LIT_NOTALLOWED_NODATA and saying that "Error at assignment: Overwritten protected field.".
Have tried all the options of function module HR_INFOTYPE_OPERATION, but nothing is helping.
Kindly let me know if any information on the same.
Best Regards,
Rahul MalaniHave you checked what's in the Subtype field of table T777D for infotype 0002?
IF t777d-namst ne space. "QNOK025939
MOVE <namst> TO <subty>.
ENDIF.
Usually this sentence won't be executed unless there is something in that field. Usually we don't have subtypes for IT0002.
Also make sure that the infotype that gives the dump is 0002 and not 0105.
Regards. -
BADI /BAPI /Function Module in PP
PP Experts,
I need help to identify the BADI /BAPI /Function Module in PP for
BOM Explosion multilevel (TXn CS11)
Planned Order Create and Change (Txn MD11/MD12)
Production Order Create and Change (CO01/CO02)
Simulation Order (Co01S/Co02S)
Appreciate your valuable inputs.
Thanks and Regards,
PradeepHi,
Following Enhancements available for the said T-Codes
Transaction Code - CS11 Display BOM Level by Level
Enhancement
PCSD0014 Wissensbasierte AuftragsStl:Status setzen beim fixieren
PCSD0013 Customer-specific processing of an explosion for BOM browse
PCSD0012 Customer - Mat. number/mat. number during material exchange
PCSD0011 Knowledge-based order BOM, parallel update
PCSD0010 Order/WBS BOM, determine explosion date
PCSD0009 Order/WBS BOM, determine URL page
PCSD0008 WBS BOM: Customer-specific explosion for creating
PCSD0001 Applications development R/3 BOMS
PCSD0002 BOMs: Customer fields in item
PCSD0003 BOMs: Customer fields in header
PCSD0004 BOM comparison
PCSD0005 BOMs: component check for material items
PCSD0006 Mass changes user exit
PCSD0007 Check changes in STKO
Business Add-in
BOM_EXIT BOM User Exit
BOM_IPPE iPPE Checks Within BOM Maintenance
BOM_UPDATE Maintain BOMS
CEWB_BOM_CUS_FIELDS EWB: Customer Fields with BOM Header (Screen Enhancement)
CEWB_BOM_UPDATE Check Bill of Material on Saving
CEWB_ITM_CUS_FIELDS EWB: Customer Fields with BOM Item (Screen Enhancement)
Transaction Code - MD11/MD12 Create Planned Order
Enhancement
LMDR2001 User exits restr. profiles of opt. pur.ord.-based load bldg
LMDZU001 User exits in additional planning
Transaction Code - CO01/CO02/CO01S/CO02s Create production order
Enhancement
PPCO0010 Enhancement in make-to-order production - Unit of measure
PPCO0012 Production Order: Display/Change Order Header Data
PPCO0013 Change priorities of selection crit. for batch determination
PPCO0015 Additional check for document links from BOMs
PPCO0016 Additional check for document links from master data
PPCO0017 Additional check for online processing of document links
PPCO0018 Check for changes to production order header
PPCO0019 Checks for changes to order operations
PPCO0021 Release Control for Automatic Batch Determination
PPCO0022 Determination of Production Memo
PPCO0023 Checks Changes to Order Components
STATTEXT Modification exit for formatting status text lines
PPCO0009 Enhancement in goods movements for prod. process order
CCOWB001 Customer exit for modifying menu entries
COIB0001 Customer Exit for As-Built Assignment Tool
COZF0001 Change purchase req. for externally processed operation
COZF0002 Change purchase req. for externally procured component
PPCO0001 Application development: PP orders
PPCO0002 Check exit for setting delete mark / deletion indicator
PPCO0003 Check exit for order changes from sales order
PPCO0004 Sort and processing exit: Mass processing orders
PPCO0005 Storage location/backflushing when order is created
PPCO0006 Enhancement to specify defaults for fields in order header
PPCO0007 Exit when saving production order
PPCO0008 Enhancement in the adding and changing of components
Business Add-in
SIDAT_UPDATE Change date of price simulation
CAUFVD_CHANGE BAdI: Overall Network Scheduling with Selection Option
AFABD_CHANGE Change Relationship
PPPI_SEL_ORD_EXT_REL
Regards
Ahsan -
hi,
have anyone worked with function module in BADI.if so plz
let me know how how to do
my current requirment is on that
poits will be rewarded
regards
rajHi Raj,
check out these links
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d0456c54-0901-0010-f0b3-cd765fb99702
Differences between BADI and User Exits
BADI's
BADI
CMOD Vs BADI....!!!!!!!!!
http://help.sap.com/saphelp_erp2005/helpdata/en/a3/1d40425c459923e10000000a155106/frameset.htm
BAdI(Business Addins) are enhancement techniques using Object Oriented Technique.
Users of BAdI can customize the logic according to the specific requirements (User-defined) or use the standard logic available.
Each Business Add-In has
At least one BAdI definition
A BAdI interface
A BAdI class that implements the interface
For User-defined BAdI,
developer creates an interface for the add-in.
Enhancement management creates an adapter class that implements the interface
Developer creates an instance of the class in the application program and calls the corresponding methods.
For standard BAdI, interface and class will be predefined by SAP.
Adapter class performs these tasks
Control ( the class calls all active implementations)
Filtering (If the Add-in has to be executed under certain conditions, the class ensures that only certain implementations are executed)
Maybe you are looking for
-
How to connect play book to lcd tv
Dear Sir, I m connecting Micro HDMI to HDMI Cable through play book to lcd but showing not connected please guide. Thanks and Regards, Arman
-
Setup of a standby and a streams - architectural question
Hi, I am thinking about a standby (prodstdby) for my Production (prod) database. For another part of the company we need to setup streams (HIS), this will copy only a part of the database ( some sort of archiving) to a database called HIS. During the
-
Adding a row in matrix[Update Mode]
Hi All, I am using a document type table, which has a matrix and i have created the UDO for dis. in Add mode its working properly. In update mode also its working properly but when i add a new row in the matrix its displaying the previous rows data n
-
When in Excel, I try to pring fast draft or regular draft both with plain paper. For some reason, I can't choose plain paper from the paper selection as it is grayed out. So when I print anything, it takes forever and colors it pixel by pixel. No mor
-
Has anyone moved messenger from Netware to Linux? I have Messenger installed on Netware 6.5. I am wanting to move Messenger to SLES 10 SP2. Same NDS tree, just wanting to move servers.