Mapping Exception Issue with RFC LookUp

Hi,
My scenario is Idoc To file, in my idoc user who created a purchase order filed is not there but in xml file i want the user who create that PO, for this i am using RFC LooUp. I want the user who created a purchase order.
Graphical Mapping looks like below.
Belnr-->User Defined Function--
>UserName
Please find the code bloew:
String DBTABLE = "EKKO";
String lookUpField = "ERNAM";
String WHERE_CLAUSE = " EBELN "" = "" ' "a" ' " ;
JCO.Repository mRepository;
JCO.Client mConnection = JCO.createClient(
               "500",
                "RFCUSER",
               "abc1234",
               "EN",
               "cxylo06",
               "05");
// connect to SAP
mConnection.connect();
// create repository
mRepository = new JCO.Repository( "GenericRFCMappingLookup", mConnection );
// create function template to select data from any table
JCO.Function function = null;
IFunctionTemplate ft = mRepository.getFunctionTemplate("RFC_READ_TABLE");
function = ft.getFunction();
// Obtain parameter list for function
JCO.ParameterList input = function.getImportParameterList();
// Pass function parameters
// set import parameters table name and RFC
input.setValue( DBTABLE, "QUERY_TABLE");
input.setValue( "," , "DELIMITER");
//Fill the where clause of the table
JCO.ParameterList tabInput = function.getTableParameterList();
JCO.Table inputTable = tabInput.getTable("OPTIONS");
inputTable.appendRow();
inputTable.setValue(WHERE_CLAUSE,"TEXT");
mConnection.execute( function );
//Find the position of the field that has to be lookedUp
JCO.Table lookupFieldPos = function.getTableParameterList().getTable("FIELDS");
int pos = -1;
for (int i = 0; i < lookupFieldPos.getNumRows(); i++)
          lookupFieldPos.setRow(i);
          if (lookupFieldPos.getString("FIELDNAME").equals(lookUpField))
          pos = i;
//Get the exact lookupvalue from the position obtained above
JCO.Table valueSet = function.getTableParameterList().getTable("DATA");
valueSet.setRow(0);
String resultSet = valueSet.getString("WA");
result.addValue(resultSet);
mConnection.disconnect();
I am not aware of java coding so kindly make necessary  modifications.
Kindly suggest what changes i need to do to execute perfectly.
Your help will be greatly apprecited.
Regards,
Venkat

Hi Venkat,
     If you use the JCO connection to get the value from RFC, it would be a problem in futherly like when you move this interface DEV to Q, then you need to change the connection parameters to establish the JCO connection.Same in Production environment too.It is not advisable to do JCO lookup. Go for RFC lookup as the link given by Farooq.
Create Reciever RFC communication channel and take the XML signature of u r RFC by importing that RFC under imported objects.Create an UDF, for this see the sample code which is exisitng in document to pass the Export parameter to RFC.
In this way u r RFC channel establish the connection to R3 and your RFC will execute and return the value.U just need to change the Reciever RFC channel parameters respective of environment.
Cheers
Veera

