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

After Subroutine the internal table value getting cleared!!!

Former Member
0 Likes
1,694

Dear Experts,

I have a problem in my program. One of my perform statment calling another program. In that program my internal table getting 28 rows of values( i checked durring debuging ), at the end of the form again its coming back to my main program. Durring that time its getting refreshed with out refresh statment. But i required the values.

Can anyone suggest that.

The source code will be,


  PERFORM fill_ck11n_screen(saplzplmbom) USING wa_mast2-werks.
  MOVE 'E' TO h_mode.
  REFRESH msg_tab.
  CALL TRANSACTION 'CK11N' USING    zbdcdata
                          MODE    h_mode
                          "OPTIONS  FROM g_s_options
                          MESSAGES INTO msg_tab.

Here Zbdcdata getting values in the perform, but after this perform the value getting cleared.

Suggest me pls.

Mohana

5 REPLIES 5
Read only

GauthamV
Active Contributor
0 Likes
1,116

Did you try Export/import option ?

Read only

Former Member
0 Likes
1,116

Where are you capturing the returing internal table entries? I guess you will have to add the tables option in the perform statement.

Vikranth

Read only

Former Member
0 Likes
1,116

Hi,

If you want the internal tables values to be reflect in the calling program, the called subroutine must have the internal table's name passed in TABLES parameter in the subroutine or should be a part of the global definitions common to both the called subroutine and the calling program.

Please Make sure atleast one of these happens.

Read only

Former Member
0 Likes
1,116

You are not passing the zbdcdata tab from your main program to your routine. Probably, you are making changes to an internal table named zbdcdata in the routine just like your zbdcdata table in your main program.

Try this code:

Perform fill_ck11n_screen(saplzplmbom) using wa_mast2-werks changing zbbcdata.

Form ck11n_screen(saplzplmbom) Using uv_werks type werks

Changing ct_zbcdata type bdcdata_tab.

Now change all references in this routine for the zbdcdata table to ct_zbdcdata.

It should work now.

Good luck!

Edited by: Guus Jansen on Dec 13, 2010 1:12 PM

Read only

tushar_shukla
Active Participant
0 Likes
1,116

Mohana,

Set the watchpoint on that internal table before call transaction statement during debugging, you'll find the point where this internal table values are getting are changed.

USING option does not protect the variables from being changed inside the called control block unless the variable is passed by value.

You can make a copy of internal table before passing it further to the call transaction statement .