Hi All,
I am trying to do the client proxy scenario, my scenario is to fetch the material data from R/3 and place it in a file. from material master i am taking 4 fields data matnr,mbrsh,mtart,meins and created a program to fetch the data for those fields. please find the code below
REPORT ZABAP_PROXY.
DATA : Proxy TYPE REF TO ZDEV1CO_MI_MATERIAL_OB. " Class name
DATA : It TYPE ZDEV1MT_MATERIAL. " outbound interface name
DATA : It_mara like mara occurs 0 with header line.
CREATE OBJECT proxy.
TRY.
SELECT * from MARA into table It_mara where ersda eq sy-datum.
loop at it_mara.
move-corresponding : it_mara to it-Mt_Material.
endloop.
CALL METHOD PROXY->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.
In order to test this scenario i am doing in the following way.
first i am executing my abap program and then going to tcode sproxy and choose our outbound message interface and execute then i will get the one screen where i will input sender service , sender name space sender interface and checked the check box generate template data and i am getting the data in the file in destination system byt iam getting data as This is a string 1, this is a string 2 .. etc. but not the actucal data from material master. knidly syggest me the way i am following is correct or wrong and provide me some solution for this
Thanks in advance.
Regards,
Prem.S