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

Work Area Problem

Former Member
0 Likes
1,116

HI,

I am facing problem is Work area.

I have a code as below:

===

REPORT ZSCD_TEST9.

data: wa_RETURN type BAPIRET2_T .

wa_return-message = sy-subrc.

===

WA_return is a table withour header line and therefore has no component called Message.

I dont want it to be an internal table.

Any idea how do I achieve this?

reagrds,

9 REPLIES 9
Read only

Former Member
0 Likes
956

Hi

declare like this

data: wa_return type BAPIRET2, "work area

itab_return type BAPIRET2_T "its a table type check in se11

wa_return-message = sy-subrc.

append wa_return to itab_return.

Aditya

Read only

former_member125931
Active Participant
0 Likes
956

Declare for body also,then append it.

Read only

Former Member
0 Likes
956

changes its type as BAPIRET2.

Read only

0 Likes
956

I cannot change it to BAPITET2 as this code is a part of the Function Module and the data passed back in export parameter is of type BAPIRET2_T.

If I change the export parameter, it may afftect the programs that will call this FM.

Is there any way?

Read only

Former Member
0 Likes
956

Hi,

Try this code:

REPORT ZSCD_TEST9.

data: wa_RETURN type BAPIRET2.

wa_return-message = sy-subrc.

Regards,

Joy.

Read only

Former Member
0 Likes
956

data: wa_RETURN type BAPIRET2 .

wa_return-message = sy-subrc.

this will help u.

Regards

Anbu

Read only

Former Member
0 Likes
956

Hi,

anyhow u r declaring WA_RETURN is type of another table..

instead of that better declare WA_RETURN as type of BAPIRET2.

then create another internal table with that BAPIRET2.

Read only

former_member787646
Contributor
0 Likes
956

Hi

Try this and check.

Data: WA_RETURN like line of BAPIRET2_T .

Hope this would help you.

Murthy

Read only

Former Member
0 Likes
956

If you dont want to change the parameter then declare data like this :

DATA: l_str_return LIKE LINE OF wa_return.

APPEND l_str_return TO wa_return.

clear l_str_return.