‎2007 Apr 12 2:21 PM
Hi everyone,
I am using a RFC FM 'BBP_INB_DELIVERY_CREATE' for inbound delivery creation. When i am testing this in SE37 with certain parameters, viz., document date, time, total weight, unit of weight ( all this in header) , material number, qty, unit, po no, line no. (all this in detail part of this FM), it works fine and a corresponding document is created in its header table(LIKP) and line table(LIPS).
But, when i am calling this FM in SE38 and passing same parameters as mentioned above, it's neither exporting nor returning any messages.
Can anyone please suggest me to solve this and tell me if i need to pass some more info for this FM.
Regards,
Vishwanath
‎2007 Apr 12 2:25 PM
u need to pass material no, po no, item no in its original format... say for material is 12345, then u need to pass as 000000000000012345 (whole length of material).
for this purpose use CONVERSION_EXIT_ALPHA_OUTPUT.
‎2007 Apr 12 2:23 PM
Are you sure the RETURN table is empty?
Did you get any value in the EF_DELIVERY parameter?
Regards,
Ravi
‎2007 Apr 12 2:26 PM
Take care of your data formating.
Example for MATNR :
016486 is different of 16486
‎2007 Apr 12 2:27 PM
Yes i am sure about it.
********************************
REPORT zvornu.
DATA: lv_exnum TYPE likp-exnum, "Number of foreign trade data in MM and SD documents
lv_vbeln TYPE likp-vbeln. "Delivery Number
DATA: li_bbp_detail TYPE TABLE OF bbp_inbd_d, "Internal Table of type header of BAPI
lw_bbp_detail TYPE bbp_inbd_d, "Work area for header of BAPI
lw_bbp_header TYPE bbp_inbd_l, "Work area for details/line item of BAPI
li_bbp_return TYPE TABLE OF bapireturn, "Internal Table for return messages from BAPI
lw_bbp_return TYPE bapireturn. "Work area for return messages from BAPI
lw_bbp_header-deliv_date = sy-datum. "Current Date
lw_bbp_header-deliv_time = sy-uzeit. "Current Time
lw_bbp_header-total_wght = '4.500'. "Total Weight
lw_bbp_header-unit_of_wt = 'KG'. "Unit of weight
lw_bbp_detail-material = 'PCS-02-ART417'. "Material number
lw_bbp_detail-deliv_qty = '9000'. "Quantity
lw_bbp_detail-unit = 'PC'. "Unit
lw_bbp_detail-po_number = '4500000210'. "PO number
lw_bbp_detail-po_item = '00010'. "PO Item number
APPEND lw_bbp_detail TO li_bbp_detail.
CLEAR: lw_bbp_detail.
*Calling BAPI for creation of Inbound Delivery
CALL FUNCTION 'BBP_INB_DELIVERY_CREATE'
EXPORTING
is_inb_delivery_header = lw_bbp_header
IMPORTING
ef_delivery = lv_vbeln
TABLES
it_inb_delivery_detail = li_bbp_detail
return = li_bbp_return.
IF sy-subrc IS INITIAL.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'
IMPORTING
RETURN =
.
ENDIF.
LOOP AT li_bbp_return INTO lw_bbp_return.
WRITE: / lw_bbp_return-type,
lw_bbp_return-message.
ENDLOOP.
Here is the code for reference.
regards,
Vishy
‎2007 Apr 12 2:25 PM
u need to pass material no, po no, item no in its original format... say for material is 12345, then u need to pass as 000000000000012345 (whole length of material).
for this purpose use CONVERSION_EXIT_ALPHA_OUTPUT.