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

call transcation QE51N problem

Former Member
0 Likes
1,191

Hello,

I try to call transaction QE51N within my z program passing the Inspection lot.

I filled the relevant screens for bdcdata_tab and call:

opt-dismode = 'E'.

opt-defsize = 'X'.

CALL TRANSACTION 'QE51N' USING bdcdata_tab OPTIONS FROM opt.

The problem is that when it is in the transaction and passing thorough operations

it asks : Should the data for operation ---

be saved?

if pressing yes, it goes out of transaction back to the program.

It does not happend when i run directly the transaction (not from a program) and stay into the transaction until exit.

does someone have a clue why it happened like that? and what to do avoid this.

Thanks for your help,

Fariba

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,054

Try adding the below parameter before the CALL Transaction.

I was having the same problem in an iView.

opt-racommit = 'X'. "Do not end transaction at COMMIT WORK

Hello,

I try to call transaction QE51N within my z program passing the Inspection lot.

I filled the relevant screens for bdcdata_tab and call:

opt-dismode = 'E'.

opt-defsize = 'X'.

CALL TRANSACTION 'QE51N' USING bdcdata_tab OPTIONS FROM opt.

The problem is that when it is in the transaction and passing thorough operations

it asks : Should the data for operation ---

be saved?

if pressing yes, it goes out of transaction back to the program.

It does not happend when i run directly the transaction (not from a program) and stay into the transaction until exit.

does someone have a clue why it happened like that? and what to do avoid this.

Thanks for your help,

Fariba

5 REPLIES 5
Read only

Former Member
0 Likes
1,054

Hi Fariba,

Pass the function code for the SAVE button as well, to the BDC table, and then call the transaction. The data will automatically get saved.

Hope this helps.

Regards

Anil Madhavan

Read only

0 Likes
1,054

Thanks for your reply,

How can I Pass the function code for the SAVE button ?

The next are the actions I've made:

DATA opt TYPE ctu_params.

CLEAR bdcdata_wa.

bdcdata_wa-program = 'SAPLQEES'.

bdcdata_wa-dynpro = '0500'.

bdcdata_wa-dynbegin = 'X'.

APPEND bdcdata_wa TO bdcdata_tab.

CLEAR bdcdata_wa.

bdcdata_wa-fnam = 'BDC_OKCODE'.

bdcdata_wa-fval = '=TAB_LOS'.

APPEND bdcdata_wa TO bdcdata_tab.

CLEAR bdcdata_wa.

bdcdata_wa-program = 'SAPLQEES'.

bdcdata_wa-dynpro = '0500'.

bdcdata_wa-dynbegin = 'X'.

APPEND bdcdata_wa TO bdcdata_tab.

CLEAR bdcdata_wa.

bdcdata_wa-fnam = 'QL_PRLOS-LOW'.

bdcdata_wa-fval = lv_prueflos.

APPEND bdcdata_wa TO bdcdata_tab.

CLEAR bdcdata_wa.

bdcdata_wa-fnam = 'BDC_OKCODE'.

bdcdata_wa-fval = '/00'.

APPEND bdcdata_wa TO bdcdata_tab.

CLEAR bdcdata_wa.

bdcdata_wa-program = 'SAPLQEES'.

bdcdata_wa-dynpro = '0500'.

bdcdata_wa-dynbegin = 'X'.

APPEND bdcdata_wa TO bdcdata_tab.

CLEAR bdcdata_wa.

bdcdata_wa-fnam = 'BDC_OKCODE'.

bdcdata_wa-fval = '=CRET'.

APPEND bdcdata_wa TO bdcdata_tab.

opt-dismode = 'E'.

opt-defsize = 'X'.

opt-updmode = 'S'.

CALL TRANSACTION 'QE51N' USING bdcdata_tab OPTIONS FROM opt.

Where & what I have insert in these lines?

Thanks in advance,

Fariba

Read only

0 Likes
1,054

Dear Anil,

I couldn't understand what do you mean:

"Pass the function code for the SAVE button"

Can you please explain me?

Thanks for your help,

Fariba

Read only

Former Member
0 Likes
1,055

Try adding the below parameter before the CALL Transaction.

I was having the same problem in an iView.

opt-racommit = 'X'. "Do not end transaction at COMMIT WORK

Read only

0 Likes
1,054

Thank you Mark,

It was very helpful. It did the job!!!