on 06-12-2006 10:30 AM
Hi
We're on SRM 4.0 with SRM Server 5.0 SP08.
We're trying to add some additional checks on field DELIV_DATE of a new SC being entered. For this we want to use BBP_DOC_CHECK_BADI.
In the BAdI with content of field IV_DOC_GUID we read the SC details with a CALL FUNCTION 'BBP_PD_SC_GETDETAIL'. But we always get an emtpy table (E_ITEM) back, thus no chance do apply our additional checks.
What are we doing wrong here? Does the call function require some special importing paramters besides the i_guid and e_item?
The SC we want to do the checks on is not yet parked / saved. It's just being entered and when the user changes the DELIV_DATE field content it must follow some rules (e.g. must be a working day and other things).
Thanks for helpful hints! I'd like to reward some points!
Kind regards,
Renaud
Hi Renaud,
this is really strange.
This is the correct methodology.
I used it several times to control the delivery date against some calendar (factory, or supplier delivery calenda) and had no problem with this BADI.
Can you post the complete code of your BADI ?
Rgds
Christophe
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Christophe
You're right of course... I was wrong! Re-checked it again and found this out:
a) I debugged the BAdI and after the BBP_PD_SC_GETDETAIL call I got back an empty E_ITEM table. Switching off debugging it worked correctly! This behaviour mislead me to believe it doesn't work.
b) The BAdI is called when adding items from catalog to SC
c) The BAdI is called when navigating to the SC item detail screen
d) The BAdI is called when clicking on the "refresh" button
e) BUT THE BAdI IS NOT CALLED when clicking on the "check" button! Of course (and according to Murphy's law) I tested it always with this "check" button and wondered why it never worked...
So is there a way to pass through this BAdI when clicking on the "check" button? Or do I have to implement a second BAdI accordingly? If so, which one?
Disha:
Here's some code I implemented in BBP_DOC_CHECK_BADI:
DATA: lt_item TYPE TABLE OF BBP_PDS_SC_ITEM_D.
DATA: wa_item TYPE BBP_PDS_SC_ITEM_D.
CALL FUNCTION 'BBP_PD_SC_GETDETAIL'
exporting
i_guid = iv_doc_guid
i_with_itemdata = 'X'
tables
e_item = lt_item.
LOOP AT lt_item INTO wa_item.
* Do whatever is needed here...
ENDLOOP.
Kind regards,
Renaud
Message was edited by: Renaud Desarzens
Hi Christophe
There are sometime days where the system seems to randomly behave... Don't ask me why but without doing anything with parameter IV_MODE it "suddenly" passed through my coding in BBP_DOC_CHECK_BADI even when clicking the "check" button. It must be time for a little pause
Everything seems to work like I want now... except that I'm trying to pass variables to long text messages of own message id 'ZXXX'. But that's another story for probably another thread.
Kind regards,
Renaud
Hi Renaud /Christophe,
I have tried renaud's Suggestion..But i am still facing the same problem...Although the check is done for the delivery date..If i dont enter the Del date on the first screen..although the error message is thrown..I wnat that the control should reamin on the first screen itself until the delivary date is entered...
I feel that this cannot be controlled thru the BADI..rather i need to make the field mandatory through the template??
Regards,
Disha.
Hi,
I implemented method BBP_DOC_CHEKC of the BBP_DOC_CXHECK BAdI.
I am getting the follwoing error
"The following error text was processed in the system SRD : Templateinterpretation abgebrochen, Template nicht vorhanden."
I beleive "Template nicht vorhanden" means template not found. What template?
I checked ST22 and says an ABAP error occured when executing...
CALL FUNCTION 'BBP_PD_SC_GETDETAIL'
exporting
i_guid = iv_doc_guid
i_with_itemdata = 'X'
tables
e_item = lt_item.
I am just doing trying out implementing the check badi. I basically want to get a 'Hello World" check badi so I can use it as an example.
Thanks,
Naing Zaw-Tun
Marcin,
I don't think that is the problem...
Below is the information from ST22. Note, the error occurs when trying to execute an ABAP statement. I put breakpoints...but the get the error before the breakpoint is reached (at I am not getting a change to see the break stop)
1 method IF_EX_BBP_DOC_CHECK_BADI~BBP_DOC_CHECK.
2
3 DATA: lt_item TYPE TABLE OF BBP_PDS_SC_ITEM_D.
4 DATA: wa_item TYPE BBP_PDS_SC_ITEM_D.
5
6
>>> CASE SY-UCOMM.
8 WHEN OTHERS.
9
10 ENDCASE.
11
12 CALL FUNCTION 'BBP_PD_SC_GETDETAIL'
13 exporting
14 i_guid = iv_doc_guid
15 i_with_itemdata = 'X'
16 tables
17 e_item = lt_item.
18
19
20 endmethod.
Thanks,
Naing
Hello Naing,
What i understood from your statement is that the error message in not displayed and even it is not stopping at the breakpoint..justify me..!
1.check whether the BADI implementation is active for the Shopping cart BO.
2. If it is not stopping at the break point , then please check whether the property
"~generateDynpro" is maintained for the service BBPSC01 or not.
3. try using the method parmeter IV_MODE.
Kind Regards,
Mani
Hi,
Did you try to set the parameter 'i_with_itemdata' in FM BBP_PD_SC_GETDETAIL to 'X'?
BR,
Sjoerd
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Renaud,
For your reqt of checking the Delivery date field,you can use the BADI BBP_DOC_CHANGE_BADI(to check the date value) as well as the badi BBP_DOC_CHECK_BADI (to throw the corresponding error message) together using external memory.
In the 1st BADI ,you can check the date field(DELIV_DATE in struct BBP_PDS_SC_ITEM_ICU) and acc modiy the tables ET_ACCOUNT ,ET_PARTNER, ET_ORGDATA ,ET_HCF and ET_ICF.
Hope this helps...
Regards,
Disha.
Pls reward points for helpful answers
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.