on 02-16-2007 1:07 PM
Hi all,
I am populating the data in account assignment tab while creating Shopping cart.the fields COST_CTR and G_L_ACCT are populated by BADI(DOC_CHANGE_BADI), i have considered the structure BBPS_ACC_BADI for populating the BADI in this BADI i have fields like COST_CTR,ORDER_NO and WBS_ELEM_E to populate.My Query is i want to populate the description for G_L_ACCT.How can i find that GL account description field i have searched in the structures BBPS_ACC_BADI and BBP_PDS_ACC but i didn't found that field.Can anyone help me out to find the GL account description field.
Hi Joseph,
You have 2 things:
1) Populate GL Acc from Fav GL Account
2) Populate Short Text for GL Account.
1) if you use BBP_DOC_CHANG_BADI the GL Account no is verified for existence in SRM system and as suggested by Atul you may try BBP_CREATE_PO_BACK as this triggers after the verification process.
2) When you send the GL Account to Backend you need not send the Description again. It reads from the backend system. So you need not use RFC to get the GL Acc Details and as you have informed about your Z-Table. Just extract the value from that and populate the GL Account.
Regards
Rakesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for ur reply..
I have done the same thing..just populated the GL Account using DOC_CHANGE_BADI but the thing when ever i am selecting the GL Account it is giving error as "GL account 55500008 is not created(please check your input)" which is resticting me to create either PO or SC...how to remove this error ???
Hi
Please mainatian the correct GL Account (Based on R/3 system) in the SRM system.
Here are the steps ->
Log on SPRO Transaction in SRM.
o IMG→SRM Server→ Cross Application Basic Settings→ Account Assignment.
 Define Account Assignment Categories. In this step you define different Account
assignment Categories and assign fields to these Account Assignment Categories.
 You can also define how the EBP Account Assignment Category assigned to
Backend Category
o IMG→SRM Server→ Cross Application Basic Settings→ Define G/L Account for Product Category and Account Assignment Category
 You specify the G/L account that is to be posted to in Financial Accounting in the backend system, depending on the product category and the account assignment category.
 Note that for each product category that you work with, you have to enter all possible account assignment categories and a G/L account
 BBP_DETERMINE_ACCT BADI using SE18 Transaction can also be used to determine the GL Accounts
