Hierarchy

⤷

⤷

IMG Activity
ID | SIMG_PSMFG_AP_PRVAL | BAdI: Change Values to be Transmitted to the Asset Record |
Transaction Code | S_PLN_06000401 | (empty) |
Created on | 20030709 | |
Customizing Attributes | SIMG_PSMFG_AP_PRVAL | BAdI: Change Values to be Transmitted to the Asset Record |
Customizing Activity | SIMG_PSMFG_AP_PRVAL | BAdI: Change Values to be Transmitted to the Asset Record |
Document
Document Class | SIMG | Hypertext: Object Class - Class to which a document belongs. |
Document Name | FMFG_AC_PROP_VAL |
Use
This BAdI allows you to change the values to be passed to the asset master record.
Method: CHANGE_VALUES
Requirements
You must be using the Accountable Property program. In the program logic, many fields are calculated and MM Purchasing information is passed to the BAPI which creates the Asset Master. If you want to change any of the data that will be passed to the asset master, you change it here.
Standard settings
One asset or subasset will be created for each item. You can identify which purchasing data the asset represents by the importing fields PO number, PO item number, and account assignment.
You can then change the data in the "changing" tables below, and these updates will be passed back to the Accountable Property program for asset creation or posting.
PO_NUMBER Importing
PO_ITEM Importing
ACCOUNT_ASSIGNMENT Importing
GEN_DATA Changing
GEN_DATAX Changing
ACQUIS_DATA Changing
POSTING_DATA Changing
REAL_ESTATE Changing
REAL_ESTATEX Changing
POST_DATA Changing
POST_DATAX Changing
TIME_DEP_DATA Changing
TIME_DEP_DATAX Changing
Example
You want to assign a unique inventory number for each asset created:
*---- If a field that is required is empty, pass it the value you would
*---- like it to have, here we create a inventory number for the
*---- asset master record
IF gen_data-invent_no IS INITIAL.
*---- Execute customer function to get next inventory number
call function 'ZZ_GET_INVENTNO'
importing
invent_no = new_inventno.
gen_data-invent_no = new_inventno.
gen_datax-invent_no = 'X'.
ENDIF.
Method MESSAGE_EXCEPTION
The method MESSAGE_EXCEPTION allows you to suppress the error messages proposed by the program where required fields are not filled. This can be used where it is known that the required field will be populated later by the BAdI.
In some circumstances, you may want to add required fields to the asset after the program has executed. To suppress errors in posting to assets that are incomplete, perform FI-AA customizing which will allow message AAPO 184 to be displayed as a warning, and not an error. Although it is not recommended, assets can be created in an incomplete state and updated later, after asset record creation and acquisition posting.
The typing for the local table which you assign to the table parameter REQ_FIELD should be similar to the example in the sample implementation.
Activities
After calling up the IMG activity, a dialog box appears, in which you can enter a name for the implementation.
If you have already made other implementations for this BAdI, another dialog box appears, in which the existing implementations are displayed. In this case, choose Create, and proceed as follows:
- In the dialog box, enter a name for the BAdI implementation in the Implementation field, and choose Create.
The screen for creating BAdI implementations is now displayed.
- Enter a short text for the implementation in the Short text for implementation field.
- From the tab index, choose Interface.
The Name of implemented class field is already filled on the tab page, as a class name was automatically assigned to the implementation when you named it.
- Save your entries, and assign the implementation to a development class.
- Place the cursor on the method, and double-click to enter method processing.
- Enter the code for the implementation between the statements
method <Interface name> ~ <Name of method>
andendmethod
. - Save and implement your code. Return to the Edit Implementation screen.
- Save the entries on the Edit Implementation screen.
Note: You can also create an implementation, and then activate it at a later time. In such a case, end the processing stage at this point.
- Choose Activate
The code you stored in the method will be run when the application program is executed.
Business Attributes
ASAP Roadmap ID | 204 | Establish Functions and Processes |
Mandatory / Optional | 2 | Optional activity |
Critical / Non-Critical | 2 | Non-critical |
Country-Dependency | A | Valid for all countries |
Maintenance Objects
Maintenance object type | E | Business Add-In - Definition |
History
Last changed by/on | SAP | 20030709 |
SAP Release Created in | 200 |