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

Extended Syntax Error......

Former Member
0 Likes
1,251

Hi All,

In my Program I have created the following Subroutine -

FORM call_back TABLES record_tab  STRUCTURE seahlpres
                                  CHANGING  shlp_top TYPE shlp_descr
                                                     callcontrol TYPE ddshf4ctrl.

Here seahlpres is a DDIC Structure

Now this is giving an Extended Syntax Error stating that "Using STRUCTURE is Obsolete".

Agreed, but I am unable to use following -

FORM call_back TABLES record_tab  TYPE STANDARD TABLE OF seahlpres
                         CHANGING  shlp_top TYPE shlp_descr
                                            callcontrol TYPE ddshf4ctrl.

or

FORM call_back TABLES record_tab  TYPE LINE OF seahlpres
                         CHANGING  shlp_top TYPE shlp_descr
                                            callcontrol TYPE ddshf4ctrl.

How to remove this Error, by what way should RECORD_TAB be declared as to remove the Error.

Regards,

Pankaj Agarwal.

1 ACCEPTED SOLUTION
Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
1,186

Hi,

Try this:


DATA : it_seahlpres TYPE STANDARD TABLE OF seahlpres,
       wa_seahlpress TYPE seahlpress.


FORM call_back TABLES   record_tab  TYPE it_seahlpress
               CHANGING shlp_top TYPE shlp_descr
                        callcontrol TYPE ddshf4ctrl.

Hope this helps you.

Regards,

Tarun

10 REPLIES 10
Read only

Former Member
0 Likes
1,186

Hi;

You have to declare the table type of it like.

types:

tt_seahlpres type standard TABLE OF seahlpres.

then

FORM call_back exporting / importing record_tab type tt_seahlpres

CHANGING shlp_top TYPE shlp_descr

callcontrol TYPE ddshf4ctrl.

endform.

Eventhough SAP is advicing to not use of changing only use export and import parameters.

Regards

Shashi

Read only

Former Member
0 Likes
1,186

Hi,

Use table type of 'seahlpres'. If it there already in the system then use it or create new one.

Your code will look like this:

FORM call_back TABLES record_tab TYPE tt_seahlpres

CHANGING shlp_top TYPE shlp_descr

callcontrol TYPE ddshf4ctrl.

Regards,

pranaya

Read only

Former Member
0 Likes
1,186

hi.

u have to add the statement

TABLES: seahlpres.

at the beginning of ur program. then ur program will somewhat look like this :

REPORT ZREPORT_NAME.

TABLES: seahlpres.

"

" Your code goes here..

"

" Definitation of ur form goes here.

FORM call_back TABLES record_tab TYPE STANDARD TABLE OF seahlpres

CHANGING shlp_top TYPE shlp_descr

callcontrol TYPE ddshf4ctrl.

"

" Your code goes here,..

"

ENDFORM.

Hope this solves ur problem....

Regards,

Anirban

Read only

Former Member
0 Likes
1,186

Hi,

see the below code from tcode ABAPDOCU.

REPORT demo_mod_tech_example_5.

DATA: BEGIN OF line,

col1 TYPE i,

col2 TYPE i,

END OF line.

DATA itab LIKE STANDARD TABLE OF line.

PERFORM fill CHANGING itab.

PERFORM out USING itab.

FORM fill CHANGING f_itab LIKE itab.

DATA f_line LIKE LINE OF f_itab.

DO 3 TIMES.

f_line-col1 = sy-index.

f_line-col2 = sy-index ** 2.

APPEND f_line TO f_itab.

ENDDO.

ENDFORM.

FORM out USING value(f_itab) LIKE itab.

DATA f_line LIKE LINE OF f_itab.

LOOP AT f_itab INTO f_line.

WRITE: / f_line-col1, f_line-col2.

ENDLOOP.

ENDFORM.

-


For more details check examples in abapdocu.

The ABAP Programming Language >Modularization Techniques >Procedures >Subroutines

Cheers,

Rudhir

Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
1,187

Hi,

Try this:


DATA : it_seahlpres TYPE STANDARD TABLE OF seahlpres,
       wa_seahlpress TYPE seahlpress.


FORM call_back TABLES   record_tab  TYPE it_seahlpress
               CHANGING shlp_top TYPE shlp_descr
                        callcontrol TYPE ddshf4ctrl.

Hope this helps you.

Regards,

Tarun

Read only

Former Member
0 Likes
1,186

Tarun,

This is what I tried initially, but it gives an error -

"The Type "IT_SEAHLPRES" is unknown.

Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
1,186

Hi,

Refer this demo, its working:-


DATA : it_tcurc TYPE STANDARD TABLE OF tcurc,
       wa_tcurc TYPE tcurc.


START-OF-SELECTION.
  PERFORM call_back TABLES it_tcurc.


*&---------------------------------------------------------------------*
*&      Form  call_back
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->IT_TCURC   text
*----------------------------------------------------------------------*
FORM call_back TABLES it_tcurc.

ENDFORM.                    "call_back

Regards,

Tarun

Read only

Former Member
0 Likes
1,186

Thanks Tarun,

This Works.....

Read only

Former Member
0 Likes
1,186

Hi,

Try this.

FORM call_back USING record_tab TYPE TABLE OF seahlpres

CHANGING shlp_top TYPE shlp_descr

callcontrol TYPE ddshf4ctrl.

Regards,

Roopa

Read only

0 Likes
1,186

>

> Hi,

>

> Try this.

>

> FORM call_back USING record_tab TYPE TABLE OF seahlpres

> CHANGING shlp_top TYPE shlp_descr

> callcontrol TYPE ddshf4ctrl.

>

> Regards,

> Roopa

RRO,

Using TYPE TABLE OF gives a Short Dump........