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

Syntax Error

Former Member
0 Likes
468

Hello Friends, An upgrade error from 4.6 to 6.0.


FORM BUILD_OBJECT_FROM_IDOC USING    P_OBJECT_NAME
                                     P_VERB
                                     P_IDOCTYPE
                                     P_OBJECT[].

With the above statement I had an error

In Release 4.0, the special character "[" - as here in the name "P_OBJECT[]" - is no longer allowed.

I chnaged it to,


FORM build_object_from_idoc
TABLES p_object TYPE object
USING p_object_name
      p_verb
      p_idoctype.

now the error is,

You can only refer to the object type OBJECT using "REF TO".

ANy suggestions.

Thanks

Raju.

1 ACCEPTED SOLUTION
Read only

rahulkavuri
Active Contributor
0 Likes
446
FORM build_object_from_idoc
TABLES p_object structure object
USING p_object_name
      p_verb
      p_idoctype.

hi I have edited my response above, check if it works now...

*                             D A T A                                  *
************************************************************************
DATA:  BEGIN OF t_data OCCURS 0,
           werks LIKE msku-werks, "Plant
           matnr LIKE msku-matnr, "Material
           END OF t_data.

FORM get_data  TABLES   pt_data STRUCTURE t_data.

***********CODE**********

ENDFORM.

Edited by: Rahul Kavuri on Mar 10, 2008 11:28 PM

3 REPLIES 3
Read only

Former Member
0 Likes
446

hi ,

see this, please define the p_object as the table type .

types: begin of itab,

f1

f2

.

.

end of itab.

data: object type standard table of itab.

in you form p_OBJECT type itab. "<<<<ur structure name of object

Read only

rahulkavuri
Active Contributor
0 Likes
447
FORM build_object_from_idoc
TABLES p_object structure object
USING p_object_name
      p_verb
      p_idoctype.

hi I have edited my response above, check if it works now...

*                             D A T A                                  *
************************************************************************
DATA:  BEGIN OF t_data OCCURS 0,
           werks LIKE msku-werks, "Plant
           matnr LIKE msku-matnr, "Material
           END OF t_data.

FORM get_data  TABLES   pt_data STRUCTURE t_data.

***********CODE**********

ENDFORM.

Edited by: Rahul Kavuri on Mar 10, 2008 11:28 PM

Read only

0 Likes
446

THanks Venkat and Rahul.

Raju.