cancel
Showing results for 
Search instead for 
Did you mean: 

How to check whether a Record Exists or not in Ztable

Former Member
0 Kudos

Hi all,

I have Req like this

In ZTable i have 2 fields * Legacy System , Legacy Material No*

Environment Value is coming in one of the field in Idoc

The logic is if the Environment Value is UK and a Record Exists on the ZTable for Legacy Sysyetm = Leg1 means i have send Legacy Material No , else Send 01

Please suggest me the process for this

REgards

Vamsi

Edited by: Vamsi Krishna on May 19, 2009 5:31 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

First you must create a RFC function in R3, this function must return a field indicating if exist (example if exist the value is X else blank).

If you are working with PI 7.1 you can use the function RFCLookup to call this RFC and get the response, but if you are working with a previous version you have to create a java mapping to do this lookup and import as imported archive.

Regards

Jose Manuel

Answers (2)

Answers (2)

Former Member
0 Kudos

Hey

If this ZTable is on R/3 then you can do a RFC look-up.

If the Ztable is on PI itself,then you can do a simple ABAP mapping

Thanx

Aamir

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

where do you want to check it?

what kind of flow is that ?

do you want to check it before sending to PI? then check it in abap

do you want to check it inside a mapping ? then you can use mapping lookups

specify your requirement with more details

Regards,

Michal Krawczyk

Former Member
0 Kudos

Hi Michal / Aamir,

Thanks for your replies.

The ZTable is at R/3 side only, iam using RFC Lookup for this, but iam bit confuse on how to construct the logic to check whether there is a record Exists or not on Ztable

Logic shld be If the Environment value is UK and a record exists on the Ztable for Legacy system "ABC" means then send Legacy material number else send 01

In Table we will have the fields Legacy System Legacy Material No & Environment value is coming from Idoc itself( Ex: UK or US)

Regards

Former Member
0 Kudos

You need to write a function module (RFC) in R/3 to return a flag based on your input values. You need to call this RFC using Mapping lookup from your mapping.

Former Member
0 Kudos

Hi,

Could you please provide any sample blog or Doc which deals with the same

How to write the Func Module in ECC with what import and Export parameters

Please provide some inputs...

Regards

sunilchandra007
Active Contributor
sunilchandra007
Active Contributor
0 Kudos

You can use RFC_READ_TABLE module directly.

Have a look at this blog -

Use this crazy piece for any RFC Mapping Lookups!

/people/sravya.talanki2/blog/2005/12/21/use-this-crazy-piece-for-any-rfc-mapping-lookups

Regards,

Chandra

Former Member
0 Kudos

Hi,

Iam reffering the same Blog only for RFC Lookup.

But could you please let me know where and how to include the logic to check whether there is record exists or not for particular field

REgards