Similar Messages

  • Exception Handling in RFC lookup

    Hi Experts,
    I have a query in RFC Lookup function working with PI 7.1,  file to Idoc scenario.
    I am using Enhance Receiver Determination to find the dynamic recivers.Here we have used a Functional Module which gives an output according to the the input parameter (which comes from input file). thus i have used RFC lookup to the remote system to fetch this info from FM.
    Problem -
    When the remote system is down or if the RFC lookup attemped & exceptions raised for some reason (RFC user authority has been changed & it was not able to perform the intended Job at remote system) , the message stuck in queue and block the several other messages from another interfaces which belongs to teh same queue.
    Queries-
    This is not allowed in production as it affects other services.
    1>how can we handle the RFC lookup exception (in case of remote system is down or if the RFC lookup exception)
    2>how can we perform Local lookup at PI box rather then remote lookup (the FM fetches the data from remote system)
    3>Is Value mapping is relevant in this case raher the RFC lookup ? I am not sure as the values are dynamic & selected as per the FM's output.
    Please provide your valuable insight .
    Thanks in advance !
    -Jyoti

    Hi Jyoti,
    Answer for your 3 question.
    1. RFC lookup will get execute on R/3 so if R/3 is down there no way that your RFC lookup will work as expected.
    2. So if R/3 is down or RFC not able to get receiver system due to some problem.. then in that case.
              On your Receiver determination at bottom
              Configure  u201Cif no receiver found proceed as followingu201D
               In this you can have 3 option.
                        a. Error message u2013 if you select this the transaction will end with error message in SXMB_MONI
                        b. Ignore: if you select this execution will get ignored and there will not be any entry in SXMB_MONI
                        c. Select the following receiver. You can select this and can configured default receiver system in case if RFC not able to determine receiver then interface will get route to receiver system configured here.
    3. As you mentioned values are dynamic  then Value mapping doesnu2019t make any sense here. RFCl ookup is the right option and above are few other option in case you RFC lookup flailed.
    Thanks,
    Bhupesh

  • Enhanced Receiver Determination with RFC Lookup

    Hi All,
    I am building an interface with Enhanced Receiver Determination. Scenario would be that the Receiver Systems would be stored in a Z table in SAP ECC, and in PI Receiver Determination I am doing an RFC look up to find the systems, and using those.
    I built the mapping for Receiver Determination, and it tested fine in ESR. But while Creating the Receiver Determination in Integration Directory, After I specify the Receiver mapping name, and put the RFC channel name for the RFC parameter, it doesnt allow me to save the Receiver Agreement with a run time error message
    "Link from Receiver Determination  | <Sender>| <Interface>| * | * to object type "Channel" with role "122474913b1311deaadb42057dd8b002" is not permitted"
    My question is a) if the RFC lookup allowed in the mapping for Receiver Determination?
    B) if yes, am I missing someting or is it a system issue?

    i have seen Enhanced RD with lookups that work. Have to say it was not a RFC lookup used but rather a DB look in one of the implementations i had worked with. But still I really dont think a RFC lookup should be an issue.
    Troubleshoot the lookup mapping to be working other than in the enhanced RD (i.e independently) .
    if you head no where, i suggest opening a OSS note.

  • OBIEE 11g  Map View - Issue with Label Translation

    Hi All,
    I have a strange translation issue with the Maps in 11g.
    Created in English language to plot the Revenue for each of the Postal Codes.
    I selected Postal Code and Revenue Amount in the Criteria and created a new Map View. It had the text 'Postal Code' in the Map Legend and then the scale for revenue amount.
    Now I logged on with Chinese Language , it still appears as 'Postal Code' in English where in it was actually supposed to show it in Chinese.
    We have a translation pack to get all the column names translated. If I try creating a new table view, it shows the translated text instead of 'Postal Code', but some how this doesn't work with Maps.
    Has anyone faced similar issues ? Is there a workaround for this ?
    Thanks for any pointers.

    Hi,
    I also encounter the same issue. When I view combined layout, I get the No Results message. But when I edit the table layout, I see that there are records returned. Does anyone had any luck in resolving this issue?
    Thanks!

  • Problem with RFC LookUp Parametrised Mapping

    Dear All,
    I am using RFC Look function in message mapping and have defied import parameter as xyz of category adapter and type RFC to get a sinle value response from RFC.
    After this, I created operation mapping. Now going for Parameter binding, it is not showing me any value i.e. parameter defined in message mapping is not displaying due to which i am not able to activate operation mapping, it is showing error as "Binding for Message Mapping MM_FILE is not correct. Parameter xyz of Message Mapping MM_FILE is missing"
    I have checked various blogs on SDN but I am not able to figure out the mistake.
    Kindly guide me out.
    Reg,
    NJ

    Hi nishu,
    in operation you need type a name againasi the parameter XYZ.
    XYZ----
    ABC
    and in configuration when you will use this operation mapping in interface determination then it will ask for the value of ABC.
    so
    suppose channel name---CC_TEST
    So in Interface mapping you will assign
    ABC=CC_TEST
    So in Operation mapping you have assigned
    XYZ=ABC
    means XYZ=CC_TEST(beacuse ABC=CC_TEST)
    Simple Math 

  • PI Message Map - useOneAsMany issue with more than 10 lines.

    I am having an issue using 'useOnAsMany' .  I am using this to map lines of text from an idoc, specifically the SHPMNT04 idoc.  When there are more than 10 lines of text (i.g. 10 occurances of E1TXTP8) the sytem drops everything after the 10th line.  When I check the context of the fields it appears all occurances are being mapped however when I execute the map it drops the text after the 10 line.  Is this a bug?  Has anyone seen this and know of an answer?
    I am using 'useOneAsMany' with E1TXTH8-TDID as the first argument and E1TXTP8-TDLINE as the second and third arguments.  I am simply moving all the text when TDID = Z001.

    Hi Busse,
    Can you check the occurence of the target field to which you are mapping? If it is 0..10 then you will only 10 lines in outupt, else it should get populated.
    Regards,
    ---Satish

  • SAP PI Issue with RFC Receiver Adapter

    Hello,
    Iam using File-RFC scenario, where every thing executed fine, but in ECC iam unable to get the DATA coming from PI, Iam using Z RFC to insert data to a Z table.
    I did'nt any errors in PI, is there any option to find the output data at receiver adapter where iam using RFC adapter.
    Kindly Help,
    Thanks in Advance,
    Ravi.

    Yes. If you enable the logging you should be able to see the post mapping xml.
    Message Staging and Logging Options in Advanced Adapter Engine of PI 7.3x
    Scenario specific message staging and logging in PI 7.31 AAE
    Did you debug the RFC with test data? were you able to insert something?

  • RH 11 CSS Mapping Styles issue with Word 2013

    Hello members,
    Any help will be much appreciated.
    Platform: Win 7, RH 11, Word 2013 however, using an existing Word Template that was created in Word 2007.
    HISTORY:
    Six months ago, an upgrade of RH8 to RH11 took place (smooth, no issues reported). Please note, I have no "easy" way to verify if there was a problem in RH8 (all projects are upgraded, and old builds are backed up on IT server).
    There are existing Styles created in RH and in the Word Template (e.g., Heading 1, Heading 2, Heading 3, Normal, normal_bold, etc.). These existing Styles have no mapping issues hence, RH CSS recognizes their corresponding Word Styles.
    ISSUE:
    RH11 CSS does not recognize New RH Styles and Word Styles.
    NOTE: Styles are the same type. “For example, character to character, paragraph to paragraph, table to table, and multi-level list to multi-level list” (http://help.adobe.com/en_US/robohelp/robohtml/WS5b3ccc516d4fbf351e63e3d11aff59c2a0-7ee4.ht ml#WS21E2B5E4-C4AC-47b2-9D4B-D548EA9E3C04).
    Things Tried:
    Converted (SaveAs) my template .dot (Word 2007) to ".dotm" (Word 2013) = No change in issue mentioned above.
    What do I see when I create new Styles in RH CSS and Word Template: I am able to map Table and Multi Level List.
    Purpose: Working on a documentation standard project. Creating New Styles ‘based on’ existing styles. For example:
    RH CSS
    ListBullet
    Style: Paragraph
    Formatting: Font =10pt
    Indents: Left = 36pt
    Spacing: Before = 0px
    Paragraph: Alignment = Left
    Indentation: Left = 18pt, Right = 0pt, Special = Hanging (By 18pt)
    Spacing: Before = 6pt, After = 0pt, Line Spacing = Single
    Advanced:
    Word Template (.dot)
    ListBullet
    Style: Paragraph
    Style Properties: Name = ListBullet, Style type = Paragraph, Style based on = Normal, Style for following paragraph = ListBullet
    Formatting: Font = Arial Font style = Regular, Size = 9pt, Font color = Automatic (black), Underline style = none
    Paragraph/Indents & Spacing: Alignment = Left, Outline level = Body Text
    Indentation: Left = 0.25", Right = 0", Special = Hanging (By: 0.25")
    Spacing: Before = 0pt, After = 6pt, Line Spacing = Single, Selected (Don't add space between paragraphs of the same style)
    Paragraph/Line & Page Breaks: Pagination = Window/Orphan control, Tight wrap = None
    Bullet Format: Font = Symbol, Font style = Regular, Size = 9, Font color = no color
    Problem I am having is as follows:
    RH Wizard section - Print Document Appearance
    Project’s CSS Styles (Used Only or All)
    ListBullet
    Microsoft Word Styles (all)
    Unassigned – Use style in project) drop-down list
    The Style “ListBullet” does NOT show in the list
    NOTE: This anomaly I just reported happens for ANY new ‘Paragraph Style’ I create. If I create a List/MultiList, and the names of the Style are the same in RH and Word, RH Wizard automatically maps them. However, reading on multiple forums, authors have reported problems with Indentations (i.e., Word over extends the indentations); I have see this as well.
    PS - Happy Holidays to you and your families. My Best, ~PM
    PSS - Hi Peter ... I reviewed your site and this site, and Googled as well before posting.

    Thank you Peter and Amebr for your assistance. I ended up using RH Multilevel List Style, configured, and created an identical List Style in Word. I created a Single and a Multilevel (e.g., Level = bullet, Level 2 = squares); their challenge is matching RH indents with Word Indents... It's sort of a bear since RH does not have the Format Paragraph option (ref. drop-down) like Word Lists -  Numbering functionality.
    After generating my print document mu Bullet style reads "Normal (Web)"; even though the RH CSS Wizard recognized Word List Style I created (Ref. Font: Symbol, Font color: Black, Indent: Left: 0.15", Hanging: 0.25", Outline numbered + Level: 1 +, Numbering Style: Bullet + Aligned at: 0.15" + Indent at:  0.4", Priority: 100, Based on: No List.
    Question: Would anyone out there know why is when I highlight my bullet list to verify the correct Style (with the Styles pane open) and I see the "Normal (Web)" [its Style type = Paragraph and Style based on = Normal) is selected? If it came through (from Rh) as a true Multilevel List Style, I should not see anything.
    Happy Holidays!
    ~PM

  • Issues with migrating lookups from 9.0.3 to 9.2

    Below is a text from a TAR we've submitted with Oracle. Has anyone else run into this issue when upgrading from 9.0.3 to 9.2?
    Lookups conditions not being properly migrated is a known issue when upgrading from OWB 9.0.3 to 9.2,
    documented in Bug 3989847 - Generated Code Has Invalid Aliases After Upgrade From 9.0.3 to 9.2

    Did you try putting the toplinkProject.xml into the META-INF directory? Does the same error occur?

  • Password inconsistancy issue with RFC users in ECC 6.0 System after upgrade

    Hi,
    We have upgraded the system from 4.7 to ECC 6.0, but facing the password inconsistancy problem for RFC users. We have set the parameters like "login/min_password_lng" as "8" and "login/password_downwards_compatibility" as "3" & RFC user Type is "system". Could you please suggest how to resolve the password inconsistancy issue.

    Hi Chandan,
    you need to run the txn. SECSTORE and there it will shows you all the RFCs that have inconsistent passwords. Please maintain the correct passwords there.
    In case the existing passwords are no longer acceptable due to new security policies as per the new SAP version, you will have to change the password from SU01.
    Regards,
    Shitij

  • RFC Call through BSP - Issue with RFC logon credentials

    Hi everyone,
    I have an BSP application running on a 6.40 which calls a RFC function module on a backend system (4.6c) using a trusted RFC connection.
    The BSP is started with an URL which contains in encoded form the username and password. So we don't use the standard sap-username & sap-password.
    In the first step the user is logged in with the anonym user (user type 'service') which is entered in the SICF. So sy-uname = 'anonym'.
    After a couple of checks and verifications the BSP makes a user switch using 'SUSR_INTERNET_USERSWITCH'. Exporting parameters are the now decoded values from the URL. So after the switch sy-uname is e.g.  'blabla'.
    Now a function module on the backend system is called. What I would now expect is that on the backend system sy-uname is also 'blabla'. But it isn't. The sy-uname is still 'anonym', which isn't very helpful regarding object authority checks.
    Only after an reload of the BSP page and a second RFC call of the function module the sy-uname = 'blabla'.
    I wonder what causes this problem?
    Thanks for your replies & regards
    Kruno

    Hi,
    I solved it.
    Before I execute function 'SUSR_INTERNET_USERSWITCH' I first check if user has a valid backend account by using function module 'BAPI_USER_EXISTENCE_CHECK'.
    And this is the problem. When 'BAPI_USER_EXISTENCE_CHECK' is executed once all other RFC function calls to the backend get the wrong user.
    Why? I don't know yet. Maybe I will get an useful anwer from an OSS note.

  • Issue with RFC destination during HCM - VDS - IDM configuration

    Hi,
    I am trying to configure HCM and IDM (v7.1) using VDS. I am following the Configuration Guide. While creating the RFC Destination, I specified program ID as LDAP_VD and in Gatewayhost I have entered the host of IDM Server (where VDS is also installed). In Gateway service I have put sapgw00. But when I do connection test, I get u201CERROR: SAP gateway connection failed. Is SAP gateway started?u201D. Looks like it is trying to connect to IDM server and is looking for sapgw00 (on port 3300) and is not able to find it.
    What could be the reason for error? Am I doing RFC destination configuration correct? Do I need to put HCM system host in the Gatewayhost field?
    Regards,
    Anurag

    Hi Anurag
    You have to enter the hostname of the SAP server, not the LDAP server.
    The LDAP connection is configured later.

  • Determine output filename based on input filename content with RFC lookup

    Hello Guys,
    I have this sitaution which needs your ideas/sugestion.
    1)  PI system picks up text file from FTP server folders.
    2)  Within PI system,  we need to dynamically determine output filename , logic to determine output filename will be :
              2a)  Read content of the input file particular line number  (Fixed)
              2b)  Pass the value got from step 2a)  to the Remote function module passing value read in step 2a) to get response
              2c)  Use response received from 2b) to construct output filename.
    Please let me know if you have any qeustions on my problem,  appreciate your ideas/suggestions.
    Thanks,
    Krishna

    Hello Priyanka,
    THanks for your response to my post.
    My input  TEXT filename has following contents
    :20:CHASGB2LXXX
    :25:24803501
    :28:11264/01
    :60F:C110921USD85410,88
    :61:110921C12307,00NTR NONREF//5311802
    :86:TR ?
    ?20IV.2000199238 FR.26.08.11 IV.2000198595FR.22.08.11
    ?23AZMAT20091123183
    Now  I would like to read second row of this TEXT file containing   ":25:24803501"   and would like to read only text
    24803501.
    Hope this additional info will provide me more info on my requirement.  Appreciate your response.
    Regards
    Krishna

  • PI 7.1 EHP1 RFC Lookup- Issue

    Friends,
    I'm seeing one strange issue in RFC Lookup behavior in my PI 7.1 EHP1 . Please give me some ideas for the same
    Please see the below image for what I have done and what I'm seeing in the display queue.
    http://www.flickr.com/photos/8764045@N06/4642237515/sizes/o/
    To make it more simple - When I click on the Display queue on RFC lookup, I can see some 20 values with context changed. I removed my context and passed it to the UDF. When I check the input length in the UDF it's always giving 1, even though the display queue gives me 20 values.
    Any ideas?
    -Raj.

    Stefan/Sarvesh,
    Thanks for your replies . Please see the below snapshots for complete picture.
    UDF code & Properties -http://www.flickr.com/photos/8764045@N06/4643880555/sizes/o/
    RFC Lookup Properties -http://www.flickr.com/photos/8764045@N06/4643880541/sizes/o/
    Display Queues on UDF and RFC Lookup -http://www.flickr.com/photos/8764045@N06/4643883271/sizes/o/
    I truly appreciate all your help on this.
    -Raj.

  • Using of SALERT_CREATE in PI mapping (RFC LOOKUPs)

    I have a stupid question on using SALERT_CREATE rfc in SAP PI mapping, I am using RFC lookups in the mapping, how can I use this SALERT_CREATE RFC, Do I need to Import from PI server? do I need Communication Channel for this? How can I use to send Alerts to PI alert inbox from PI Mapping using SALERT_CREATE

    Thanks for reply Praveen, this is file to PI to File scenario, I am calling 3 RFC Lookups from Mapping, after every RFC Lookup call there are some validation checks to send alerts with out breaking the Mapping/business flow, so how can I use SALERT_CREATE rfc from mapping to send alerts

Maybe you are looking for