‎2009 Nov 30 5:33 AM
Hi All,
I have requirement to call custom BAPI in Custom Busines object Repository. i did the same and it is called successfully. now i am creating one more method(method2). i want to pass some values from method1 to method2. i decalred attributes and i pass values to those attributes in method1 and called in method2 like this.( here i cannt call the BPAI again in method2)
inmethod-2
sWC_GET_ELEMENT CONTAINER 'pinnum' Pinnum.
i am unable to pass values to method 2
do i need to do anything more.Please guide me inthis issue.
Thank & Regards,
Padma.
‎2009 Nov 30 6:27 AM
Hi Padma.
Please check if the Pinnum field is populated in debug mode and in the quotes "pinnum" mentioned the field as it is declared i.e. Pinnum or however it is decalred.
Also check if you have defined the field Pinnum a sa global parameter of just local to the method 1 that you have created.
Also if you just wish to pass parameters (i.e. Pinnum) and if it is a global field it would be populated ...so please check in debug.
Please revert if there are any queries.
Regards,
Anand.
‎2009 Nov 30 7:42 AM
Hi anand,
Thank you , I declare PINNUM as attribute in BOR . i dont know whether the attributes will treat as global or local paramaters.
i am passing values to PINNUM and calling the same in method2 of BOR.
i want to pass data to attribute from method1 the and calling the same in method 2. do i need to do anything more.
im passing data like this....
Swc_get_element container 'pinnum' pinnum.
pinnum = object-key-projectdefinition.
SWC_SET_ELEMENT CONTAINER 'pinnum' pinnum.
is this correct way?
Please let me know.
Thanks & Regards,
Padma.
‎2009 Nov 30 9:09 AM
Hi Padma,
In the code sample sent by you, you have fetched the value of pinnum and overwritten that same value by another value and set that value as the final value for pinnum i.e.
Swc_get_element container 'pinnum' pinnum. -> Fetched value
pinnum = object-key-projectdefinition. -> Over written the value
SWC_SET_ELEMENT CONTAINER 'pinnum' pinnum. ->Set the avlue to the overwritten value
I believe this should work.
Is this not working?Please let me know if you are facing any error.
Also for calling the method u need to use swc_call_method, but i think you must have already used the same.
Regards,
Anand .
‎2009 Nov 30 9:59 AM
Hi Ananad,
Im not getting error.
In the code
Swc_get_element container 'pinnum' pinnum. -> Fetched value
pinnum = object-key-projectdefinition. -> Over written the value
SWC_SET_ELEMENT CONTAINER 'pinnum' pinnum. ->Set the avlue to the overwritten value
the above one i wrote in method1.
now i want to call same PINNUM in my method2. so called like this....
Swc_get_element container 'pinnum' pinnum.
but when i debugg pinnum value is null in method2.
Please suggest me ,what i steps i have to take here.
Regards,
Padma
‎2009 Nov 30 10:23 AM
Hi,
try by changing the value in quotes to capital letters and check.
Swc_get_element container 'PINNUM' pinnum
regards
padma
‎2009 Nov 30 10:42 AM
Hi Padma,
Try doing this:
If you have defined Pinnum as PINNUM in the attributes then use SWC_SET_ELEMENT CONTAINER 'PINNUM' pinnum.
Else if u hav used Pinnum try using SWC_SET_ELEMENT CONTAINER 'Pinnum' pinnum.
If these do not work please check if the value is getting cleared within your method.
Finally debug method 1 and see if the value of Pinnum was populated the first time when ur statement SWC_SET_ELEMENT CONTAINER 'pinnum' pinnum. was called in method 1.
Regards,
Anand.
‎2009 Nov 30 11:23 AM
Hi,
As u suggested i make it as Captial letter and i tried but im not able to succeeded in that.
it is not passing any value to method2.
Thanks and regards,
Padma.