2015 May 06 12:41 PM
Hi Guys,
There is one badi def. with which i have to create an implementation for it , and in implemenation i have to just add a clear statement for a particular field of a structure in a required method.
1) The problem is importing parameter of that method is a object reference in which there is a structure(Private). I have to clear one of the field of the structure , so how can i access that field which i have to clear ?
2) Second thing is once i have cleared , i have 5 changing parameters (only one importing parameter in my case of required method) , how to make changes get reflected. And also those 5 parameters are of type field selection. So how to use these parameters to make my changes get reflected ?
PFA
Please help me out.
Regards,
Hemanth
2015 May 06 12:47 PM
By looking at both the mentioned circumstances,
1) The problem is importing parameter of that method is a object reference in which there is a structure(Private). I have to clear one of the field of the structure , so how can i access that field which i have to clear ?
2) Second thing is once i have cleared , i have 5 changing parameters (only one importing parameter in my case of required method) , how to make changes get reflected. And also those 5 parameters are of type field selection. So how to use these parameters to make my changes get reflected ?
It makes me feel that this is not the right BADI to cater your requirement.
Can you further explain why you want to clear a Standard variable or what is the exact requirement. So that you can get relevant suggestions.
Hi Guys,
There is one badi def. with which i have to create an implementation for it , and in implemenation i have to just add a clear statement for a particular field of a structure in a required method.
1) The problem is importing parameter of that method is a object reference in which there is a structure(Private). I have to clear one of the field of the structure , so how can i access that field which i have to clear ?
2) Second thing is once i have cleared , i have 5 changing parameters (only one importing parameter in my case of required method) , how to make changes get reflected. And also those 5 parameters are of type field selection. So how to use these parameters to make my changes get reflected ?
PFA
Please help me out.
Regards,
Hemanth
2015 May 06 12:47 PM
By looking at both the mentioned circumstances,
1) The problem is importing parameter of that method is a object reference in which there is a structure(Private). I have to clear one of the field of the structure , so how can i access that field which i have to clear ?
2) Second thing is once i have cleared , i have 5 changing parameters (only one importing parameter in my case of required method) , how to make changes get reflected. And also those 5 parameters are of type field selection. So how to use these parameters to make my changes get reflected ?
It makes me feel that this is not the right BADI to cater your requirement.
Can you further explain why you want to clear a Standard variable or what is the exact requirement. So that you can get relevant suggestions.
2015 May 06 1:59 PM
Its very lengthy process, its getting difficult to explain, in simple i need to clear a variable called supplying plant in that particular badi(Since its a standard bussiness process)
2015 May 06 2:13 PM
Hemanth,
if the parameter you want to change is NOT in the changing parameters of your BADI, then this is not the BADI you need.
Try to use an implicit enhancement to achieve this, or try to user another BADI.
PS.: maybe you can use field-symbol assignment to access the data you need in memory, but this is not recommended.
Regards,
Frisoni
2015 May 06 2:20 PM
Ok Frisoni, ill check alternate badi's or enhancements
Prior to this let me check whether i can access the field or not , so could you help out how to access fields in the debugger.
PFA for structure info @ debug level.
.
Regards,
Hemanth
2015 May 06 3:24 PM
Not sure if it is exactly what you need, but is kind like this:
FIELD-SYMBOLS: <fs_ekko> TYPE ekko.
ASSIGN ('(SAPLMEPO)EKKO') TO <fs_ekko>.
IF sy-subrc IS INITIAL.
CLEAR <fs_ekko>-reswk.
ENDIF.
Regards,
Frisoni
2015 May 07 10:18 AM
Hi Frison,
I think this gonna work for me and thanks. But just tell me why are u assigning '(SAPLMEPO)EKKO' ?
Regards,
Hemanth
2015 May 07 12:59 PM
Hemanth,
SAPLMEPO is the main program, all objects and references you see inside BADI are in some point called in main program. So, you access the EKKO structure to change the values you need.
Regards,
Frisoni
2015 May 07 5:08 PM
2015 May 06 2:04 PM
Using GET REFERENCE you could clear the private attribute of the object instance.
http://help.sap.com/abapdocu_740/en/abapget_reference.htm
I'm not able to understand your 2nd requirement, if you could tell me the BADI name / method I could understand better.
Thanks,
Sharath