How to add zero into value prefix??

I have one reuqirement about adding zero prefix into value of Infoobject AAAA. Infoobject AAAA is the attribute of Infoobject BBBB. I need to write a ABAP code in the transfer rule of infoobject BBBB.
The length of infoobject BBBB is 10. That means system will automatically add zero if the length of the value is less than 10 after data loading.
Any body know how to write it

Hi Dreshof,
Try this:-
CONSTANTS: c_zeros(10) TYPE c VALUE '0000000000'.
SHIFT TRANS_STRUCTURE-aaaa RIGHT DELETING TRAILING SPACE.
OVERLAY TRANS_STRUCTURE-aaaa WITH c_zeros.
RESULT = TRANS_STRUCTURE-aaaa.
The correct code is as shown below. Please ignore the code above this.
Hi Again,
Try this:-
CONSTANTS: c_zeros(10) TYPE c VALUE '0000000000'.
DATA: wa_aaaa LIKE TRANS_STRUCTURE-aaaa,
SHIFT wa_aaaa RIGHT DELETING TRAILING SPACE.
OVERLAY wa_aaaa WITH c_zeros.
RESULT = wa_aaaa.
This will work.
Now do a syntax check. If all is ok. Save.
Hope it helps ,
Best regards,
Sunmit.
Edited by: sunmit bhandari on Jun 27, 2009 12:40 AM
Message was editted after your post below

