Shipment type must be equal to shipment type

Hi
     while iam creating shipment for one delivery document it is giving an error:
"shipment type must be equal to shipment type"
Pls suggest me how to get rid of it.
Thanks

Hia Ashish ,
can u plz provide more details?
i expect there in typing mistake, vch is not matching shipment type

Similar Messages

  • BaseFont and FontName must be equals?

    I have trouble with an PDF/A document and some readers we are using:
    - Acrobat (Reader) 9.X works fine
    - Acrobat (Reader) 6.X and our own inhouse reader have problems
    I tracked it down to the following part:
    10 0 obj
    <</LastChar 255/BaseFont/TimesNewRomanPSMT/Type/Font/Encoding/WinAnsiEncoding/Subtype/TrueType/FirstChar 0/FontDescriptor 11 0 R/Widths[...<removed the numers in here>...]>>
    endobj
    11 0 obj
    <</CapHeight 666/FontBBox[-1164 -628 4096 2062]/Type/FontDescriptor/Descent -442/FontFile2 33 0 R/StemV 87/Flags 32/Ascent 1420/FontName/Times#20New#20Roman/ItalicAngle 0>>
    endobj
    The problem is the /FontName of the FontDescriptor contains "Times#20New#20Roman".
    In the pdf spec i read:
    BaseFont: "The PostScript name of the font. For Type 1 fonts, this is  always the value of the FontName entry in the font program"
    FontName: "The PostScript name of the font. This name shall be the same as the value of BaseFont in the font or CIDFont dictionary that refers to this font descriptor."
    => Thus the BaseFont and the FontName must have the same value?
    => Is that "#20" (= a blank?) even allowed inside the FontName?
    Thanks for the help,
    ToM

    I just recognized that in the PDF a TrueType Font is used.
    According to the spec it says:
    "The value of BaseFont is derived differently.
    The PostScript name for the value of BaseFont may be determined in one of two ways:
    If the TrueType font program's “name” table contains a PostScript name, it shall be used.
    In the absence of such an entry in the “name” table, a PostScript name shall be derived from the name by which the font is known in the host operating system. On a Windows system, the name shall be based on the lfFaceName field in a LOGFONT structure; in the Mac OS, it shall be based on the name of the FOND resource. If the name contains any SPACEs, the SPACEs shall be removed.
    - What is the program's "name" table? Does it mean the "name" attribute of the font dictionary?
    - And it seems that the spaces shall be removed...
    Regards,
    ToM

  • Report within CJ30 and CJI5 must be equal

    HI all,
    when running report cj30 in a specific project, "assigned" tab in object currency for 2011 shows $7,114,889.30 while report CJI5 for 2011 commitments for the same project shows a total of $6,194,289.30. according to the user The two amounts should be the same. The difference is $920,600 which can be seen as  the balance of NTW 5001631. This PO 4500125119 was recently amended (split over 2010 and 2011) and it seems as though it is now being double-counted in the CJ30 calculation.
    please advice how this has happened. Also, is the CJ30 assigned tab report the same as the CJI5 report?
    thanks in advance.

    Hi
    CJI5 provides only a part of your CJ30 assigned values.Please try to read some SAP documentation to understand the concept of assigned values and try to explain your client.I believe that your system is showing the right figures.
    Regards
    Ravi

  • Name must be equal to bindName?

    If I set up different values for name and bindName for eg. SessionInfo or RowSetInfo, I find that the next time I enter the design mode, I can't see anything in the structure pane of the Navigator, just the string "opening hu.regens.Kapcsolat".
    It seems not to be able to parse the code...
    Did I something wrong?
    Tib

    Sorry, but I realized, that not the name ~ bindName was the reason but the
    loginDlg1.setDataItemName("infobus:/oracle/session1");
    line. If there was this line, the design view doesn't appear, but w/o this everything works fine, so I have to comment in/out every time I change to/from design view.
    Tib

  • Error: Order Management Order-level sales credit total () must equal 100%

    Hi,
    When I click checkout and fill the details and place the order from minisite , I am getting following error:
    "Error messages from Order Management Order-level sales credit total () must equal 100%.
    Salesperson is required on a booked order.There is an error in order submission."
    I have set ASO : OM Defaulting profile option to Yes.
    Please help me..
    Thanks and regards,
    Muhammed Aslam

    Hi;
    What is EBS version?
    Please see:
    Service Charges Error: Order Level Sales Credit Total() Must Be Equal 100% [ID 394641.1]
    Error Message - "Order-level sales credit total () must equal 100%." [ID 726030.1]
    Order-level sales credit total () must equal 100%-Copy RMA: LINE FLOW - RETURN FOR CREDIT ONLY [ID 1061854.1]
    Regard
    Helios

  • BCS error: Trial balanc enot equals zero

    When I run the task to validate data in BCS, it says "trial balance not equals zero for one company code".
    Any ideas?
    Ravi T

    HI Ravi
    Possibilities are:
    01. Wrongly posting of Transactions accounts in GL a/c of Trial Balance
    02. Wrongly importing the values from external files like...XLs
    (Please verify the values of Negative Posting Items if any the each GL head of Trial balance Accounts)
    03. Picking up of Historical Aged Trial Blance figures( uncheck the HATB) options if any, on the same CompanyCode which has been already gerated for that period.
    Every GL a/c in Trial Balance account has the-- Type of Accounts(Assets or Liabi), Opening Balance, and current day transactions details (debit or credit value). the summation of opening balance, current day transactions(+/-) must be equal to closing balance of the account on that day.
    just FYI:
    In double-entry accounting requires the sum of all debit accounts to equal the sum of all credit accounts, a trial balance is required to verify correctness. The trial balance is a list of accounts and their balances at a point in time. When preparing a trial balance, three steps are needed:
    1.You must list each account title and the amount accrued in the trial balance. If an account has a zero balance, just list it with a zero in the normal balance column.
    2.Next you must calculate the total amount of the debit balance, as well as, the total credit balance.
    3.Last you verify that the total debit balance is equal to the total credit balance.
    If the total debit balance and total credit balance are not equal then there must be an error that needs correction. If the credits and debits do appear equal on the trial balance, it still does not guarantee that no errors were made. The main goal of the trial balance sheet is to report whether the account balances are reported in the appropriate debit or credit columns and to allow for future reference of financial statements
    Hope this will help you in functioanl aspect.
    Thanks & Regards
    ukraghu

  • Why do we need to override Hascode and Equals method?

    Hi,
    == checks if the two references are equal and .equlas will check if the value is same, if we want .equals to take care of both reference and value are correct. why cant I just override equals with an extra check that references are equal(==).
    Please someone elaborate on this and also tell me what role hashcode plays in this.
    thanks
    Anirudh

    anirudh1983 wrote:
    if we want .equals to take care of both reference and value are correct. why cant I just override equals with an extra check that references are equal(==).Many equals() methods do run an '==' check first for efficiency (and I would recommend it if you're writing one yourself).
    Please someone elaborate on this and also tell me what role hashcode plays in this.The reason that it is good practise to override equals() and hashCode() together is to maintain consistency.
    Hashcodes are used by all Java collections that contain the word 'Hash' in their name, and may also be used by other programs that need a hash code for identification; so if you supply one, you must follow the rules (which you can find in the API for Object.equals() and Object.hashCode()).
    The main rule is this: *objects that are equal() must have equal hashcodes*.
    Note that the reverse is NOT true: objects that are not equal() do not have to have different hashcodes, but it is usually better if they do.
    There is quite a lot to know about hashcodes, and what makes a good one, so I suggest you follow dcminter's advice if you want to be a happy and prosperous Java programmer.
    Winston

  • Collection.equals

    The javadocs for collection.equals states
    "The general contract for the Object.equals method states that equals must be symmetric (in other words, a.equals(b) if and only if b.equals(a)). The contracts for List.equals and Set.equals state that lists are only equal to other lists, and sets to other sets. Thus, a custom equals method for a collection class that implements neither the List nor Set interface must return false when this collection is compared to any list or set. (By the same logic, it is not possible to write a class that correctly implements both the Set and List interfaces.) "
    Why not? Couldn't a class implement both List and Set and compare either way, depending on what kind of object it is being compared with?
    FYI I grumbled about equals before in a previous post
    http://forum.java.sun.com/thread.jspa?forumID=425&threadID=619976
    I was just working on something and came across a bug in my code because I was hashing something using an arrayList as a key, and I believed incorrectly that equals would be implemented the same way it is for arrays.
    It seems weird to me that Collection, List and Set require symmetry and transitivity between all classes implementing them, but CharSequence (an interface implemented by both String and StringBuffer, ala my other post) does not.
    CharSequence states:
    "This interface does not refine the general contracts of the equals and hashCode methods. The result of comparing two objects that implement CharSequence is therefore, in general, undefined. Each object may be implemented by a different class, and there is no guarantee that each class will be capable of testing its instances for equality with those of the other. It is therefore inappropriate to use arbitrary CharSequence instances as elements in a set or as keys in a map"
    Ok. So the guys working on Java have given us at least three or four different patterns to follow here: There are arrays which we know are only equal if they are the same array. There's the Object (general) implementation of equals in which we can count on objects of different classes being different. There's List and Set where all lists and sets are equal to other lists and set respectively, and there's the CharSequence pattern in which all bets are off.
    Wouldn't it be easier for people to learn and program in java if they could rely on one of these patterns without having to go through the javadocs with a fine toothed comb?

    No.
    Let's say you have a List, (L) a Set (S) and a
    List/Set (LS).
    You want both of the following to be able to be
    true:
    LS.equals(L)
    LS.equals(S)
    However, symmetry and transitivity combine to tell us
    that L.equals(S) and S.equals(L) must also return
    true.
    The contracts for List and Set require L.equals(S)
    and S.equals(L) to return false.
    Ah ok. Thanks for clearing that up for me. It seems kind of limiting to say that there could never be a collection that is both a list and a set, but I guess it wouldn't be too hard to work around.
    Object and arrays use the same equals method--only
    returns true if the references are equal.Yes, I meant Object in the general sense, not the Object class itself. So things like Integer(5) can be equal to another Integer, but never to a Float.
    There's List and Set where all lists and
    sets are equal to other lists and setrespectively,
    No. Any List can be equal to any other List,
    and any Set can be equal to any other Set. In
    both cases, it depends on what elements the
    collection contains.Right, sorry that's what I meant to say.
    It makes sense that List and Set define equals the
    way they do. Since Lists are ordered, it makes sense
    that the order should matter in determining equality.
    Since Sets are not ordered, it would not make
    sense to use order in determining equality.Naturally. But it might also make sense just to say that lists and sets are only equal to themselves.
    and there's the CharSequence pattern in which all
    bets are off.There's nothing special about CharSequence. It's just
    another interface that doesn't define a specific
    equals implementation.Yes. What I was trying to get at is that while in general objects (such as subclasses of Number) are only be equal to objects of the same class, and lists and sets must be equal to other lists and sets, respectively, that CharSequence says that some subclasses MAY be comparable using equals.
    However, ease of learning is not the one and only
    supreme driving force behind the design of the
    language and the APIs.Acknoledged. What I mean is that with equals following all these different patterns, it is easy to make a mistake that goes unnoticed until software is in the hands of the clients.
    Rather than trying to cram equals (or anything else)
    into a fixed set of pigeonholes, you'd be better
    served to try to undertand the fundamental purpose
    behind it and what kinds of factors go into deciding
    what the appropriate implementation is in a given
    situation.Ok. What is the fundamental purpose behind equals? Not trying to be hostile here, I'm just curious. I know that one of the biggest factors is with collections and such questions as hashing and contains. Another big one is String.equals(...) to compare strings. Are there any others?
    I'm just trying to figure out how it might be possible to make equals() more opaque in future languages, so that people can read the basic definition of equals given in Object and know how it is used and how to use it. If you think that it is already clear and easy to use, consider that using FindBugs (google for FindBugs if you are interested) I found a bug in the java source in ChoiceFormat that has existed since ChoiceFormat's inception in Java 1.1 in which it calls equals between a StringBuffer and a String. If the people working on designing Java can make these mistakes, what hope have the rest of us?

  • Custom equality comparison

    Hi All,
    I have an Object lets say its named "Bomb".Bomb has two member variables x and y both Strings.
    public class Bomb {
    String x;
    Stirng y;
    I have a HashMap that holds these Bomb objects as keys , and values as some other objects.
    HashMap
    | Bomb | some object |
    In the class Bomb, either the value of x, or the value of y can be null, but not both.
    The HashMap is populated with Bomb objects that have non-null values for both x and y.
    How do i implement the equals and hashCode() for the Bomb Object so that I can lookup the value within the HashMap using a Bomb object that has only one of x or y that is non-null.
    For instance, in the HashMap , I cd have a Bomb object whose x="hello" and y="world", and i lookup with a Bomb object whose x is null and y = "world", i shd be able to get the value within the HashMap. Similar is the case where x is not null and y is null.
    any clues ?

    This sounds like a very bad idea.
    If you have {"Hello", "world"} in the map, you want be able to find it with {"Hello", null} and also with {null, "world"} right?
    This means that {"Hello", "world"} must equal {"Hello", null} and {"Hello", "world"} must also equal {null, "world"}.
    But this means that {"Hello", null} and also with {null, "world"}.
    Also, {"Hello", "booger"} would be equal to {"Hello", null}, and therefore {"Hello", "booger"} would be equal to {"Hello", "world"} and to {null, "world"}.
    I'd suggest you create two maps. One would have a Comparator that compares just the first field, and one would have a comparator that compares just the second field.

  • How to create Web Service based on PI WSDL message

    Hi all,
    we have following scenario:
    Within PI (version 7.1) we set up a message type and inbound service interface. This service interface should send the PI message to a web service running on a SAP J2EE (version 7.01). As the PI message is sent as WSDL I thought it should be easy to build a web service on the SAP J2EE based on this WSDL from PI.
    Unfortunately, I have problems creating the Web Service.
    For my current project we integrated the NWDI to the SAP NetWeaver Developer Studio and I'm required to add the Web Service to an existing DC (Development Component) within the NWDI.
    What I tried so far is:
    - I created a Deployable Proxy Project and within this I created a Client Proxy Definition based on the WSDL from the PI. But I can't add this Proxy to the DCs of the NWDI and I don't know how to implement my own coding here in order execute specific functions.
    - I created a new class within the NWDI DC and a public method. Based on this I created a Virtual Interface and a Web Service Definition (WSD). Then I added this to a Web Service Deployment Descriptor. I uploaded this to the SAP J2EE. But I'm not able to access this and I don't know hoe to assign the WSDL here.
    I also tried here to create a client proxy based on this WSD as I thought I might assign the WSDL here. But I don't see the WSD in the list of Web Services uploaded to the SAP J2EE...
    Can you please advice me how to create a Web Service in such an environment?
    regards
    René Jurmann

    Hi Tahir,
    sorry that you needed to wait this long - but this is how I created the web service:
    The steps on how to create the web service in NetWeaver Developer studio are nearly the same as described in the blog http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/5838. [original link is broken] [original link is broken] [original link is broken]
    Some steps I just skipped and some others I added. Some of the steps I did the way I described it as I needed to connect the web service with the SAP PI.
    Prerequisites:
    Add Java Perspective and J2EE Development Perspective to the open perspectives.
    Within "Window - Preferences - Web Services" check "Soap extensions visible in the virtual interface editor"
    The SDM of the corresponding SAP J2EE is configured within "Window - Preferences"
    Create a Development Component (DC) with type "J2EE -> EJB Module"
    The business logic of the web service will be implemented in an Enterprise Java Bean (EJB). So first the EJB component must be created:
         Choose "File -> New -> Other"
         In opening PopUp choose "Development Component -> Development Component Project"
         Select the Software Component for which you want to add the DC (e.g. "Local Development -> MyComponents")
         Choose now vendor, name and type:
              vendor is an alpha-numeric string of 20 characters starting with a letter - all in lower case
              name is an alpha-numeric string starting with a letter - all in lower case
              vendor and name concatenated must not be longer then 40 characters
              the name can be separated into different part using "/" as separator
              each part of the name must not be longer than 8 characters
              the type is "J2EE - EJB Module"
              you can specify a Caption as general description for the web service
    Create new EJB
    To create the EJB itself:
         In J2EE DC Explorer of J2EE Development Perspective expand new DC and right-click on folder "ejbModule"
         Choose "New - EJB" with following details:
              EJB Name: <name as for PI service Interface to be created - starting in upper case>
              EJB Project: <pre selected>
              Bean Type: Stateless Session Bean
              Default EJB Package: <corresponds to namespace in PI>
              generate default interfaces: Checked
    Regarding the "Default EJB Package" this should be created according the namespace in PI for which all PI objects will be created. This only applies if you have some naming conventions here.
    Example:
    Namespace in PI is:  http://company.net/pi/SOFTWARE_COMP/Application
    The corresponding package then is: net.company.pi.software_comp.application
    Implement coding for web service
    As the web service will be called via PI some transfer variables will be submitted. Most likely, those variables will not be standard type (e.g. String) but a complex type. Those types must be generated as Java classes. Below an example of a complex type I needed:
    Data Type
    net.company.pi.software_comp.application.types.MessageProcessingInformation
    Structure:
         Element name          Element type
         sendingSystemID          String
         interfaceID               String
         businessProcessVariantCode     String
         testIndicator               Boolean
    For every element described a public "get", "set" and "has" method must be created in the corresponding Java class:
    package net.company.pi.software_comp.application.types;
    import java.io.Serializable;
    public class MessageProcessingInformation implements Serializable {
         protected String sendingSystemID;
         protected String interfaceID;
         protected String businessProcessVariantCode;
         protected Boolean testIndicator;
         public String getSendingSystemID() {
              return sendingSystemID;
         public void setSendingSystemID(String value) {
              this.sendingSystemID = value;
         public boolean hasSendingSystemID() {
              if(sendingSystemID != null && !sendingSystemID.equals("")){
                   return true;
              return false;
    All Java classes representing complex types and all classes referenced here (used for sub-types) must implement java.io.Serializable. Java standard types which do not implement this class must not be used as sub-types.
    As soon as all data types are declared the real business logic can be implemented:
         In J2EE DC Explorer of J2EE Development Perspective expand DC - "ejb-jar.xml" - <Name> and double click on "ejbCreate"
         In detail view select folder "Business Methods" and click "Add"
         choose name of business method - this should be the same as the PI message type used for the service interface - starting lower case
         return type should be "void"
         add needed parameters fully qualified - including package (as specified in PI and created previously in DC)
         you can mark certain parameters as array if necessary
    Remark:
    It might be that after saving you get an error. This might be as the package name of one component is copied to the corresponding Java class at the very beginning (before the package declaration within the Java class). Simply delete the string here.
    It also might be, that the new business method is only defined in the remote interface class but not in the bean class. Just create an according method in the bean class.
    Within the newly created business method within the bean class you can now implement the business logic.
    Create a DC with type "J2EE -> Enterprise Application"
    In order to create the "real" web service and deploy it to the J2EE an Enterprise Application project has to be created. So create a new DC as for the EJB Module but choose as type "J2EE -> Enterprise Application".
    After the DC is created right click on the EJB DC and choose "Add to EAR Project". Choose the new DC.
    Create web service for EJB
    As soon as you implemented the business logic you can create the "real" web service. Therefore:
         Right click on the EJB name below "ejb-jar.xml"
         Choose "New - Web Service"
         Choose proper "Web Service Name" and "Configuration Name" (probably oriented at the EJB name)
         Copy the URL of the web service - you'll need it later for PI configuration
         on the second next screen use the same name for "Virtual Interface" and "Web Service Definition" (the name should be the name of the "Endpoint")
         the "EAR Project" should be preselected
    Unfortunately, the web service can't be used in its current configuration to be accessed by PI. Therefore the Virtual Interface must be changed. To do so, expand folder "Virtual Interfaces" and double click the virtual interface created.
    Within the detail view expand in tabs "Mapping" and "Types" the complete folder structure. For any "SOAP Extension" where a namespace can be defined use as namespace the corresponding namespace in PI (e.g. http://corpintra.net/pi/CBFC_GLOBAL_SAP_APPL/BillerDirect) but do not change any "Soap Extension" of a standard Java type. (if you don't have any naming convetions for namespaces in PI you can leave the SOAP Extension here. But then the namespace in PI should be set accordingly.)
    Probably it can be necessary on top level "Soap Extensions" in tab "Mapping" to leave "Use Namespaces for Parameters" unchecked. For some of my web services this parameter must be checked for others not - just try.
    If you can define a "New Name", "Local Name" or "Item Label" for a Soap Extension then use a name with starting upper case letter. (For Java Naming conventions most of the data type names will start with lower case letters.) Especially the method name must be renamed this way in order to stick to the PI namings.
    As a last point to change here check in tab "Mapping" all "Incoming Parameters" which you specified as array. Use for those as "New Name" a different name - do not just simply change from lower case to upper case. This is necessary as on PI we need to create two levels although here only one is specified.
    For any own sub-type declared as array the name within the coding should also differ from the corresponding Java Class name the type refers to.
    If all this is done you can deploy the web service to the J2EE:
         right click on "Enterprise Application" DC and choose "Development Component - Build..." and build all corresponding components
         right click on "Enterprise Application" DC and choose "Development Component - Deploy"
    Test the new web service via <J2EE URL>/wsnavigator/enterwsdl.html
    Create PI interface
    After the web service is created successfully the PI integration can be started.
    Therefore, within the Enterprise Services Builder create a data type according to the web service definition. All components defined on top-level for this data type should be declared as incoming parameter for the web service business method. Therefore it could be necessary to create some sub data types on PI first and add those to the "master" data type.
    Ensure that the names of the components correspond to the names defined in the web service (see virtual interface here). Those names must exactly be the same - including lower/upper case. Also take care for the ordering of the components.
    In case you need to include arrays following applies:
    The upper level is of occurrence "1:1". This has only one sub-entry with occurrence "1:n". The names for upper and sub-level must not equal.
    Based on the data type a message type is created. The name of the message type must be exactly the same as the name of the web service business method. (Hint: the name of the web service business method was most likely changed in the virtual interface. Then this name must correspond to the message type name.) Based on the message type an asynchronous inbound interface is to be created (which will be referred in the Integration Directory). The operation name for this interface (left panel) should be the same as the name for the web service business method.
    Create PI mappings and routings
    How to map (message mapping and operation mapping) from source to the web service message I wont explain here as this depends on the source message. The only important things here are:
         When creating the SOAP communication channel within the Integration Builder the "Target URL" is:
              <J2EE URL>/<Access URL as specified in web service creation>?wsdl&style=document
         The soap action is the name of the web service business method.
         Most likely the web service needs authentication to be executed.

  • UCM-VCR Adapter in WLP error while publishing content-config.xml changes

    Hi,
    I am getting this error when i publish my changes to server for UCM-VCR Adapter in WLP 10.3.2.
    weblogic.application.ModuleException: Error reading descriptor: META-INF/content
    -config.xml for app module ucmEAR
    at weblogic.application.config.DefaultModule.parseDescriptorBean(Default
    Module.java:483)
    at weblogic.application.config.DefaultModule.prepare(DefaultModule.java:
    282)
    at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(Modu
    leListenerInvoker.java:199)
    at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(Depl
    oymentCallbackFlow.java:391)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD
    river.java:83)
    Truncated. see log file for complete stacktrace
    Caused By: weblogic.descriptor.BeanAlreadyExistsException: Bean already exists:
    "com.bea.content.config.RepositoryPropertyBeanImpl@d0b61789(/[UCMRepository]/Rep
    ositoryProperties[ContentServerAdminUser])"
    at weblogic.descriptor.internal.ReferenceManager.registerBean(ReferenceM
    anager.java:227)
    at com.bea.content.config.ContentStoreBeanImpl.setRepositoryProperties(U
    nknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    Truncated. see log file for complete stacktrace
    >
    i also add oracle-ucm-spi-app-lib.ear in weblogic-application.xml's WebLogic Shared Library.
    please find the related files.
    content-config.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <content-config xmlns="http://www.bea.com/ns/portal/90/content-config">
    <!-- This is a default content repository applications can use.
    The IDE should copy this to META-INF/content-config.xml of the
    application.
    This repository is not required for WLP services, so you can remove
    it or change it as needed. -->
    <content-store>
              <name>UCMRepository</name>
              <class-name>com.oracle.content.spi.ucm.RepositoryImpl
              </class-name>
              <username>wlpApp</username>
              <repository-property>
                   <description>Hostname on which the UCM Content Server is running
              </description>
                   <name>ContentServerHostname</name>
                   <value>172.23.210.16</value>
              </repository-property>
              <repository-property>
                   <description>Port on which the UCM Content Server is running (on host named above)
                   </description>
                   <name>ContentServerPort</name>
                   <value>4444</value>
              </repository-property>
              <repository-property>
                   <description>Content Server uname in Admin role, for
                   security checks
                   </description>
                   <name>ContentServerAdminUser</name>
                   <value>sysadmin</value>
              </repository-property>
              <repository-property>
                   <description>List of folder ObjectClasses</description>
                   <name>folder_badge_objectClasses</name>
                   <value>IDC:Folder</value>
              </repository-property>
              <repository-property>
                   <description>Single user for all type related interactions
                   </description>
                   <name>TypeRetrievalShapeUser</name>
                   <value>typeShapeUser</value>
              </repository-property>
              <repository-property>
                   <name>useNativeSecurity</name>
                   <value>false</value>
              </repository-property>
              <repository-property>
                   <description>Protocol used to connect with the UCM Server.
                                  Valid
                                  options are INTRADOC or INTRADOC_SSL. INTRADOC is the
                                  default.
                   </description>
                   <name>ContentServerServiceType</name>
                   <value>INTRADOC</value>
              </repository-property>
              <repository-property>
                   <description>Content Server Username in Admin role, used
                   for security
                   checks
                   </description>
                   <name>ContentServerAdminUser</name>
                   <value>sysadmin</value>
              </repository-property>
              <repository-property>
                   <description>Polling interval for the
                   CacheInvalidator IntervalJob
                   (must be equal to or greater than 2 min)
                   </description>
                   <name>CacheInvalidationInterval</name>
                   <value>2</value>
              </repository-property>
              <repository-property>
                   <description>Location on the filesystem of the
                   client SSL keystore
                   file. Only used when ContentServerServiceType
                   is INTRADOC_SSL
                   </description>
                   <name>ContentServerSSLKeystoreFile</name>
                   <value>c:/client_keystore</value>
              </repository-property>
              <repository-property>
                   <description>SSL keystore password. Only used when
                   ContentServerServiceType is INTRADOC_SSL
                   </description>
                   <name>ContentServerSSLKeystorePassword</name>
                   <value>idcidc</value>
              </repository-property>
              <repository-property>
                   <description>SSL keystore alias name. Only used when
                   ContentServerServiceType is INTRADOC_SSL
                   </description>
                   <name>ContentServerSSLKeystoreAlias</name>
                   <value>SecureClient</value>
              </repository-property>
              <repository-property>
                   <description>SSL keystore alias password. Only used when
                   ContentServerServiceType is INTRADOC_SSL
                   </description>
                   <name>ContentServerSSLKeystoreAliasPassword</name>
                   <value>idcidc</value>
              </repository-property>
              <read-only>true</read-only>
              <binary-cache-max-entry-size>102400</binary-cache-max-entry-size>
              <!-- metadata search -->
              <search-is-enabled>true</search-is-enabled>
              <!-- full text search -->
              <fulltext-search-is-enabled>true</fulltext-search-is-enabled>
              <search-indexing-is-enabled>false</search-indexing-is-enabled>
         </content-store>
    </content-config>
    p13n-cache-config.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <p13n-cache-config xmlns="http://www.bea.com/ns/p13n/90/p13n-cache-config">
         <!--
              This is the caches for the default content repository. The IDE should
              copy this to META-INF/p13n-cache-config.xml of the application. These
              caches are for the default WLP Repository. You can modify these to fit
              your needs. If you remove the WLP Repository, you can remove these
              entries.
         -->
         <cache>
              <name>nodeCache.UCMRepository</name>
              <description>Caches node id to node instance for UCMRepository</description>
              <time-to-live>60000</time-to-live>
              <max-entries>50</max-entries>
         </cache>
         <cache>
              <name>nodePathCache.UCMRepository</name>
              <description>Caches node path to node instance for UCMRepository</description>
              <time-to-live>60000</time-to-live>
              <max-entries>50</max-entries>
         </cache>
         <cache>
              <name>typeCache.UCMRepository</name>
              <description>Caches binary property values for UCMRepository</description>
              <time-to-live>300000</time-to-live>
              <max-entries>200</max-entries>
         </cache>
         <cache>
              <name>typeNameCache.UCMRepository</name>
              <description>Caches type id to content type for UCMRepository</description>
              <time-to-live>300000</time-to-live>
              <max-entries>200</max-entries>
         </cache>
         <cache>
              <name>binaryCache.UCMRepository</name>
              <description>Caches type name to content type for UCMRepository</description>
              <time-to-live>60000</time-to-live>
              <max-entries>10</max-entries>
         </cache>
         <cache>
              <name>searchCache.UCMRepository</name>
              <description>Caches node id to node for UCMRepository</description>
              <time-to-live>300000</time-to-live>
              <max-entries>200</max-entries>
         </cache>
         <cache>
              <name>nativeAuthCacheUCMRepository</name>
              <description>Caches node path to node for UCMRepository</description>
              <time-to-live>5000</time-to-live>
              <max-entries>5000</max-entries>
         </cache>
         <cache>
              <name>repo.ucm.typeNameCache.UCMRepository</name>
              <description>Caches node id to node instance for UCMRepository</description>
              <time-to-live>1800000</time-to-live>
              <max-entries>5000</max-entries>
         </cache>
         <cache>
              <name>repo.ucm.nodePathToUidCache.UCMRepository</name>
              <description>Caches node id to node instance for UCMRepository</description>
              <time-to-live>1800000</time-to-live>
              <max-entries>5000</max-entries>
         </cache>
         <cache>
              <name>repo.ucm.nodeUidCache.UCMRepository</name>
              <description>Caches node id to node instance for UCMRepository</description>
              <time-to-live>1800000</time-to-live>
              <max-entries>5000</max-entries>
         </cache>
         <cache>
              <name>repo.ucm.securityInfoCache.UCMRepository</name>
              <description>Caches node id to node instance for UCMRepository</description>
              <time-to-live>1800000</time-to-live>
              <max-entries>5000</max-entries>
         </cache>
         <cache>
              <name>repo.ucm.typeNamesCache.UCMRepository</name>
              <description>Caches node id to node instance for UCMRepository</description>
              <time-to-live>1800000</time-to-live>
              <max-entries>5000</max-entries>
         </cache>
         <cache>
              <name>repo.ucm.indexedFieldsCache.UCMRepository</name>
              <description>Caches node id to node instance for UCMRepository</description>
              <time-to-live>1800000</time-to-live>
              <max-entries>5000</max-entries>
         </cache>
    </p13n-cache-config>

    Hi Venu,
    Normally if you can see the UCM content in the admin console, it means the adapter is configured correctly and the placeholder should work. There's a couple of things I can suggest:
    1. Did you include the oracle-ucm-spi-app-lib.ear file in your project as documented under the heading Add a Reference to the UCM VCR Adapter Shared Library in the UCM VCR adapter installation docs ( [http://download.oracle.com/docs/cd/E13155_01/wlp/docs103/ucm_adapter/install.html|http://download.oracle.com/docs/cd/E13155_01/wlp/docs103/ucm_adapter/install.html] )?
    2. Browse to a document in the repository in the admin console. Pick one of the fields there (e.g. IDC:Folder.dDocId), grab the value and run a query using the placeholder. Do you get a single result?
    3. The original poster (user8867138) mentions a query along the lines of returning all folders that has dDocAuthor = sysadmin. If your UCM system had 10,000 folders all created by sysadmin, the adapter might be timing out? IIRC, you can adjust the timeout in UCM.
    4. Did you try a similar query using Content Selector instead?
    5. If the WLP server domain is running on a separate machine, is UCM configured to accept connections from the WLP server but not your machine?
    I would suggest getting the latest patches for WLP too as some of them are related to the UCM VCR adapter.
    Cheers,
    Cappa

  • Creation of routing using BAPI_ROUTING_CREATE

    Hi,
    I need to create routing using BAPI. I am using BAPI_ROUTING_CREATE. My routing is not saved. I am using BAPI_TRANSACTION_COMMIT  also when message type is 'S', after Routing is created. But Still my routing is not saved. I can see successfull message as N/50003801/01 is created .
    I already spent lot of time on this, and gone thru coding available in google search, still no use. I debug BAPI couple if timings but didnot find anything.
    I even tried using SE37 directly by Sequence execution of both BAPI_ROUTING_CREATE & BAPI_TRANSACTION_COMMIT, no use. i tried different combinations like by giving input values to INPUT PARAMETERS OF BAPI_ROUTING_CREATE giving BOM usage, without BOM usage, TESTRUN value as 'X' and as SPACE.
    I even gone thru this Func. Module /SAPMP/BAPI_ROUTING_PROCESS which directly calls BAPI_ROUTING_CREATE inside it, but no use. I see many people is giving solution as BAPI_TRANSACTION_COMMIT, but I really think that is not problem.
    Does any one have any idea on this issue.
    Thanks in Advance

    Hi Cthota,
    Indeed, TESTRUN must be equal to space. And BAPI_TRANSACTION_COMMIT is needed, as stated in the doc's.
    Could you please check all messages in RETURN table? Very likely there is something not correct in the parameters, that do not prevent the system to assign routing numbering, but that may affect saving.
    Just let us known...
    Bye,
    flavio

  • Diff between gui_upload &? ws_upload

    can any one tell me what is the difference between gui_upload and ws_upload.

    Hi harish
    WS_UPLOAD function module is now obsolete
    from 4.7 ,gui_upload is used., this supports OOPs.
    check this
    WS_UPLOAD and WS_DOWNLOAD, the function modules used until now are not part of the standard set of ABAP commands. They are used to display the file interface on the presentation server. WS_UPLOAD and WS_DOWNLOAD are not compatible with USs and have been replaced by GUI_UPLOAD and GUI_DOWNLOAD.
    The new function modules, GUI_UPLOAD and GUI_DOWNLOAD, have an interface that also allows you to write Unicode format to the local hard drive.
    Instead of using the function modules, you can use the static methods GUI_UPLOAD and GUI_DOWNLOAD of the global class CL_GUI_FRONTEND_SERVICES.
    These classes are used to convert ABAP data from the system format to external formats and vice versa. During this conversion process, character-type data may be converted to another character set, while numeric-type data may be converted to another byte order (or endian format). You must use a container of type X or XSTRING for data in an external format.
    Character sets and endian formats are also converted by the file interface (OPEN DATASET with new additions), RFCs, and the function modules GUI_DOWNLOAD and GUI_UPLOAD. The classes described below are available for those special cases where the possibilities offered by conversion are insufficient. Since these classes work with containers of types X and XSTRING, these containers can be copied unconverted by the file interface (OPEN DATASET with new additions), RFCs, and the function modules GUI_DOWNLOAD and GUI_UPLOAD. These classes replace the following two statements:
    TRANSLATE c ...FROM CODE PAGE     g1 ... TO CODE PAGE     g2
    TRANSLATE f ...FROM NUMBER FORMAT n1 ... TO NUMBER FORMAT n2
    For a detailed description, see the class documentation in the Class Builder. The following classes are available:
    CL_ABAP_CONV_IN_CE
    Reads data from a container and converts it to the system format. You can also fill structures with data.
    CL_ABAP_CONV_OUT_CE
    Converts data from the system format to an external format and writes it to a container.
    CL_ABAP_CONV_X2X_CE
    Converts data from one external format to another.
    These classes are used to convert ABAP data from the system format to external formats and vice versa. During this conversion process, character-type data may be converted to another character set, while numeric-type data may be converted to another byte order (or endian format). You must use a container of type X or XSTRING for data in an external format.
    Character sets and endian formats are also converted by the file interface (OPEN DATASET with new additions), RFCs, and the function modules GUI_DOWNLOAD and GUI_UPLOAD. The classes described below are available for those special cases where the possibilities offered by conversion are insufficient. Since these classes work with containers of types X and XSTRING, these containers can be copied unconverted by the file interface (OPEN DATASET with new additions), RFCs, and the function modules GUI_DOWNLOAD and GUI_UPLOAD. These classes replace the following two statements:
    TRANSLATE c ...FROM CODE PAGE     g1 ... TO CODE PAGE     g2
    TRANSLATE f ...FROM NUMBER FORMAT n1 ... TO NUMBER FORMAT n2
    For a detailed description, see the class documentation in the Class Builder. The following classes are available:
    CL_ABAP_CONV_IN_CE
    Reads data from a container and converts it to the system format. You can also fill structures with data.
    CL_ABAP_CONV_OUT_CE
    Converts data from the system format to an external format and writes it to a container.
    CL_ABAP_CONV_X2X_CE
    Converts data from one external format to another.
    Minimal demo report for Virus Scan Interface.
    For a functionally more complete example see report RSVSCANTEST.
    REPORT zvscandemo.
    Selection screen
    PARAMETERS:
      profile TYPE vscan_prof-profile,
      file    TYPE localfile.
    Events
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR file.
      PERFORM file_f4.
    START-OF-SELECTION.
      PERFORM main.
    Main program
    FORM main.
      IF file IS INITIAL.
        MESSAGE s058(vscan) DISPLAY LIKE 'E'.
        EXIT.           " =================== EXIT =====================
      ENDIF.
    Access file and create XSTRING
      TYPES:
        ty_xline(1024) TYPE x.
      DATA:
        lf_file       TYPE string,
        lf_filelength TYPE i,
        lt_datatab    TYPE STANDARD TABLE OF ty_xline.
      lf_file = file.
      CALL METHOD cl_gui_frontend_services=>gui_upload
        EXPORTING
          filename                = lf_file
          filetype                = 'BIN'
        IMPORTING
          filelength              = lf_filelength
        CHANGING
          data_tab                = lt_datatab
        EXCEPTIONS
          OTHERS                  = 1.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
                     DISPLAY LIKE 'E'
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          EXIT.           " =================== EXIT =====================
        ENDIF.
    Recombine binary data
      DATA:
        lf_tabline TYPE ty_xline,
        lf_data    TYPE xstring.
      LOOP AT lt_datatab INTO lf_tabline.
        CONCATENATE
            lf_data
            lf_tabline
          INTO
            lf_data
          IN BYTE MODE.
      ENDLOOP.
      lf_data = lf_data(lf_filelength).
    Get scanner instance
      DATA:
        lo_vsi TYPE REF TO cl_vsi.
      CALL METHOD cl_vsi=>get_instance
        EXPORTING
          if_profile          = profile
        IMPORTING
          eo_instance         = lo_vsi
        EXCEPTIONS
          configuration_error = 1
          profile_not_active  = 2
          internal_error      = 3
          OTHERS              = 4.
      CASE sy-subrc.
      No error.
        WHEN 0.
          " Nothing to do
      Profile not active. For this report, this is an information message.
        WHEN 2.
          MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
                     DISPLAY LIKE 'I'
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          EXIT.            " =================== EXIT =====================
      All other exceptions are issued as errors.
        WHEN OTHERS.
          MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
                     DISPLAY LIKE 'E'
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          EXIT.            " =================== EXIT =====================
      ENDCASE.
    Perform virus scan
      DATA:
        lf_scanrc    TYPE vscan_scanrc.
      CALL METHOD lo_vsi->scan_bytes
        EXPORTING
          if_data             = lf_data
        IMPORTING
          ef_scanrc           = lf_scanrc
        EXCEPTIONS
          not_available       = 1
          configuration_error = 2
          internal_error      = 3
          OTHERS              = 4.
    All exceptions here are errors
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
                   DISPLAY LIKE 'E'
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        EXIT.            " =================== EXIT =====================
      ENDIF.
    Print return code and text
      DATA:
        lf_text TYPE string.
      lf_text = cl_vsi=>get_scanrc_text( lf_scanrc ).
      WRITE: / 'Result of virus scan: ', lf_scanrc, '(', lf_text, ')'.
      IF lf_scanrc = cl_vsi=>con_scanrc_ok.
        WRITE: / 'File is clean'.
      ELSE.
        WRITE: / 'File was either infected',
                 'or could not be scanned',
                 'or was ignored'.
                 'Or another problem occurred'.
      ENDIF.
    ENDFORM.
    F4-help for filename
    FORM file_f4.
      DATA:
        lt_filetable TYPE filetable,
        lf_rc        TYPE i.
      CALL METHOD cl_gui_frontend_services=>file_open_dialog
        EXPORTING
          multiselection          = abap_false
        CHANGING
          file_table              = lt_filetable
          rc                      = lf_rc
        EXCEPTIONS
          file_open_dialog_failed = 1
          cntl_error              = 2
          error_no_gui            = 3
          not_supported_by_gui    = 4
          OTHERS                  = 5.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
                   DISPLAY LIKE 'E'
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        EXIT.
      ENDIF.
    Number of selected filed must be equal to one.
      CHECK lf_rc = 1.
    Access selected file
      DATA:
        ls_file TYPE file_table.
      READ TABLE lt_filetable INTO ls_file INDEX 1.
      CHECK sy-subrc = 0.
      file = ls_file-filename.
    ENDFORM.

  • Error in ABAP report  Z_SAP_HR_LDAP

    Hi All,
    I am Getting Syntax error ( Field "'E'" is unknown. it is neither one of specified table nor defined by DATA statement. While executing report mentioned below which uses logical database.
    *& Report  ZSAPHRDATA                                                  *
    REPORT Z_SAP_HR_LDAP USING DATABASE PNP.
    DATA: PLVAR LIKE OBJEC-PLVAR,
    OBJID LIKE HROBJECT-OBJID,
    KEYDA LIKE PLOG-BEGDA,
    P_OBJECTS LIKE HROBJECT OCCURS 0,
    P_OBJECTS_WA LIKE HROBJECT,
    S_OBJECTS LIKE HROBJECT OCCURS 0,
    S_OBJECTS_WA LIKE HROBJECT,
    I1001_ITAB LIKE P1001 OCCURS 0 WITH HEADER LINE,
    I1001_ITAB2 LIKE P1001 OCCURS 0 WITH HEADER LINE,
    LDAPDESTINATION LIKE LDA_TYPES-LDAPDESTINATION,
    LDAPSERVER LIKE LDA_TYPES-LDAPSERVER,
    ldapinitialrun like lda_types-flag,
    LOGSYS LIKE TBDLS-LOGSYS,
    ERRORS LIKE BAPIRET2 OCCURS 0,
    ERRORS_WA LIKE BAPIRET2.
    DATA: mid TYPE sy-msgid VALUE 'LDAPSYNC',
    mtype TYPE sy-msgty VALUE 'I',
    num TYPE sy-msgno.
    structure for short ldap-attributes
    fieldnames must be equal to basis structure LDA_ATTR_L (for RFC-call)
    TYPES: BEGIN OF TS_LDAP_ATTR_L,
    PERNR LIKE LDA_ATTR_L-PERNR,
    ATTR_TAB LIKE LDA_ATTR_L-ATTR_TAB,
    ATTR_FIELD LIKE LDA_ATTR_L-ATTR_FIELD,
    VALUE LIKE LDA_ATTR_L-VALUE,
    END OF TS_LDAP_ATTR_L.
    data: attributes type ts_ldap_attr_l occurs 0,
    attributes_wa type ts_ldap_attr_l.
    infotypes: 0001, 0002.
    tables: pernr, rfcdes.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETERS: P_TEST default 'X' AS CHECKBOX.
    SELECTION-SCREEN END OF BLOCK B1.
    Parameters: LDAPSRV Default 'SAPHRLDAP' LIKE LDA_TYPES-LDAPSERVER,
    LDAPDEST Default 'LDAPDEST' LIKE rfcdes-rfcdest.
    at selection-screen.
    clear: p_objects[], s_objects[], attributes[].
    CALL FUNCTION 'RH_GET_PLVAR'
    IMPORTING
    PLVAR = PLVAR
    EXCEPTIONS
    no_plvar = 1
    OTHERS = 2.
    if sy-subrc <> 0.
    MESSAGE E015(HRLDAP).
    endif.
    KEYDA = sy-datum.
    get pernr.
    rp-provide-from-last p0001 space keyda keyda.
    rp-provide-from-last p0002 space keyda keyda.
    ATTRIBUTES_WA-PERNR = p0001-pernr.
    lastname
    attributes_wa-attr_tab = 'EMPLOYEE'.
    attributes_wa-attr_field = 'LASTNAME'.
    attributes_wa-value = p0002-nachn.
    append attributes_wa to attributes.
    firstname
    attributes_wa-attr_tab = 'EMPLOYEE'.
    attributes_wa-attr_field = 'FIRSTNAME'.
    attributes_wa-value = p0002-vorna.
    append attributes_wa to attributes.
    sAMAccountName
    attributes_wa-attr_tab = 'EMPLOYEE'.
    attributes_wa-attr_field = 'SAMACCOUNTNAME'.
    Using the employee number a unique name is created
    for the sAMAccountName
    concatenate ‘E’ p0001-pernr into attributes_wa-value.
    append attributes_wa to attributes.
    other attributes have to added here.
    for each additional attribute an appropriate field
    has to defined in the structure EMPLOYEE
    for example you can choose the following:
    attributes_wa-attr_tab = 'EMPLOYEE'.
    attributes_wa-attr_field = 'TELEPHONE'.
    if you want to transfer the telephone number
    of an employee from SAP HR to Active Directory
    In the web Application Server an appropriate mapping
    has to be defined using transaction LDAP for each new
    attribute (here called TELEPHONE).
    end-of-selection.
    get own logical system
    CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'
    IMPORTING
    OWN_LOGICAL_SYSTEM = LOGSYS
    EXCEPTIONS
    OWN_LOGICAL_SYSTEM_NOT_DEFINED = 1
    OTHERS = 2.
    IF SY-SUBRC NE 0.
    TODO: Komprimierung sy-mandt: 3 -> 2 Stellen !!!
    CONCATENATE SY-SYSID SY-MANDT INTO LOGSYS.
    ENDIF.
    loop at attributes into attributes_wa.
    write: / ATTRIBUTES_WA-PERNR , attributes_wa-attr_tab.
    write: attributes_wa-attr_field ,attributes_wa-value.
    endloop.
    IF P_TEST = 'X'.
    EXIT.
    ENDIF.
    send attributes to ldap client
    send attributes
    CALL FUNCTION 'SPLDAP_RECEIVE_ATTRIBUTES'
    DESTINATION LDAPDEST
    EXPORTING
    LOGSYS = LOGSYS
    SERVERID = LDAPSRV
    ATTRIBUTES_S = attributes[]
    INITIAL_RUN = LDAPINITIALRUN
    ATTRIBUTES_L = attributes[]
    ATTRIBUTES_X = TOTAL_ATTRS_X[].
    IMPORTING
    RETURN = ERRORS[].
    IF NOT ERRORS[] IS INITIAL.
    READ TABLE ERRORS INDEX 1 INTO ERRORS_WA.
    MESSAGE ID mid TYPE mtype
    NUMBER ERRORS_WA-NUMBER
    WITH ERRORS_WA-MESSAGE_V1 ERRORS_WA-MESSAGE_V2
    ERRORS_WA-MESSAGE_V3 ERRORS_WA-MESSAGE_V4.
    endif.

    this looks strange ,
    I copied to my system and tried , first i got the error what u had got ,
    then i just removed <b>'E'</b> in the concatenate statement and added again , now it works , do the same and try ur luck
    copy paste this and try
    *& Report ZSAPHRDATA *
    REPORT Z_SAP_HR_LDAP USING DATABASE PNP.
    DATA: PLVAR LIKE OBJEC-PLVAR,
    OBJID LIKE HROBJECT-OBJID,
    KEYDA LIKE PLOG-BEGDA,
    P_OBJECTS LIKE HROBJECT OCCURS 0,
    P_OBJECTS_WA LIKE HROBJECT,
    S_OBJECTS LIKE HROBJECT OCCURS 0,
    S_OBJECTS_WA LIKE HROBJECT,
    I1001_ITAB LIKE P1001 OCCURS 0 WITH HEADER LINE,
    I1001_ITAB2 LIKE P1001 OCCURS 0 WITH HEADER LINE,
    * LDAPDESTINATION LIKE LDA_TYPES-LDAPDESTINATION,
    * LDAPSERVER LIKE LDA_TYPES-LDAPSERVER,
    ldapinitialrun like lda_types-flag,
    LOGSYS LIKE TBDLS-LOGSYS,
    ERRORS LIKE BAPIRET2 OCCURS 0,
    ERRORS_WA LIKE BAPIRET2.
    DATA: mid TYPE sy-msgid VALUE 'LDAPSYNC',
    mtype TYPE sy-msgty VALUE 'I',
    num TYPE sy-msgno.
    * structure for short ldap-attributes
    * fieldnames must be equal to basis structure LDA_ATTR_L (for RFC-call)
    TYPES: BEGIN OF TS_LDAP_ATTR_L,
    PERNR LIKE LDA_ATTR_L-PERNR,
    ATTR_TAB LIKE LDA_ATTR_L-ATTR_TAB,
    ATTR_FIELD LIKE LDA_ATTR_L-ATTR_FIELD,
    VALUE LIKE LDA_ATTR_L-VALUE,
    END OF TS_LDAP_ATTR_L.
    data: attributes type ts_ldap_attr_l occurs 0,
    attributes_wa type ts_ldap_attr_l.
    infotypes: 0001, 0002.
    tables: pernr, rfcdes.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETERS: P_TEST default 'X' AS CHECKBOX.
    SELECTION-SCREEN END OF BLOCK B1.
    Parameters: LDAPSRV Default 'SAPHRLDAP' LIKE LDA_TYPES-LDAPSERVER,
    LDAPDEST Default 'LDAPDEST' LIKE rfcdes-rfcdest.
    at selection-screen.
    clear: p_objects[], s_objects[], attributes[].
    CALL FUNCTION 'RH_GET_PLVAR'
    IMPORTING
    PLVAR = PLVAR
    EXCEPTIONS
    no_plvar = 1
    OTHERS = 2.
    if sy-subrc <> 0.
    MESSAGE E015(HRLDAP).
    endif.
    KEYDA = sy-datum.
    get pernr.
    rp-provide-from-last p0001 space keyda keyda.
    rp-provide-from-last p0002 space keyda keyda.
    ATTRIBUTES_WA-PERNR = p0001-pernr.
    * lastname
    attributes_wa-attr_tab = 'EMPLOYEE'.
    attributes_wa-attr_field = 'LASTNAME'.
    attributes_wa-value = p0002-nachn.
    append attributes_wa to attributes.
    * firstname
    attributes_wa-attr_tab = 'EMPLOYEE'.
    attributes_wa-attr_field = 'FIRSTNAME'.
    attributes_wa-value = p0002-vorna.
    append attributes_wa to attributes.
    * sAMAccountName
    attributes_wa-attr_tab = 'EMPLOYEE'.
    attributes_wa-attr_field = 'SAMACCOUNTNAME'.
    * Using the employee number a unique name is created
    * for the sAMAccountName
    concatenate 'E' p0001-pernr into attributes_wa-value.
    append attributes_wa to attributes.
    * other attributes have to added here.
    * for each additional attribute an appropriate field
    * has to defined in the structure EMPLOYEE
    * for example you can choose the following:
    * attributes_wa-attr_tab = 'EMPLOYEE'.
    * attributes_wa-attr_field = 'TELEPHONE'.
    * if you want to transfer the telephone number
    * of an employee from SAP HR to Active Directory
    * In the web Application Server an appropriate mapping
    * has to be defined using transaction LDAP for each new
    * attribute (here called TELEPHONE).
    end-of-selection.
    * get own logical system
    CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'
    IMPORTING
    OWN_LOGICAL_SYSTEM = LOGSYS
    EXCEPTIONS
    OWN_LOGICAL_SYSTEM_NOT_DEFINED = 1
    OTHERS = 2.
    IF SY-SUBRC NE 0.
    * TODO: Komprimierung sy-mandt: 3 -> 2 Stellen !!!
    CONCATENATE SY-SYSID SY-MANDT INTO LOGSYS.
    ENDIF.
    loop at attributes into attributes_wa.
    write: / ATTRIBUTES_WA-PERNR , attributes_wa-attr_tab.
    write: attributes_wa-attr_field ,attributes_wa-value.
    endloop.
    IF P_TEST = 'X'.
    EXIT.
    ENDIF.
    * send attributes to ldap client
    * send attributes
    CALL FUNCTION 'SPLDAP_RECEIVE_ATTRIBUTES'
    DESTINATION LDAPDEST
    EXPORTING
    LOGSYS = LOGSYS
    SERVERID = LDAPSRV
    * ATTRIBUTES_S = attributes[]
    INITIAL_RUN = LDAPINITIALRUN
    ATTRIBUTES_L = attributes[]
    * ATTRIBUTES_X = TOTAL_ATTRS_X[].
    IMPORTING
    RETURN = ERRORS[].
    IF NOT ERRORS[] IS INITIAL.
    READ TABLE ERRORS INDEX 1 INTO ERRORS_WA.
    MESSAGE ID mid TYPE mtype
    NUMBER ERRORS_WA-NUMBER
    WITH ERRORS_WA-MESSAGE_V1 ERRORS_WA-MESSAGE_V2
    ERRORS_WA-MESSAGE_V3 ERRORS_WA-MESSAGE_V4.
    endif.

  • Object casting: confusion in ABAP Objects: Complete Reference book

    Hi,
    During Object Assignments using casting, is a Type Test carried out during the syntax check or at runtime?
    A.5.2.2 (page 1008) of 'ABAP Objects: The Complete Reference' says about Widening Cast: "...you must check at runtime...". However on the next page under A.5.3.2 it says of Widening Cast in Data References: "The syntax check precludes...".
    A.5.4 (page 1010) concerns Assignments between Object Reference Variables, but makes no mention of whether checks are carried out by a syntax check or at runtime.
    Also nowhere does it mention when Type Tests for Narrow casting takes place. Can anyone clear my confusion please? Unfortunatly I don't know enough about this stuff to test by writing some code.
    Thanks.

    William,
    Your questions can be answered by the following rule for object references, which I found in the book "ABAP Objects" by Horst Keller and Sascha Krüger:
    "... that the static type of the target variable must be equal to or more general than the dynamic type of the source variable."
    Here "static type" means the type with which an object reference variable is declared. "Dynamic type" is the type that the object reference variable has at runtime. The dynamic type of an object reference is always more special than its static type, otherwise a runtime error occurs.
    With this rule all your questions can be answered:
    1. The Narrowing Cast is always checked during the syntax check. Example:
    DATA o_ref1 TYPE REF TO object.
    DATA o_ref2 TYPE REF TO class_1.
    o_ref1 = o_ref2.  
    Here the reference o_ref2 has a dynamic type "class_1" or a subclass of it, which is narrower than its static type "class_1", which is narrower than the static type "object" of the reference o_ref1. Therefore, the syntax check says that the assignment is OK.
    2. The Widening Cast is always checked at runtime and requires an assignment using the operator ?=. If you use the operator = in the assignment, a syntax error occurs. Therefore the following  example produces a syntax error (try it yourself):
    DATA o_ref1 TYPE REF TO object.
    DATA o_ref2 TYPE REF TO class_1.
    o_ref2 = o_ref1.  
    The correction for this syntax error is:
    DATA o_ref1 TYPE REF TO object.
    DATA o_ref2 TYPE REF TO class_1.
    o_ref2 ?= o_ref1.
    Now the syntax check is satified, and the correctness of the widening cast is checked at runtime.
    Kind regards,
    Michael Kraemer
    Message was edited by: Michael Kraemer

Maybe you are looking for

  • User id while  creating a purchase order

    Hello all, I would like to know whether there is any option to enter the user id or user name while creating a purchase order. If so could anyone post on how to do that. Thanks, Maxx

  • License Key When Using Executable Windows Installer

    Post Author: Robert Flaherty CA Forum: Deployment When using the executable Windows Installer for installing the Crystal 2008 runtime files on client PC, do you need to enter your license key?  If you leave the field blank, what happens?

  • Flex bug in Validator?

    see mx.validators.Validator.as line:929 ValidationResult has a constructor of : ValidationResult(isError:Boolean, subField:String = "", errorCode:String = "", errorMessage:String = "") The first parameter means a "ValidationResult" maybe a result car

  • Renaming iPod Nano

    I bought an iPod Nano at Best Buy that had been previously opened. The previous person who owned the iPod named it with her first name, how do I change the name of the iPod to my name? Thanks.

  • Adding subnet IP range to VLAN in SGE2000P switch

    hi, I am unable to add subnet IP range to VLAN in SGE2000P switch. Can anyone help me to configure same. Thanks in advance I want to configure 3 VLAN in my SGE2000P switch. as a router I am using my Fortigate firewall 50b. I have done all required co