Plsql string assignment

Hello,
after creating a report with a type of "sql query(PL/SQL function Body returning sql query)" I will always have an error message as follows:
At first here is my pl/sql code:
declare
q varchar2(3000);
begin
q:='select empno,';
q:=q||'ename,';
q:=q||'hiredate,';
q:=q||'job from emp';
q:=q||'where ';
q:=q||'job='SALESMAN' ';
return q;
end;
The error message:
1 error has occurred
Function returning SQL query: Query cannot be parsed within the Builder. If you believe your query is syntactically correct, check the ''generic columns'' checkbox below the region source to proceed without parsing
(ORA-06550: line 9, column 13:
PLS-00103: Encountered the symbol "SALESMAN" when expecting one of the following:
. ( * @ % & = - + ; < / > at in is mod not rem
<> or != or ~= >= <= <> and or like
between ||
The symbol ". was inserted before "SALESMAN" to continue.)
Thanks for helping and solving the problem.
My

Ensure that hard-coded constants are enclosed within a set of double single-quotes (or like you said, the apostrophe) - double quotes won't work and neither will a set of single quotes. Here is the example that I keep for reference:
<pre>
SQL_STATEMENT := 'SELECT A.CORONER_CASE_ID CASE'
|| ' , TO_CHAR(A.PRONOUNCED_DATE,''YYYY-MM-DD'') PRONOUNCED'
|| ' , B.E_DEATH_MANNER_DESC DEATH_MANNER'
|| ' , C.FIRST_NAME_TX || '' '' || C.LAST_NAME_TX NAME'
|| ' , A.EMPLOYEE_ID EMPLOYEE_ID'
|| ' , HTMLDB_ITEM.CHECKBOX(1,A.PRELIM_COMP_IND,NULL,''Y'') PRELIM_COMP_IND'
|| ' , HTMLDB_ITEM.CHECKBOX(2,A.REVIEWED_HO_IND,NULL,''Y'') REVIEWED_HO_IND'
|| ' FROM CORONER_CASE A'
|| ' , MANNER_OF_DEATH B'
|| ' , EMPLOYEE C'
|| ' WHERE A.DEATH_MANNER_CD = B.DEATH_MANNER_CD (+)'
|| ' AND A.EMPLOYEE_ID = C.EMPLOYEE_ID' ;
</pre>

Similar Messages

  • Accessing String assigned in a JSP from a Servlet?

    Hello all, I was wondering if there is a way to access a String object that was assigned by an HttpSession object in a JSP from a Servlet. What happens is, in my application a user logs in, an HttpSession object is instantiated and all of the user credentials are assigned within a JSP like:
    HttpSession httpSession = request.getSession( false );
    String userName = httpSession.getAttribute("userName);
    ...{code}
    Next, I have a Servlet (which is really just a Proxy to a different server), that I need to log some information with, namely the userName String. Is there a way I can access that String without instantiating another HttpSession object? Because when the timeout occurs (or when the user clears his cache I have found), the HttpSession becomes invalidated (even if I use  +HttpSession#getSession( true )+) and the +HttpSession#getAttribute+ call fails (userName is just null). So is this possible to do?
    Thanks in advance!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    dnbphysicist wrote:
    I understand you cannot recover attributes from a dead session, this is why I wanted to be able to access a variable that is pulled from the Session immediately after login so I can still get to it even once the session is dead.
    Normally a session doesn't go dead after login.
    I imagine that by using application scope the app would confuse the userName with other users that are logged in?Certainly. It was just an example. But your data clearly belongs in the session, so just keep it in the session. If the session get invalidated while it should not get invalidated, then your problem truly lies somewhere else.
    I am definitely not arguing you latter point either :) A lot of this code I inherited unfortunately from previous developers and we are in desperate need of a redesign.I wish you much luck with that.

  • How to get String assigned value

    Hi,
    As String is immutable and we know that the value of string is not changable.
    eg: String abc= new String();
    abc = "INDIA";
    system.out.println("1st abc : "+abc);
    abc=abc.toLowerCase();
    system.out.println("2nd abc : "+abc);
    As we know as string is immutable the value for the 2nd abc gives us india.As 2nd abc creates a new instance object stores in new memory location.
    Then y string is called immutable.It means the value is getting changed.
    Is their a way to retrive my original value or first assigned value for abc i.e INDIA.
    Thanks
    LeoSun.

    LeoSun wrote:
    Then y string is called immutable.It means the value is getting changed.No, it is not changed, you just assign a new value to your variable 'abc'.
    String abc = "INDIA";
             +-----------+
    abc -----+-> "INDIA" |
             +-----------+
    abc = abc.toLowerCase();
             +-----------+
    abc ---+ |   "INDIA" |
           | |           |
           +-+-> "india" |    
             +-----------+As you see, "INDIA" is not changed, a new String, "india" is created where your variable 'abc' points to.
    Is their a way to retrive my original value or first assigned value for abc i.e INDIA.
    ...Once you change the value of 'abc' (and there exists no reference to it's old value), then no, it's not possible.
    Why would you want that?

  • PLSQL: String Buffer Overflow

    When I create a sql region or a plsql returning sql, I get an error: "ORA-06502: PL/SQL: numeric or value error: character string buffer too small". My query is pretty long. If I reduce the length of the query, it works fine without errors. I tried to run the same query in the sql workshop. There also I get the same error. Can I increase the buffer for the string? Is there anyway to tackle this situation?

    Hi Scott
    I found my mistake.
    Many thanks for your reply, yes you are correct it is the SQL*Plus prompt of Oracle Apex. I have tried the operation on SQL*Plus as well, I get the same error. I am trying to implement a formula which looks something like this: (Calculates the Balance of a Mortgage)
    A=L*(1-(1+r)^p-n) / 1-(1+r)^-n
    L is the Loan i.e. L = $270,000
    r is the interest rate in decimal format and per month so, 8% is r = 0.08/12
    p is number of payments already made, say 6 months p=6
    n total number of payments to be made say 360 months
    so my statement becomes like this:
    -- A=L*(1-(1+r)^p-n) / 1-(1+r)^-n
    select 270000 * 1 - power((1+(0.08/12)), 6-360) / 1 - power((1+(0.08/12)),-360) from dual
    which does return the correct value of:
    269999.813394013370288801946710628610631
    the balance of the loan after 6 payments
    I think my problem was "operator precedence" , sorry!
    But I think I must have hit a hard limit as the following does return a value.
    SQL> select power(-0.002, -20) from dual
    9.5367431640625000000000000000000000E+53
    but
    SQL> select power(-0.002, -200) from dual
    ORA-01426: numeric overflow
    Maybe too small to fit to an Oracle Number data type!?
    Many Thanks
    Kubilay

  • String assignment ?

    Hi,
    in the following code:
    public class Test {
    public static void main(String[] args) {
    String s = new String("Welcome to Java");
    Object o = s;
    String d = (String)o;
    System.out.println(o + s + d);
    Both strings and the object are referring to the same string object., and the println shows 3 "Welcome to Java" 's. I don't understand exactly why this is so? I was hoping someone might be able to explain it to me.
    Thanks!
    Jimbo
    think

    First of all, I was under the impression that when
    you declare a string variable and use the new keyword
    that what you were doing was constructing a String
    object (to which you can apply the functions of the
    String class). Yes. But you don't NEED to do new String(...) to get a String object. Usually you just assign it to a String literal (s = "abc";) or get it from a config file or user input, or call some object's toString() method.
    I am unclear what is actually happening when the code
    "Object o = " was used. Is the Object class the
    super (or parent) class, so that a String is
    automatically in the Object class because it is its
    parent? Correct.
    I take it that after that line of code, we
    have two reference variables pointing at the
    String......and then the second "String = " statement
    is just making another reference to the same String.Correct.
    With the family example you gave me.....applying it
    this string.....the three variables are just three
    different points of reference to the same string. Correct.
    As far as why I thought it might be any
    different....earlier on in the class
    we had code that went kinda like this:
    String s = "me";
    String t = "you";
    s = t;
    I guess in this case we lost our reference to the
    String "me", so if we println s and t we get two
    "you" 's.Correct. So, why would printing a + b + c (or whatever your variables were in the initial post) produce anything but three of the same thing? I still don't know what you expected or why.
    I guess I was getting this all
    confused....probably making it more difficult than it
    actually is...but I have a lot coming at me at
    once.....Actually, it sounds like you have a better handle on how Java's reference variables work than most beginners. The idea that the variable holds a reference, not an object, and that assignment doesn't copy an object, comes hard to some people. You sound like you understand that part of it.

  • Simple String assignment

    I'm using netBeans...if that matters. I've never seen this error before while assigning content to a string. Can anyone tell me why this is happening?
    textForArtist is a JLabel.
    found : java.lang.String
    required: com.sun.org.apache.xpath.internal.operations.String
    this.artist = textForArtist.getText();
    Thanks in advance.

    textForArtist.getText() returns a java.lang.String object.
    What type is this.artist? Looks like it's a com.sun.org.apache.xpath.internal.operations.String type, according to the error message. That isn't compatible with a java.lang.String expected type, hence the error. Did you really expect that since both class names happen to end in "String" that it would just work as if by magic?

  • How to assign the dynamic value of PV to Sip Header in ICM?

    Hi everybody,
    I would like to ask your help, please. We are working on Temporary IVR Handoff (ICM+CVP). I need to add/modify a customer Sip header in ICM transfer script. The value for that header is dynamic and stored in the one of ICM Call Peripherial Variables (PV9, for examle).
    Is it possible somehow to assign the value of that PV9 to Sip header (Set Variable Call.SipHeader)? I tried to do it but unfortunally without any success. I can assign any static string, but how to assign the value of the PV??? That's the question...
    For static string assignment the syntax of the Set Variable Node (Call.SipHeader) looks like that:
    "IVR-Handoff~add~It's Cisco"
    and it works fine.
    For dynamic value (PV9) I tried:
    "IVR-Handoff~add~Call.PeripherialVariable9" - it add Call.PeripherialVariable9 as a string, but not it's value;
    "IVR-Handoff"~add~Call.PeripherialVariable9 - returns a syntax error;
    Call.PeripherialVariable9 - no Sip header is added.
    What do you think? Is it doable at all?
    Any ideas, answers or examples how to do it would be much appreciated.
    Thank you in advance.
    Dmitriy.

    Hi Senthil,
    Yes! It works, but with the little difference. The right answer is:
    "IVR-Handoff~add~"&Call.PeripherialVariable9
    (Call.PeripherialVariable9 is without quotes, otherwise it insert the name of the variable, but not it's value)
    The other solution is shown here (thanks to Paul Tindall):
    http://developer.cisco.com/web/cvp/forums/-/message_boards/message/15627744?p_p_auth=6psgR8ML
    concatenate("IVR-Handoff~add~",Call.PeripherialVariable9)
    Thank you so much for the idea! I very appreciate your help and vote you.

  • When same search strings are given, during EBS upload system not picking up

    Hi,
    We have a total of 7 company codes and have different -different seach strings assigned to each of them in EBS config. But now my client want to have a same seach string for two company codes, when configured in ECC 6.0 , and tried to upload the statement neither of the company codes are getting the bank statement uplaoded. Is there a way where we can assign company code wise so that the bank statement gets uploaded.
    Thanks and Regards
    Sri

    Hi,
    I think this should be possible. Different company codes will have different House banks and Accounts ID.
    The same search string can be used for each of the company code and house banks. This happend when after defining the search string, you assign these strings as above.
    Tip : Please also check in the "TEST", by copying the search string from the bank file and see if the mapping is being hit.
    Rgds,
    Suresh

  • SQL Developer 3 EA2 - Problem with formating plsql source code

    I'm using sql developer 3 ea2. I have played with source code formating.
    I have 2 issues with formating in source code editor.
    I have a plsql string like the following extending over several lines.
    s VARCHAR2(2000) := 'SELECT
    col1, col2, col3
    FROM table
    WHERE col4 = :var';The result after apply "format" to my sourcecode ist:
    s VARCHAR2(2000) := 'SELECT
    col1, col2, col3
    FROM table
    WHERE col4 = :var';The second is that sql developer ist camelizing the previous line if I type a whitespace in plsql sourcecode.
    How to switch that off??
    The last issue is realy annoying!
    Christian

    I am having exactly the same problem. Every time you use Format Ctrl/F7 it adds new line feeds. Code starts off as:
    command := '
    select account_status, default_tablespace, temporary_tablespace,
    to_char(created,"YYYY-MON-DD HH24:MI:SS"), profile
    from Dba_Users@@
    where username=:1' ;
    First Format Ctrl/F7 get an extra blank line:
    command := '
    select account_status, default_tablespace, temporary_tablespace,
    to_char(created,"YYYY-MON-DD HH24:MI:SS"), profile
    from Dba_Users@@
    where username=:1' ;
    Then second Format Ctrl/F7, get THREE extra lines!!! It goes exponential!!
    command := '
    select account_status, default_tablespace, temporary_tablespace,
    to_char(created,"YYYY-MON-DD HH24:MI:SS"), profile
    from Dba_Users@@
    where username=:1' ;
    So far I've only really encountered the problem with dynamic SQL, which ignores the extra line feeds.
    i am pretty sure this is a long standing SqlDeveloper Format problem, going back to V2.

  • External java function that should return String array

    Hi everyone,
    I have a split function in plsql that takes 10 times longer a java tokenizer function that i was written. So, i want to use java external function to split my plsql strings into pieces.
    I can write a java external procedure that returns types like int, float and String types. I have no problem about it.
    My problem is returning an array of strings. I found a book that has an example about how can we get directory list in plsql with java external procedure.
    (code)
    import java.io.File;
    import java.sql.*;
    import oracle.sql.*;
    import oracle.jdbc.*;
    public class JFile {
    public static oracle.sql.ARRAY dirlist (String dir)
    throws java.sql.SQLException
    Connection conn = new OracleDriver().defaultConnection( );
    ArrayDescriptor arraydesc =
    ArrayDescriptor.createDescriptor ("DIRLIST_T", conn);
    File myDir = new File (dir);
    String[] filesList = myDir.list( );
    ARRAY dirArray = new ARRAY(arraydesc, conn, filesList);
    return dirArray;
    CREATE OR REPLACE FUNCTION dirlist (dir IN VARCHAR2)
    RETURN dirlist_t
    AS
    LANGUAGE JAVA
    NAME 'myFile.dirlist(java.lang.String) return oracle.sql.ARRARY';
    (code)
    I could compile this source file in localhost but not remotehost. There are jar files ( import oracle.sql.*; import oracle.jdbc.*; ) that should be added to remote classpath. ( others have already added java classpath ). But, which classpath i should add? Oracle has own JVM and Classpath, probably i should upload these jar files to oracle classpath. Am i wrong? How can i do? Can you explain in detail? How can i return string array from java external function in Oracle ?
    I am using Oracle 11.1.0.7 on Solaris Sparc Machine.

    Hi,
    What do you mean "compile in remote host"
    Aren't you using the loadjava tool? - that should be enough, the RDBMS already "has" the jars needed.
    [A must read|http://download.oracle.com/docs/cd/B28359_01/java.111/b31225/chone.htm#BABCFIIF]
    Regards
    Peter

  • Assign color to findTextPreference as object

    I have a script that creates a color, applies it to a particular property of a number of styles (one after the other) and then searches for that property. This works just fine the first time I run it in an InDesign session, and usually the second and third times as well. However, at some point I find that it stops working, because when the color is assigned to the findTextPreference property it is assigned as a string that gets some numbers after it. So, I do something like this:
    var myColor = myDoc.colors.itemByName("testCol");
    myCSty.underlineGapColor = myColor;
    app.findTextPreferences.underlineGapColor = myColor;
    However, if I then query app.findTextPreferences.underlineGapColor, it is a string, and that string will be something like "testCol 3" (it iterates upwards depending on how many times I've run it during a session). I can't change the string; assigning NothingEnum.NOTHING to the property and then reassigning the color just iterates the number again. In fact, even if I try to assign that color to a different color property, or to a findGrepPreferences color property, it continues to iterate the number. I so far have not been able to recreate this problem in a less complex script (I'm still trying), but I was hoping someone might have encountered this and might have some guidance.
    I thought that the problem might be related to the bug discussed here: fillColor in find/change Preferences in indesign cs3 so I started adding my colors at the app level as well. This doesn't seem to hurt anything, but it doesn't help either. And trying to assign the color whose parent is app to my findTextPreferences property just gives me the error seen there (I guess that means the bug was fixed? I'm not sure.)
    Is there any way to force the findTextPreferences properties to accept an object rather than converting that object into a string? Or is my problem too vague and unrepeatable to help at this point?
    Thank you!

    Upon further testing of this, it seems like the issue is rooted in one particular document which, if open, can experience this problem or cause it to occur in other documents (like it's polluting the session). I have no idea why, but since I can't provide the file it's not something anyone is likely to be able to recreate or help me with. Not sure if I should delete my question or close it, or what.

  • Variable created as String in HP Calc Manager

    Hi,
    I have created a variable which is type 'String' associate to a member which has datatype text. I expect the users when they run the rule to populate that with free text which is for information. However the rule doesnot validate.
    Any tips on how do I get the same working.
    Thanks,
    XXX

    What he said was take that as a reference, and that is a script in Capex where a string assignment through rule was working.
    Tell us what is not working, if you can post your script and then someone can look at it and see what the problem is.
    Can you enter text from Webform (not using rule)
    Regards
    Celvin

  • Where we can find the detail infomation about the Value String of automatic

    Where we can find the detail infomation about the Value String of automatic?
    such as WE06,WE01 and so on.

    Hai,
               Value string keys are for SAP internal usage. It is just a pointer to the transaction event key which is necessary for automatic account determination.
               Movement types are linked to transaction keys via valuation string in OMWN T-code.
               The R/3 System automatically determines the value string assigned to a specific transaction. It depends partly on entered parameters manually and partly on parameters derived internally by the system. The value string contains all posting transactions that are possible for a certain transaction. The program decides which of these posting transactions lead to G/L account postings in individual cases. You cannot define this in Customizing.
    Value string WE01, for the goods receipt for a purchase order into stock, contains transactions BSX and WRX.
    WE01: BSX, WRX, PRD, KDM, EIN, EKG, BSV, FRL, FRN, BSX, UMB.
    WA14: BSX ,PRD, BSX, UMB
    WA01: BSX, GBB, PRD, BSX, UMB
    Value string RE05 contains transactions BSX and UMB.
    In the standard system, value string WE01 is assigned to goods receipts (and also cancellations and return deliveries) for Standard and Subcontracting purchase order items without account assignment concerning valuated material into stock. In the case of (valuated) goods receipts for purchase order items not subject to account assignment,
    post the items to a stock account using the transaction key BSX and make an offsetting entry to a GR/IR clearing account. A price difference posting (transaction key PRD) is only used if the valuated material is subject to standard price control and if the order price (or invoice price) is different from the standard price. Transaction key KDM is required in Inventory Management for purchase orders in foreign currencies because of differences in exchange rates between goods receipts and invoice receipts, unless the material can not be debited or credited because it is subject to standard price control.
    The transaction keys EIN and EKG (and possibly FRE – see account determination for delivery costs) are only used in company codes where purchase account management is active (as required in France and Belgium for example).
    The transaction keys BSV, FRL, and FRN are only used for the Subcontracting item category.
    Value string WA14 is defined for deliveries without charge (movement type 511).
    The following scenarios are possible:
    Delivery without charge for material subject to moving average price control &#8594; No accounting document
    Delivery without charge for material subject to standard price control (and if the posting date is in the previous period – standard price in the posting period = standard price in the current period) &#8594; Inventory posting (receipt at standard price) and offsetting entry to price differences account
    Delivery without charge for material subject to standard price control, with posting date in the previous period and the standard price in the posting period is different to the standard price in the current period &#8594; Inventory posting (receipt at standard price) and offsetting entry to price differences account (posting in the previous period) &#8594; Stock correction posting and Revenue/expense from revaluation (posting in the current period)
    In the standard system, value string WA01 is assigned to goods issues and other goods receipts. The R/3 System uses an additional influencing factor, account grouping, to differentiate further between the various movements during account determination.
    Hope it will be Helpful 4 u.
    Reward Point if Useful.

  • Beginner : Array , String Problems continue.

    Hi everybody I am so New in Java or rather not really able to understand Java yet.
    I have assignment where I do not know how to think anymore..is probably very easy to those who understand programming but sadly I do not.
    Program should do:
    1. assign any amount of different strings.
    2. user is giving any letter he/she wants and program to find it among given strings.
    If searched letter is in any string/ strings , only these strings or string are printed.
    3. If in given strings is not searched letter, program has to say it, for ex: there is not letter you search for.
    As long as now I have only, strings assigning to array. So there are strings in array but I do not know how to write code where I can find given letter by user.
    I just do not know how I should think(anymore at all ;)) here. I am really frustrated and desperate, how to understand this?? Once and for all!!!
    I was thinking maybe I should use ArrayList? but how...or Can it be done both ways with Array or with ArrayList?
         public static void main(String[] args) {
              Scanner scan = new Scanner(System.in);
              System.out.print("How many strings ?");
              int antal= scan.nextInt();
              String [] str = new String[antal];
               String string = null;     
              int x;
               scan.nextLine();
                 for( x=0;x<str.length;x++){
                      System.out.print("String "+(x+1)+": ");                       
                 string= scan.nextLine();
                 str[x]= string;
                System.out.print("Write a letter you wish to find :");
                String letter = scan.nextLine();
                char check = letter.charAt(0);
      //somthing in here ....

    Thank you very, very much for helping me, this is the first forum where I am getting any answers at all. Thanks guys!
    Yes, that is true I have a problem to "see" things in code..I feel " lost in translation " :)...Sometimes I think I understand code and than suddenly code does total different thing than I thought. I have to pass 2 exams of Java basic and bit advance level of Java , all seems very dark now..but I have a hope that I at least pass those exams. Of course it could be fantastic to start understand Java (or any other computer language) and be able to code one day for real. To be honest, I envy you that you can understand Java. When, all code works is so cool and fun! ok, Back to code...
    So I read your tips and advices , thanks.
    Here is another problem, with help of indexOf(char) I got index for character I searched, fine.
    The way i wrote the code I got separate answer for each string(check in code). What I need to have is, separate printed strings where given character is found and nothing else should be printed. Later, I need just one general comment ,only in case if character is NOT found in given strings.
    import java.util.*;
    public class upp9 {
         public static void main(String[] args) {
              Scanner scan = new Scanner(System.in);
              System.out.print("How many strings ?");
              int antal= scan.nextInt();
              String [] str = new String[antal];
              int x;
               scan.nextLine();
                 for( x=0;x<str.length;x++){
                      System.out.print("String "+(x+1)+": ");                       
                 str[x]= scan.nextLine();
                System.out.print("Write a letter you wish to find :");
                String letter = scan.nextLine();
                char check = letter.charAt(0);
                   for( x=0;x<str.length;x++){
                       str[x].indexOf(check);
                     //     System.out.println("String "+(x+1)+" "+str[x].indexOf(check));
                if((str[x].indexOf(check))>=0)
                     System.out.println("String "+(x+1)+" "+str[x]);
                else
                     System.out.println("Nothing in this string");
      System.out.println();
    }is printed.
    How many strings ?4
    String 1: hello
    String 2: other
    String 3: alex
    String 4: batman
    Write a letter you wish to find :a
    Nothing in this string
    Nothing in this string
    String 3 alex
    String 4 batmanI should get printed (with other code)...where I don't know how to think here? what code I should use?, what I can what I can not do here...hmmm
    //in case found
    How many strings ?4
    String 1: hello
    String 2: other
    String 3: alex
    String 4: batman
    Write a letter you wish to find :a
    String 3 alex
    String 4 batmanor....
    //in case NOT found
    How many strings ?4
    String 1: hello
    String 2: other
    String 3: alex
    String 4: batman
    Write a letter you wish to find : j
    Not found

  • Valuation String in MM

    Dear All
    I would like to understand the significance of Valuation String in account determination.
    It is attached to the movement type but what is the exact utility.I mean we could have attached directly movement type to the transaction event key but why do we need valuation string?
    Regards

    Hai,
    Value string keys are for SAP internal usage. It is just a pointer to the transaction event key which is necessary for automatic account determination.
    Movement types are linked to transaction keys via valuation string in OMWN T-code. The R/3 System automatically determines the value string assigned to a specific transaction.
    It depends partly on entered parameters manually and partly on parameters derived internally by the system.
    The value string contains all posting transactions that are possible for a certain transaction.
    The program decides which of these posting transactions lead to G/L account postings in individual cases.
    You cannot define this in Customizing.
    Value string WE01, for the goods receipt for a purchase order into stock, contains transactions BSX and WRX.
    WE01: BSX, WRX, PRD, KDM, EIN, EKG, BSV, FRL, FRN, BSX, UMB.
    WA14: BSX, PRD, BSX, UMB WA01: BSX, GBB, PRD, BSX, And UMB
    Value string RE05 contains transactions BSX and UMB.
    In the standard system, value string WE01 is assigned to goods receipts (and also cancellations and return deliveries) for Standard and Subcontracting purchase order items without account assignment concerning valuated material into stock.
    In the case of (valuated) goods receipts for purchase order items not subject to account assignment, post the items to a stock account using the transaction key BSX and make an offsetting entry to a GR/IR clearing account.
    A price difference posting (transaction key PRD) is only used if the valuated material is subject to standard price control and if the order price (or invoice price) is different from the standard price. Transaction key KDM is required in Inventory Management for purchase orders in foreign currencies because of differences in exchange rates between goods receipts and invoice receipts, unless the material can not be debited or credited because it is subject to standard price control.
    The transaction keys EIN and EKG (and possibly FRE – see account determination for delivery costs) are only used in company codes where purchase account management is active (as required in France and Belgium for example).
    The transaction keys BSV, FRL, and FRN are only used for the Subcontracting item category. Value string WA14 is defined for deliveries without charge (movement type 511).
    In the standard system, value string WA01 is assigned to goods issues and other goods receipts. The R/3 System uses an additional influencing factor, account grouping, to differentiate further between the various movements during account determination.
    at company code level chart off accounts will be assigned, at valuation area level valuation grouping code has to assign
    For the material if Qty and value updation is activated  at the time only system goto find the value string,
    when you do the goods receipt or invoices at the time system find the value string based on the value string system will post to the GL accounts
    Regards
    Pramod

Maybe you are looking for