on 02-22-2008 7:15 AM
Hi All,
Good afternoon. I have one requirement to work on Proxies.
Any body have detailed code about Client ABAP Proxy, please send me ASAP.
I am very thankful to you in advance.
Thanks & Regards,
Nagarjuna.
Hi,
Create a report in SE38 and create the proxy in SPROXY transaction.
Call the proxy in the report program.
Look at the below sample codes for Client proxy.
REPORT ZCLIENTPROXY.
Program for single occurence*************************
*
*DATA:clientprxy TYPE REF TO ZCO_MIOA_ABAP_PROXY.
*
*CREATE OBJECT clientprxy.
*
*DATA itab TYPE ZMT_PROXY.
*
*TRY.
itab-MT_PROXY-EMP_NAME = 'ABC'.
*
*
CALL METHOD clientprxy->execute_asynchronous
EXPORTING
output = itab.
commit work
.
CATCH cx_ai_system_fault .
DATA fault TYPE REF TO cx_ai_system_fault .
CREATE OBJECT fault.
WRITE 😕 fault->errortext.
*ENDTRY.
*
*****************************************************************
DATA: objClientProxy TYPE REF TO ZCO_MIOA_ABAP_PROXY.
Create object objClientProxy.
DATA itab type ZMT_PROXY.
DATA Invoice type ZDT_PROXY_SRC_INVOICE_TAB.
DATA Address type ZDT_PROXY_SRC_ADDRESS_TAB.
DATA InvoiceLine like line of Invoice.
DATA AddressLine like line of Address.
AddressLine-Street = 'Street1'.
Append AddressLine to Address.
AddressLine-Street = 'Street2'.
Append AddressLine to Address.
InvoiceLine-Emp_Name = 'Emp1'.
InvoiceLine-Address = Address.
Append InvoiceLine to Invoice.
refresh Address.
AddressLine-Street = 'Streetx'.
Append AddressLine to Address.
AddressLine-Street = 'Streety'.
Append AddressLine to Address.
InvoiceLine-Emp_Name = 'EmpX'.
InvoiceLine-Address = Address.
Append InvoiceLine to Invoice.
itab-MT_Proxy-Invoice = Invoice[].
try.
call method objclientproxy->execute_asynchronous
EXPORTING
output = ITab.
commit work.
CATCH cx_ai_system_fault .
DATA fault TYPE REF TO cx_ai_system_fault .
CREATE OBJECT fault.
WRITE 😕 fault->errortext.
ENDTRY.
Thanks,
Gunasree
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi see below link
ABAP Proxy outbound program - purchase order send
ABAP Proxy inbound program - sales order creation - Community Profiles - Wiki
ABAP Proxy Generation --
http://help.sap.com/saphelp_nw04/helpdata/en/14/555f3c482a7331e10000000a114084/content.htm
Actiave ABAP Proxies -- /people/vijaya.kumari2/blog/2006/01/26/how-do-you-activate-abap-proxies
ABAP Client Proxies -- /people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy
Thanks
swarup
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
U need to write the code in report and through this report u need to call the method.
this code is for ur understanding:
here it is a simple strucutre.
REPORT ZPROXY_TO_FILE.
Proxy for Table:
data: obj type ref to ZTP_CO_MIOA_FILE,
it_data type ZTP_DT_FILE_DATA_TAB,
wa_data type ZTP_DT_FILE_DATA,
it_wa type ZTP_MT_FILE.
value passed to XI:
wa_data-LINE = '1'.
wa_data-ITEM = 'CDB'.
wa_data-AMOUNT = '200'.
wa_data-TAX_CD = 'B'.
wa_data-TAX_AMNT = 1000'.
append wa_data to it_data.
clear wa_data.
calue passsed to XI:
wa_data-LINE = '2'.
wa_data-ITEM = 'ABC'.
wa_data-AMOUNT = '100'.
wa_data-TAX_CD = 'A'.
wa_data-TAX_AMNT = '5'.
append wa_data to it_data.
clear wa_data.
it_wa-mt_file-data = it_data.
create object obj.
try.
TRY.
CALL METHOD obj->EXECUTE_ASYNCHRONOUS
EXPORTING
OUTPUT = it_wa .
commit work.
CATCH CX_AI_SYSTEM_FAULT .
ENDTRY.
CATCH cx_ai_system_fault .
DATA fault TYPE REF TO cx_ai_system_fault .
CREATE OBJECT fault.
WRITE 😕 fault->errortext.
ENDTRY.
Thnx
Chirag
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.