cancel
Showing results for 
Search instead for 
Did you mean: 

PO Query

Former Member
0 Kudos

Dear all,

Let's say a BPM receives xml message in the following format and there can be 2 thousands of <Lot> records:

<MT_PO_Query>

<Lot> (0~unbounded)

<PO_NUM>

<PART_NUM>

<Status>

</Lot>

</MT_PO_Query>

I'd need the BPM to query PO records from SAP based on each different <PO_NUM>. Verify <PART_NUM> against with part number value of the query result. If they match, update <Status> tag to 'G';if not, update <Status> to 'F'. And split them into 2 xml messages and insert them into two different tables.

My questions are:

1)How do I do it? (what STEPs to use, any java coding involved,etc.)

2)Which RFC to use for PO query?

3)There seems to be a performance issue by having querying PO for two thousands times. Any better way to do this in XI?

Regards,

Steve

Message was edited by: steve peng

Accepted Solutions (0)

Answers (1)

Answers (1)

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

>>>>1)How do I do it? (what STEPs to use, any java coding involved,etc.)

you can use a RFC call in the mapping

(RFC API) to do that

>>>>2)Which RFC to use for PO query?

your own which will only take PO_NUM

and PART_NUM as input

>>>>3)There seems to be a performance issue by having querying PO for two thousands times. Any better way to do this in XI?

you NEED to od it in <b>one call</b>

(standard) via a advanced defined function

(from which you will call RFC API)

Regards,

michal

Former Member
0 Kudos

Michal,

<i>1)How do I do it? (what STEPs to use, any java coding involved,etc.)</i>

What I meant was what steps or java coding should be used to achieve the scenario that I specified. (like loop, transformation, etc.)

<i>your own which will only take PO_NUM

and PART_NUM as input</i>

How do I create my own RFC? Should I just find a close one and modify it?

<i>you NEED to od it in one call

(standard) via a advanced defined function

(from which you will call RFC API)</i>

Could further specify that?

Regards,

Steve

Former Member
0 Kudos

Hi,

<i>1)How do I do it? (what STEPs to use, any java coding involved,etc.)

What I meant was what steps or java coding should be used to achieve the scenario that I specified. (like loop, transformation, etc.)</i>

You can resolve this using graphical mapping(and calling this mapping in your bpm transformation step.)

<i>How do I create my own RFC? Should I just find a close one and modify it?</i>

You could either use an existing one, or create a new rfc.

<i>you NEED to od it in one call

(standard) via a advanced defined function

(from which you will call RFC API)

Could further specify that?</i>

Since, there can be thousands of <lot> tags,make sure that you collect all these and make a single rfc call.

This way, you would be optimizing your scenario.

Regards,

Smitha.

Former Member
0 Kudos

Smitha,

<i>You can resolve this using graphical mapping(and calling this mapping in your bpm transformation step.)</i>

Please take a closer look at the scenario:

I'd need the BPM to query PO records from SAP based on each different <PO_NUM>. Verify <PART_NUM> against with part number value of the query result. If they match, update <Status> tag to 'G';if not, update <Status> to 'F'. And split them into 2 xml messages and insert them into two different tables.

<i>You could either use an existing one, or create a new rfc.</i>

What do you usually do to find an appropriate RFC doc? And is there a clear tutorial on creating a new RFC doc?

<i>Since, there can be thousands of <lot> tags,make sure that you collect all these and make a single rfc call.</i>

Lots of the <PO_NUM> could be idential in 2 thousands of <Lot> tags. How would you filter them out?

Regards,

Steve

Former Member
0 Kudos

Hi,

<i>I'd need the BPM to query PO records from SAP based on each different <PO_NUM>. Verify <PART_NUM> against with part number value of the query result. If they match, update <Status> tag to 'G';if not, update <Status> to 'F'. And split them into 2 xml messages and insert them into two different tables.</i>

You could take both these as input, and within the rfc, carry out the processing logic.

We usually create a new rfc, to carry out the required processing. An rfc is nothing but a function module that is remotely enabled. All you need to do is to write some abap code.

<i>Lots of the <PO_NUM> could be idential in 2 thousands of <Lot> tags. How would you filter them out?</i>

You could write a small udf which does this job for you.

Regards,

Smitha.

Regards,

Smitha