on 10-15-2008 7:19 PM
Hi,
I have a requirement as below:
On my R/3 system, there is an abap program which writes the file to the local file system.
I want XI to pick up that file and write it to some where else. For this I can use file to file scenario.
But the issue is, after that abap program writes the file to the local, I want it to invoke the XI interface to pick the file.
I was trying to use Proxy to File scenario, but in that case the ABAP program should send the file to XI. But I want my abap program to just write the file to file system and then trigger XI which should be able to pick up the file.
Can anybody help me on how to accomplish this requirement.
Thank you
MLS
Thanks Nilesh. I will try this out and let you know the result.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Laxmi
Why dont you use Proxy to FIle and deliver the file to both the places where R/3 was delivering and where you want to deliver the file.
You can pass the data from internal table and can have a generic structure at PI side. using this you can have target and filename whichever you would like to use for variable substitution
proxy code given above will work
Thanks
Gaurav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks so much Nilesh.
Can you give me a sample code on ABAP side of how you did this?
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is a sample code which I used for testing .....
types: begin of tt_itab,
data type string,
end of tt_itab.
data: lt_itab type table of tt_itab.
data: gw_itab type tt_itab.
data: lt_row type zcl_string_tab.
data : l_string type string.
----
Local Variables
----
data: lv_filename type string, "Filename & path where file is stored
lv_string type string, "String for holding data
lv_tabix type sy-tabix. "Table Record Number
*Outbound Proxy declarations
DATA:
lv_out TYPE zcl_mt_budget_in,
lv_bacs_payments TYPE REF TO zcl_co_mi_budget_ob,
lv_fname TYPE rlgrap-filename.
data : lt_string_data type standard table of zst_budget_query initial size 0.
data : lw_string_data type zst_budget_query.
do 10 times.
lw_string_data-row = '121231242357488568957kfvgdghfjasfgas8453675347q34567vhjvsdfhf7rwt5r6735374'.
append lw_string_data to lt_string_data.
enddo.
lv_out-mt_budget_in-details-row = lt_row.
lv_out-mt_budget-details-row = l_string.
lv_out-mt_budget_in-header-file_name = 'Query333444_.txt'.
CREATE OBJECT lv_bacs_payments.
TRY.
CALL METHOD lv_bacs_payments->execute_asynchronous
EXPORTING
output = lv_out.
CATCH cx_ai_system_fault.
ENDTRY.
Hope this will help.
Nilesh
I thought so....ugh!!!
I can use proxy to file. But the problem is, I have hundred different files with different structures...
For eg: File1 is like below:
100,"test data1", 300
200,"test data2", 400
Now File2 is like below:
5248.98, DB, USD, 50000, "wwww"
4677.34, TN, USD, 60000, "xxxx"
Like wise I have hundred different files. Well, I dont want to create hundred different interfaces in XI to do that.
What can I do? I am just a rookie in XI so need your suggestions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your quick reply.
I can use external controlled adapter but again my requirement is different.
After the ABAP program writes it to the file system, I want it to send the source directory and target directory as parameters to XI in the payload, so that on XI I can use variable substitution and can dynamically get the source directory from where to pick up the file and target directory of where to write the file.
Can we do this at all?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oops... I understood it in other way.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>>after that abap program writes the file to the local, I want it to invoke the XI interface to pick the file.
You can control adapter externally by sending a HTTP request from a program to activate/de-activate the adapter.
Search for "Control adapter externally" in the blogs section in SDN.
Thanx
Aamir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.