cancel
Showing results for 
Search instead for 
Did you mean: 

Which mapping is suitable?

Former Member
0 Kudos

Hi Experts,

I have a requirement, i want to know best feasible solution.

The scenario is XML to IDOC.

XML Structure :

<MessageType>

<Record> 0...Unbound

<ContractNumber>

<Action>

<Filed-One>

<LineNumber>

</Record>

Input : this contains Contrat Number, Action Filed, Field-One. Possible Values for Action field is "ADD", "DELETE", "Update". Depending on Action filed, Filed-one data should be added/Deleted/Update to Contract Number in R3 via IDOC at that particular line number. Contracts in R3 have contract line numbers....

Here Problem is : 1) In the case of ADD, XI should do RFC look up get back next available line number from R3 for a Contract Number. That is If there is a value like 4800034 in Contract number and Action is ADD, then XI needs to call RFC look up. The input for RFC look up is Contract number and out put is next available line item. After getting next available line number from R3, the contract should be added to R3 at that line number.

2) For Delete and Update, RFC look up is not needed as <LineNumber> contains the value, so XI need to DELETE or UPdate contract in that particular line number.

A big problem is : Suppose we have 5 contracts in the input XML for Same cotract number, and for that contract next available line item number in R3 is 80, Then XI is Adding the input 5 records in the same line item ( Because RFC look up is being called and 80 is returned since i am calling RFC look up 5 times for the same Contract Number ) as a result 5th value is overwriting all the remaining 4 input values.. and only 5th value is visible.

Kinldy tell me how this can be over come.

The soulution come to my mind is : we need to separte all contracts with Add Actions ( We can leave DELETE and UPDATE as they contain Line Item numbers where to delete and Update) and For every different contract, if that contract is having multiple ADDs, then XI shuld call RFC once and get the value.... and increment the value by 1 for next input records...

How this thing can be done?

Thanks

Subbu

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

try this,

got the data from XMS file to R/3 by using ABAP proxy, then store data in internal table,

and pass the data to IDOC (FM) one by one, by this you can achieve your desired result.

Former Member
0 Kudos

Hi,

Thanks for your Input...

But, for all the records pertaining to one contract.. We need to push one IDOC to R3... There is a segment in BLAORD03 IDOC called E1EDP01. This segmet should be repeted N number of time for Add, Update and Delete as well... That is 4 adds, 3 updates, 2 deeletes... In the BALORD03 IDOC only E1EDP01 should be reated 9 times... I addition to that RFC call should be done once for the firest add value and the next available line item shuld be incremented.. that this IF RFC is returning 80 as value in the first RFC look up.. then we need to add 81, 82, 83, 84 values to one of the fields in E1EDP01 segment.

Kinldy share your inputs.

Thanks,

Subbu

Former Member
0 Kudos

What I mean to say is..

take all data as it is in ABAP stack using ABAP proxy from XI/PI and supply it to idoc from there by manage the things in loop...

no need to use rfclookup or any thing in pi, use PI for datatransfer only