Hope this will help.
Please reward suitable points.
Regards
- Atul
Hi
Yes ... This G/L account is not maintianed in any of the SRM standard tables. This F4 Help will not work, as it is looking for the data locally in sRM.
You need to maintain the correct G/L Account in SRM system by referring to the corresponding correct Gl Account maintained in R/3 system and enter the same here for that purpose.
Hope this will help.
Please reward suitable points.
Regards
- Atul
Hi Joseph,
There can be better way to find it.
I will suggest.
E_ITEM-BE_CO_CODE in FM BBP_PD_SC_GETDETAIL.
regards,Nishant
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nishant,
Thanks!
One more doubt...i am using the BADI BBP_DOC_CHANGE_BADI..for populating the Favorite GL values to the GL account..but when i use FM META_GLACCOUNT_GETDETAIL..how to populate company code to this FM ..as this BADI's exporting parameters doesnot store company code..where exactly can i get this company code for particuler PO or SC...
HI,
The thing is i am populating for <b>POs</b> in the BADI BBP_DOC_CHANGE_BADI but it BBPT_PO_ITEM_BADI doesnot store company code....
After getting the GL Account description(short_text) to which field i need to populate???as there is no field related to it in the BADI BBP_DOC_CHANGE_BADI...
Message was edited by:
joseph Prashanth
Thanks!
My problem is i am maintaintaing the Favorite GL codes in one of the Ztable from this ztable i am bringing the favorite gl value and populating to standard GL account in the account assignment tab while creating PO/SC..the value is populated correctly using DOC_CHNAGE_BADI..but it is giving error as "GL Account 5550008 is not created, please check your input" the error i have found is the GL account value that i am populating is not taking its description..so i want to populate the GL account value and its description both..so from the FM META_GLACCOUNT_GETDETAIL i will be geting the GL account description..to which field should i populate so that i cannot get error..
Message was edited by:
joseph Prashanth
Hi
GL Account error - This is a SAP Bug. We have already raised an OSS message with SAP long back.
Try using those G/L Accounts, which does not create an error message, once the Back-end document is created in SAP R/3 system directly. Assign the same to the Shopping cart line items and then try out.
Hope that will help.
Regards
- Atul
Thanks!
Actually these values are from backend R/3 only...i am storing all the GL values from the R3 to some Ztable in SRM based on the user...i am populating the GL account value correctly using the BADI...but i am unable to populate GL account description...thats why it is giving error as GL account not created though that GL is present in the backend R3..
Please Help
Message was edited by:
joseph Prashanth
Message was edited by:
joseph Prashanth
Hi
It's quite clear.
Do this..
<b>In the BBP_DOC_CHANGE BADI you can make a call the
META_GLACCOUNT_GETDETAIL
and get the respective GL Description there and fill the same in the custom field in the Shopping cart and once your SRM document is getting converted into a R/3 document like Purchase order, P Req, Reservation, etc...
Inside the BBP_CREATE_PO_BACK BADI
or
BBP_CREATE_REQ_BACK BADI in SRM system, map the necessary GL A/c Description to the relevant field inside the structure, to resolve the issue.</b>
Hope this will help.
Please reward suitable points.
Regards
- Atul
Thanks!
Can u please explain why we need to implement the BBP_CREATE_PO_BACK??
The main reason i want GL Description is because i am getting error as "GL 5550008 is not created" because it is considering only the GL number not its description...
I Dont want to move this GL description to R3..<b>i just want to fill the standard GL Description field so that i cannot get the error message when i select the GL account number as my favorites as it is preventing me from creation of SC/PO</b>..main reason is while creating of SC/PO this error is prevents me from creation..
Mainly i want to remove that error...so that i can create PO/SC..please help
Message was edited by:
joseph Prashanth
Hi
<u>Say you have created a custom field in the Shopping cart Item Level by referrring to OSS note - 672960.
This custom field should be populated by some value (GL Account Description) in your case and should be mapped to the correct field before
BAPI_PO_CREATE / BAPI_PO_CREATE1 function module is called in the SRM System to create a Back end Purchase order in R/3 system.</u>
<b>Here is the sample code</b>
METHOD if_ex_bbp_create_po_back~fill_po_interface.
DATA: ls_po_items TYPE bbps_bapiekpoc,
l_tabix TYPE sy-tabix,
ls_po_account TYPE bbp_bapiekkn.
LOOP AT po_items INTO ls_po_items.
*--- Loop counter
l_tabix = sy-tabix.
READ TABLE po_item_account INTO ls_po_account INDEX l_tabix.
IF sy-subrc EQ 0.
*--- In the case of the Back-end Purchase Order, the Shopping Cart custom Field -*--- GL Account should pickup the Shopping cart G/L Account in Cost
*--- Assignment tab
ls_po_items-zzglaccount = ls_po_account-g_l_acct.
ENDIF.
MODIFY po_items FROM ls_po_items TRANSPORTING zzglaccount.
ENDLOOP.
ENDMETHOD.
Hope this will help.
Please reward suitable points.
Regards
- Atul
Hi
<u>Incase you are having SRM 5.5 version, then you can use BBP_CREATE_BE_PO_NEW BADI else, use the old BADI
BBP_CREATE_PO_BACK.</u>
<b>Here is the documentation of this BADI -
BBP_CREATE_PO_BACK</b>
____________________________________________________
Short Text
Purchase Order in Backend System
You can use the Business Add-In BBP_CREATE_BE_PO_NEW to change all data transferred to the backend system to create a purchase order. This includes the item data, account assignment, and text.
Standard settings
The following changing parameters are available in the FILL_PO_INTERFACE method:
Parameter Transfer structure
PO_ITEMS Purchase order items
PO_ITEMS_ADD_DATA Additional purchase order item data
PO_ITEM_SCHEDULES Purchase order delivery schedule line
PO_ITEM_ACCOUNT Purchase order item account assignment
PO_ITEM_TEXT Purchase order item texts
PO_LIMITS Purchase order limits
PO_CONTRACT_LIMITS Purchase order limits - Contracts
PO_SERVICES Services for a purchase order item
PO_SRV_ACCOUNT Account assignment data for service
PO_SRV_TEXTS Texts for service line
PO_HEADER Purchase order header
PO_HEADER_ADD_DATA Purchase order header additional data
PO_ADDRESS Purchase order header address data
You can use the following parameters for transferring the attachements to the backend system:
CT_ATTACH_BE KW attachments including document
CV_ATTACH_BE_DOC_TYPE Document type (standard is SRM)
CV_ATTACH_BE_STORAGE_CAT Storage type (standard is DMS_C1_ST)
CV_ATTACH_TRANSFER_ACTIVE Activate transfer of attachments
CV_ATTACH_USE_URL Transfer URL only
Recommendation
If you edit the PO_HEADER_ADD_DATA structure, you should check the settings of parameter HEADER_ADD_DATA_RELEVANT.
Activities
You are able to use the parameter HEADER_ADD_DATA_RELEVANT in the BAdI implementation. Assigning this parameter the value:
'1'
Means that the system only transfers the data of structure PO_HEADER_ADD_DATA to the purchase order in the backend system that is not empty (initial).
'x'
Means that the system transfers all data of structure PO_HEADER_ADD_DATA to the purchase order in the backend system regardless of whether individual fields are filled.
Hope this will help.
Please reward suitable points.
Regards
- Atul
Thanks!
this is the code i have written in the DOC_CHNAGE BADI for PO
method IF_EX_BBP_DOC_CHANGE_BADI~BBP_PO_CHANGE.
DATA : ls_ztgl_codes TYPE ztgl_codes.
FIELD-SYMBOLS : <ls_account> TYPE BBPS_ACC_BADI,
<ls_item> LIKE LINE OF et_item.
data: ls_capt TYPE ztcapt,
ls_item_it like line of it_item,
ls_item_et like line of et_item.
loop at it_item into ls_item_it.
move-corresponding ls_item_it to ls_item_et.
append ls_item_et to et_item.
endloop.
ET_ITEM[] = IT_ITEM[].
ET_ACC[] = IT_ACC[].
ET_PARTNER[] = IT_PARTNER[].
ET_ORGDATA[] = IT_ORGDATA[].
ET_HCF[] = IT_HCF[].
ET_ICF[] = IT_ICF[].
LOOP AT et_item ASSIGNING <ls_item>.
LOOP AT et_acc ASSIGNING <ls_account> WHERE p_guid = <ls_item>-guid.
IF <ls_account>-zzsrm_cap_no <> ''.
SELECT SINGLE * FROM ztcapt INTO ls_capt WHERE capno = <ls_account>-zzsrm_cap_no.
<ls_account>-zzsrm_stage = ls_capt-stage.
<ls_account>-zzsrm_project = ls_capt-proj.
ENDIF.
if <ls_account>-ZZSRM_FAV_SEQ <> ''.
select single * from ztgl_codes into ls_ztgl_codes
where FAV_SEQENCE = <ls_account>-ZZSRM_FAV_SEQ
and username = sy-uname.
<ls_account>-ZZTERTP = ls_ztgl_codes-ZZTERTP.
<ls_account>-ZZTERCD = ls_ztgl_codes-ZZTERCD.
<ls_account>-ZZMKTCD = ls_ztgl_codes-ZZMKTCD.
case ls_ztgl_codes-acc_cat.
when 'CC'.
<ls_account>-acc_cat = 'CC'.
<ls_account>-COST_CTR = ls_ztgl_codes-COOBJ.
when 'WBS'.
<ls_account>-acc_cat = 'WBS'.
<ls_account>-WBS_ELEM_E = ls_ztgl_codes-COOBJ.
When 'OR'.
<ls_account>-acc_cat = 'OR'.
<ls_account>-ORDER_NO = ls_ztgl_codes-COOBJ .
endcase.
<ls_account>-G_L_ACCT = ls_ztgl_codes-G_L_ACCT.
data : lt_account_detail type BAPI3006_2.
ls_account_detail like line of lt_account_detail.
data : lv_sysid type LOGSYS.
data : ls_header type BBP_PDS_PO_HEADER_D.
Check the SRM system
IF SY-SYSID = 'UPD'.
LV_SYSID = 'UHD_111'.
ELSEIF SY-SYSID = 'UPX'.
LV_SYSID = 'SAPUHD111'.
ELSEIF SY-SYSID = 'UPQ'.
LV_SYSID = 'SAPUHQ100'.
ELSEIF SY-SYSID = 'UPP'.
LV_SYSID = 'SAPUPP100'.
ENDIF.
CALL FUNCTION 'META_GLACCOUNT_GETDETAIL'
EXPORTING
companycode = <b>(WHAT TO PASS HERE AS COMPANY CODE IS NOT STORED)</b>
glacct = <ls_account>-G_L_ACCT
LANGUAGE = 'EN'
LOGICAL_SYSTEM = LV_SYSID
IMPORTING
RETURN =
ACCOUNT_DETAIL = lt_account_detail
TABLES
CONTROL_RECORD =
.
<ls_account>-zzshort_text = lt_account_detail-short_text.
endif.
ENDLOOP.
ENDLOOP.
endmethod.
<b>From here i have GL Short text (<ls_account>-zzshort_text) ...Now where to pass this GL shorttext as DOC_CHANGE_BADI doesnot store GL description...
DO u want me to implement BBP_CREATE_PO_BACK..if i implement want to write init and how to populate GL Account Description...</b>
Please help...
Message was edited by:
joseph Prashanth
Message was edited by:
joseph Prashanth
Message was edited by:
joseph Prashanth
Message was edited by:
joseph Prashanth
Hi
You can create a custom field in the Account assignment tab off the shopping cart
and populate the data using META_GLACCOUNT_GETDETAIL (Remotely enabled Function Module) and then map the field description to this custom field inside the BBP_DOC_CHANGE_BADI implementation.
<b>Please refer to OSS note - 672960 for further help.</b>
Hope this will help.
Please reward suitable points.
Regards
- Atul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Joseph,
I think that what you want is to change the G/L account description while SC it's been created/updated, and you want to know where to put that description to be taken by SC...
I have checked the DOC_CHANGE_BADI and unfortunately i couldn't find it, the BADI table ET_ACC only contains G_L_ACCT, GL_ACC_ORIGIN but those fields contain the value keys to access the account...
Maybe you will need to research in other BADI's to find if there's another way to populate it....
Best regards,
Gerardo.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Joseph,
I found one way to find Description of GL account using a BAPI(Remotely enabled Function Module).
META_GLACCOUNT_GETDETAIL
META_GLACCOUNT_GETLIST
These BAPI need Import Parameter as Company code,Language,Logical System.
I feel that BADI META_GLACCOUNT_GETLIST suits your requirement.
regards,nishant
Please reward points if this helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nishant,
Thank you very much for ur reply...
But the thing is i am maintaining the Favorite GL Values in one of the Z field and passing this value to the standard GL Account field in the account assignment tab,the BADI i am using is BBP_DOC_CHANGE_BADI which populates the favourite GL value selected by the user...here the GL Account description is not picking that why it is giving error as "GL Account 5500008 is not Present,Check your input".By your reply i can find out the GL Description.
But one more doubt i have is : i am using this Favourite GL Account for Both Shopping cart and POs.If i am using FM META_GLACCOUNT_GETDETAIL here i need to specify company code...but i am using the FM BBP_PD_PO_GETDETAIL here i will get company code value from E_HEADER....BUT for Shopping cart i am using FM BBP_PD_SC_GETDETAIL here E_HEADER does not contain company code ..how to find the compnay code when i am using for shopping cart..
Please help...
Hi
The Company code in this case, can be find out, based on the Current User Logged on to ITS Web, and is creating the Shopping carts in this case from the Organizational Plan of SRM system.
<b>Either use any of the Function modules to fetch the User attributes maintained in the organization plan.</b>
<b>BBP_READ_ATTRIBUTES
BBP_USER_GET_ATTRIBUTES
BBPU_GET_ATTRIBUTES_ANALOG
BBP_GET_ATTRIBUTES_AT03 </b>
This will depend on your SRM system version.
Hope this will help.
Please reward suitable points.
Regards
- Atul
Hi
Can you re-phrase your question again ? It's quite confusing.
<b>Do you want to create a back-end document in the R/3 system or handle the document Locally in SRM itself.</b>
What is your system version ? Which type of EBP Scenario are you using ?
<b>Incase if you are talking about R/3 document to get created form SRM Shopping cart, then the G/L Account description is not required to be sent from SRM, As the same will automtically apper in the R/3 Back-end document (Purchase order, Purchase Requisition, etc)</b>
Actually it depends, incase you have maintained GL Accounts in SRM System itself, then you can get the details from SRM Locally.
Hope this will help.
Please reward suitable points.
Regards
- Atul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.