cancel
Showing results for 
Search instead for 
Did you mean: 

Doubt in client proxy

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member187437
Contributor
0 Kudos

i think you want ot debug your proxy. For that, you need not execute your abap program. You directly execute the proxy interface. There, specify the parameters as you told. Since you checked the Generate Template data checkbox, some default data is generated. YOu can change them. If you dont check that box, the message tags will be empy, where you can fill up your own data.

If you want to debug your abap report, you need to execute it in debug mode.

Former Member
0 Kudos

Aarthi,

If i didn't check the check box Generate Template data then i am getting empty values as like below :

<?xml version="1.0" encoding="utf-8" ?>

- <ns1:Mt_Material xmlns:ns1="urn://clientproxy.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<Matnr />

<Mbrsh />

<Mtart />

<Meins />

</ns1:Mt_Material>

how can i get the values from data base related to material , is there any procedure to execute other than this.

Prem.S

former_member187437
Contributor
0 Kudos

For that you need to execute your abap program. (provided you have setup the configuration objects) . Only your abap program will fetch the data from the table.

Then this will be sent to the client proxy, which inturn will be sent to the destination(the file, in you case)

In case you want to deug the abap report, execute the report in debugging mode(may be with watchpoint)

Former Member
0 Kudos

Aarthi,

I have executed my ABAP program and checked in debugging mode the data is coming into exporting parameter OUTPUT.

<u><i><b>provided you have setup the configuration objects</b></i></u>

What does it mean where should i configure the objects, can u eloberate more on that

Prem.s

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

When you execute your report which calls the ZDEV1CO_MI_MATERIAL_OB proxy an Xi message is sent. You will find this message using the SXMB_MONI transaction of your backend system. If the status is OK a checkered flag should be displayed. Then you will also find it in Xi using the same transaction code SXMB_MONI.

The test tool in SPROXY is mainly to test inbound proxy interfaces and not outbound.

rgds Johan

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

>>>and then going to tcode sproxy and choose our outbound message interface and execute then i

I don't get this step...

you need to generate the class in SProxy and then you forget about it

now you can execute abap report and the message will be send

nothing more - you can see it in SXMB_MONI in R3 and also in XI

Regards,

michal

Former Member
0 Kudos

Michal,

Class and methods are generated in sproxy, and then i have executed my abap report but the values which i am getting are

<?xml version="1.0" encoding="utf-8" ?>

- <nr1:Mt_Material xmlns:nr1="urn://clientproxy.com">

<Matnr>This is a string 1</Matnr>

<Mbrsh>This is a string 2</Mbrsh>

<Mtart>This is a string 3</Mtart>

<Meins>This is a string 4</Meins>

</nr1:Mt_Material>

Not from the data base, when i check my program in debugging mode i could able to see the values from data base. Kindly provide the solution.

Prem.S