Condition Specific or attach query with chose from list

Hi All,
I have developed a form with the header containing the Customer Code and Name and the Rows containing columns like SO Number, Item Code, Item Name and Quantity.
The SO Number field has a chose from list and I want that this will show only the Open Sales orders for the customer selected in the header CUSTOMER CODE field of the form.
Similarly The ITEM CODE choose from List will only show the items in that particular selected Sales Order in the first column of that row.
This is very much being possible through formatted search attached. But I wish if this can be done by adding condition or query to the choose from list. Please help me in this regards with your suggestions.
Please provide a sample code if any has already done something like this.
Regards,
Raj

Hi,
U can use a CFL with conditions. So when u tab out u can get only the required records.
Check out the below threads for some samples for CFL conditions. Search the forum for more samples.
CFL with conditions
cfl conditions
RE: CFL Conditions
CFL Conditions and Edit Text
Vasu Natari.

Similar Messages

  • Chose from list in internal error?

    Hi  expert
    i want to use chose from list from  udf object.
    Private Sub LoadingCFL(ByVal oForm As SAPbouiCOM.Form)
            Try
                Dim oCFLs As SAPbouiCOM.ChooseFromListCollection
                'Dim oCons As SAPbouiCOM.Conditions
                'Dim oCon As SAPbouiCOM.Condition
                oCFLs = oForm.ChooseFromLists
                Dim oCFL As SAPbouiCOM.ChooseFromList
                Dim oCFLCreationParams As SAPbouiCOM.ChooseFromListCreationParams
                oCFLCreationParams = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
                ' Adding 2 CFL, one for the button and one for the edit text.
                oCFLCreationParams.MultiSelection = False
                oCFLCreationParams.ObjectType = "SM_TPR" ''''''17
                'oCFLCreationParams.UniqueID = "CFL1"
                'oCFL = oCFLs.Add(oCFLCreationParams)
                oCFLCreationParams.UniqueID = "CFL2"
                oCFL = oCFLs.Add(oCFLCreationParams)
            Catch
                ' MsgBox(Err.Description)
            End Try
        End Sub
    when i use object no 17..... its showing  order chosefrom list.,but when i use  user define field object"  SM_TPR"
    then its error message showing   ''''''''''''''   internal error-1033
    please solve this problem......

    Hi John
    U could have given the object type in the screen painter itself.
    -Anto

  • Crystal report Chose from List or drop down value in parameter from UDT

    Hi Experts,
    I had face a issue while creating a report for my client in crystal report , I had create a report and in the parameter field I want to select the value from the chose from list or drop down value from the User define table.
    In parameter had written field as : Code@Select * from dbo. [@UDT] ;  but in the report filled I am not able to select the value.
    Please Help me ! Thanks in Advance. :

    HI
    Welcome to the Forum...
    You cannot put all the values in a single parameter field so you need to select each field for each parameter...
    Better you post it in this link for more reponses:
    Reporting and Printing

  • Query with variant from ABAP

    Hello!
    I need to execute a BW-query from an Abap-report.
    I tried it already with function module 'RRW3_GET_QUERY_VIEW_DATA' and with classes / objects 'CL_RSR_REQUEST' resp. 'CL_RSR_DATA', but:
    I want to use the query with a variant, which could be found in table RSRPARAMETRIZA.
    (Btw: even with a variant in table RSRVARIANTDIR  I don't get the results wanted...)
    Is there a direct way to call a BW-query with a variant from Abap?
    Alternatively: How do I get the variant-contents? Is there a 'universal' way to work with both kinds of variants? (RSRVARIANTDIR / RSRPARAMETRIZA) 
    Thanks in advance.

    Thanks for the link.
    Well, I already read that document and I followed the links to the former blogs on this subject.
    But this solution doesn't work for me: CL_RSR_QUERY_VARIABLES is unknown.
    I read the pdf and the function-module-code, but I still don't have an idea how to work with query- variants . The example-coding includes a line
    DATA: wf_variant TYPE variant .
    but that's not used, or is it?
    (I don't have a set of variables and conditions, but just a variant-name. The variant will be created by other people, who would start my report.)
    Greetings

  • Parametrized query with output from sql

    Hey all,
    has anyone figure out how to use the database connectivity toolset to perform a parameterized query with outputs (SQL)? From the other threads that i have read it would seem that this issue is not resolved. The error i get is:
    Error -2147467259 occurred at Cmd Execute.vi->getjobID.vi
    Possible reason(s):
    Exception occured in Microsoft OLE DB Provider for ODBC Drivers: [MySQL][ODBC 3.51 Driver][mysqld-5.0.50sp1a-enterprise-gpl-log]OUT or INOUT argument 3 for routine eln.lv_caperJob_create is not a variable or NEW pseudo-variable in BEFORE trigger in Rec Create - Command.vi->Cmd Execute.vi->getjobID.vi
    However, In Toad for mysql the following call works:
    set @outJobID=-999;
    set @outMsg="";
    call  lv_caperJob_create('TestJune30_2', '207', @outJobID, @outMsg);
    select @outJobID, @outMsg
    Attached is the LV code i am using. Thanks!
    Attachments:
    db code.JPG ‏50 KB

    Your first approach gave you an error because it took the ? parameter inside the '%?%' string and treated it as whole string as '%?%'. As you set the parameter, it did not understood where it need to insert the parameter.
    Your second approach is pretty much OK, only problem is you are trying to set the parameter with a string and aging creating the string while setting the parameter.
    The solution will be to create the whole string before setting the parameter and set the created String as parameter on the query something like this.
    String parameter = "%"+searchString+"%";
    Then set the parameter string to the query.
    Thanks

  • Set value in af:query with value from method

    hello all
    i have problem, when they want set value in af:query (inputText) with value from method, how to do that?
    anyone help..?
    thx
    agungdmt

    Hi,
    are you facing this issue when you try to show few values on right side (selected list) of shuttle component.
    what is your usecase exactly ?

  • BEx query with variant from ABAP

    Hello,
    I'm looking for possibility to start BEx query with variant (variant is created with tx RSRT) from ABAP. There are some funktion modules, which start queries (launch excel), for example RSAH_LAUNCH_EXCEL or RSSEM_QUERY_LAUNCH, but they are ending with short dump, when there are variables in the query. Is there any standard FM, which starts the query with variant or accepts parameters?
    regards,
    Krzysztof

    Hi,
    the short dump was my fault, I've passed query name instead of genuniid to the RSAH_LAUNCH_EXCEL.
    What I'm trying to do is to I'll start BEx query with parameters (I don't want to get selection-screen from the query, I need to fill it from ABAP).
    Here is my example, which is not working.
    DATA:
      lv_query(30) TYPE c,
      lv_genuniid  TYPE rsrrepdir-genuniid,
      ls_var       TYPE rrx_var,
      lt_var       TYPE TABLE OF rrx_var.
    lv_query = 'YB_MAKLER_DETAIL'.
    CALL FUNCTION 'CONVERSION_EXIT_GENID_INPUT'
      EXPORTING
        input  = lv_query
      IMPORTING
        output = lv_genuniid.
    IF lv_genuniid = ''.
      WRITE: / 'There is no Query', lv_query.
    ELSE.
      ls_var-vnam = 'YS_MKLE'.
      ls_var-sign = 'I'.
      ls_var-opt  = 'EQ'.
      ls_var-low  = '0000005100'.
      APPEND ls_var TO lt_var.
      ls_var-vnam = 'YS_VTGJ'.
      ls_var-sign = 'I'.
      ls_var-opt  = 'EQ'.
      ls_var-low  = '1999'.
      APPEND ls_var TO lt_var.
      CALL FUNCTION 'RSAH_LAUNCH_EXCEL'
        EXPORTING
          i_genuniid                       = lv_genuniid
          I_OBJVERS                        = 'A'
          i_hide_sapgui                    = 'X'
        TABLES
          I_T_VAR                          = lt_var.
    ENDIF.
    If parameter 'i_hide_sapgui' is empty, I'm getting empty selection-screen,
    If parameter 'i_hide_sapgui' equals 'X' I'm getting selection-screen filled with values, which were used last time manualy, not with values from the internal table 'lt_var'.
    Do you have any idea how to pass parameters to the query with this function module?
    Regards,
    Krzysztof

  • Query with 'different from' clause in Sqlite

    My question is very simple:
    How can I submit a query with a 'different from' clause into a table.
    In AIR, I would like to query :
    "select * from myTable where myField <> 'value' ";
    but it does'nt work !
    Nor
    "select * from myTable where myField != 'value' ";
    nor
    "select * from myTable where myField is not 'value' ";
    is it impossible to query with a 'different from' clause in Sqlite wih Adobe Air

    Hello,
    SQLite in AIR does support 'different from' and '<>' is the correct operator. Take the following emp table for example:
    id
    name
    age
    1
    A
    26
    2
    B
    30
    3
    C
    28
    If you want to query the records whose name isn't A. The following SQL is correct:
    select * from emp where name <> 'A'
    Thanks,
    Yang

  • Query with Tables from another Database

    Hi.
    I have a problem with a Query that executes a stored procedure that inserts data in a Table from another DataBase. The problem is when I try to execute a Query with the data related of that table using the user parameters of SBO ('[%0]'....'[%3]'). I use the following parameters for reference to the Table:
    "....FROM [-BDName-].[dbo].[-TableName-] T1..... "
    Any suggestions? Thanks a lot....
    (Suggestions in English or Spanish)

    None

  • Catch chose from list results, & use it

    The following script will activate/deactivate layers based on the letter {A, E, D, F} chosen from the list, then export single page (w 3 digits for the page number section) PDF. The problem I have I don't know to trap or cacth the results of whatever is chosen from the list & use it to name the pdf. If file name is ABC01_A_100.indd & the letter chosen from the list is "E" then final pdf should be ABC01_E_100.pdf.  If  the letter chosen from the list is D then final pdf is  ABC_D_100.pdf.  Basically what is changing whatever is between the two underscores _?_
    I can see the results on the events window. How can I capture the results of whatever is chosen from list? I tried return statement but no success at all.
    •Then the other question is  if i use choose from list with multiple selection allowed in which I can select more letters: A", "E", "D", "F" how can I output different PDFs with whatever is chosen from the list (with the correct layers activated/deactivated) & file names; ABC01_E_100.pdf, ABC01_F_100.pdf, ABC01_F_100.pdf.  See below. Please any input is greatly appreciated.
    property myPDFpreset : missing value
    set myPDFpreset to "Screen"
    set versionLayers to {"A", "E", "D", "F"}
    set the_choice to (choose from list versionLayers with prompt "What version do you need?" with multiple selections allowed) as text
    set chosenVersionLayer to item 1 of the_choice
    -->Activate versions Layers based in what was chosen
    if the_choice is false then error number -128
    if the_choice is "A" then
       myA()
    else if the_choice is "E" then
       myE()
    else if the_choice is "D" then
       myD()
    else if the_choice is "F" then
       myF()
       end if
    on myA()
       tell application "Adobe InDesign CS4"
           tell active document
               --Activate Layers
               set properties of layer "Tive" to {visible:true}
               set properties of layer "Logo" to {visible:true}
               set properties of layer "Search" to {visible:true}
               set properties of layer "Z1" to {visible:true}
               --Hide Layers
               set properties of layer "Z2" to {visible:false}
               set properties of layer "Z3" to {visible:false}
               set properties of layer "NS" to {visible:false}
               set properties of layer "MD" to {visible:false}
           end tell
           display alert " A activated"
       end tell
    end myA
    on myE()
       tell application "Adobe InDesign CS4"
           --set myDocument to active document
           tell active document
               --Activate Layers
               set properties of layer "Tive" to {visible:true}
               set properties of layer "Logo" to {visible:true}
               set properties of layer "Search" to {visible:true}
               set properties of layer "Z2" to {visible:true}
               --Hide Layers
               set properties of layer "Z1" to {visible:false}
               set properties of layer "Z3" to {visible:false}
               set properties of layer "NS" to {visible:false}
               set properties of layer "MD" to {visible:false}
           end tell
           display alert " E activated"
            end tell
    end myE
    on myD()
       tell application "Adobe InDesign CS4"
           --set myDocument to active document
           tell active document
               --Activate Layers
               set properties of layer "Tive" to {visible:true}
               set properties of layer "Logo" to {visible:true}
               set properties of layer "Z3" to {visible:true}
               --Hide Layers
               set properties of layer "Z1" to {visible:false}
               set properties of layer "Z2" to {visible:false}
               set properties of layer "NS" to {visible:false}
               set properties of layer "MD" to {visible:false}
               set properties of layer "Search" to {visible:false}
           end tell
           display alert "D activated" giving up after 6
            end tell
    end myD
    on myF()
       tell application "Adobe InDesign CS4"
           --set myDocument to active document
           tell active document
               --Activate Layers
               set properties of layer "Tive" to {visible:true}
               set properties of layer "Logo" to {visible:true}
               set properties of layer "Z3" to {visible:true}
               set properties of layer "NS" to {visible:true}
               --Hide Layers
               set properties of layer "Z1" to {visible:false}
               set properties of layer "Z2" to {visible:false}
               set properties of layer "MD" to {visible:false}
               set properties of layer "Search" to {visible:false}
           end tell
           display alert "F activated" giving up after 6
        end tell
    end myF
    ---======================
    tell application "Adobe InDesign CS4"
       activate
       set source_folder to file path of active document --Put the PDFs same folder as ID file
       set theName to name of active document
       set text item delimiters of AppleScript to {"_"}
       set theShortName to text 1 thru text item -2 of theName
       --text 1 thru text item -2 is every character from the first character to the second to last text item
       set text item delimiters of AppleScript to ""
      tell application "Finder"
           if (exists folder "PDFs" of folder source_folder) is false then
               make folder at source_folder with properties {name:"PDFs"}
           end if
       end tell
       repeat with x from 1 to count pages of active document --single pages
           set thePageName to name of page x of active document
           set page range of PDF export preferences to thePageName
           --section-page number M-U-S-T have 3 digits
           set threeDigitPageName to text -3 thru -1 of ("00" & thePageName)
           (* text 1 thru 3 are the first 3 characters
                       text -3 thru -1 are the last 3 characters*)
           set theFilePath to source_folder & "PDFs:" & theShortName & "_" & threeDigitPageName & ".pdf" as string
    ----Export PDF as single pages
           tell active document
               export format PDF type to theFilePath using myPDFpreset without showing options
           end tell
    end repeat
    end tell

    The following script will activate/deactivate layers based on the letter {A, E, D, F} chosen from the list, then export single page (w 3 digits for the page number section) PDF. The problem I have I don't know to trap or cacth the results of whatever is chosen from the list & use it to name the pdf. If file name is ABC01_A_100.indd & the letter chosen from the list is "E" then final pdf should be ABC01_E_100.pdf.  If  the letter chosen from the list is D then final pdf is  ABC_D_100.pdf.  Basically what is changing whatever is between the two underscores _?_
    I can see the results on the events window. How can I capture the results of whatever is chosen from list? I tried return statement but no success at all.
    •Then the other question is  if i use choose from list with multiple selection allowed in which I can select more letters: A", "E", "D", "F" how can I output different PDFs with whatever is chosen from the list (with the correct layers activated/deactivated) & file names; ABC01_E_100.pdf, ABC01_F_100.pdf, ABC01_F_100.pdf.  See below. Please any input is greatly appreciated.
    property myPDFpreset : missing value
    set myPDFpreset to "Screen"
    set versionLayers to {"A", "E", "D", "F"}
    set the_choice to (choose from list versionLayers with prompt "What version do you need?" with multiple selections allowed) as text
    set chosenVersionLayer to item 1 of the_choice
    -->Activate versions Layers based in what was chosen
    if the_choice is false then error number -128
    if the_choice is "A" then
       myA()
    else if the_choice is "E" then
       myE()
    else if the_choice is "D" then
       myD()
    else if the_choice is "F" then
       myF()
       end if
    on myA()
       tell application "Adobe InDesign CS4"
           tell active document
               --Activate Layers
               set properties of layer "Tive" to {visible:true}
               set properties of layer "Logo" to {visible:true}
               set properties of layer "Search" to {visible:true}
               set properties of layer "Z1" to {visible:true}
               --Hide Layers
               set properties of layer "Z2" to {visible:false}
               set properties of layer "Z3" to {visible:false}
               set properties of layer "NS" to {visible:false}
               set properties of layer "MD" to {visible:false}
           end tell
           display alert " A activated"
       end tell
    end myA
    on myE()
       tell application "Adobe InDesign CS4"
           --set myDocument to active document
           tell active document
               --Activate Layers
               set properties of layer "Tive" to {visible:true}
               set properties of layer "Logo" to {visible:true}
               set properties of layer "Search" to {visible:true}
               set properties of layer "Z2" to {visible:true}
               --Hide Layers
               set properties of layer "Z1" to {visible:false}
               set properties of layer "Z3" to {visible:false}
               set properties of layer "NS" to {visible:false}
               set properties of layer "MD" to {visible:false}
           end tell
           display alert " E activated"
            end tell
    end myE
    on myD()
       tell application "Adobe InDesign CS4"
           --set myDocument to active document
           tell active document
               --Activate Layers
               set properties of layer "Tive" to {visible:true}
               set properties of layer "Logo" to {visible:true}
               set properties of layer "Z3" to {visible:true}
               --Hide Layers
               set properties of layer "Z1" to {visible:false}
               set properties of layer "Z2" to {visible:false}
               set properties of layer "NS" to {visible:false}
               set properties of layer "MD" to {visible:false}
               set properties of layer "Search" to {visible:false}
           end tell
           display alert "D activated" giving up after 6
            end tell
    end myD
    on myF()
       tell application "Adobe InDesign CS4"
           --set myDocument to active document
           tell active document
               --Activate Layers
               set properties of layer "Tive" to {visible:true}
               set properties of layer "Logo" to {visible:true}
               set properties of layer "Z3" to {visible:true}
               set properties of layer "NS" to {visible:true}
               --Hide Layers
               set properties of layer "Z1" to {visible:false}
               set properties of layer "Z2" to {visible:false}
               set properties of layer "MD" to {visible:false}
               set properties of layer "Search" to {visible:false}
           end tell
           display alert "F activated" giving up after 6
        end tell
    end myF
    ---======================
    tell application "Adobe InDesign CS4"
       activate
       set source_folder to file path of active document --Put the PDFs same folder as ID file
       set theName to name of active document
       set text item delimiters of AppleScript to {"_"}
       set theShortName to text 1 thru text item -2 of theName
       --text 1 thru text item -2 is every character from the first character to the second to last text item
       set text item delimiters of AppleScript to ""
      tell application "Finder"
           if (exists folder "PDFs" of folder source_folder) is false then
               make folder at source_folder with properties {name:"PDFs"}
           end if
       end tell
       repeat with x from 1 to count pages of active document --single pages
           set thePageName to name of page x of active document
           set page range of PDF export preferences to thePageName
           --section-page number M-U-S-T have 3 digits
           set threeDigitPageName to text -3 thru -1 of ("00" & thePageName)
           (* text 1 thru 3 are the first 3 characters
                       text -3 thru -1 are the last 3 characters*)
           set theFilePath to source_folder & "PDFs:" & theShortName & "_" & threeDigitPageName & ".pdf" as string
    ----Export PDF as single pages
           tell active document
               export format PDF type to theFilePath using myPDFpreset without showing options
           end tell
    end repeat
    end tell

  • Dynamically fill area with words from list

    hello all,
    i would like to fill the entire area of a flash movie with
    words.
    the movie starts out blank, but as time goes on the visible
    area fills with words from a pre-written list.
    ideally, the height and width of the words is randomized
    within a range i determine.
    i wouldn't mind being pointed to a tutorial that shows how to
    fill an area with randomly-sized rectangles, that might help.
    eventually, i want to be able to control the speed of the
    area being filled with an input device (mouse or external sensor)
    but first things first!
    am using flash 8.
    thank you,
    aya.

    You may want to check this out. It fills a space with words
    and keeps filling the empty space. I'ts open source so you can take
    peak inside.
    http://www.levitated.net/daily/levEmotionFractal.html

  • Creating a Query with Data from 4 Tables.

    Hey guys. I'm having a small problem figuring out the best way for me to handle this query.
    I'm trying to make a query which outputs the amount of appointments a GP has furfilled, and the total amount allowed.
    I have 4 tables, for each I'm just gonna list the relevent columns:
    Appointment: ID, Patient_ID.
    Patient: ID, GP_ID.
    GP: ID, Trust_ID.
    Trust: ID, Quota.
    Appointment table has 400 entries (2 per patient atm).
    Patient table has 200 entries.
    GP Table has 30 entries (GP's can be assigned to more than one person) .
    Trust table has 6 entries.
    What I need to do is, look at the appointment table and get the number of times each patient has an appointment.
    Go through the patient table, and find out which GP the patient in the appointment belongs to.
    Add each occurance to the correct GP.
    Find out which Trust each GP belongs to, and add the total for each GP to the correct Trust.
    Check the quota in the Trust table, to see if the total is more than the allowed.
    I can't seem to think of an easy or simple way for me to do this. Can anyone help please? Many thanks.

    Hi,
    That sounds like a job for JOIN.
    To check the quotas against the total, use the SUM function; either the aggregate SUM or the analytic SUM, depending on your requirements.
    Sorry this answer is so vague, but that's the bes I can do with the information provided so far.
    Whenever you have a problem, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables involved. In this case, between 2 and 10 rows of data per table should be enough to show what you need to do.
    Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
    Always say which version of Oracle you're using.

  • Need help with writing a query with dynamic FROM clause

    Hi Folks,
    I need help with an query that should generate the "FROM" clause dynamically.
    My main query is as follows
    select DT_SKEY, count(*)
    from *???*
    where DT_SKEY between 20110601 and 20110719
    group by DT_SKEY
    having count(*) = 0
    order by 1; The "from" clause of the above query should be generated as below
    select 'Schema_Name'||'.'||TABLE_NAME
    from dba_tables
    where OWNER = 'Schema_Name'Simply sticking the later query in the first query does not work.
    Any pointers will be appreciated.
    Thanks
    rogers42

    Hi,
    rogers42 wrote:
    Hi Folks,
    I need help with an query that should generate the "FROM" clause dynamically.
    My main query is as follows
    select DT_SKEY, count(*)
    from *???*
    where DT_SKEY between 20110601 and 20110719
    group by DT_SKEY
    having count(*) = 0
    order by 1; The "from" clause of the above query should be generated as below
    select 'Schema_Name'||'.'||TABLE_NAME
    from dba_tables
    where OWNER = 'Schema_Name'
    Remember that anything inside quotes is case-sensitive. Is the owner really "Schema_Name" with a capital S and a capital N, and 8 lower-case letters?
    Simply sticking the later query in the first query does not work.Right; the table name must be given when you compile the query. It's not an expression that you can generate in the query itself.
    Any pointers will be appreciated.In SQL*Plus, you can do something like the query bleow.
    Say you want to count the rows in scott.emp, but you're not certain that the name is emp; it could be emp_2011 or emp_august, or anything else that starts with e. (And the name could change every day, so you can't just look it up now and hard-code it in a query that you want to run in the future.)
    Typically, how dynamic SQL works is that some code (such as a preliminary query) gets some of the information you need to write the query first, and you use that information in a SQL statement that is compiled and run after that. For example:
    -- Preliminary Query:
    COLUMN     my_table_name_col     NEW_VALUE my_table_name
    SELECT     table_name     AS my_table_name_col
    FROM     all_tables
    WHERE     owner          = 'SCOTT'
    AND     table_name     LIKE 'E%';
    -- Main Query:
    SELECT     COUNT (*)     AS cnt
    FROM     scott.&my_table_name
    ;This assumes that the preliminary query will find exactly one row; that is, it assumes that SCOTT has exactly one table whose name starts with E. Could you have 0 tables in the schema, or more than 1? If so, what results would you want? Give a concrete example, preferably suing commonly available tables (like those in the SCOTT schema) so that the poepl who want to help you can re-create the problem and test their ideas.
    Edited by: Frank Kulash on Aug 11, 2011 2:30 PM

  • Query with information from SD tables

    Dears,
    I have two questions concerning the creation of a Query which reports information of sales orders and information related to these (tables VBAK, VBAP, KNA1, VBKD).
    1. I want to include for example the ship-to-party, but I only find the field in structures, so it would not be able to include... or is there another way to acces this field?
    2. I want to include the field KONWA (rate unit). It should appear showing the rate unit depending on the condition type PR00 on item level... Is this possible?
    If anybody could help me out on this topics, I would appreciate it a lot!
    Thanks in advance,
    Dominik Ley
    Chile

    Hi,
    The answer for the first question is If you want to include ship to party at
    a)Header level:Simply pass the order number in to VBPA  table and fetch for PARVW="WE" having POSNR=000000.By default header details will appear in this table.Take "ADRNR" field contents and pass to ADRC table to fetch the address.
    b)Item level:If you want ship to party address at the item level Simply pass the order number in to VBPA  table and fetch for PARVW="WE" having POSNR=000010 or 000020 like that what ever is your line item number.If it recognises any change in change at the line item then only the entry will appear in the table.otherwise you cannot find any entry in the table.Take "ADRNR" field contents for the corresponding line item and pass to ADRC table to fetch the address.
    Regards,
    Mohan.

  • Update Query with Results From another Procedure

    I am not sure if you can do this or what the proper format of the command might look like.
    I have a stored procedure which insert records into a database. I want to insert the records which are returned by calling another procedure. This other procedure returns a cursor object to a variable named o_rows. Can this be done using Oracle 8i?
    Insert into MyTable
    MyStoredProcedure(oRows);

    You have a couple of options.
    1) You can turn your stored procedure into a pipelined table function. This would allow you to do something like
    INSERT INTO myTable
      SELECT *
        FROM TABLE( myStoredProcedure() );I don't believe that pipelined table functions were available in 8i, however.
    2) The other option would be to fetch rows from the cursor and insert those into your table. Something like
    LOOP
      FETCH oRows INTO col1, col2, col3, col4, ...
      INSERT INTO myTable( <<column list>> )
        VALUES( col1, col2, col3, col4 );Note that for simplicity I am omitting the declarations of the local variables col1, col2, etc. and the check to see whether the cursor was exhausted.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

Maybe you are looking for