on 05-20-2008 9:42 PM
Hi
i am doing Webservice to RFC ..to create the Sales order..as BAPI will not support the COMMIT i wrote the RFC Programme to COMMIT EXPLICITlY...
When i tested the RFC its posting the data and i am getting the Sales Document Number..
When i tried to post the data from Webservice i am not getting any Response (i.e Sales document number) i think RFC is not Commiting ...Even i checked the Coomit Handling for Single BAPIS calls in RFC Adapter still no use ...
Any idea where i did mistake..
The RFC progrmme for Commit:
FUNCTION ZRFC_SALESORDER_CREATE.
*"----
""Local interface:
*" TABLES
*" ORDER_HEADER_IN1 STRUCTURE BAPISDHD1
*" ORDER_PARTNERS STRUCTURE BAPIPARNR
*" ORDER_ITEMS_IN STRUCTURE BAPISDITM
*" ORDER_SCHEDULES_IN STRUCTURE BAPISCHDL
*" RETURN STRUCTURE BAPIRET2
*" IT_SALES STRUCTURE VBAK
*"----
data: salesdoc type BAPIVBELN-VBELN.
data: wa_sales like line of it_sales.
clear:it_sales, wa_sales,salesdoc.
*Loop at ORDER_HEADER_IN1.
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
SALESDOCUMENTIN =
ORDER_HEADER_IN = ORDER_HEADER_IN1
ORDER_HEADER_INX =
SENDER =
BINARY_RELATIONSHIPTYPE =
INT_NUMBER_ASSIGNMENT =
BEHAVE_WHEN_ERROR =
LOGIC_SWITCH =
TESTRUN =
CONVERT = ' '
IMPORTING
SALESDOCUMENT = salesdoc
TABLES
RETURN = return
ORDER_ITEMS_IN = ORDER_ITEMS_IN
ORDER_ITEMS_INX =
ORDER_PARTNERS = ORDER_PARTNERS
ORDER_SCHEDULES_IN = ORDER_SCHEDULES_IN
ORDER_SCHEDULES_INX =
ORDER_CONDITIONS_IN =
ORDER_CFGS_REF =
ORDER_CFGS_INST =
ORDER_CFGS_PART_OF =
ORDER_CFGS_VALUE =
ORDER_CFGS_BLOB =
ORDER_CFGS_VK =
ORDER_CFGS_REFINST =
ORDER_CCARD =
ORDER_TEXT =
ORDER_KEYS =
EXTENSIONIN =
PARTNERADDRESSES =
.
*commit work.
*endloop.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = Return
.
if sy-subrc = 0.
wa_sales-vbeln = salesdoc.
append wa_sales to it_sales[].
endif.
ENDFUNCTION
Hi,
Are you using RFC Receiver Adapter to call the RFC? If yes, you can do a commit by checking the flag "Commit Handling for Single BAPI Calls" in the advanced mode on the channel. You do not need to write a custom RFC for doing a commit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.