Application Development 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: 

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

Closing Thread

Not getting answers

Former Member
0 Kudos

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

Former Member
0 Kudos

closing thread

not getting replies

Former Member
0 Kudos

got answer

0 Kudos

What's the answer buddy ?

0 Kudos

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

Former Member
0 Kudos

got answer