on 01-23-2009 12:00 AM
Hi Tech Experts,
Please help me in this.
This is what am trying to do in DOC_CHECK badi :
if flt_val eq 'BUS2201'
In IF statement call FM SPOOL_DPO_READ_BAPI_EXPORTS, who reads PO data exported to backend.
Use this data to call FM ZB46B_DPO_TRANSFER with testrun option enabled.
Copy errors tab from lt_bapi_return to et_messages retrun tab.
endif.
( Note : ZB46B_DPO_TRANSFER is the copy of FM 'B46B_DPO_TRANSFER' having changes of
1. Added 'lv_testrun' type xfeld,optional, pass value as import parameter
2. In source code, calling FM BBP_PO_INBOUND, included ' testrun = lv_testrun ' in EXPORTING )
This is the code below i tried but getting errors :
IF FLT_VAL EQ 'BUS2201'.
CALL FUNCTION 'SPOOL_DPO_READ_BAPI_EXPORTS'
EXPORTING
i_guid = iv_doc_guid
i_targetappl_type = iv_targetappl_type
IMPORTING
e_header = ls_header
e_logical_system = lv_logical_system
et_attach = lt_attach
TABLES
e_item = lt_items
e_account = lt_account
e_partner = lt_partner
e_confirm = lt_confirm
e_longtext = lt_longtext
e_limit = lt_limit
e_orgdata = lt_orgdata
e_tax = lt_tax
e_messages = lt_messages
e_actval = lt_actval
e_acc_actval = lt_acc_actval
e_header_rel = lt_header_rel
e_itmlim_rel = lt_itmlim_rel
e_status = lt_po_status
e_tolerance = lt_tolerance.
CALL FUNCTION 'ZB46B_DPO_TRANSFER'
EXPORTING
i_header = ls_header
i_logical_system = lv_logical_system
it_attach = lt_attach
lv_testrun = 'X'
TABLES
i_item = lt_items
i_account = lt_account
i_partner = lt_partner
i_confirm = lt_confirm
i_longtext = lt_longtext
i_limit = lt_limit
i_orgdata = lt_orgdata
i_tax = lt_tax
i_actval = lt_actval
i_acc_actval = lt_acc_actval
i_header_rel = lt_header_rel
i_itmlim_rel = lt_itmlim_rel
i_status = lt_po_status
e_messages = lt_messages
i_tolerance = lt_tolerance
control_record = control_record
lt_bapi_return = lv_bapi_return.
append lv_bapi_return to et_messages.
But, while debugging it is not going inside of FM BBP_PO_INBOUND ( in ZB46B_DPO_TRANSFER) as getting struck at FM 'CONTROL_RECORD_GET_DESTINATION' and not going inside further.
In debugging it is found that 'control_record' table is not filling up. why ?
Could any one help me out in this ?
Thanks
Regards, Sunu
Hi Techies,
From where the values would be passed to the table 'Control_record' inside of calling FM 'CONTROL_RECORD_GET_DESTINATION'. ( in FM B46B_DPO_TRANSFER).
Can any one help me out in this.
Thanking You.
Regards, Sunu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sunayana,
The driver is not being called properly. Please refer the FM - META_DPO_TRANSFER. You need the below call in your case also:
* call the dispach function
call function 'META_BAPI_DISPATCH'
exporting
object = lv_object
method = 'DPOTransfer'
logical_system = i_logical_system
importing
functionname = call_function
tables
control_record = control_record
exceptions
object_not_found = 1
others = 2.
Here call_function will be B46B_DPO_TRANSFER, but you can call your function here. The control_record value passed above can be used.
Hope this solves your problem.
Regards
Kathirvel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.