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

Problem with passing structure in PERFORM ... Statement

Former Member
0 Likes
5,679

I have the following perform statement

PERFORM fill_segment using wa_msg g_simulate.

Form..

FORM fill_segment using p_ msg p_simulate.

wa_xr-country = p_msg-country.

....

ENDFORM.

I have the following error

the dataobjct p_msg has no structure and therefore no component called country

Definition of wa_msg

wa_msg TYPE zemsgs,

zemsgs is a transparent table

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,258

Change the FORM definition to this:


FORM fill_segment USING p_msg LIKE wa_msg
                                        p_simulate.

ENDFORM

7 REPLIES 7
Read only

Former Member
0 Likes
2,259

Change the FORM definition to this:


FORM fill_segment USING p_msg LIKE wa_msg
                                        p_simulate.

ENDFORM

Read only

anversha_s
Active Contributor
0 Likes
2,258

hi

try this.

FORM fill_segment using <b>structure p_ msg</b> p_simulate.

rgds

Anver

Read only

Former Member
0 Likes
2,258

I have learned that you can not pass a structure as a variable into a perform. How I have gotten around it is just make the structure variable (wa_msg) a global and then do the work as you are doing. Without passing the variable to the perform.

Message was edited by:

Kori Benton

Read only

0 Likes
2,258

See my response. You absolutely can pass a structure to a form.

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
2,258

Try this.

FORM fill_segment using p_msg type zemsgs
                                      p_simulate.

You may also need to TYPE the p_SIMULATE.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
2,258

hi,

perform fill_segment p_msg1 p_simulate.

FORM fill_segment USING p_msg1 LIKE wa_msg1

p_simulate.

ENDFORM.

with regards

m.srikanth.

Read only

Former Member
0 Likes
2,258

solved. thx. I figured I had to "type" it.