‎2009 Mar 25 6:47 AM
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.
‎2009 Mar 25 6:58 AM
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
‎2009 Mar 25 6:53 AM
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
‎2009 Mar 25 6:54 AM
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
‎2009 Mar 25 6:58 AM
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
‎2009 Mar 25 6:58 AM
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
‎2009 Mar 25 6:58 AM
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
‎2009 Mar 25 7:06 AM
Tarun,
This is what I tried initially, but it gives an error -
"The Type "IT_SEAHLPRES" is unknown.
‎2009 Mar 25 7:13 AM
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
‎2009 Mar 25 7:16 AM
‎2009 Mar 25 7:11 AM
Hi,
Try this.
FORM call_back USING record_tab TYPE TABLE OF seahlpres
CHANGING shlp_top TYPE shlp_descr
callcontrol TYPE ddshf4ctrl.
Regards,
Roopa
‎2009 Mar 25 7:13 AM
>
> 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........