Query to Lookup Ship To in a UDF for the Inventory Transfer

Good Day Experts!
I created a UDF for the Ship To Code in the Inventory Transfer Window.  The problem is I do not know how to create a query to be used in the Formatted Search for this UDF wherein it will lookup all the Ship To Codes in the table CRD1 of that particular  Customer selected in the Inventory Transfer window.  The objective is to choose a Ship to code just like in the sales document.
My next problem would be how to display automatically the whole Ship To Address in another UDF based on the Ship To Code chosen in the UDF Ship To Code.
Your inputs would be highly appreciated.
Regards,
Jen

To get the Complete ShipTO Address, use the following Code
SELECT T0.cardname+CHAR(13)+isnull(T0.Address,'')+CHAR(13)+
cast(T0.Building as varchar(100))+CHAR(13)+isnull(T0.city,'')+CHAR(13)
+isnull(T0.zipcode,'') as Address FROM CRD1 T0
WHERE T0.CardCode =$[OWTR.CardCode] and  T0.cardtype='S' and
T0.Address=$[OWTR.UDF1]
Here Replace UDF1 with the Name of the UDF in which Shipto Address Names are shown as per my previous post.
Hope you understand

Similar Messages

  • Save Query - An error occurred while creating connection strings for the query

    A workbook trying to edit and reload I get the following error "Save Query - An error occurred while creating connection strings for the query" No Power Pivot data model or anything.

    I am getting the same error when editing a Power Query in an Excel spreadsheet. It happens when I change a Group By step to do a Sum instead of Count Rows.

  • UDF Inventory Transfer

    Hi,
    I created a UDFs in marketing documents at row level. I only see the header UDF in the inventory transfer document. How can i create UDF in inventory transfer? Can I?
    Thanks
    Regards
    Adriana

    Hi Adriana,
    When you created a UDFs in marketing documents at row level , it would be already available to Inventory Transfer row level.  Check you form setting to see. They are usually in the bottom.  You can bring them up to get them on top of the fields to be viewed easily.
    Thanks,
    Gordon

  • How to give query in lookup type udf in OIM 11g

    Hi,
    In OIM 9.x, we were able to provide query in lookup type field in users UDF to fetch data from DB and display it in lookup table.
    Where as in OIM 11g, I cant find that option. We need to provide user id in lookuptype field based on some query. Please let me know where we can do the same in OIM 11g.
    Thanks,
    Kalpana.

    In OIM 9.x, we had below query in one of the lookup type attribute:
    select usr.usr_udf_empid,usr.usr_first_name,usr.usr_last_name from usr where usr.usr_emp_type='Full-Time' and usr.usr_status='Active' and usr.USR_UDF_EMPID is not null
    The lookup used to show firstname, lastname & employee id of active employees in the lookup.
    Where we can achieve the same in OIM 11g?
    Thanks,
    Kalpana.

  • UDF for JDBC lookup in PI 71

    I am facing some issue while importing the SQL meta-data from db2 in PI 7.1 , guess the db2 version is old and not compatible with 7.1 or could be problem with drivers, I want to go head with writing UDF for the jdbc lookup, can you please let me know  the code and how it can be written or blogs, thanks

    >>> can you please let me know the code and how it can be written or blogs, thanks
    You can try this link if you dont want to use graphical jdbc lookup... Follow this link , it has code to use ...
    /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
    Also refer these links
    For 7.0 -  http://scn.sap.com/people/william.li/blog/2007/03/30/using-jdbc-connection-pool-in-xi-message-mapping
    For 7.1 http://scn.sap.com/people/jin.shin/blog/2008/02/15/sap-pi-71-mapping-enhancements-series-graphical-support-for-jdbc-and-rfc-lookups

  • UDF For Retrieving the Tax Code based on PO

    Hi all,
    Mine is a file to Idoc scenario.
    I wrote a FM to retrieve the Tax Code based on PO .
    Created the udf which directly gets the Taxcode from the r/3 with out importing in to the imported objects,is this correct i never tried this before.
    Find the UDF for the Same.
    final String    CHANNEL_NAME = "GeneratedReceiverChannel_RFC",
         VALNOTFOUND = "VALUE_NOT_FOUND",
         SAPRFCNS = "urn:sap-com:document:sap:rfc:functions",
         TAG_FM = "Z_P_INT012_RFC_LOOKUP",
         TAG_TAX_CODE = "T_TAX_CODE",
         TAG_TAX_CODE_P = "TAX_CODE";
    AbstractTrace trace = container.getTrace();
              DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
              DocumentBuilder builder = null;
              factory.setNamespaceAware(false);
              factory.setValidating(false);
              try {
                   builder = factory.newDocumentBuilder();
              } catch (Exception e) {
                   trace.addWarning("Error creating DocumentBuilder - " + e.getMessage());
              Document docReq = null;
              try {
                   // Building up RFC Request Document
                   docReq = builder.newDocument();
                   Node root = docReq.appendChild(docReq.createElementNS(SAPRFCNS, TAG_FM));
                   Node nodeTbOpt = root.appendChild(docReq.createElement(TAG_TAX_CODE));
                   for (int i = 0; i < pernr.length; i++) {
                        Node nodeTbOptItem = nodeTbOpt.appendChild(docReq.createElement("item"));
                        nodeTbOptItem.appendChild(docReq.createElement(TAG_TAX_CODE_P)).appendChild(docReq.createTextNode(TAX_CODE<i>));
              } catch (Exception e) {
                   trace.addWarning("Error while building RFC Request  - " + e);
              trace.addInfo("RFC Request XML: " + docReq.toString());
                                                    //trace.addWarning("RFC Request XML: " + docReq.toString());
              // Lookup
              Payload load = null;
              try {
                   Channel channel = LookupService.getChannel(receiver[0], CHANNEL_NAME);
                   RfcAccessor accessor = LookupService.getRfcAccessor(channel);
                   InputStream is = new ByteArrayInputStream(docReq.toString().getBytes());
                   XmlPayload payload = LookupService.getXmlPayload(is);
                   load = accessor.call(payload);
              } catch (LookupException e) {
                   trace.addWarning("Error during lookup - " + e);
              // Parsing RFC Response Document
              Document docRsp = null;
              try {
                   docRsp = builder.parse(load.getContent());
              } catch (Exception e) {
                   trace.addWarning("Error when parsing RFC Response - " + e.getMessage());
              trace.addInfo("RFC Response XML: " + docRsp.toString());
                                                    //trace.addWarning("RFC Response XML: " + docRsp.toString());
              try {
                   NodeList res = docRsp.getElementsByTagName("item");
                   for(int i=0;i<res.getLength();i++){
                        NodeList itemNodes = res.item(i).getChildNodes();
                        Map itemMap = new HashMap();
                        for(int j=0;j<itemNodes.getLength();j++){
                             itemMap.put(itemNodes.item(j).getNodeName(), itemNodes.item(j).getFirstChild().getNodeValue());
                        rows.add(itemMap);
                                                            catch (Exception e) {
                   trace.addWarning("Result value not found in DOM - " + e);
                   result.addValue("true");
    Error:
    16:24:08 Start of test
    Source code has syntax error:  /usr/sap/XD1/DVEBMGS30/j2ee/cluster/server0/./temp/classpath_resolver/Map283041f0edf311dd960b0003bacd2461/source/com/sap/xi/tf/_MM_INT012_INVOICE_DET_.java:598: 'class' or 'interface' expected public void TaxValues$(String[] a,String[] b,ResultList result,Container container){ ^ /usr/sap/XD1/DVEBMGS30/j2ee/cluster/server0/./temp/classpath_resolver/Map283041f0edf311dd960b0003bacd2461/source/com/sap/xi/tf/_MM_INT012_INVOICE_DET_.java:618: 'class' or 'interface' expected } ^ /usr/sap/XD1/DVEBMGS30/j2ee/cluster/server0/./temp/classpath_resolver/Map283041f0edf311dd960b0003bacd2461/source/com/sap/xi/tf/_MM_INT012_INVOICE_DET_.java:619: 'class' or 'interface' expected ^ 3 errors  Source code has syntax error:  /usr/sap/XD1/DVEBMGS30/j2ee/cluster/server0/./temp/classpath_resolver/Map283041f0edf311dd960b0003bacd2461/source/com/sap/xi/tf/_MM_INT012_INVOICE_DET_.java:598: 'class' or 'interface' expected public void TaxValues$(String[] a,String[] b,ResultList result,Container container){ ^ /usr/sap/XD1/DVEBMGS30/j2ee/cluster/server0/./temp/classpath_resolver/Map283041f0edf311dd960b0003bacd2461/source/com/sap/xi/tf/_MM_INT012_INVOICE_DET_.java:618: 'class' or 'interface' expected } ^ /usr/sap/XD1/DVEBMGS30/j2ee/cluster/server0/./temp/classpath_resolver/Map283041f0edf311dd960b0003bacd2461/source/com/sap/xi/tf/_MM_INT012_INVOICE_DET_.java:619: 'class' or 'interface' expected ^ 3 errors
    16:24:11 End of test.

    Hi Potharaju,
    Why don't you try this, that really works:
    If you are using PI 7.1:
    http://help.sap.com/saphelp_nwpi71/helpdata/en/33/1ec6ced273493a993a80c2301c03da/frameset.htm
    If you are using XI 3.0, PI 7.0
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1b439
    Try with these.
    Regards,
    Juan

  • Reg: UDF for removing values after decimals

    HI,
      Please help me on the below issue,
      I need an UDF for the follwing requirement,
    as my input value is 12354.12354875 then the result will be like 12345.123,
    After deceimal it should get only 3 values.
    Please help me points will be awarded.
    Edited by: UDAY on Apr 5, 2010 3:56 PM

    >
    UDAY wrote:
    > yes its needed to be truncated only not rounded.
    In that case even the standard function FormatNum can also help.
    Regards,
    Abhishek.

  • UDF for Item Master Data

    Hi,
    The UDF options in the menu bar for the Item Master Data are available in one database but NOT in another database.
    Is this a known bug and/or related to conversion of a database from a previous version.
    We're using SBO 6.5 SP:01 EF:07
    Thanks

    Hi,
    UDF options in the menu bar are only visible if there are defined UDF for the active form. Are you sure that the seccond database has any UDF?
    Regards,
    Ibai Peñ

  • UDF for Timestamp

    Hi Friends,
    Can anyone please provide me the UDF for the following case.I need my output file name in following format
    156WE_YYYYmmddHHMMSS.xml
    Thanks for quick help..
    Regards,
    Dinesh

    Hi,
    In the target file adapter, you can choose target file name as 156WE_.xml, then in next tab choose ADD time stamp. It will create a  output filename as 156WE_YYYYmmddHHMMSS.xml, if values till underscore is fixed.
    Else you can use below code.
    /* Using Dynamic Configuration */
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    //conf.removeAll();
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    //String filename= conf.get(key);
    conf.put(key, fileName);
    key= null;
    return fileName;
    Refer link ---  http://wiki.sdn.sap.com/wiki/display/Snippets/SAPXIDynamic+Configuration
    Regards
    Aashish Sinha

  • Emaill address in the ship to first and then look for the sold to

    Hi,
    I have a requirement where-
    The output should use Emaill address in the ship to first and look for the sold to if the record is not available in the ship to.
    Can somebody help?
    Regards,
    Pankaj Jain

    If you are taling about the email address used in the output determination process, you can do the following.
    Set up the access sequence for the output with two steps:
    1.  For the ship-to
    2. For the sold-to
    (you can use the same table - just set up the fields assignment differently on the two steps>
    On the 1st step, assign a requirement routine that checks for the email address on the partner. If it isn't there (i.e. on the ship-to), the access will be skipped - and the system will determine the output for the  sold-to,
    You will need an ABAPer to create a requirement routine (VOFM).

  • Reg: UDF for varchar to smalldatetime

    Hi guys,
    I am trying to post DATA date field  in PI (EX : 20080406 from IDOC )   to smalldatetime in the SQL database.(JDBC) .
    The communication channel throws error :  cannot convert nvarchar to smalldatetime.
    The possible solution is including the java.sql import functions and write a UDF for the same.
    Can anyone help me with a UDF for the same so that i can pass the source field  to database using the UDF.

    Hi Kushee,
    smalldatetime format is: 2007-05-08 12:35:00
    See this help: http://msdn.microsoft.com/en-us/library/ms182418.aspx
    So use the standard datetime function with a separator space in between date and time. It should solve your issue. No need for udf.
    Regards,
    ---Satish

  • Write a query to get the users those are not appliyed for the exam?

    hi frz i have two tables like User,UserHistory
    User table contains clmns--Uid,Uname
    UserHistory contain columns--Uid,Course,Status.
    so i want to write a query to find out those are not applied for the particlur course i want to found only those records from the two tables...

    Hello,
    The SQL Server forums are over here:
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/home
    Karl
    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
    My Blog: Unlock PowerShell
    My Book: Windows PowerShell 2.0 Bible
    My E-mail: -join ('6F6C646B61726C40686F746D61696C2E636F6D'-split'(?&lt;=\G.{2})'|%{if($_){[char][int]&quot;0x$_&quot;}})

  • GetListItems CAML query using Lookup fields

    Hi,
    I am struggling to find the correct CAML query syntax to use for GetListItems where I need to return an item ID based on a query involving both a lookup field (lookup is to a column within the same list) and a text field.
    For Example (but changing one of the below to a lookup field):-
    <soap:Body>
        <m:GetListItems>
          <m:listName>ListName</m:listName>
          <m:query>
    <Query>
      <Where>
        <And>
          <Eq>
            <FieldRef Name="LevelOne" />
            <Value Type="Text">"test1"</Value>
          </Eq>
          <Eq>
            <FieldRef Name="LevelTwo' />
            <Value Type="Text">"test2"</Value>
          </Eq>
        </And>
      </Where>
    </Query>
    </m:query>
    <m:viewFields>
    <FieldRef Name ="ID" />
    </ViewFields>
    </m:viewFields>
    </m:GetListItems>
    </soap:Body>
    Any help appreciated!

    When you query a lookup column, you can choose to either query by text value or by lookup ID number (that is, the ID of the item being looked up).
    Here are examples of both:
    <FieldRef Name="MyLookupColumn" />
    <Value Type="Lookup">Thriggle</Value>
    <FieldRef Name="MyLookupColumn" LookupId="TRUE" />
    <Value Type="Lookup">100</Value>

  • Issue with Jar files in UDF for RFC LookUp

    Hi,
    I am writing a UDF for RFC LookUp.
    In the import statement of UDF, I used the JAR File : com.sap.aii.mapping.lookup.*;
    The code inside the UDF uses LookupService.getChannel.
    When I test the UDF, It shows an error ( ^ ) at LookupService.getChannel.
    Could you please help me in understanding why Am I getting this error at all?
    Thanks In Advance.
    Rohan

    Hi,
    I have used 'com.sap.aii.mapping.lookup.LookupService', and I got the following message error:
    G:/usr/sap/XD1/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map1c5a7dc23dcf11dda79f001e4f342f87/source/com/sap/xi/tf/_MM_MT_PlannedOrder_to_ZLOIPLO_.java:3: package aii_map_api does not exist import com.sap.aii.mappingtool.tf3.;import com.sap.aii.mappingtool.tf3.rt.;import java.util.;import java.io.; import java.lang.reflect.;import aii_map_api.jar;import com.sap.aii.mapping.lookup.LookupService;*
    ^
    Also in the above message there are 3 packages that I have not used at all and still I see them in the message.
    Any reason?
    Rohan.

  • Querying w/ lookup data

    I have a table of name and address information that links to a city table on a city ID value. I would like to present this to the users without the appearance of the city ID value, just with the city and state from the child table. I would also like the users to be able to query and update with essentially the same form. Since I am new to all this, I am getting bogged down in data blocks, canvases, forms, etc. But this isn't rocket science, and I can't be the first one with this requirement, so what's the tricky shortcut?
    Thanks in advance,
    Mark.

    You need to write a Post-Query trigger for the block which does something like:
    SELECT city_name
    ,state
    INTO :<block>.city_name
    ,:<block>.state
    FROM cities
    WHERE city_id = :<block>.city_id
    You may well need the following at the end of the Post-Query trigger:
    set_record_property(get_block_property('<block>', current_record), '<block>', status, query_status);
    So the Form doesn't think that the record has been changed and try to update it.
    null

Maybe you are looking for

  • How to Link Text and Image as One Button?

    I can easily convert an image or text to a button, but how do I link them both as one button so when you mouseover either one, they both turn a color and when you click on one, they both turn a color before jumping to the scene?

  • Sending email  notifications/alerts via Enterprsie Manager 11g

    I have Oracle 11g on Linux...and i have set up SMTP of my Enterprise Manager Database control. I click on Test and an email was sent successfully. What i dont know is how to add more emails as the receipient of the alerts. I have setup metrics like n

  • Problem removing package from AUR

    hi, ive been using avant window navigator, the bzr version from the AUR.  after a system update it stopped working and i want to try something else out anyway, but when i try to remove it i get checking dependencies... error: failed to prepare transa

  • Package can not be compiled

    Hello Friends, Our environment is SERVER : ORACLE 10G , OS : WINDOWS 2003. I am preparing a test database for training purposes by export full database by FULL =Y. All functions are working fine except an job is not able to run. I found the package c

  • Firefox for Android won't install on HTC Explorer

    My HTC Explorer seems to have all the requirements for Firefox to be installed. The screen resolution is 320 x 480 - more than the minimum spec. The Android version is 2.3.5. - higher than the version quoted. HTC Sense version 3.5 But when I try to i