cancel
Showing results for 
Search instead for 
Did you mean: 

File to R/3 via Abap proxy -- need help

Former Member
0 Kudos

Hello,

I have made a scenario File to R/3 via Abap Proxy

My Inbound Async Message Interface has Message Type -Emp_Rac_Detail_MT.

Message Type has structure

EmpID

EmpName

Age

I have table in R/3 ZRACTABLE where I need to post data

Fields in ZRACTABLE are

EMPID

EMPNAME

AGE1

Pls send me the code that I need to write in Async Method of Proxy

that will put data

Regards

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi herry ,

u need the code of Function Module right???

here it is...

TABLE : ZRACTABLE

DATA : gi_zractable TYPE standard table of ZRACTABLE.

DATA : gw_zractable TYPE zractable .

gw_zractable-empid = g_empid.

gw_zractable-empname = g_empname.

gw_zractable-age = g_age.

append gw_zractable into g_zractable.

update zractable from gw_zractable.

in the importing parameter give empid,empname and age....

no need to give anything in Export parameter and table in the FM.....

Regards

Biplab

Former Member
0 Kudos

Hello Biplab,

I need to write code in Async Method of Proxy.

My Inbound Async Message Interface has Message Type -Emp_Rac_Detail_MT.

Message Type has structure

EmpID

EmpName

Age

I have table in R/3 ZRACTABLE where I need to post data

Fields in ZRACTABLE are

EMPID

EMPNAME

AGE1

Pls send me the code that I need to write in Async Method of Proxy

that will put data

Regards

former_member614185
Contributor
0 Kudos

Hey,

DATA:

lv_ID type EmpID,

lv_NAME type EmpName,

lv_AGE type Age.

  • Convert Input Parameters

lv_ID = input-Emp_Rac_Detail_MT-EmpID.

lv_NAME = input-Emp_Rac_Detail_MT-EmpName.

lv_AGE = input-Emp_Rac_Detail_MT-Age.

call function 'ZEMPDETAILS'

EXPORTING

ID = lv_ID.

NAME = lv_NAME.

ROLE = lv_AGE.

endmethod.

Create a function module(ZEMPDETAILS) as biplab posted and create a proxy as i posted.

ok

Dont forget to reward point

Former Member
0 Kudos

Hi Herry,

First of all u have to write a Function module in R/3 ....for that i given u the code above.

Now in ur inbount proxy in the implementation class u have to write code right???

Here is the code...

      • **** INSERT IMPLEMENTATION HERE **** ***

DATA:

lv_EMPID type EMPID,

lv_EMPNAME type EMPNAME,

lv_AGE type AGE.

  • Convert Input Parameters

lv_EMPID = input-Emp_Rac_Detail_MT-EMPID.

lv_EMPNAME = input-Emp_Rac_Detail_MT-EMPNAME.

lv_AGE = input-Emp_Rac_Detail_MT-AGE.

call function 'ZEMP_RAC_FM' /** thats ur function module name **/

EXPORTING

EMPID = lv_EMPID .

EMPNAME = lv_EMPNAME.

AGE = lv_AGE.

endmethod.

Regards

biplab

<i>*** give points if it hepls you!!!</i>

Former Member
0 Kudos

Hello,

I have made this code

method ZII_EMP_DETAIL_ASYNC_IN_RAC_MI~EXECUTE_ASYNCHRONOUS.

data: wa type ZRACTABLE.

  • Convert Input Parameters

wa-EMPID = input-Emp_Rac_Detail_MT-EmpID.

wa-EMPNAME = input-Emp_Rac_Detail_MT-EmpName.

wa-AGE1 = input-Emp_Rac_Detail_MT-Age.

insert ZRACTABLE from wa.

endmethod.

But I am getting input-Emp_Rac_Detail_MT-EmpID is unknown error.

Pls suggest

Former Member
0 Kudos

Hello,

I have made Function Module Name -- Z_TEST1

I have written code as given by you.

Now when I caheck it gives error -- 'The type EMPNAME is unknown'

Pls suggest

former_member614185
Contributor
0 Kudos

Try my previous code .....

Former Member
0 Kudos

Hello,

Code has been generated. Thanks

But now when I send data I am getting error on sxmb_moni

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

- <!-- Call Adapter

-->

- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">

<SAP:Category>XIProtocol</SAP:Category>

<SAP:Code area="MESSAGE">NOT_AUTHORIZED_FOR_PROC</SAP:Code>

<SAP:P1>RACHIT</SAP:P1>

<SAP:P2 />

<SAP:P3 />

<SAP:P4 />

<SAP:AdditionalText />

<SAP:ApplicationFaultMessage namespace="" />

<SAP:Stack>User herry has no authorization to process messages</SAP:Stack>

<SAP:Retry>M</SAP:Retry>

</SAP:Error>

Pls suggest what authorization I need

Former Member
0 Kudos

Hello,

Code has been generated. Thanks

But now when I send data I am getting error on sxmb_moni

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

- <!-- Call Adapter

-->

- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">

<SAP:Category>XIProtocol</SAP:Category>

<SAP:Code area="MESSAGE">NOT_AUTHORIZED_FOR_PROC</SAP:Code>

<SAP:P1>RACHIT</SAP:P1>

<SAP:P2 />

<SAP:P3 />

<SAP:P4 />

<SAP:AdditionalText />

<SAP:ApplicationFaultMessage namespace="" />

<SAP:Stack>User herry has no authorization to process messages</SAP:Stack>

<SAP:Retry>M</SAP:Retry>

</SAP:Error>

Pls suggest what authorization I need

former_member614185
Contributor
0 Kudos

hi,

You can assign SAP_XI_IS_SERV_USER role to your userid and try.

Former Member
0 Kudos

Hello Prabhu,

This tole setting I have alraedy done.

Any other role assign to do

Regards

former_member614185
Contributor
0 Kudos

SAP_XI_Developer

SAP_XI_Configurator

check whether these roles are assigned or not.

Former Member
0 Kudos

Hi herry,

I think u dont have full authorization.

and one more thing please post one question in one post.Please follow SDN rules.

Biplab

former_member614185
Contributor
0 Kudos

Check out this blog,

/people/siva.maranani/blog/2005/04/03/abap-server-proxies

Former Member
0 Kudos

Hello,

I have ssen this blog. In code it talks about call function 'ZEMPMASTER'.

Can u pls send me the code

Regards

former_member614185
Contributor
0 Kudos

You just write one function module according to your requirement and use the same