on 09-27-2006 3:37 PM
Hi,
We are implementing SRM 4, extended classic scenario.
We have a requirement wherein we want to perform R/3 GL validations at the time of creating shoppping carts and purchase orders (PO's).
Would like to know which function modules (FM's) are used in R/3 to perform GL validations while creating PO's so that we can call those FM's (by copying them and converting them to RFC's if required) in doc save badi before saving the shopping cart or purchase order in SRM.
Also if anybody has any other approach, please let us know. Any help would be greatly appreciated.
Thanks and Regards,
Jayesh
Hi
There is a BADI which is used to change the document.
BBP_DOC_CHANGE_BADI,This BADI can be used .
To get the GL account details.
You can use FM 's can be looked at.
META_GLACCOUNT_GETDETAIL Get Details from G/L Account
META_GLACCOUNT_GETLIST List of G/L Accounts
Incase this does not solve your issue,please write your problem in details.
Your statement does not make your problem clear whether it is appreaing in SC or PO and what scenario you are implementation and what is your support pack level.
Using BBP_DOC_CHECK_BADI, you can issue your own custom message incase GL Account is blank or entered incorrect.
Alternatively, Using Function module, BAPI_ACC_GL_POSTING_CHECK (RFC enabled) from R3 to SRM inside BBP_DOC_CHECK_BADI, you can do validation as well.
See the threads, for additional help.
Let me know incase you face any issues.
Hope this will help.
Please reward suitable points, incase it suits your requirements.
Regards
- Atul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jayesh
There are 2 ways to determine GL in SRM.
1. Maintain GL codes for product categories & Account assignment in SPRO. With this relevant GL code will be picked in SRM for the selected product category.
SRM server>Cross appln basic setting>Acct assignment--->Define GL acct for product category
2. Maintain logic to determine GL code in BADI BBP_DETERMINE_ACCT. In this BADI use ITEM_DATA and ACCT_DATA tables in method DETERMINE_ACCOUNT.
This should solve your purpose.
Do reward points if helpful.
Regards
Jagadish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
By deafult the G/L codes will be picked up from setting 1 mentioned by jagdish.
If you need to overwrite these,you will need to implement the BADI "BBP_DETERMINE_ACCT" and method "DETERMINE_ACCOUNT".
In this method ,use the FM "MR_ACCOUNT_ASSIGNMENT" for the retreiving the G/L account from R/3.If you need any sample code ,do write to me.
BR,
Disha.
Pls reward points for helpful answers.
Hello, I was going to use the BADI BBP_DETERMINE_ACCT and this method DETERMINE_ACCOUNT to change the default GL codes using the sample code from other posts. However I'm running into 1 issue, the remote function I call in R/3 that uses MR_ACCOUNT_ASSIGNMENT requires a valuation class(bklas), to find this I need to look it up in MBEW and I require a valuation area(BWKEY) to find the unique record. To find valuation area, I need to know the plant the material is from and I do not have this information to pass to the R/3 function. All the BADI gives me is Mat#, comp code this is not enough to determine plant.
Does anyone have any suggestions?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.