cancel
Showing results for 
Search instead for 
Did you mean: 

single RFC Lookup should return multiple values - but returns no values

Former Member
0 Kudos

I have an RFC Lookup in my PID system that i had to change due to a test defect.

the FM i wrote was working on a single value and returning the correct entry... however it now needs to return multliple entries and map 0..unbounded....

i have made the changes, the FM works in ECD, however when i call the FM from the mapping, it does not return any values... now, i am asking my basis team to change the PIAPPLUSER to dialog user so i can throw a breakpoint for an external user...

has anyone done a single to multi value mapping on lookup? i am not sure that it is the FM that is incorrect as it is very simple code..


DATA: lt_jobtype TYPE zhr_lkupjobtype_t.

  CLEAR     lt_jobtype.
  REFRESH lt_jobtype.

  SELECT * FROM zhr_lkupjobtype
    INTO TABLE lt_jobtype
    WHERE zinterface_id = import-zinterface_id
    AND   zsap_jobtype  = import-zsap_jobtype.

  MOVE lt_jobtype TO export.

is there a way of checking the RFC part of an message mapping? i checked the full trace within graphical mapping but this shows no return....

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I guess progress is progress no matter how slow....

the FM is returning the values now...

however, the field is only populated once... despite pulling back the 7 items... i can see them in the display queue after running the test.....

i added a split by value... but still only the single record is populated.....

any thoughts?

VijayKonam
Active Contributor
0 Kudos

Post the que values and your target structure.

VJ

Former Member
0 Kudos

I think you have to use RemoveContext instead of SplitByValue why because your parent node "jobTypes" is having 1:1 occurrence and under that child node "jobTypes" is 0:unbounded, so in order to get all the values under same parent you have to use RemoveContext.

Try and let us know.

Former Member
0 Kudos

Remove Context did the job! 🐵

thank you!

Answers (1)

Answers (1)

Former Member
0 Kudos

Sorry for my previous options as they are not required... Just check the below things..

Move it_jobtype[] to export[].

I hope the export is of table type. (I mean export is the name of internal table which you declared under tables parameters in RFC)

>

> is there a way of checking the RFC part of an message mapping? i checked the full trace within graphical mapping but this shows no return....

You can check the RFC results in you message mapping. Since your coding is not ok (as per my understanding) therefore your mapping is not getting any data from RFC.

Regards,

Sarvesh

Edited by: Sarvesh Singh on Apr 19, 2010 8:23 PM

Former Member
0 Kudos

I am using a MOVE instead of APPEND.

according to the keyword help if the tables are identical, you can use MOVE.

it works when i test in SE37.

i have tested it both ways and i get the same result each time.

i even tried it this way:


  SELECT * FROM zhr_lkupjobtype
    INTO TABLE export  
    WHERE zinterface_id = import-zinterface_id
    AND   zsap_jobtype  = import-zsap_jobtype.

and that works too to get the target values into the export table! that's what made me think it was not the code as i have tried three different ways of writing the same code... the Function Module works perfectly anyway! but when it is called from PI i cannot see if any values are returned....

Former Member
0 Kudos

Hi,

If it is wrkng fine in the se37 then, can u reimport the FM and refresh the cache once

Also make corresponding changes..in IR(if any)...

Try executing now once more...

If still prblm persists let us know..

Babu

Former Member
0 Kudos

Yes, that correct no need to use Append. I think you have to do some changes in your UDF in order to take multiple values in XI.

Have a look into this thread which talks similar issue..

Former Member
0 Kudos

it is stil not working!

i am just trying to do a many to many mapping from an RFC Lookup...

nothing flash that should require a UDF

any field can have a 0..unbounded and not need a UDF so why should an RFC Lookup need one?

VijayKonam
Active Contributor
0 Kudos

Is it an RFC look up or an RFC receiver side scenario? In the latter case, all you need to do is to reimport the RFC in to and make necessary mapping changes.

VJ

Former Member
0 Kudos

Actually UDF is not required. I just saw the question and few lines of coding from the thread which I mentioned my previous reply, so thought it may help you.

BTW have you tried after cache refresh.