cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in execution of a BAPI with XML input to a transaction in MII

swapnil_mohite
Explorer
0 Kudos

HI,

I am trying to call our custom BAPI with JCo Interface which takes a RESULT_INPUTXML and other single input parameter and returns the required tasks( ie, UD, Results & Remarks). The required RFC is not taking XML INPUT and is return failure.

I have put a repeater to the RESULT_INPUTXML and also created an XML structure & Table. After that i have used Assignnment to assigned the values from RESULT_INPUTXML to XML structure and than to XML Table from the structure.

XML structure:

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

<item>

<INSPCHAR/>

<CHAR_DESCR/>

<SPECIFICATION/>

<UP_TOL_LIMIT/>

<LOW_TOL_LIMIT/>

<RESULT/>

</item>

XML TABLE:

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

<T_INSP_CHAR_RESULTS>

</T_INSP_CHAR_RESULTS>

RESULT_INPUTXML:

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

<Rowsets>

<Rowset>

<Row>

<INSPCHAR>0010</INSPCHAR><RESULT>111</RESULT>

</Row>

<Row>

<INSPCHAR>0020</INSPCHAR><RESULT>11</RESULT>

</Row>

<Row>

<INSPCHAR>0030</INSPCHAR><RESULT>11</RESULT>

</Row>

<Row>

<INSPCHAR>0040</INSPCHAR><RESULT>11</RESULT>

</Row>

<Row>

<INSPCHAR>0050</INSPCHAR><RESULT>1</RESULT>

</Row>

<Row>

<INSPCHAR>0070</INSPCHAR><RESULT>1</RESULT>

</Row>

<Row>

<INSPCHAR>0080</INSPCHAR><RESULT>1</RESULT>

</Row>

<Row>

<INSPCHAR>0090</INSPCHAR><RESULT>1</RESULT>

</Row>

<Row>

<INSPCHAR>0100</INSPCHAR><RESULT>1</RESULT>

</Row>

<Row>

<INSPCHAR>0110</INSPCHAR><RESULT>11</RESULT>

</Row>

<Row>

<INSPCHAR>0140</INSPCHAR><RESULT>1</RESULT>

</Row>

<Row>

<INSPCHAR>0150</INSPCHAR><RESULT>1</RESULT>

</Row>

<Row>

<INSPCHAR>0160</INSPCHAR><RESULT>1</RESULT>

</Row>

</Rowset>

</Rowsets>

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

<Rowsets>

<Rowset>

Kindly provide a solution to the problen. Help would be appreciated.

Thanks in advanced..:)

Regards,

Swapnil

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Swapnil,

Check this blog

I guess your requirement is same passing multiple items in one BAPI input.

Please check the Bapi request XML in repeater and confirm whether it is forming the right structure,.

Thanks

Anshul

swapnil_mohite
Explorer
0 Kudos

Hi Anshul,

I have built my transaction referring to same blog.

By the way i am only passing mandatory values to the structure and rest are blank. Also I have found the solution for the problem.

The problem was when i was looping the record with repeater and then assigning it, I was not appending it. so only last record would be there.

Hope it helps others who faced similar issues. Queries are welcomed.

Thanks,

Swapnil