cancel
Showing results for 
Search instead for 
Did you mean: 

Graphical mapping need small help

Former Member
0 Kudos

I am working a scenario as File to IDOC.

I am using RFCLOOKUP with functional module.

for this RFCLOOKUP, i have one field as input and output as flag.

if flag = x then nothing pass to idoc filed

if flag=space then need to pass some fix values based on two fields.

So i am trying to do the logic as below.

Field1 -->RFClookup --> flag           --->  if then else condition    ---> if flag = x then nothing/ if flag = space then --->field2 and field 3 need to pass fixvalues and get the result and that i need to pass to IDOC field.

Please help

1. how i can mention this part ( RFClookup --> flag )  

2. after flag condition 

3. field2 and field 3 to fix values based on flag = space

4. finally to IDOC.

if you can help graphically it would be great ???

Accepted Solutions (1)

Accepted Solutions (1)

former_member184681
Active Contributor
0 Kudos

Hi,

This sounds simple. See the mapping below:

The only thing still to do is to change the "Source" with your exact mapping logic, including the Fix Values.

Regards,

Greg

Former Member
0 Kudos

Thanks Greg for your response.

Need small clarifications.

At "Source", written a logic as below.

Field10 and Field20 concatenate  ----> FixValues (key, value) --- > if Then   -->  passing the Fixvalue to Target

But getting the problem at this above logic.......like it is not properly taking the Field1 and Field2 pair and getting the Value.

Here one problem is in you mapping daigram at Field1, i have written the logic as below

Field1  ---> Remove contexts 

Field 2 ---> Remove contexts     ----> Sortbykey --->Splitby value(Each Value) ---> RFClookup.

please help the values are not passing properly and passing as randomly......

Thanks

Former Member
0 Kudos

Earlier the File to IDOC logic is working fine....but now after changing the above logic...i am getting wrong results..

Based on Companycode, need to post the IDOC.......but i am testing with Same Company code of 4 records....triggering 4 idocs....

first one with all the data......that means with all the 4 records...

second one, third one and 4th one with header data only....triggering IDOCs.....

how should i correct is only first IDOC......

no need of 2nd, 3rd and 4th idocs..

Answers (3)

Answers (3)

Former Member
0 Kudos

To achieve your mapping, you need to:

- Create your RFC function (with export parameter as a CHAR or Bool)

- Follow these help to put the RFC Lookup into your mapping:

http://scn.sap.com/people/jin.shin/blog/2008/02/15/sap-pi-71-mapping-enhancements-series-graphical-s...

http://scn.sap.com/community/pi-and-soa-middleware/blog/2010/01/28/graphical-rfc-lookup-and-how-you-...

- For output parameter, use the IFTHEN function to set a fixed value to the receiver field structure

0 Kudos

Hi Sabu,

you logic is almost right way.

you need to concat the Field2 & Field3

Field1 -->RFClookup --> flag --->  if then else condition    ---> if flag = x then nothing/ if flag = space then --->concat ----> field2 and field 3 .

regards,

Venkat

Former Member
0 Kudos

Dear  sabu,

I advice you to create UDF for this requirement.

Or else you really want to do it without UDF then create a temporary variable at target message type.

Use the Declaring  variable feature.

For the field2 and feild3 you have to check condition two times based on field 1. Better put the condition and store your result value in variable

and then proceed further based on variable value do your mapping.

thanks and regards,

Anup Banerjee