on 06-25-2010 3:44 PM
We have the requirement to change the Purchasing Group in accordance to
account assignment, if the account assignment (Cost Center) is changed
on SC by the user while creating/modifing it.
We are on classic scenario on SRM 5.0 and the Purchasing Group is
defaulted based on Organizational Responsibility in PPOSA_BBP.
We use to change PG this the BADI BBP_DOC_CHANGE_BADI changing the
table et_item and et_orgdata, but we have problem with F4 help and the
changing of Account Assignment Category causes dump
(UNCAUGHT_EXCEPTION).
Thank you in advance.
Best Regards.
Claudia Gastaldi.
Hi Claudia,
Maybe this link might help.
You could use the mentioned BADI instead of the DOC_CHANGE_BADI.
When you look at the dump, the call stack, does it originate from your BADI?
You should be able to notice this, there will be DOC_CHANGE_BADI somewhere down the call stack.
Maybe it is due to error coming from the backend if you press F4.
What I always do for backend errors is set a breakpoint in function META_BAPI_DISPATCH, this function is called before every call to the backend. then replicate your issue, press F4, the BP will hit (it might hit a few times, but if you look at the call stack in debug you will notice if it's looking for accounting data or something else (e.g. Budget)). F7 out of the function, and look at the call_function below it, there will be a return parameter, F6 over this function and make not of any backend errors that appear.
Sometimes the backend errors get lost in SRM.
Hope this helps,
Kind Regards,
Matthew
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Now I set my Purchaising Group using the BADI BBP_PGRP_FIND ( 3 possible PG : A01, B01, C01) and it's ok.
Also match-code seems to be ok: the user explodes the f4 menu and he sees 3 PG : A01, B01, C01.
But If he tries to change the Purchainsing Group from A01 (default) to B01 the program has a dump (UNCAUGHT_EXCEPTION=>
CX_BBP_PD_ABORT).
I have canceled my modify in DOC_CHANGE_BADI and I'm using only BBP_PGRP_FIND badi.
The problem is caused from the change of PG, if I comment my modify I have no problem.
The problem is not caused from the reading of backend data ( I saw it in debug).
I see furthermore that the BADI BBP_PGRP_FIND is called during the creation of SC only the first time, then if the user modifies data I was not able to change the PG again from badi BBP_PGRP_FIND (it is not called).
Example
The user creates SC with cost center 1000-01 and I set PG with value A01,
before saving the user changes the value of cost center with 2000-01, but I can't change the PG.
Thank you in advace.
Claudia.
Details of DUMP:
The exception 'CX_BBP_PD_ABORT' was raised but was not caught at any stage in the call hierarchy.
Since exceptions represent error situations, and since the system could not react adequately to this error, the current program, 'SAPLBBP_PDH', had to be terminated.
An exception occurred. This exception is dealt with in more detail below. The exception, which is assinged to the class 'CX_BBP_PD_ABORT', was not caught,which led to a runtime error. The reason for this exception is:
Buffer table is not actual.
You may able to find an interim solution to the problem in the SAP note system. If you have access to the note system yourself,
use the following search criteria:
-
"UNCAUGHT_EXCEPTION" CX_BBP_PD_ABORTC
"SAPLBBP_PDH" or "LBBP_PDHU08"
"BBP_PD_ABORT"
-
Client................ 100
User.................. "MAZZAG"
Language key....... ..."I"
Transaction............"BBPSC01 "
Program............... "SAPLBBP_PDH"
Screen.............. .."SAPLBBP_SC_UI_ITS 1000"
Row in Screen..........48
Information on the caller of the "HTTPS" connection:
Plug-in type..........."HTTPS"
Caller IP.............."10.71.134.111"
Caller Port............8001
Universal Resource ID.."/sap/bc/gui/sap/its/bbpsc01/~flNUQVRFPTI3NDcyLjAwOC4wMy
4wMQ=="
Code of CHANGE_BADI:
LOOP AT et_item WHERE del_ind IS INITIAL.
et_item-be_pur_group = wa_hrv5500a-ekgrp.
MODIFY et_item INDEX sy-tabix.
ENDLOOP.
LOOP AT et_item WHERE del_ind IS INITIAL.
READ TABLE et_orgdata WITH KEY p_guid = et_item-guid.
IF sy-subrc = '0'.
IF NOT et_orgdata-proc_org_resp_id IS INITIAL.
et_orgdata-proc_org_resp_id = wa_hrv5500a-objid.
ENDIF.
et_orgdata-proc_group_id = wa_hrv5500a-objid.
MODIFY et_orgdata INDEX sy-tabix.
ENDIF.
ENDLOOP.
Code of BBP_PGRP_FIND badi ( is fixed code only for test)
wa_purch_data-description = 'CCCCCCCCCCCCCCCC'.
wa_purch_data-proc_group-otype = 'O'.
wa_purch_data-proc_group-objid = '50000612'.
wa_purch_data-proc_org-otype = 'O'.
wa_purch_data-proc_org-objid = '50000607'.
wa_purch_data-be_pur_group = '117'.
wa_purch_data-be_pur_org = 'IT10'.
wa_purch_data-logical_system = 'D01CLNT100'.
APPEND wa_purch_data TO et_purch_data.
MOVE wa_purch_data TO es_purch_data.
wa_purch_data-description = 'DDDDDDDDDD'.
wa_purch_data-proc_group-otype = 'O'.
wa_purch_data-proc_group-objid = '50008010'.
wa_purch_data-proc_org-otype = 'O'.
wa_purch_data-proc_org-objid = '50000607'.
wa_purch_data-be_pur_group = 'N02'.
wa_purch_data-be_pur_org = 'IT10'.
wa_purch_data-logical_system = 'D01CLNT100'.
APPEND wa_purch_data TO et_purch_data.
Cla.
Hi Claudia,
Your code
============
LOOP AT et_item WHERE del_ind IS INITIAL.
READ TABLE et_orgdata WITH KEY p_guid = et_item-guid.
IF sy-subrc = '0'.
IF NOT et_orgdata-proc_org_resp_id IS INITIAL.
et_orgdata-proc_org_resp_id = wa_hrv5500a-objid.
ENDIF.
et_orgdata-proc_group_id = wa_hrv5500a-objid.
MODIFY et_orgdata INDEX sy-tabix.
ENDIF.
ENDLOOP.
=============
et_orgdata-proc_org_resp_id
structure BBP_PDS_ORG
BBP_PROG_ORG_RESP_ID
structure BBP_PDS_ORG
et_orgdata-proc_group_id
BBP_PROC_GROUP_ID
the two are char 12
Yet you have the two of them equals wa_hrv5500a-objid
while wa_hrv5500a-objid-OBJID is of type NUMC 8
Hope this helps,
Kind Regards,
Matthew
Hi Matthew,
Thank you for your help.
I chenge my code, now before set the BBP_PROG_ORG_RESP_ID and BBP_PROC_GROUP_ID, I use an intermediate fields type char leght 12:
DATA: wa_po_resp_id TYPE bbp_prog_org_resp_id.
wa_po_resp_id = wa_hrv5500a-objid.
CONDENSE wa_po_resp_id.
LOOP AT et_item WHERE del_ind IS INITIAL.
READ TABLE et_orgdata WITH KEY p_guid = et_item-guid.
IF sy-subrc = '0'.
IF NOT et_orgdata-proc_org_resp_id IS INITIAL.
et_orgdata-proc_org_resp_id = wa_po_resp_id.
ENDIF.
et_orgdata-proc_group_id = wa_po_resp_id.
MODIFY et_orgdata INDEX sy-tabix.
ENDIF.
ENDLOOP.
But the program dump the same.
Do you have another hints for me ?
Thank you very much.
Claudia
did you fill all fields?
proc_group_ot
proc_group_id
proc_org_resp_ot
proc_org_resp_id
proc_org_ot
proc_org_id
One other point to consider, do the purchasing organisation and correct purchasing group correspond with the current company code? Check the organisational model for that.
Check if the values are filled correctly, buffer table not actual comes mostly from wrongly filled data.
Regards,
Robin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is the structure that the standard passes to CHANGE BADI :
FIELD TYPE LENGTH VALUE
CLIENT C 3
GUID X 16 3591B92906A00345AA829DAA18F3D4A0
P_GUID X 16 882857A0FCD5384DA2158B1ABC1E83B3
DEL_IND C 1
PROC_ORG_RESP_OT C 2 O
PROC_ORG_RESP_ID C 12 50000612 *
PROC_ORG_OT C 2 O
PROC_ORG_ID C 12 50000607
PROC_GROUP_OT C 2 O
PROC_GROUP_ID C 12 50000612 *
I change only PROC_ORG_RESP_ID and PROC_GROUP_ID with another GA 50001080 ( for example).
I've only a company code IT01 => ID 50000607.
All my GA are defined under COmpany IT01.
Thank you
Claudia.
I've solved the problem by myself.
It was my error in code, when the user change the account type, the system delete the Cost Center, but I read my PG from Cost Center, so when the Cost Center is blank I can't find the PG and the table et_orgdata remains empty and it causes the dump.
now I check the Cost Center value before modify table et_orgdata.
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.