2007 Jan 05 1:09 PM
Hi Experts ,
I am new to BADI, but My Boss given me a BADI to wotk over it.
My sys is configured through the change pointers that
when i change/create customer it is automatically update in decentralised server.
Now my requirement starts ,
having table for conversion when i m trying to change my customer , the BADI
Customer_add_data_bi should trigger ,in that i found the only method PROCESS_ALE_OWN_CHANGE_POINTER is triggering
My problem is how to write code here with importing/exporting parameters..
Please anybody let me know , its urgent.....
Regards....
Hi Experts ,
I am new to BADI, but My Boss given me a BADI to wotk over it.
My sys is configured through the change pointers that
when i change/create customer it is automatically update in decentralised server.
Now my requirement starts ,
having table for conversion when i m trying to change my customer , the BADI
Customer_add_data_bi should trigger ,in that i found the only method PROCESS_ALE_OWN_CHANGE_POINTER is triggering
My problem is how to write code here with importing/exporting parameters..
Please anybody let me know , its urgent.....
Regards....
2007 Jan 05 1:13 PM
Hi
By trx SE19 you have to create the implemantation for that BADI, for example ZCustomer_add_data_bi, here do a doubleclick on the method and then insert your code.
How to use the parameter depends on which parameter you need to do.
For example if you need to read T_KNA1_KEY:
DATA: WA_KNA1_KEY TYPE KNA1_KEY_S.
LOOP AT T_KNA1_KEY WA_KNA1_KEY.
ENDLOOP.
Max
2007 Jan 05 4:57 PM
Hi Max,
Thank you,
i have to select the customer as importing and have to export it,please let me know clearly
having one conversion table with fields
zcust_tab1 DB table with values
s_old sys old id
cust_old cust old number
cust_new cust new number
if change the customer , thro change pointer (RBDMIDOC), BADI should trigger
it has to check CUSTOMER in the segment is equal to CUST_NEW
, if it is then it has to convert with CUST_OLD to the SEGMENT.
please send me the coding according to this ..
BR
2007 Jan 06 9:16 AM
Hi Madhavi
Hope u r clear with creating a BADI implementation(from transaction SE19).
An imprtant foreword when it comes to BADIs is - "We cannot influence(create/change) the export/import/changing parameters of BADI methods. we can only get & set values of the parameters that are available"........so creation of ur own parameter is ruled-out.
Now, as per ur requirement, (if i am not wrong) u want to check the customer number value with the one in ur Z-Table. for that get into ur code and use the parameter T_KNA1_KEY provided for the method PROCESS_ALE_OWN_CHANGE_POINTER. This parameter is a structure and has KUNNR in it. you can use this field for ur purpose.
More over, the parameter T_KNA1_KEY is of type "changing" , so if u want to alter the value of customer number field on ur own, then change the field T_KNA1_KEY -KUNNR in ur code.
Thanks
Mukundhan
2007 Jan 06 12:10 PM
Hi Mukundhan,
First i want to thank you for your clarification.
I gone through the same as you referred , but here the value kunnr is not generating into the importing parameter.
but that the only method triggering when i am generating the idoc through the program RBDMIDOC.
Now i am dilema that whether i am in the right track.
pls let me know ...
BR,
Madhavi
2007 Jan 07 4:26 AM
Hi Madhavi
When u say the BADI method is getting triggred while u generate ur IDOC, that means u have got the right BADI.
The parameter T_KNA1_KEY of method PROCESS_ALE_OWN_CHANGE_POINTER is a "Changing" parameter. Whch means it enters ur method with a value and leaves the method with the value u populate. Now here is the Catch......while entering ur code the parameter T_KNA1_KEY will <b>def carry some value</b> and while leaving ur code the parameter has to be populated back with the changed or initial value. Else the parameter will leave ur code with EMPTY value.
Probably u would have over looked the fact that parameter T_KNA1_KEY is an internal table, hence u will have to loop at the internal table and only then ul get the value for KUNNR.......if so, then please try looping and get the value.
Regards
Mukundhan
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |