Application Development 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: 

Reg parameter table

Former Member
0 Kudos

Hi ,

plz check my below program and exaplain me how to make use of parameter table

CLASS cl_abap_objectdescr DEFINITION LOAD.

CLASS add DEFINITION.

PUBLIC SECTION.

METHODS add IMPORTING x TYPE i

y TYPE i

EXPORTING z TYPE i.

ENDCLASS. "add DEFINITION

CLASS add IMPLEMENTATION.

METHOD add.

z = x + y.

ENDMETHOD. "ADD

ENDCLASS. "ADD IMPLEMENTATION

TYPE-POOLS: abap.

START-OF-SELECTION.

DATA : x TYPE i VALUE 10,

y TYPE i VALUE 20,

z TYPE i.

DATA : it_ptab TYPE abap_parmbind_tab,

wa_ptab TYPE abap_parmbind.

DATA : obj TYPE REF TO add.

DATA : add TYPE string VALUE 'ADD'.

wa_ptab-name = 'X'.

wa_ptab-kind = cl_abap_objectdescr=>exporting.

GET REFERENCE OF X INTO wa_ptab-value.

INSERT wa_ptab INTO TABLE it_ptab.

wa_ptab-name = 'Y'.

wa_ptab-kind = cl_abap_objectdescr=>exporting.

GET REFERENCE OF Y INTO wa_ptab-value.

INSERT wa_ptab INTO TABLE it_ptab.

wa_ptab-name = 'Z'.

wa_ptab-kind = cl_abap_objectdescr=>importing.

GET REFERENCE OF Z INTO wa_ptab-value.

INSERT wa_ptab INTO TABLE it_ptab.

CREATE OBJECT obj

TYPE

(add)

PARAMETER-TABLE

it_ptab.

WRITE : z.

The dump analysis is as follows

Runtime Errors DYN_CALL_METH_PARAM_NOT_FOUND

Except. CX_SY_DYN_CALL_PARAM_NOT_FOUND

Date and Time 2008.07.28 02:10:02

Short text

Formal parameter not found during dynamic method call.

regards

4 REPLIES 4

Former Member
0 Kudos

0 Kudos

Hi,

When to use parameter table addition with CREATE OBJECT statement?

and how to use it.

With example in SAP HELP I tried but its leading to dump as in my program shown.

regards

prasanth

0 Kudos

Hi,

Parameter table in Method call is Basically used when call method Dynamically and pass the actual parameter dynamically.

The error you have mentioned occured when the specified and actual parameter are different.

Just follow the procedure and criteria for using parameter table in case of method call in this link.Hope you will get to know the reason for the runtime error.

http://help.sap.com/saphelp_nw70/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm

Regards,

Sujit

Former Member
0 Kudos

hi,

You can Refer to the link.

http://www.sapnet.ru/abap_docu/ABAPCREATE_OBJECT_ABAP_OBJECTS.htm

Regards

Sumit Agarwal