on 02-03-2015 2:19 PM
Hello Experts,
My requirement is like ECC is creating multiple file and Client wants that PI should start picking the file only once a final file like'.done' file is there.
Can any one help me on this that how can we proceed with this requirement?
I have gone through following two options:
Option 1: "Msecs to Wait Before Modification Check".
Option 2: Trigger file logic through checking 'Additional File(s)' check box in Sender Communication Channel.
Regards,
Pradeep
Hi Pradeep,
you can use the trigger file option. Please check the below wiki question 4
Sender File Adapter Frequently Asked Questions - Process Integration - SCN Wiki
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Praveen,
I have gone through this blog and created the report. But while calling method
*Get http response from server
call method CLIENT->RECEIVE
exceptions
HTTP_COMMUNICATION_FAILURE = 1
HTTP_INVALID_STATE = 2
HTTP_PROCESSING_FAILED = 3
others = 4.
Sy-subrc value is coming as '1' and giving following error 'HTTPIO_PLG_CANCELED'.
Can you tell me what can be wrong in this.
Regards,
Pradeep
Hello,
Here is my code, and its failing at "call method CLIENT->RECEIVE". Here Sy-subrc value is coming as 1.
data: V_URL type STRING,
CLIENT type ref to IF_HTTP_CLIENT.
data: RESPONSE_CODE type SYSUBRC,
RESPONSE_TEXT type STRING.
data: FIELDS_TAB type TIHTTPNVP,
STATUS_CODE type STRING,
STATUS_REASON type STRING,
NUMBER type I.
data: W_RESULT type STRING,
RESULT_TAB type table of STRING,
RESULT_WA like line of RESULT_TAB.
"Get comm channel status
*V_URL = '/AdapterFramework/ChannelAdminServlet?party=*&service=*&channel=Test_CommChannel_ExtCtrl&action=status'.
"Start comm channel
v_url = 'http(s):XXX.XX.XXX.XXX:XXXXX/AdapterFramework/ChannelAdminServlet?party=*&service=*&channel=CC_File_Merch_Recv&action=start'.
"Stop comm channel
"v_url = '/AdapterFramework/ChannelAdminServlet?party=*&service=*&channel=Test_CommChannel_ExtCtrl&action=stop'.
call method CL_HTTP_CLIENT=>CREATE
exporting
HOST = 'XXX.XX.XXX.XXX' "PI system name
SERVICE = 'XXXXX' "Port number
* PROXY_HOST =
* PROXY_SERVICE =
* SCHEME = SCHEMETYPE_HTTP
* SSL_ID =
* SAP_USERNAME =
* SAP_CLIENT =
importing
CLIENT = CLIENT
exceptions
ARGUMENT_NOT_FOUND = 1
PLUGIN_NOT_ACTIVE = 2
INTERNAL_ERROR = 3
others = 4.
*if SY-SUBRC <> 0.
* message E000 with SY-SUBRC.
*endif.
*
*if SY-SUBRC <> 0.
* message E000 with SY-SUBRC.
*endif.
*set header fields
call method CLIENT->REQUEST->SET_HEADER_FIELD
exporting
NAME = '~request_method'
VALUE = 'POST'.
call method CLIENT->REQUEST->SET_HEADER_FIELD
exporting
NAME = 'Content-Type'
VALUE = 'application/xml'. "; charset=UTF-8' .
*Set request protocol
call method CLIENT->REQUEST->SET_HEADER_FIELD
exporting
NAME = '~server_protocol'
VALUE = 'HTTP/1.0'.
*Update url
call method CLIENT->REQUEST->SET_HEADER_FIELD
exporting
NAME = '~request_uri'
VALUE = V_URL.
*Disable logon popup
CLIENT->PROPERTYTYPE_LOGON_POPUP = CLIENT->CO_DISABLED.
call method CLIENT->AUTHENTICATE
exporting
USERNAME = 'XXXXXX' "Username
PASSWORD = 'XXXXXX' . "Password
CL_HTTP_UTILITY=>SET_REQUEST_URI( REQUEST = CLIENT->REQUEST
URI = RESPONSE_TEXT ).
*Send http request to server
call method CLIENT->SEND
exceptions
HTTP_COMMUNICATION_FAILURE = 1
HTTP_INVALID_STATE = 2
HTTP_PROCESSING_FAILED = 3
others = 4.
if SY-SUBRC <> 0.
call method CLIENT->GET_LAST_ERROR
importing
CODE = RESPONSE_CODE
message = RESPONSE_TEXT.
message I000(SR) with RESPONSE_TEXT.
exit.
endif.
*Get http response from server
call method CLIENT->RECEIVE
exceptions
HTTP_COMMUNICATION_FAILURE = 1
HTTP_INVALID_STATE = 2
HTTP_PROCESSING_FAILED = 3
others = 4.
if SY-SUBRC <> 0.
call method CLIENT->GET_LAST_ERROR
importing
CODE = RESPONSE_CODE
message = RESPONSE_TEXT.
STATUS_CODE = CLIENT->RESPONSE->GET_HEADER_FIELD( '~status_code' ).
STATUS_REASON = CLIENT->RESPONSE->GET_HEADER_FIELD( '~status_reason' ).
concatenate RESPONSE_TEXT '(' STATUS_CODE STATUS_REASON ')'
into STATUS_REASON separated by SPACE.
message I000(SR) with STATUS_REASON.
exit.
endif.
*Get header_fields contents such status code, reason etc
"call method client->response->GET_HEADER_FIELDS
" changing
" FIELDS = Fields_Tab .
clear: W_RESULT.
W_RESULT = CLIENT->RESPONSE->GET_CDATA( ).
refresh RESULT_TAB.
split W_RESULT at CL_ABAP_CHAR_UTILITIES=>NEWLINE into table RESULT_TAB.
loop at RESULT_TAB into RESULT_WA.
write / RESULT_WA.
endloop.
Hi Pradeep,
Actual one is this
"Start comm channel
"v_url = '/AdapterFramework/ChannelAdminServlet?party=*&service=*&channel=Test_CommChannel_ExtCtrl&action=start'.
"Stop comm channel
"v_url = '/AdapterFramework/ChannelAdminServlet?party=*&service=*&channel=Test_CommChannel_ExtCtrl&action=stop'.
But you have written this.
"Start comm channel
v_url = 'http(s):XXX.XX.XXX.XXX:XXXXX/AdapterFramework/ChannelAdminServlet?party=*&service=*&channel=CC_File_Merch_Recv&action=start'.
"Stop comm channel
"v_url = '/AdapterFramework/ChannelAdminServlet?party=*&service=*&channel=Test_CommChannel_ExtCtrl&action=stop'.
Check it onece.
Thanks Guys..
This problem is resolved. Now I am calling the suggested Report from ECC to start the Communication Channel externally once Job is completed in ECC.
Regards,
Pradeep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pradeep,
So is it a batch job which is creating these multiple files and placing in the directory? You can set the Polling interval of the channel or set up Availability time planning for this channel to pick up file in a time interval when the job ends or based on the logic in place.
Regards,
Sriram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pradeep,
If its a daily job, then you set up ATP as per the end time of the job with some buffer and set an external control to start the channels and stop it post that.
Try and see if it works and satisifies ur requirement. If i have not understood the requirement correctly please do let me know so that i can help further
Regards,
Sriram
Hi Pradeep,
Please check the below link.
Controlling a Communication Channel Externally - Process Integration Monitoring - SAP Library
External control may not even be required if you know that the predefined job finishes at a paritcular time. You may just start the channel based on the job end time with a buffer..
Regards,
Sriram
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.