04-24-2006 2:37 PM
How to declare a global variable in badi.
Say I have to get value from a variable DELIVERY_FINAL_CHECK.
The value from this variable shud be used in another method SAVE_DOCUMENT_PREPARE.
Thanks and regards,
Sujatha
04-24-2006 2:43 PM
Hi,
You can define it as an attribute in the class interface.
Hope this helps.
Please mark helpful answers.
Regards,
Amit Mishra
04-24-2006 2:54 PM
Hi Tharun,
You can define the variable in the atribute of the interface. Make that attribute public.
Make it static attribute if wanna access it using only the class n not instantiate the object.
Regards,
Tanveer.
Please mark helpful answers.
04-24-2006 2:55 PM
HI
YES WE CAN DECLARE THE GLOBAL VARIABLE IN BADI
YOU CAN USE THE STATIC KEYWORD TO DECLARE A GLOBAL VARIABLE IN BADI.
GO THROUGH THIS LINKS
http://www.sap-img.com/abap/business-add-in-you-need-to-understand-abap-oo-interface-concept.htm
http://www.firstlogic.com/partners/SAP/faq.asp
THANKS
MRUTYUN
04-24-2006 2:56 PM
hi tarun,
declare a varible, say var1, in the <b>attribute</b> of the class implementing the BADi. The type of the variable must be of the same type as the variable whose value you want to get from the method DELIVERY_FINAL_CHECK.
Then you can use var1 in the method SAVE_DOCUMENT_PREPARE.
Regards,
Kunal.