Message-Mapping: Use same RFC lookup for different target fields

Hello,
I need to apply an RFC Lookup which delivers a boolean flag back (true or false). This RFC lookup should be used for different target fields.
Is there a way to execute the RFC lookup just once and then store the result in an internediate variable that I can use for all futher checks for different target fields?
If this is not possible and I have to apply the RFC lookup for all necessary target fields is it then executed for each target field ? This is exactly what I want to avoid in order not to slow down performance.
The input parameter (=source field value) would be the same.
Thank you for your advice!

Exactly.
Here is a UDF example I have that you could adapt to your needs.
Set
public String setCounter(String a,String b,Container container){
/* Store values in global datacontainer
a: mapping value and return valueparameter
b: name for stored value parameter
GlobalContainer myGlobalContainer;
myGlobalContainer = container.getGlobalContainer();
myGlobalContainer.setParameter(b.toUpperCase(), a);
return a;
Get
public String getCounter(String a,Container container){
   //write your code here
GlobalContainer gc = container.getGlobalContainer();
if (gc.getParameter(a) != null) {
  return String.valueOf(gc.getParameter(a));
} else {
return "1";

Similar Messages

  • Can we use same number range for different  fields

    can we use same number range for different  fields. how can we see the number range defined for a particular field

    Hai,
    Yes you can have same number range for different fields  by using the same domain to the data elements that are user to your two fields.
    To see the range:
    Go to SE11,Type table Name open it-->double click on the DataElement adjasent to the field name ,You will get Domian ,Double click on Domain You will get Domain.There See Value range option .Value range cam also be defined by Value Table which will also at the Doamin level.
    <b>Reward points if it helps you.</b>
    Regds,
    Rama.Pammi

  • Can i use same address pool for different remote access VPN tunnel groups and policy

    Hi all,
    i want to create a different remote access VPN profile in ASA. ihave one RA vpn already configured for some purpose.
    can i use the same ip address pool used for the existing one for the new tunnel-group (to avoid add rotuing on internal devices for new pool) and its a temporary requirement)
    thanks in advance
    Shnail

    Thanks Karsten..
    but still i can have filtering right? iam planning to create a new group policy and tunnelgroup and use the existing pool for new RA  and i have to do some filetring also. for the new RA i have to restrict access to a particualr server ,my existing RA have full access.
    so iam planning to create new local usernames for the new RA and new group policy with vpn-filter value access-list to apply for that user as below,  this will achive waht i need right??
    access-list 15 extended permit tcp any host 192.168.205.134 eq 80
    username test password password test
    username test attributes
    vpn-group-policy TEST
    vpn-filter value 15
    group-policy TEST internal
    group-policy TEST attributes
    dns-server value 192.168.200.16
    vpn-filter value 15
    vpn-tunnel-protocol IPSec
    address-pools value existing-pool
    tunnel-group RAVPN type ipsec-ra
    tunnel-group RAVPN general-attributes
    address-pool existing-pool
    default-group-policy TEST
    tunnel-group Payroll ipsec-attributes
    pre-shared-key xxx

  • Issues of using same enhancement set for different components

    Hi experts,
    I have an issue when using the same enhancement set(ZCRM_EHSET) for two different components IUICMD & IUICMRD. Component IUICMRD has two views IUICMRD/MainVS & IUICMRD/MeterReading and these views have been copied to Component IUICMD.
    Now, i am getting the following error, when i try to access AccountSearch view of component IUICMD
    Context initialization failed in view IUICMRD/MeterReading of UI Component IUICMD
    An exception has occurredException Class CX_SY_MOVE_CAST_ERROR - Source type \CLASS=CL_IUICMD_BSPWDCOMPONENT_IMPL is not compatible, for the purposes of assignment, with target type \CLASS=CL_IUICMRD_BSPWDCOMPONENT_IMPL
    Method: CL_IUICMRD_METERREADING_IMPL=>DO_INIT_CONTEXT
    Source Text Row: 10
    Let me know how i can solve this. Is there any precautions that i should have taken before using the same enhancement view for two different components.
    Thanks in advance.......................
    Regards,
    Prabahar

    Hi Bharathy,
    Thank you for the reply which helped me to come close to the solution.
    I hope you reply will solve the second part of my question where i get MOVE_CAST_ERROR.
    My first Question is still unanswered and i request you to provide solution if you have any. I worked on CRM 4.0 and CRM 2007 is new to me.
    My first question is below.
    I have two components IUICMD & IUICMRD. I have enhanced 4 views in the first component IUICMD using enhancement set ZCRM_ENHSET. There is no problem with that. But when i try to use the same enhancement set ZCRM_ENHSET for enhancing the second component IUICMRD, it's enhanceable in enhancement set.  But 2 views IUICRMD/Meterreading & IUICMRD/MainVS is also copied to first component and available as enhanceable views in First component.
    Is it the std behaviour that views from one component is copied to other when you try to use the same enhancement set? Kindly let me know if you faced similar situation.
    Best regards,
    Prabahar

  • Is it possible to use same sap script for different comp code with difflogo

    I have 3 company codes. I need to use same sap script to all  but each company code has different logo. I dnt want to go for 3 different sap script. Is it possible to change in coding
    like this
    If comp code = '100'
    print ' logo1'
    If comp code = '200'
    print ' logo2'
    If comp code = '300'
    print ' logo3'
    in same sapscript.If yes how ?

    Hi,
    Yes you can do it.
    In Sap Script use:-
    /: If Comp code='100'
       INCLUDE ZHEX-LOGO100 OBJECT TEXT ID ST LANGUAGE EN
    /:Elseif comp code = '200'
    INCLUDE ZHEX-LOGO200 OBJECT TEXT ID ST LANGUAGE EN
    /:Else
    INCLUDE ZHEX-LOGO300 OBJECT TEXT ID ST
    LANGUAGE EN
    /:Endif
    I hope this helps,
    Regards
    Raju Chitale

  • Using same program-id in different RFC adapters

    Hi,
    I have the following question:
    Is it possible to use the same program-id in different RFC adapters for the same SAP backend?
    In gerneral, what are the naming-conventions or best practices for using program-ids for RFC adapters?
    Thanks for your answer!
    best regards,
    Hannes

    No,
    You should not use same program ID for different RFC adapters. It is recommended by SAP (check FAQ's on RFC).
    Although technically you can use but it gives you unpredictable behaviour based on connection pool.
    Regards,
    Satish

  • Is it possible to do message mapping using different namespace message type

    Hi all,
    Is it possible to do message mapping using different namespaces message types
    Example :
    i am having message type MT_1 in namespace http://sap.com/abc
    and second message type MT_2 in namespace http://partner.com/xyz
    so MT_1 can be mapped with MT_2 or not having different namespace.
    Thanks

    Read through my reply in this thread for Defining Software component dependencies.
    Though it explains this for Improted Archives, it also holds true for Message Types to be used in message mappings.
    Re: Payload Extraction
    Regards
    Bhavesh

  • SAP XI 3.0 Same source for different target in std Value mapping function

    Hi,
    We have replicated 4 value mapping entries from R3 to XI having the same Context , Agency , Schema and value for source, but each of the 4 values has the same Context and Agency but different Schema and Value respectively.
    To illusstate :
    Source                             |Target
    Context Agency Schema    Value -----Context Agency   Schema     Value
    CS1      AS1      SS1      1        CT1       AT1      ST1       A
    CS1      AS1      SS1      1        CT1       AT1      ST2       A
    CS1      AS1      SS1      1        CT1       AT1      ST3       B
    This value mapping is not working and we always get the source value as the result.
    We are wondering if the reason for this is that we use the same source for different targets. But we are not 100 % sure of it.
    When I read the documentation on Value mapping or when we use the value mapping standard function in graphical mapping, we pass the context , agency and schema of the source and target respectively and the source value to get the target value, and this combination is always unique in our case as seen in the above example.
    Has anyone faced this kind of an issue, if yes I would appreciate if anyone could help us resolve this problem.
    Thanks in advance.
    regards,
    Advait

    Hi Advait,
    From the below what I understand is that you are not able to do value mapping for the follwoing
    1     A
    2     A
    3     B
    As value mapping allow one to one mapping only. Please do it like as mentioned below
    1     1*A
    2     2*A
    3     3*B
    Then in the graphical mapping of Integration Repository do the mapping for the same as shown below
    source field > VALUEMAPPING> UDF--> TARGET Field
    In UDF suppress the value of  1* , 2* , 3* which can be done as follows
    create one UDF with one input field
    //write the code as below to suppress the field
    return input.substring(2);
    Here the davantage of using 1* , 2* , 3* etc is that you have the option to use value mapping for 100 values which I think is not normally the case for any Interface.
    If you have same source you can do the same thing for that.
    Hope this helps you to resolve your query.
    Thanks & Regards
    Prabhat

  • RFC Destinations for different clients on same host

    Hi
    I have an SRM and SUS on the same server and the clients are different. I have a flow from SRM to SUS and also back from SUS from SRM.
    Do I have to create seperate RFC Destinations for different clients?
    What about the other details likePort, Partner Profile, Logical system etc, do we have to maintain all for both of them seperately ?
    Regards
    Ajith

    Hi Ajith,
    Do I have to create seperate RFC Destinations for different clients?
    >>> A set of RFC Destination, Port & Parnter Profile is used to connect two systems between one client of source system to one client of Target system. Eg. from clinet 100 of XXX system to clinet 100 of YYY system. So, you need to take this into account and create seperate RFC destination for each different pair of connections.
    What about the other details likePort, Partner Profile, Logical system etc, do we have to maintain all for both of them seperately ?
    >>>In PI, you need to create BS for each different client of SRM & SUS system.
    I hope this helps.
    Regards, Gaurav.

  • How to use same RESULT SET for two different events

    hello friends,
    I need to use same result set for two different events. How to do it.
    here My code,
    private void jComboBox1ItemStateChanged(java.awt.event.ItemEvent evt) {
    // TODO add your handling code here:
    try
    String selstate,selitem;
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con=DriverManager.getConnection("jdbc:odbc:tourismdatasource","sa","");
    selstate="select * from tab_places where state=?";
    PreparedStatement ps=con.prepareStatement(selstate);
    ps.setString(1, jComboBox1.getSelectedItem().toString().trim());
    ResultSet rs=ps.executeQuery();
    if(rs.next())
    jTextField1.setText(rs.getString("place_ID"));
    jTextField2.setText(rs.getString("place_name"));
    jTextField3.setText(rs.getString("category"));
    byte[] ba;
    ba=rs.getBytes("image");
    ImageIcon ic = new ImageIcon(ba);
    jLabel6.setIcon(ic);
    in=true;
    catch(ClassNotFoundException cfe){JOptionPane.showMessageDialog(null, cfe.getMessage());}
    catch(SQLException sqe){JOptionPane.showMessageDialog(null,sqe.getMessage());}
    Now i need the same Result Set(rs), in another event(jButton6ActionPerformed),
    private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {
    // TODO add your handling code here:
    }  how do i get dat resultset,
    help me out

    One post wasn't enough?
    {color:0000ff}http://forum.java.sun.com/thread.jspa?threadID=5246634{color}
    db

  • Can i use the same email address for different users?

    we are a small department with one email address, can i use the same email address for different users?

    No. Each user needs to have his unique ID.
    Mylenium

  • Urgent: RFC Lookup for BAPI in XI

    Hi,
    I am trying to call a BAPI that exists in XI system,in the Message Mapping in same XI system.
    If I run the BAPI,it is working fine.
    But if I call this in XI Message Mapping using RFC lookup,it returns garbage.
    I am not getting any RFC error.
    Can anyone please tell me what could be the reason for this.
    Thanks.
    Best Regards,
    Shweta

    Hi Shwetha,
    Please refer the below weblog:
    • RFC lookup using JCO (without communication channel)
    /people/sravya.talanki2/blog/2005/12/21/use-this-crazy-piece-for-any-rfc-mapping-lookups
    • RFC lookup with communication channel.
    /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
    Sample code:
    public void createAlert(String InterfaceID, String AlertCategory, String errorString,String RFCReceiverCommunicationChannel,String BusinessService)
    try{
    final String SAPRFCNS = "urn:sap-com:document:sap:rfc:functions",
    FUNCTION_MODULE= "Z_FI_RAISE_ALERT";
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = null;
    factory.setNamespaceAware(false);
    factory.setValidating(false);
    try {
    builder = factory.newDocumentBuilder();
    } catch (Exception e) {
    Document docReq =null;
    try {
    docReq = builder.newDocument();
    Node root = docReq.appendChild(docReq.createElementNS(SAPRFCNS, FUNCTION_MODULE));
    // Creates XML structure which is passed to ABAP function module
    root.appendChild(docReq.createElement("I_INTERFACE_ID")).appendChild(docReq.createTextNode(InterfaceID));
    root.appendChild(docReq.createElement("I_ERROR")).appendChild(docReq.createTextNode(errorString));
    root.appendChild(docReq.createElement("I_ALERTCAT")).appendChild(docReq.createTextNode(AlertCategory));
    } catch (Exception e) {
    // XML Payload
    Payload result1 = null;
    try {
    Channel channel = LookupService.getChannel(BusinessService, RFCReceiverCommunicationChannel);
    RfcAccessor accessor = LookupService.getRfcAccessor(channel);
    InputStream is = new ByteArrayInputStream(docReq.toString().getBytes());
    XmlPayload payload = LookupService.getXmlPayload(is);
    result1 = accessor.call(payload);
    } catch (LookupException e) {
    // trace.addWarning("Error during lookup - " + e);
    // System.out.println(e.toString());
    catch(Exception e)
    // System.out.println(e.toString());
    Thnx
    Chirag

  • Can we use same Business Service for Sender and Receiver

    Can we use same Business Service for Sender and Receiver

    Hi
    In addition to the above infomation explaining about the Business Service..
    Business Service: Address an abstract business entity as the sender or receiver of messages.
    Using a business service, you can define the technical or business subunits of the companies involved and then assign them the relevant interfaces.
    The business services are used when configuring cross-company processes also..
    regards
    Kishore

  • How to Use Same Asset Number with Different Sub-number

    Hi
    We want to sell some assets and buy them back on lease. We want to use same Asset number with different sub-number under the same company code. This new asset will be under different Depreciation Area (Statistical).
    We use external numbes for assets . And same asset number range is used by all compnay codes.
    Please suggest whether this is possible & how.
    With Regards,
    Nitin

    Hi,
    Go to field status for asset master data section and change the field status to optional for field Deactivation date, then follow the below steps.
    You can create an sub asset number to an asset, which is already deactivated by retirement as like normal sub asset creation with AS11.(While creating sub number, you need to remove cap date and deactivate dcate field manually from asset master)
    With this you can get new asset number as same as your old retired asset main number and but sub number will be different.
    To post to diff dep area, other than 01, then you first create an acq transaction type, which will post only to specific areas and then use the new asset number in ABSO to post acq with your custom TTY.
    I have tested and found working well in my system............Try now in your test client
    Thanks,
    Srinu

  • Is it possible to have same file size for different dpi?

    I changed one.TIFF file (300dpi, 1024X1332)  to .jpg files of four different dpi. But when I checked the four result jpg files, I found out that they are all in same file size and quality.( I also have checked the property of the files in the Windows.)
    I think more DPI means more data and more file size. Am I wrong?
    I use Photoshop CS 5.1(64bit, WINDOWS) - which is part of my Adobe Master Collection CS5.5.
    TIFF(300dpi, 1024X1332) ->
    1. JPG(72dpi, 1024X1332) : 306KB
    2. JPG(108dpi, 1024X1332) : 306KB
    3. JPG(144dpi, 1024X1332) : 306KB
    4. JPG(600dpi, 1024X1332) : 306KB
    I tested a few times more with different files. and same result comes out.(same file size for different dpi)
    Thanks in advance.

    Yes absolutely. Great observation.  PPI does not control the number of pixels, just how big they are.
    Now, if you change the PPI in the Image Size dialog with Resample checked.. then, that is a different story. In that case you will be changing the pixel dimension of an image (i.e.,changing the total number of pixels making up the image) while keeping its print size.
    In your test files, you will notice all the print sizes are different, because all you were telling Photoshop to do was change the size of the pixels (if or when the image is ever printed), which is really just a bit of metadata of the file.

Maybe you are looking for

  • Code ran fine in Eclipse, no output as a Jar file..help!

    I have been working on a piece of code that reads an excel spreadsheet, and writes xml files based on that. (I'm to cheap to buy the numerous software out there) The code ran beautifully in Eclipse, and all the right dialog windows and console output

  • Issue with Export of 4.6D System

    Hi guys, I am trying to run an export on 4.6D using Oracle 9.2, but unfortunately I get the following message in my INSTGUI.. Would anyone have any ideas on how to solve this issue? I've read that we need to check if the users have permissions or are

  • Unable to convert the sender service ACC_BSer_SEN_F2I to an ALE logical sys

    IN a File to Idoc senario.... this the error am getting , wot may be the issue <SAP:Code area="IDOC_ADAPTER">ATTRIBUTE_INV_SND_SERV</SAP:Code>   <SAP:P1>ACC_BSer_SEN_F2I</SAP:P1>   <SAP:P2 />   <SAP:P3 />   <SAP:P4 />   <SAP:AdditionalText />   <SAP:

  • Simple xmp query tool

    I'm looking for a simple query tool which I could use to explore XMP files, for Windos with GUI. I have been experimenting with SparqlGUI, but it doesn't seem to recognize the XMP language. Any ideas?

  • Dreamweaver 8 - Help Creating a Blog

    A friend of mine uses RapidWeaver for Mac and he tells me it makes it really easy to create and update his XML/RSS based blog. How would I accomplish this using Dreamweaver? Could someone point me in the right direction for a tutorial or provide me w