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

How to find OK_CODE value while is running a t-code?

Former Member
0 Likes
604

Hi all,

I'm running the transaction FB60 once with a company code, and second time with a diferent company code.

I debug the program in both cases to see ok_code value and this one changes for every case, even when the process in FB60 is the same, exactly the same fields filled for both companies.

Anyone have an idea why ok_code changes when I'm doing the same process in the transaction?

I've tried to find the point in program where ok_code gets the value but it looks automatically, from no other variable.

PD: the reason why I'm checking ok_code is because depending on its value, the transaction executes a validation by doc. position or not.

Thanks in advance,

regards,

4 REPLIES 4
Read only

bharat_rathod2
Active Participant
0 Likes
559

Dear,

Why you are not going with sy-ucomm or sy-tcode?

sy-ucomm = command

sy-tcode   = entered transcation

Read only

0 Likes
559

Hi Bharat, the code of this transaction is standard and I'm only trying to find out why the value of ok_code changes when I'm running the transaction two times with the same data except company code.

thanks

Read only

0 Likes
559

Dear,

Please try to debug your transction

in debug mode you find

METHOD handle_double_click.

CALL METHOD cl_gui_cfw=>set_new_ok_code

       EXPORTING

         new_code = m_okcode_select.

here value of ok_code is change


Read only

0 Likes
559

Dear,

ok_code = user command value.

means enter, back, exit,cancle,etc...