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

temporary table problems

Former Member
0 Likes
697

Hi

I have a problem

I declared a temporary table in my top as follows:

TYPES: BEGIN OF gt_sales_t2,

invoiceid TYPE xixi_deid,

productid TYPE xixi_deid,

customerid TYPE xixi_deid,

quantity TYPE xixi_dequantity,

error TYPE xfeld,

chflg TYPE xfeld,

mark TYPE xfeld,

empty TYPE xfeld,

END OF gt_sales_t2.

Data: gt_sales_t TYPE STANDARD TABLE OF gt_sales_t2,

gs_sales_t TYPE gt_sales_t2.

This is all well and good.

The problem is in the SAVE form

I have a declaration for my PERFORM SAVE in my usercommand, as can be seen below:

PERFORM SAVE using gs_sales_t.

In the FORM SAVE I tried this:

FORM SAVE using gs_sales_t TYPE gt_sales_t2.

However this is not being accepted

I got the following error message:

In PERFORM or CALL FUNCTION "POPUP_MSGSAVE300", the actual parameter "GT_SALES_T" is incompatible with the formal parameter "GT_SALES_T".

Thank you for your time

5 REPLIES 5
Read only

Former Member
0 Likes
665

Hi,

I think you need to define your subroutine parameter as TABLE, not USING.

Regards,

Nick

Read only

Former Member
0 Likes
665

Hi

If you are changing the table gs_sales_t. in the form routine, then use CHANGING than USING.

And for the form routing declare like below

FORM SAVE using gs_sales_t LIKE gs_sales_t.

Thanks

Sourav

Read only

Former Member
0 Likes
665

Hello,

Try this,

PERFORM SAVE tables gs_sales_t.

form save tables gs_sales_t structure gs_sales_t.

endfor.

Read only

Former Member
0 Likes
665

Hi,

I believe there is problem here: Are you passing table or structure?

The code you have written in Form and Perform is with reference to the structure. But the error message refer to the Internal Table??

Could you verify that you are passing and referring to the table or structure? One more side note, SInce this is a global internal table its not mandatory to pass it to the routine. Its available in the routine.

Best regards,

Kazmi

Edited by: Abd-Al-Aleem on Jul 29, 2009 6:26 PM

Read only

Former Member
0 Likes
665

Thank you...

i'll try some of these ideas