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

BADI - OBJECTS - how to declare global objects in local method

Former Member
0 Likes
1,205

Interface name : IF_EX_ME_PROCESS_REQ_CUST

CLass Name : ZCL_IM_PRPO_MM_BADI_CHECK

it has two methods

PROCESS_ACCOUNT

CHECK

METHOD if_ex_me_process_req_cust~check.

LOOP AT i_items INTO l_item.

ls_item = l_item-item->get_data( ).

ENDLOOP.

endmethod.

METHOD if_ex_me_process_req_cust~process_account.

DATA: re_persistent_data1 TYPE exkn.

CALL METHOD im_account_ref->get_persistent_data

RECEIVING

re_persistent_data = re_persistent_data1.

ENDMETHOD.

QUESTION

re_persistent_data(process_Account) has fields sakto and PSP_PNR.

i need to acccess the field values in

Check Method.

kindly help me with code

please help me with code

Thanks

8 REPLIES 8
Read only

Former Member
0 Likes
1,074

export the variable from where it is generated . .and IMPORT it in the method where you want to use..

Read only

0 Likes
1,074

Closing Thread

Not getting answers

Read only

Former Member
0 Likes
1,074

Hey ,

using a IMPORT and EXPORT in methods will guve you ans error.

So what can you do is , create a ztable in datbase and populate the data into it from where it is available and then get that data into other method where you want to use it.

Refer this answered(by me) thread for the same question.

Hope this is helpful.

Regards,

Uma Dave

Read only

Former Member
0 Likes
1,074

closing thread

not getting replies

Read only

Former Member
0 Likes
1,074

got answer

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,074

What's the answer buddy ?

Read only

0 Likes
1,074

I think having one attribute would have solved the issue.

Assign it where u r getting value.. and access it in check method.

G@urav

Read only

Former Member
0 Likes
1,074

got answer