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

Issue using perform

Former Member
0 Likes
482

Hello,

I am using following code:

DATA: it_rbkp TYPE TABLE OF RBKP.
DATA: wa_rbkp like line of it_rbkp.
DATA: v_amt LIKE RBKP-RMWWR.

IF not WA_RBKP is initial.
   perform main using  wa_rbkp-belnr
                       wa_rbkp-gjahr.
ENDIF.


FORM main  USING    P_WA_RBKP_BELNR
                                 P_WA_RBKP_GJAHR.
perform action using wa_rbkp.
ENDFORM.                    " main

FORM action using wa_rbkp.
v_amt = wa_rbkp-rmwwr.
endform.

Now the statement v_amt = wa_rbkp-rmwwr is causing a problem saying that data object wa_rbkp has no structure.

Please help.

Regards,

Rajes.

Edited by: Rajesh Thomas on Dec 9, 2008 8:50 PM

3 REPLIES 3
Read only

naimesh_patel
Active Contributor
0 Likes
454

You need to explicitly TYPE the parameter.

Like:


FORM action using wa_rbkp TYPE RBKP. " <<
v_amt = wa_rbkp-rmwwr.
endform.

Regards,

Naimesh Patel

Read only

Former Member
0 Likes
454

Hello,,

you can do like this:

FORM action USING wa_rbkp STRUCTURE rbkp.
  v_amt = wa_rbkp-rmwwr.
ENDFORM.                    "action

Bye,

Andrew83.

Read only

nkr1shna
Contributor
0 Likes
454

Hi Rajesh

Here is the solution for your error with corrected code.

DATA: it_rbkp TYPE TABLE OF RBKP.

DATA: wa_rbkp like line of it_rbkp.

DATA: v_amt LIKE RBKP-RMWWR.

IF not WA_RBKP is initial.

perform main using wa_rbkp-belnr

wa_rbkp-gjahr.

ENDIF.

FORM main USING P_WA_RBKP_BELNR

P_WA_RBKP_GJAHR.

perform action using wa_rbkp-rmwwr.

ENDFORM. " main

FORM action using p_rmwwr TYPE RMWWR.

v_amt = p_rmwwr.

endform.

Let me know if you further questions.

Best Regards,

Krishna

<<text removed>>

Edited by: Matt on Dec 10, 2008 9:16 AM - Do not ask for or offer points, as per the forum rules.