2007 Feb 07 1:17 PM
Hi Gurus.
Please let me know the solution for the below problem,
I have created a RF transaction for creating an inbound delivery, then this delivery will be added to the original shipment. I am using the function module bbp_inb_delivery_create. This RF transaction is working fine when executed as a standalone application.
This RF transaction will be called by some other Z RF transaction, we are doing it thru a BDC. If my RF TCODE is executed in background mode then the function module bbp_inb_delivery_create throwing me back to the called program not allowing me to do the other processess.
Its just creating a new delivery and going back to the program from where this was called, not allowing me to add the delivery to the shipment.
Please let me know what is the solution for this.
Thanks well in advance.
Amit
Hi Gurus.
Please let me know the solution for the below problem,
I have created a RF transaction for creating an inbound delivery, then this delivery will be added to the original shipment. I am using the function module bbp_inb_delivery_create. This RF transaction is working fine when executed as a standalone application.
This RF transaction will be called by some other Z RF transaction, we are doing it thru a BDC. If my RF TCODE is executed in background mode then the function module bbp_inb_delivery_create throwing me back to the called program not allowing me to do the other processess.
Its just creating a new delivery and going back to the program from where this was called, not allowing me to add the delivery to the shipment.
Please let me know what is the solution for this.
Thanks well in advance.
Amit
2007 Feb 07 1:20 PM
Amit,
How are you calling RFC bbp_inb_delivery_create from your RF TCODE. Could you please provide the code.
Thanks
2007 Feb 08 5:56 AM
Hi Rahul
I have given the extract of the code below
I am calling this RFC at the PAI event after checking some conditions, reading the delivery details using the RFC bbp_inb_delivery_getdetails.
DATA : lit_data LIKE bbp_inbd_d OCCURS 0 WITH HEADER LINE,
lv_billoflad TYPE likp-bolnr,
lv_delivery TYPE likp-vbeln.
CLEAR : gv_lines,
gwa_data,
git_ret.
REFRESH: git_ret.
READ TABLE git_data INTO gwa_data INDEX 1.
IF sy-subrc EQ 0.
MOVE : gwa_data-material TO lit_data-material,
gwa_data-vend_mat TO lit_data-vend_mat,
gwa_data-matl_desc TO lit_data-matl_desc,
i_split TO lit_data-deliv_qty,
gwa_data-unit TO lit_data-unit,
gwa_data-po_number TO lit_data-po_number,
gwa_data-po_item TO lit_data-po_item.
APPEND lit_data.
CLEAR lit_data.
ENDIF.
MOVE : gwa_header-delivery TO lv_delivery,
gwa_header-billoflad TO lv_billoflad.
gwa_header-delivery = ' '.
Inbound delivery create, a copy of BBP_INB_DELIVERY_CREATE
CALL FUNCTION 'BBP_INB_DELIVERY_CREATE'
EXPORTING
is_inb_delivery_header = gwa_header
IMPORTING
ef_delivery = vbeln_new
TABLES
it_inb_delivery_detail = lit_data
return = git_ret.
DESCRIBE TABLE git_ret LINES gv_lines.
READ TABLE git_ret INDEX gv_lines.
IF sy-subrc EQ 0.
IF git_ret-type = gc_s AND
git_ret-code = gc_me780.
subrc = gc_0.
Updating Bill of ladding and GR/GI Number
PERFORM sub_update_bolnr USING lv_delivery
lv_billoflad
CHANGING subrc
vbeln_new.
.
ELSE.
subrc = gc_1.
PERFORM sub_write_message USING git_ret-message_v1
git_ret-code+0(2)
git_ret-code+2(3).
PERFORM sub_clear_fields.
ENDIF.
ENDIF.
Message was edited by:
Amit Hiremath
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |