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

problem with call function close_form

Former Member
0 Likes
1,351

Hello ,

I have a problem with function module close_form.I dont know if I am doing something wrong but please help me.

the issue is


declarations:
data: gt_itcpp type table of itcpp,
         gt_otfdat type table of itcoo.
 CALL FUNCTION 'CLOSE_FORM
 EXPORTING
   RESULT  = gt_itcpp
 TABLES
   otfdata = gt_otfdat
 EXCEPTIONS
   OTHERS  = 1.

DUMP: FUNCTION PARAMETER RESULT IS UNKNOWN.

THANKS

1 ACCEPTED SOLUTION
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,268

data: gt_itcpp type table of itcpp,
         gt_otfdat type table of itcoo.
 CALL FUNCTION 'CLOSE_FORM
 EXPORTING
   RESULT  = gt_itcpp  "<--Should pass a structure not a internal table
 TABLES
   otfdata = gt_otfdat
 EXCEPTIONS
   OTHERS  = 1.
10 REPLIES 10
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,269

data: gt_itcpp type table of itcpp,
         gt_otfdat type table of itcoo.
 CALL FUNCTION 'CLOSE_FORM
 EXPORTING
   RESULT  = gt_itcpp  "<--Should pass a structure not a internal table
 TABLES
   otfdata = gt_otfdat
 EXCEPTIONS
   OTHERS  = 1.
Read only

former_member188827
Active Contributor
0 Likes
1,268

the function call is incorrect.try:

CALL FUNCTION 'CLOSE_FORM'

IMPORTING

RESULT = gt_itcpp

TABLES

otfdata = gt_otfdat

EXCEPTIONS

OTHERS = 1.

replace "exporting" with importing

Read only

former_member188827
Active Contributor
0 Likes
1,268

can you paste your function call here because "RESULT" should be placed in importing section rather than exporting

Read only

Former Member
0 Likes
1,268

Pretty basic question and although marked as solved, it still doesn't look correct. So please be careful when assigning points.

Keshav??

Rob

Read only

0 Likes
1,268

Hi Rob,

You are always welcome to unassign it

My mistake ..shouldnt have answered it .

it still doesn't look correct

Why ?

Read only

0 Likes
1,268

No problem answering it, but shouldn't it be something like:

DATA: wa_itcpp  TYPE          itcpp,
      gt_otfdat TYPE TABLE OF itcoo.

CALL FUNCTION 'CLOSE_FORM'
  IMPORTING
    RESULT  = wa_itcpp
  TABLES
    otfdata = gt_otfdat
  EXCEPTIONS
    OTHERS  = 1.

Rob

Read only

0 Likes
1,268

Yes Rob.

I have already mentioned it there

"<--Should pass a structure not a internal table

Read only

0 Likes
1,268

My point was that there are actually two problems with the original code: the one that you pointed out and the one that abapuser pointed out.

Although both were very helpful individually, I don't think either one actually solved the problem.

It would be misleading to anyone searching the forum looking for posts that solved a problem similar to theirs and only implemented half the solution.

In fact abapuser's answer is the one that answers the question that was actually asked.

Rob

Read only

0 Likes
1,268

Hi Rob,

You are right

Edited by: Keshav.T on Sep 24, 2010 9:34 PM

Read only

0 Likes
1,268

Keshav - just to be clear, the issue was not really with anything you posted. It was with the OP who was (I hope) just not being particularly careful in assigning points.

Rob