2006 Oct 21 5:28 AM
Hello,
Is there is anyway of passing the data from standard code to an user exit without changing the standard code.
I have the contents inside an internal table (it_partner) which is part of standard code (CJ20N). Now I need to pass the contents (it_partner) to an userexit.
Will substitution exit help me in this case?
If not is there any other way of achieving this without copy the standard code?
Thnx.
2006 Oct 22 3:18 PM
Hi,
you can use BADI for this.
Execute transaction SE19. Click create, then input
PROJECTDEF_UPDATE in the field definition name. Then write your code in the method BEFORE_UPDATE.
Regards,
Clemens
Hello,
Is there is anyway of passing the data from standard code to an user exit without changing the standard code.
I have the contents inside an internal table (it_partner) which is part of standard code (CJ20N). Now I need to pass the contents (it_partner) to an userexit.
Will substitution exit help me in this case?
If not is there any other way of achieving this without copy the standard code?
Thnx.
2006 Oct 21 10:24 AM
Hi,
There is a "dirty" way to do that which implies the use of field-symbols.
This would be coded like this.
Let's call:
SAPxxxx the name of the main program where it_partner is located
PARTNER_TYPE the type of the structure of it_partner
FIELD-SYMBOLS : <ft_partner> TYPE TABLE OF partner_type,
<fs_parter> TYPE partner_type.
ASSIGN ('(SAPxxxx)it_partner[]') TO <ft_partner>.
LOOP AT <ft_partner> ASSIGNING <fs_partner>.
... your processing here
ENDLOOP.There is also an example in the ABAP FAQ:
<i>Please, consider the involvements of this solution carefully. In particular, SAP might change its own coding of the CJ20N transaction so that you will be obliged to find another solution in times of the next upgrade.
Now, that I have exposed the possible problems, I can personnally add that this works great (as long as you do not modify the standard internal table from your user exit !!) !)
</i>
Best regards,
Guillaume
2006 Oct 22 3:18 PM
Hi,
you can use BADI for this.
Execute transaction SE19. Click create, then input
PROJECTDEF_UPDATE in the field definition name. Then write your code in the method BEFORE_UPDATE.
Regards,
Clemens
2006 Oct 23 1:36 PM
Hello Clemens,
Thanks for the details..
Problem with this BADI is partner details are not getting passed to the badi which I actually need.
Thanks,
2006 Oct 23 2:06 PM
Sree,
sorry, that was just a quick one as I don't know your specific situation.
Try the following:
Goto se24
Display class cl_exithandler
Double click on the method GET_INSTANCE.
Put a break point at Line no.25 (CASE sy-subrc).
Execute your transaction
It will stop at any BADI calls because
cl_exithandler->GET_INSTANCE
must be called for all BADIs.
Hopefully you will find the right one!
Regards,
Clemens
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |