‎2008 Jul 22 5:41 AM
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,
‎2008 Jul 22 5:44 AM
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
‎2008 Jul 22 5:46 AM
‎2008 Jul 22 5:46 AM
‎2008 Jul 22 5:59 AM
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?
‎2008 Jul 22 5:47 AM
Hi,
Try this code:
REPORT ZSCD_TEST9.
data: wa_RETURN type BAPIRET2.
wa_return-message = sy-subrc.
Regards,
Joy.
‎2008 Jul 22 5:49 AM
data: wa_RETURN type BAPIRET2 .
wa_return-message = sy-subrc.
this will help u.
Regards
Anbu
‎2008 Jul 22 5:52 AM
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.
‎2008 Jul 22 6:21 AM
Hi
Try this and check.
Data: WA_RETURN like line of BAPIRET2_T .
Hope this would help you.
Murthy
‎2008 Jul 22 7:19 AM
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.