Similar Messages

  • How to add a default value in a site column for every item in a document library

    HI
    i created a content type with some site columns ,
    and included in a Document library.
    Process ( content type)
    -ProcessNo
    -ProcessName
    after that i uploaded 100 Documents but not  added value in a site column process name.
    now  how i add a default value in a site column for every document in a document library 
    adil

    HI
    i get below error when i change the script 
    PS C:\scripts> C:\Scripts\updatedefaultvalue.ps1
    Cannot index into a null array.
    At C:\Scripts\updatedefaultvalue.ps1:8 char:7
    + IF($i[ <<<< "Title"] -eq $null)
        + CategoryInfo          : InvalidOperation: (Title:String) [], RuntimeExce
       ption
        + FullyQualifiedErrorId : NullArray
    $web = Get-SPWeb http://tspmcwfe:89/
    $list = $web.Lists["test"]
    $item = $list.Items | Where { $_["Name"] -eq "Emc" }
    foreach($i in $items)
    IF($i["Title"] -eq $null)
             $i["Title"] = "test"
           $i.Update()
    adil
    Why are you piping a where in the items? Do you only want to add the "test" to ones matching
    a name?
    If you have ISE installed on your server I recommend you put your code in there and debug it. 
    If this is helpful please mark it so. Also if this solved your problem mark as answer.

  • How to add TickMark into dropdownlist?

    Hello,
    i am looking for dropdownlist with multiple selection.
    Is there a DropDownList widget allows more than one menu item to be selected at a time?
    i got ans from forum
    http://forums.adobe.com/message/3319311#3319311
    they said we can add tickmark into dropdownlist.so that we can select more than one item.But How to add Tickmark into dropdownlist? OR can we custmize dropdownlist?
    please, give some hint.
    If Anybody knows the solution , please help me.

    I think there are two ways:
    1) Use a specific control with text tokenization, like a Telerik's one  RadAutoCompleteBox (user1's text is a token, and user2's text is an editable
    text area);
    2) Use CSR (client-side rendering; JSLink field of a list EditForm's web part) to make the original field (input tag) read only and dynamically add second text
    box for user2's editable text. Then on form submit you can combine the two values: read only one and dynamically edited. You may do so via overriding the PreSaveAction() JavaScript function in your JSLink file.
    v

  • How to add images into a java application (not applet)

    Hello,
    I am new in java programming. I would like to know how to add images into a java application (not an applet). If i could get an standard example about how to add a image to a java application, I would apreciated it. Any help will be greatly apreciated.
    Thank you,
    Oscar

    Your' better off looking in the java 2d forum.
    package images;
    import java.awt.*;
    import java.awt.image.*;
    import java.io.FileInputStream;
    import javax.imageio.ImageIO;
    import javax.swing.*;
    /** * LogoImage is a class that is used to load images into the program */
    public class LogoImage extends JPanel {
         private BufferedImage image;
         private int factor = 1; /** Creates a new instance of ImagePanel */
         public LogoImage() {
              this(new Dimension(600, 50));
         public LogoImage(Dimension sz) {
              //setBackground(Color.green);      
              setPreferredSize(sz);
         public void setImage(BufferedImage im) {
              image = im;
              if (im != null) {
                   setPreferredSize(
                        new Dimension(image.getWidth(), image.getHeight()));
              } else {
                   setPreferredSize(new Dimension(200, 200));
         public void setImageSizeFactor(int factor) {
              this.factor = factor;
         public void paintComponent(Graphics g) {
              super.paintComponent(g);
              //paint background 
              Graphics2D g2D = (Graphics2D) g;
              //Draw image at its natural size first. 
              if (image != null) {
                   g2D.drawImage(image, null, 0, 0);
         public static LogoImage createImage(String filename) { /* Stream the logo gif file into an image object */
              LogoImage logoImage = new LogoImage();
              BufferedImage image;
              try {
                   FileInputStream fileInput =
                        new FileInputStream("images/" + filename);
                   image = ImageIO.read(fileInput);
                   logoImage =
                        new LogoImage(
                             new Dimension(image.getWidth(), image.getHeight()));
                   fileInput.close();
                   logoImage.setImage(image);
              } catch (Exception e) {
                   System.err.println(e);
              return logoImage;
         public static void main(String[] args) {
              JFrame jf = new JFrame("testImage");
              Container cp = jf.getContentPane();
              cp.add(LogoImage.createImage("logo.gif"), BorderLayout.CENTER);
              jf.setVisible(true);
              jf.pack();
    }Now you can use this class anywhere in your pgram to add a JPanel

  • How can add some suggested value to a propert on a Declarative Component,

    how can add some suggested value to a propert on a Declarative Component?

    kenyatta,
    Where you want to add the value ?
    If you want put some UIComponent(Value) to your declarative Component than follow my blog ( http://jneelmani.blogspot.com/2009/02/11g-how-to-create-declarative-component.html ) and add your value in STEP-5.
    You can watch live-demo at http://www.oracle.com/technology/products/jdev/viewlets/viewlet.html
    --Neelmani Jaiswal
    Edited by: Neelmani Jaiswal on Mar 23, 2009 11:11 AM

  • How to add Zero to an integer value from left (like 999 to 0999)

    hello,
    any body please tell me how to add "0" to an integer from left
    i just want to make my value 999 to 0999
    and i tried with converting it to strings but after adding zero i have to make the string to integer again because my method accepts integers onli.
    thanks in advance
    ranadheer

    i will be much clear now
    i have a jar file which takes date and time as input
    but the it accepts only 4 digits in the Year field
    so if i have date with year before 1000 its not
    accepting.so with keeping year field as integer i
    have to make the 3 digits to 4 digits by appending
    0 at the front
    thanks and regards
    RanadheerThen you need to keep that variable as a String (before parsing it to a Date object), not as a numerical value. You can prepend a String to another String using the + operator.
    String s = "0"+"123";

  • How to add get Day value in a Date object?

    Hi,
    I am writing a sql statement that has two date values. One I am getting it from the database. The format in the database is MM/DD/YYYY. My first question is how do I convert the format into the java date format, YYYY-MM-DD. The second question is I need to find out what the day is and add 1 to it. How do I get Day value in a Date object?
    Thanks.

    Look at "SimpleDateFormat" and "parse" in the archives.

  • How to add hash table values to SQL Table using Powershell

    Hi,
    I have sharepoint list with four(column1, column2, column3,column4)columns.I am reading the list column values and adding to hashtable. Now I want to add values from hastable to SQL table with four(column1, column2, colum3,column4)columns using powershell.
    I have written the following script for single column but I would like to know how to add values for multiple columns.
                if(($key -eq "Column1") )
                   $SqlQuery = "INSERT INTO [TableName] ([Column1]) VALUES ('" + $HashTable.Item($key) +"')"
                   #Set new object to connect to sql database
                   $connection = new-object system.data.sqlclient.sqlconnection
                   $Connection.ConnectionString ="server=SQLServerName;database=SQLDBName;Integrated Security = True;"
              $connection #List connection information 
                   $connection.open() #Open Connection
                 $Cmd = New-Object System.Data.SqlClient.SqlCommand
                 $Cmd.CommandText = $SqlQuery
                   $Cmd.Connection = $connection
                  $SqlAdapter = New-Object System.Data.SqlClient.SqlDataAdapter
                  $SqlAdapter.SelectCommand = $SqlCmd
                  $DataSet = New-Object System.Data.DataSet
                  $SqlAdapter.Fill($DataSet)
                  $DataSet.Tables[0]
                  $connection.Close()
    Can anybody please help me out to accomplish the task? Any help would be greatly appreciated.
    AA.

    Hi AOk2013,
    Not knowledgable on PowercShell, based on my understanding on HashTable in Java, Some modification you can make in your code to achieve your requirement.
    If the Keys in HashTable are "Column1","Column2","Column3","Column4", you can reference below.
    if(($key -eq "Column1") ) #what is the purposed of this if ?
    #$SqlQuery = "INSERT INTO [TableName] ([Term]) VALUES ('" + $HashTable.Item($key) +"')"
    #specify the real column names in the table
    $SqlQuery = "INSERT INTO [TableName] ([ColumnA],[ColumnB],[ColumnC],[ColumnD]) VALUES ('" + $HashTable.Item("Column1") +"','"+ $HashTable.Item("Column2") +"','"+$HashTable.Item("Column3") +"','"+$HashTable.Item("Column4") +"')"
    #Set new object to connect to sql database
    $connection = new-object system.data.sqlclient.sqlconnection
    $Connection.ConnectionString ="server=SQLServerName;database=SQLDBName;Integrated Security = True;"
    $connection #List connection information
    $connection.open() #Open Connection
    $Cmd = New-Object System.Data.SqlClient.SqlCommand
    $Cmd.CommandText = $SqlQuery
    $Cmd.Connection = $connection
    $SqlAdapter = New-Object System.Data.SqlClient.SqlDataAdapter
    $SqlAdapter.SelectCommand = $SqlCmd
    $DataSet = New-Object System.Data.DataSet
    $SqlAdapter.Fill($DataSet)
    $DataSet.Tables[0]
    $connection.Close()
    Since your question is regarding PowerShell, I would suggest you post it in a dedicated
    PowerShell Forum. It is more appropriate and more experts will assist you.
    If you have any feedback on our support, you can click
    here.
    Eric Zhang
    TechNet Community Support

  • How to add the resultant value in a double

    Hay guys
    I am adding two vectors (each vector has 3000 values). I want to add them together and store in a double variable. But when i compile i have an error. (incompatible type found, Object required.)
    How can i store the values of two vector in an object
    here is my peice of code
      public void result (){
            double temp1;
            for(int i=0; i<=  3000;i++){
            temp1 = (double)v.elementAt(i) + (double)v1.elementAt(i);
      NOTE: i already have 3000 values (or objects) in my vectors
    Thanks alot in advance

    Okay guss. i Used (Double) in my vectors as object because with lowercase (double) it throws error. Asbestos you said (What are the objects in the vectors? Are they Doubles (with a capital 'D')? If so, use the methods found in the Double API to change the Doubles into doubles, instead of trying to cast them.) i tried but i didnt able to findout how to use that API. Can anybody show me
    Here is my full code.
    public class Simple {
        public long c=0;
        public long a = 16807;
        public long m = 2147483647;
        public long  XO = 238640;
        public long  XO1 = 248921;
        public Vector v = new Vector();
        public Vector v1 = new Vector();
        public Vector vLast = new Vector();
        public double x = 0, R = 0;
        public double LCDx (){
        for(int i=0; i<= 3000;i++){
        x = (((a)*(XO))+c)%m;
        R = x/m;
        XO = (long)x;
        v.addElement(new Double(R));
        System.out.println(i+" Value: "+R);
        return R;
        public double LCDy (){
        for(int i=0; i<=  3000;i++){
            x = (((a)*(XO1))+c)%m;
            R = x/m;
            XO1 = (long)x;       
            v1.addElement(new Double(R));
        return R;
      public void result (){
            double temp1;
            for(int i=0; i<=  3000;i++){
    // PROBLEM PART
             double temp = (double)v.elementAt(i) + (double)v1.elementAt(i);
              vLast.add(temp); 
      }Thanks alot in advnacee

  • How to add a default value in a prompt list?

    I have a prompt list that I'm getting from the database, I want to add a deafult value in the top of the list. Ei "ALL", my current list is:
    "AMERICAS"
    "EMEA"
    "ASIA"
    I want a list like:
    "ALL"
    "AMERICAS"
    "EMEA"
    "ASIA"
    This is the code I have:
    @Select(Country Region\Regionname)IN @Prompt('Enter the region','A',{'All'}distinct 'Country Region\Regionname',Multi,Constrained)
    It is displaying only "All". Does someone know how to merge text with a database list in a promp variable?
    Thank you!
    Marcela

    please find this post
    i've solved this problem with someone before
    Optional User prompt
    ok, lets get back to our problem
    since you are in sybase databases i dont know weather there is a DUAL table like oracle or not,
    anyway forget about it and follow those steps
    1. import the universe to the desginer
    2. Right Click any empty space on the Stage to Create a derived table.
    3. Give The derived table any Dummy Name lets say "ALL_table"
    4. write a small SQL statment in the derived table "Enter SQL Expression"
    select 'ALL' from anytable you have in the database.
    lets say the countries table itself
    SELECT 'ALL' FROM USER.COUNTRIES
    validate the SQL and Click ok.
    5.you will have a derived table called "ALL_table" with field name "ALL"
    6.Drag the Field Name ALL to the Same Class whicn you "Country Name" in.
    7.Get back to your "Country Name" Dimension and Double Click it to get its properties, then go to the Properties tab.
    8.in the peroperties tab. "Associate List of Values" ,, Click "Edit" Button.
    9.you will find your "Country Name" Dimension, click "Combine Queies" icon in the bar, to have another queries union with the first one.
    10. you will have another query with "U" beside itm Drag the "ALL" dimension in it, and remove the "Country Name"
    so you will have 2 union queries one with the "Country Name" and another on with "ALL"
    gooooooood.
    11.Click "Save and Close"
    12.Check Export with universe and "Automatically Refresh before use"
    13.now you can hide the "ALL" dimension we have created before, to make it invisible for the users. (do you have problem hiding this dimension?)
    14.export your universe
    15.open WebI
    16.Create Report on this universe.
    17.put the "Country Name" Dimension on the filter and make it prompt,
    18.Run the query,
    19. tell me what you see?
    good luck
    Amr

  • How to add one more values in Search Criteria,

    Hi All,
    OAF page Search Criteria :
    Search By "name"only Available already have in the search criteria .we are need to add Description in search criteria .How to add one more filed “Description” in Search Criteria,
    Please Help Me
    Thanks
    Rajavel

    "Set the Search Allowed property to True for any LOV result items you want to present to the user as searchable values. These items are listed in the search poplist the user sees in the LOV window.
    At a minimum you must set the Search Allowed property to True for the the result table item corresponding to the LOV field on the base page.
    This is from the devguide, I suggest you read it once at least if you have started work on the framework.
    Tapash

  • How to add New status values in product

    Hi,
      In product master COMMPR01 presently system is shwoing only two vaues Blocked (ERROR), Blocked (Warning), even I have downaloded the sales staus from ECC to CRM using R3AS object 'DNL_CUST_PROD3' but on the screen system is not shwoing thos values.
    How to add new values in staus field.
    Regards,
    zafar

    Hi,
    Refer these links
    Re: GR for a production order
    status profile
    Regards,
    Vishal

  • How to add data into JTable

    How can I add data into JTable, for instance ("Mike", "Gooler", 21).

    How can I add data into JTable, for instance ("Mike",
    "Gooler", 21).You will have very good results if you segregate out the table model as a seperate user class and provide a method to add a row there. In fact, if you use the table to reflect a database table you can add the row inplace using the existing cursor. I believe it's TableExample2 in the jdk\demo\jfc\TableExamples that has a very good example of this.
    Walt

  • How to add a profile value programmatically?

    Anyone know how to add one? Is there an API?
    I want to add a user level profile option value for 'POR_DEFAULT_DELIVER_TO_LOCATION_ID' so I can default the value. Thanks!
    Thanks

    Hi,
    The LEVEL_VALUE column contains the value of the profile option (see eTRM for details).
    The LEVEL_ID should tell you at what level this profile option is set as follows:
    10001 --> Site
    10002 --> Application
    10003 --> Responsibility
    10004 --> User
    10005 --> Server
    10007 --> SERVRESP
    Note: 201945.1 - How to list E-Business Suite Profile Option values for all levels using SQLPlus
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=201945.1
    Regards,
    Hussein

  • How to disallow zero net value partial billing??

    Hi everyone,
    I've been trying to figure this out for a while to prevent billing document with zero net value to be created.
    This just happened when users made a mistake while  they were invoicing partially.
    One out of two partial invoices of 1 sales order,  has only a free goods item , so net value of this invoice is zero. F/A people concern about this.
    Please advise how to customise the system to prevent this undesireable circumstance.
    Thank you.
    Tikum.

    ํThank you for your advice. 
    Yes i realize that all items in sales order should be in billing.
    My purpose is to give users an alert that they're doing something wrong with billing cuz it should not be zero net value invoice, so they will find out what happens and correct it.
    I did maintain output determination , routine LV61B062 , to return SY-SUBRC = 4  if net value = 0
    And I did testing by invoicing with zero net value , debugging this routine, it gave '4' after pass this condition but the zero net value invoice still came out normally in the end. So i didn't work then....
    please do me a favor If you have any alternative idea...
    Thank you.
    Regards,
    Tikum.

Maybe you are looking for

  • Problem on apple id signed on device

    hi  to all concern, i have a big problem on my iphone5 device,my son borrowed my device for a months and when he gave back to me i discover that he put apple id on apps store,coz everytime when im connect to wifi the message popup on screen to enter

  • MacBook Pro almost frooze, would like to know why

    Hey About a half hour ago I came back to my computer and it was extremely sluggish. I began shutting applications down but only with the Activity Monitor running the Active RAM was 1.15 GBs. I tried to open up my console but it would not respond. I e

  • Not able to connect with Ethernet, new Pavilion dv5-4122ca​, realtek pci-e gbe ethernet controller

    When cable is plugged in, Network device still shows as that Network cable is unplugged. Driver was installed and reinstalled, cable was tested and all settings were checked and work with other laptops. Exception is that it can connect when directly

  • N97 mini - blank/unresponsive home screen & nokia ...

    I have been having problems with my Nokia N97 mini.  It froze yesterday, and I removed and re-installed the battery to restart the phone.  When the phone came back on, the email widget had changed from Nokia email to the messaging email option (the o

  • Content server upgrade from 6.40 to 6.50

    Hello, As content server version 6.40 is not supported by SAP now so we need to upgrade it to 6.50. Can anyone share the knowledge who performed it? I have gone through note 514500 and understood that patching is as simple as replacing some old files