on 08-14-2012 10:59 PM
We have to create a Z table in SRM which will contain company code,account assignment category, business partner and text.Based on the values selected while creating the cart if it has the combination of company code,account assignment and business partner the corresponding text is picked from the z table and appended to the text in the vendor text which flows to requisition. Can you suggest the BADI which we can use so that we can get this combination and also how do we pre fix the value to the vendor text.Appreciate your quick response
Hi,
the bbp_doc_change_badi is the badi you are looking for with filter value BUS2121.
Pseudo code missing some steps:
1. get details using bbp_pd_sc_getdetail, because sometimes item data/accounting data/org data is not filled
2. read ztable using values
3. loop at items
4. loop at longtext for tdid 'ITXT' = vendor text on item level and guid = item guid
5. if ztable text not already there: concat ztable text and longtext into string
6. fill longtext table again
4b endloop
3b endloop
Regards,
Robin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In the parameter partner you have 3 fields:
partner_guid = unique guid for the partner for this document
partner_no = unique guid in the system for this partner (BUT000: partner_guid)
partner_id = business partner id, in the case of suppliers this is the vendor number.
So the bp is there as far as I know.
Thanks Robin and Janke.I will check with the development team tomorow and will let you know.Thanks a lot for your help and i guess i would require your help in completing this.:).will update
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Naveen and Robin..
Naveen, i dont have much idea on technical things but where do we define this piece of code...is it in the start or in the loop where we fetch values from Z table
Are there any impacts while doing this
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nevin,
SRM has a buffer , which is updated from the UI. Sometime the buffer data and the bbp_pd_sc_getdetail data may be different. Dont ask me why and in which case. But I have noticed this.
So in order to get the accurate data you can do so by executing the below code in the change badi
CALL METHOD /sapsrm/cl_pdo_model_factory=>get_instance
RECEIVING
eo_instance = lo_pdo_model.
CALL METHOD lo_pdo_model->get_detail
EXPORTING
iv_guid = es_header-guid
IMPORTING
et_item = int_item
et_partner = int_partner
et_longtext = int_longtext
es_header = fs_header
Use the internal tables to manipulate the data and then pass them to the change badi's exporting parameters.
See if this helps.
Regards,
Naveen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks a lot Robin..We will check this out.How do we get the business partner number from the partner guid and how do we get the account assignment . Will this loop be called always while clicking any button in the shopping cart
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.