on 10-20-2008 10:38 AM
I am trying to get ABAP Proxy to work (I've been following blog from Ravi )
In my situation I have a list of data I want transferred from SAP R/3 to a 3rd Party System via XI - using ABAP Proxy.
When I debug my Triggering ABAP I can see that it builds my simple internal table correctly but when it does the
CALL METHOD prxy->execute_asynchronous
EXPORTING
output = mytableofdata.
commit work.
It gets an exception that is
CAUGHT cx_ai_system_fault
CX_ROOT INTERNAL_SOURCE_POS Structure: flat & not charlike
Here is the ABAP Trigger I have in R/3
REPORT ZINFOR_TRIGGER_OPEN_POPR_PROXY.
DATA prxy TYPE REF TO ZINFOR_CO_MI_OA_OPEN_POPR_FROM.
*
CREATE OBJECT prxy.
DATA it TYPE ZINFOR_MT_OPEN_POPR.
DATA lines type ZINFOR_DT_OPEN_POPR_LINES.
LINES-PRODUCT_CODE = 'PAULIE'.
lines-plant = '6666'.
APPEND LINES TO IT-MT_OPEN_POPR-LINES.
LINES-PRODUCT_CODE = 'PAULIE'.
lines-plant = '7777'.
APPEND LINES TO IT-MT_OPEN_POPR-LINES.
TRY.
CALL METHOD prxy->execute_asynchronous
EXPORTING
output = it.
commit work.
CATCH cx_ai_system_fault .
DATA fault TYPE REF TO cx_ai_system_fault .
CREATE OBJECT fault.
WRITE 😕 fault->errortext.
WRITE 😕 fault->CX_ROOT.
ENDTRY.
Hello ,
DATA it TYPE ZINFOR_MT_OPEN_POPR
Can you check the type of the table, is the same used in the method output parameter type.
Regards.
Sreeni.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Put the below data inside TRY as shown below and then check if it works. Also check all the data type compatability.
> TRY.
> DATA lines type ZINFOR_DT_OPEN_POPR_LINES.
> LINES-PRODUCT_CODE = 'PAULIE'.
> lines-plant = '6666'.
> APPEND LINES TO IT-MT_OPEN_POPR-LINES.
> LINES-PRODUCT_CODE = 'PAULIE'.
> lines-plant = '7777'.
> APPEND LINES TO IT-MT_OPEN_POPR-LINES.
>
>
> CALL METHOD prxy->execute_asynchronous
> EXPORTING
> output = it.
> commit work.
>
> CATCH cx_ai_system_fault .
> DATA fault TYPE REF TO cx_ai_system_fault .
> CREATE OBJECT fault.
> WRITE 😕 fault->errortext.
> WRITE 😕 fault->CX_ROOT.
> ENDTRY.
Regards,
Sarvesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
Here is the original code which is running in my system. Compare with your code..
In my opinion you have some data type mismatch, check it again.
DATA: lcl_system_fault TYPE REF TO cx_ai_system_fault.
DATA:
lcl_payment_terms TYPE REF TO ZXI_ERNCO_MIOUT_PAYMENT_TERMS,
ls_out TYPE ZXI_ERNMT_PAYMENT_TERMS_TEST,
ls_mess TYPE ZXI_ERNDT_PAYMENT_TERMS_TEST,
ls_head TYPE ZXI_ERNTSTDT_HEAD,
ls_data type ZXI_ERNDT_ITEM,
lt_data type table of ZXI_ERNDT_ITEM.
move: 'Hello' to ls_head-FIELD1,
'And' to ls_head-field2,
'How r u' to ls_head-field3.
ls_mess-HEADER = ls_head.
ls_mess-DATA = lt_data.
ls_out-MT_PAYMENT_TERMS_TEST = ls_mess.
CREATE OBJECT lcl_payment_terms.
TRY.
CALL METHOD lcl_payment_terms->execute_asynchronous
EXPORTING
output = ls_out.
COMMIT WORK.
CATCH cx_ai_system_fault INTO lcl_system_fault.
WRITE:/ 'Error: ', lcl_system_fault->errortext.
ENDTRY.
Regards,
Sarvesh
I don't think so but I will check this yet again.
I do think it is something missing for R/3 to get to XI. When I debug down into this ABAP Trigger
I can see that is stops when attempt to get Business System...this is deep within the PROXY Framework in the method XI_PROXY_ROUTING.
SLD_API_EXCEPTION
CALL FUNCTION 'LCR_GET_OWN_BUSINESS_SYSTEM'
IMPORTING
bs_key_name = business_system
EXCEPTIONS
no_business_system = 1
no_rfc_destination = 2
no_landscape_directory = 3
illegal_arguments = 4
communication_error = 5
ld_error = 6
sld_api_exception = 7
OTHERS = 8.
Then it will CALL METHOD cl_proxy_runtime_errors=>raise_proxy_exception
It may be that I need to have the R/3 TCP/IP SM59 Destination SAPJ2EE working ? The connection test on this in SM59 in R/3 does not work.
Could this be why ?
Edited by: Paulie Seikmayt on Oct 20, 2008 9:38 PM
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.