on 09-24-2007 9:47 PM
hi,
i am trying to create a purchase order and i need to create a custom made RFC, ZBAPI_PO_CREATE, so can some one help me out with the procedure and code to create the Z object.
kalyan.
Hi Kalyan,
Refer this..
http://help.sap.com/saphelp_nw70/helpdata/en/22/0425f2488911d189490000e829fbbd/frameset.htm
Hope it helps...
Kumar.S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hey kumar,
heres the code that i have used, but i am getting error messges when i execute, please let me know if u could help.
FUNCTION ZBAPI_PO_CREATE.
*"----
""Local interface:
*"----
DATA bapi_po_schedules LIKE bapieket OCCURS 0 WITH HEADER LINE.
IF bypass_bapi NE ''.
CALL FUNCTION 'RANDOM_I4'
EXPORTING
rnd_min = 0
rnd_max = 1000000000
IMPORTING
rnd_value = purchaseorder.
ELSE.
LOOP AT po_items.
MOVE-CORRESPONDING po_items TO bapi_po_schedules.
ENDLOOP.
CALL FUNCTION 'BAPI_PO_CREATE'
EXPORTING
po_header = po_header
PO_HEADER_ADD_DATA =
HEADER_ADD_DATA_RELEVANT =
PO_ADDRESS =
SKIP_ITEMS_WITH_ERROR = 'X'
ITEM_ADD_DATA_RELEVANT =
HEADER_TECH_FIELDS =
IMPORTING
purchaseorder = purchaseorder
TABLES
po_items = po_items
PO_ITEM_ADD_DATA =
po_item_schedules = bapi_po_schedules.
PO_ITEM_ACCOUNT_ASSIGNMENT =
PO_ITEM_TEXT =
RETURN =
PO_LIMITS =
PO_CONTRACT_LIMITS =
PO_SERVICES =
PO_SRV_ACCASS_VALUES =
PO_SERVICES_TEXT =
PO_BUSINESS_PARTNER =
EXTENSIONIN =
POADDRDELIVERY =
COMMIT WORK.
ENDIF.
ENDFUNCTION.
Kalyan,
I believe that you want to create the Z RFC function to include the BAPI_PO_CREATE & BAPI_TRANSACTION_COMMIT.
1. Create the import export changing and tables incl exceptions definition as BAPI_PO_CREATE.
2. Make this FM as RFC
3. Call Function BAPI_PO_CREATE
4. call function BAPI_TRANSACTION_COMMIT.
Thanks.
Srini
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.