on 01-14-2008 10:38 AM
Hi all,
My system is SRM 5.0
I'm using BBP_CUF_BADI_2 badi for some custom fields. In particular I have one that I have to populate it with the value of purchasing group (in some condition).
I want to use the OUTPUT methos od the badi.
The problem is that the purchasing group BE_PUR_GROUP of structure IS_HEADER is always empty, although I fill it in the browser.
Any idea?
thanks
enzo
Hi
Might be due to some bug or possibly due to your in-correct coding in the BADI Implementation. Please give some more details in next reply..
If possible, Paste the complete BADI Implementation code...
Related SAP OSS Notes / Links ->
Note 972657 Only some parameters filled in method MODIFY_SCREEN -2
Note 897840 Not all parameters filled in the MODIFY_SCREEN method
Note 651487 Extension Fields Displayed Despite Deactivation in BAdI
Note 537392 CUF. Cust.Fields on the 'Default values for items'
Do let me know.
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
From which user ID you are doing debugging in this case in SAP GUI...
Organizational attributes of this User does not seems to be set up.. ?
Try to use same user ID from which you logon on Web page and use same User ID and logon to SRM GUI and then you will find the problem details behind this...
Regards
- Atul
Hi,
To change the value of the custom field,you can use the BADI "BBP_DOC_CHANGE_BADI".
The error is coming because you have coded wrongly in the BADI.You can write soemthing like :
loop at et_item into ls_item.
move ls_item-mfrpn to ls_item-zz_your_new_field.
modify et_item from ls_item transporting zz_your_new_field.
endloop.
Also BADI CHANGE does change the data,if it is not correctly done, you can generate inconsistancies.
Some BADIs requiere to pass all the E tables or parameters once you have activated the BADI.
Try to put ES_HEADER] = IS_HEADER[,.. and so on for all tables.
BR,
Disha.
Pls reward points for helpful answers.
Hi
For this BE_PUR_GROUP.. We can use BBP_PD_SC_GETDETAIL function module inside the BBP_DOC_CHANGE_BADI and fill the ET_ORG[] / IT_ORG[] - organizational structure data tables in the BADI signature (Export/ Import paramaters)...
You can use the BADI "BBP_DOC_CHANGE_BADI" to change the P grp.You can use FM BBP_OM_FIND_PURCH_GRPS_BEI_2 to get the P.org & O.grp maintained in the Org structure and then acc chnage the Old Pgrp values to the valid new ones.
Regards
- Atul
Hi,
You can use various Business Add-Ins provided by SRM system to meet your requirements.
Technically, it's possible using the BADIs
BBP_DOC_CHANGE_BADI BAdI for Changing EBP Purchasing Documents
BBP_PGRP_ASSIGN_BADI EBP Purchasing Documents: Assign Purchasing Group(s)
BBP_PGRP_FIND Shopping Cart: Determine Responsible Purchasing Group(s)
BBP_CREATE_BE_RQ_NEW Exit while creating a purchase requisition in backend system
BBP_CREATE_REQ_BACK OLD Exit while creating a purch. req. in backend system
Here is the sample code for changing the already determined Purchasing groups in SRM System.
METHOD if_ex_bbp_doc_change_badi~bbp_sc_change.
data:
ls_header TYPE bbp_pds_sc_header_d,
ls_item TYPE bbps_sc_item_badi,
ls_orgdata TYPE bbp_pds_org,
ls_purch_grps TYPE bbps_om_pgr_light,
lt_purch_grps TYPE TABLE OF bbps_om_pgr_light INITIAL
SIZE 5.
Get the shopping cart header details
CALL FUNCTION 'BBP_PD_SC_GETDETAIL'
EXPORTING
i_guid = is_header-guid
IMPORTING
e_header = ls_header.
Map header data
MOVE-CORRESPONDING is_header TO es_header.
Map Item data
LOOP AT it_item INTO ls_item.
APPEND ls_item TO et_item.
ENDLOOP.
et_orgdata] = it_orgdata[.
For every purchasing organization, get the corresponding
purchasing group assigned in the Organization structure
CALL FUNCTION 'BBP_OM_FIND_PURCH_GRPS_BEI'
EXPORTING
read_purch_org = 'X'
IMPORTING
pgrp_tab_ext = lt_purch_grps.
change the purch org id and purch grp id in et_orgdata
LOOP AT it_orgdata INTO ls_orgdata.
CLEAR: ls_item.
READ TABLE et_item INTO ls_item WITH KEY guid = ls_orgdata-p_guid.
IF sy-subrc EQ 0.
CLEAR: ls_purch_grps.
Use ls_purch_grps to update org data based on changed purch org
LOOP AT lt_purch_grps INTO ls_purch_grps.
IF ls_purch_grps-purch_orgx+10(4) EQ ls_item-be_pur_org AND
ls_purch_grps-purch_grpx+10(3) EQ ls_item-be_pur_group.
ls_orgdata-proc_group_ot = ls_purch_grps-purch_grp-otype.
ls_orgdata-proc_group_id = ls_purch_grps-purch_grp-objid.
ls_orgdata-proc_org_resp_ot = ls_purch_grps-purch_org-otype.
ls_orgdata-proc_org_resp_id = ls_purch_grps-purch_org-objid.
ls_orgdata-proc_org_ot = ls_purch_grps-purch_org-otype.
ls_orgdata-proc_org_id = ls_purch_grps-purch_org-objid.
MODIFY et_orgdata FROM ls_orgdata TRANSPORTING proc_group_ot
proc_group_id
proc_org_resp_ot
proc_org_resp_id
proc_org_ot
proc_org_id
WHERE guid = ls_orgdata-guid.
EXIT.
ENDIF.
ENDLOOP.
ENDIF. " if sy-subrc eq 0 --> read table et_item
ENDLOOP. " loop at it_orgdata into ls_orgdata
************************************************************************
Hope this will help.
Refer the foll thread for more details:
Regards
- Atul
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.