Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

method in BOR

Former Member
0 Likes
862

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.

7 REPLIES 7
Read only

Former Member
0 Likes
810

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.

Read only

0 Likes
810

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.

Read only

Former Member
0 Likes
810

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 .

Read only

0 Likes
810

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

Read only

0 Likes
810

Hi,

try by changing the value in quotes to capital letters and check.

Swc_get_element container 'PINNUM' pinnum

regards

padma

Read only

Former Member
0 Likes
810

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.

Read only

0 Likes
810

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.