cancel
Showing results for 
Search instead for 
Did you mean: 

IDOC creation on the basis of RFC lookup values

Pranil1
Participant
0 Kudos

Hello everyone,

I am developing a FIle to IDOC scenario,

Its an IDOC 0..unbounded scenario where I am creating IDOC for each record of file.

I am using RFC lookup to get few values.

If any one of the fetched value for perticular record is blank then I should not process the IDOC.

Can you pls help me out how I can implement this logic on RFC lookup values.

Regards,

Pranil.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

I assume for your target IDoc, you will use an external definition to be able to have an "unbounded" target IDoc. So a target XML message with several IDocs inside it....

So just with a "IF" on your target IDoc node (<IDOC>), you can acheive that easily:

Your RFCLookup -> IF its result is blank (or what you want), THEN create the target IDoc node.

On the IF properties, use option "Keep SUPPRESS line" (or something like this sentence).

if you have to control several fields because your RFC lookup return several values (e.G country, city, zipcode), instead of testing all these fields by several "IF" in PI mapping, you can define an export field on your function module like "status" and to fill it with "OK" (in ECC after doing the corresponding controls in ECC !) and in PI to do the same control as above but based on this status = OK.

You have only one risk: if for your source data, you have not to generate at least one target IDoc (because of your blank value), you will certainly have a technical error in PI as you will not have a target XML message for a source XML message. To be tested.

regards.

Mickael

Pranil1
Participant
0 Kudos

HI Mickael,

Thanks for your valuable advice.

Regards,

Pranil.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Pranil,

here is one solution if my understanding of your requirement is correct....

Map the RFC look up function to root tag with a if condition.

like ... if RFClookup exists and not equal to null --> root

here the RFCLOOkup will be the function and the if condition will check if lookup value exists and if it is not null ..

hope this helps...

Sukarna....