Need help in BAPI

Question:
Hi i have written a BAPI for order status .
My problem is if i debug the FM the itab is getting populated but if i run the FM iam not able to get the O/p.
Please Help.
function z_bapi_get_order_status.
*"----------------------------------------------------------------------
*"*"Local interface:
*" IMPORTING
*" VALUE(BAPI_ORDERS_STATUS_IMPORT) TYPE
*" ZBAPI_ORDER_STATUS_IMPORT1
*" EXPORTING
*" VALUE(RETURN) TYPE BAPIRETURN
*" TABLES
*" T_TABLE STRUCTURE ZBAPISTAT
*"----------------------------------------------------------------------
data:
l_aufnr like afko-aufnr,
l_objnr like jest-objnr.
select single aufnr from afko into l_aufnr
where aufnr = bapi_orders_status_import-orderid.
if not sy-subrc is initial.
clear message.
message-msgty = 'E'.
message-msgid = 'Z3'.
message-msgno = '000'.
message-msgv1 = bapi_orders_status_import-orderid.
perform set_return_message using message changing return.
if 1 = 2.
message e000(z3).
endif.
endif.
check message is initial.
concatenate 'OR' bapi_orders_status_import-orderid into l_objnr.
if bapi_orders_status_import-i_excludeinactive = 'X'.
select objnr stat inact from jest into table t_bapistat
where objnr = l_objnr and inact <> 'X'.
else.
select objnr stat inact from jest into table t_bapistat
where objnr = l_objnr.
endif.
if not sy-subrc is initial.
clear message.
message-msgty = 'E'.
message-msgid = 'Z3'.
message-msgno = '001'.
message-msgv1 = bapi_orders_status_import-orderid.
perform set_return_message using message changing return.
if 1 = 2.
message e001(z3).
endif.
endif.
check return is initial.
* READ ORDER STATUS TEXT.
select istat txt04 txt30 from tj02t
into table t_tj02t
for all entries in t_bapistat where istat = t_bapistat-stat
and spras = bapi_orders_status_import-langu.
sort t_tj02t by istat.
loop at t_bapistat into g_bapistat.
read table t_tj02t with key istat = g_bapistat-stat binary search
into g_tj02t.
if sy-subrc is initial.
move :
g_tj02t-txt04 to g_bapistat-txt04,
g_tj02t-txt30 to g_bapistat-txt30.
modify t_bapistat from g_bapistat transporting txt04 txt30.
endif.
endloop.
endfunction.
Answer:
Hi,
You have defined
TABLES
*" T_TABLE STRUCTURE ZBAPISTAT
But in your code you are not passing any data to T_TABLE so you are not getting anything back from the FM.
Regards,
Sudhir/Mohit
Answer:
Hi,
Thanks guys,
That's a silly mistake i ahave done.

More Articles:

Deleting of Billing Doc, DO, SO, GR and PO of an invoices?
problem Accessing external oracle DB?
- access sum line?
Force using a particular printer for customized report?
so_object_send - ( HELP )?
sales order create?