cancel
Showing results for 
Search instead for 
Did you mean: 

Adding variable number of input lines to an RFC call

Former Member
0 Kudos

Hi

I am trying to use RFC_SAVE_TEXT to write Production Order Header Text, but obviously can only write one line from the JCO Function call.

Using the technique mentioned elsewhere on this forum I can use a local XML variable to write multiple lines, but I can only get this to work where I know how many lines I am writing. In this situation there could be as few as 0 lines, but no upper limit, so the user could post 1000 lines if he really wanted to.

Has anyone got a solution for this?

Thanks

Nick

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Nick,

I'm not clear about your requirements but I feel that this can be achieved by using an illuminator document. Accumulate the lines in the illuminator document using a repeater and then you can assign it to the line of the concerned RFC.

I haven't tried it, but i think this will be do the thing.

Regards,

Musarrat

Former Member
0 Kudos

I don't think you could pass the xmii style XML to the RFC call.

I've figured it out though, What you need to do is have two xml variables. The first is the same as the request xml of the rfc/bapi. The second is the same as the multiline element.

You then loop through the input, setting the variables in the second xml variable then using APPEND XML option of link editor to add this to the first variable.

This can then be assigned to the request of the rfc/bapi.

Thanks for your time

Nick

Former Member
0 Kudos

Nice update Nick,

My mind didn't go that way. Thanks for sharing the solution. This will be handy for me in similar scenarios.

Regards,

Musarrat