How to include variable on block's query

I have a block where I fetch data using Query with sub-querry on Query data source name. The problem is that I need to put a variable in a sub-query, but it returned error: ORA-01008 not all variables bound. I'm retrieving multiple records here.
SELECT DISTINCT --fields
FROM table1 a, table2 b, table3 c, table4 d
WHERE a.line_cd = b.line_cd
AND a.line_cd = 21
--other conditions
AND a.clm_seq_no = 7100003
AND d.eff_dt = (SELECT MAX(eff_dt)
          FROM table4
          WHERE 1=1
          AND srvc_code = a.srvc_code
          AND line_cd = a.line_cd
          AND sched_no = a.sched_no
          AND cover_code = a.cover_code
          AND eff_dt <= :global.variable --problem
)

Thanks for your replies.
Query Data source typy = Table, I also tried using package that serves as handler of global variable (variables.eff_dt) but it gives me error (cannot perform query).
( SELECT * FROM (SELECT DISTINCT a.claimant_seq, a.expense_title title,
NVL(c.max_chrg, 0) max_chrg, NVL(c.min_chrg, 0) min_chrg, DECODE(tran_type, 2,
a.amount * -1, a.amount) amnt, a.line_cd, a.subline_cd, a.iss_cd, a.clm_yy,
a.clm_seq_no, a.item_no, a.peril_cd, a.sched_no, a.cover_code, a.srvc_code,
a.srvc_dtl_code, NVL(a.days, 0) no_days, c.no_days days, NVL(d.min_chrg, 0) MIN,
NVL(d.max_chrg, 0) MAX, a.dtls_seq, a.limit_amt, a.ctpl_amt, a.excess_amt
FROM VTPLBI_DTLS a, POL_COVERAGE b, POL_SRVC_DTLS c, pol_services d
WHERE a.line_cd = b.line_cd
AND a.sched_no = b.sched_no
AND a.cover_code = b.cover_code
AND b.line_cd = d.line_cd
AND b.sched_no = d.sched_no
AND b.cover_code = d.cover_code
AND a.srvc_code = d.srvc_code
AND a.srvc_code = c.srvc_code(+)
AND a.line_cd = c.line_cd(+)
AND a.sched_no = c.sched_no(+)
AND a.cover_code = c.cover_code(+)
AND a.srvc_dtl_code = c.srvc_dtl_code(+)
AND d.eff_dt = (SELECT MAX(eff_dt) --wency05082007
          FROM POL_SERVICES
          WHERE 1=1
          AND srvc_code = a.srvc_code
          AND line_cd = a.line_cd
          AND sched_no = a.sched_no
          AND cover_code = a.cover_code
          AND eff_dt <= variables.v_eff_dt --here is the problem
UNION SELECT DISTINCT a.claimant_seq, a.expense_title, 0, 0, DECODE(tran_type,
2, a.amount * -1, a.amount) amnt, a.line_cd, a.subline_cd, a.iss_cd, a.clm_yy,
a.clm_seq_no, a.item_no, a.peril_cd, a.sched_no, a.cover_code, a.srvc_code,
a.srvc_dtl_code, NVL(a.days, 0) no_days, 0, 0, 0, a.dtls_seq, a.limit_amt,
a.ctpl_amt, a.excess_amt
FROM VTPLBI_DTLS a
WHERE (a.sched_no = 2 or a.sched_no is null) )
ORDER BY dtls_seq ) comp_dtl
Message was edited by:
Wency

Similar Messages

  • How to include OSTC.rate in this query

    How to include OSTC.rate in this query,Im using it for crystal report.
    DECLARE @sVAT NVARCHAR(max) 
    DECLARE @sCess NVARCHAR(max) 
    DECLARE @sCST NVARCHAR(max) 
    DECLARE @nDocentry  INT 
    SET @sVAT='1'  SET @sCess='7' SET @sCST ='4'
    SELECT DocEntry
      ,DocDate,VehicleNo,Driver,NumAtCard
      ,Building,Block,Street,City,District,State,Country
      ,Series,DocNum
      ,BTinNo,BCstNo,BCeRegNo,BPanNo,BCeRange,BCeComRate,BCeDivision,BEccNo
      ,Type
      ,CardName,[Delivery Addr]
      ,ECCNo,CERange,CERegNo,CEDivis,CEComRate
      ,PAN,CST,STN
      ,[Deliver At]
      ,LineNum
      ,Dscription,HSNumber,Quantity,Rate,LineTotal,Discount,Vat [VAT],Cess [Cess],Total,GTotal
      ,TotalExpns
      ,MfgName
      ,MFGBuilding,MFGBlock,MFGStreet,MFGDistrict,MFGCity
      ,MCERegNo,MCERange,MCEDivis,MCEComRate,MPAN,MCST,MSTN
      ,SupName
      ,SUPBuilding,SUPBlock,SUPStreet,SUPDistrict,SUPCity
      ,SCERegNo,SCERange,SCEDivis,SCEComRate,SPAN,SCST,SSTN
      , (select substring((select upper(name)+',' from OUBR where isnull(U_SeriesGrp,'')<>'' order by Code FOR XML PATH ('')),1,LEN((select upper(name)+',' from OUBR order by Code FOR XML PATH ('')))-1))[Branches]
    FROM
    SELECT
      /*OBTN.DistNumber*/
      INV1.DocEntry
      ,OINV.DocDate,OINV.U_VehicleNo VehicleNo,OINV.U_Driver Driver,OINV.NumAtCard
      ,CAST(OLCT.Building AS VARCHAR(255))Building,OLCT.Block,OLCT.Street,OLCT.City,OLCT.County+' - '+OLCT.ZipCode[District],OCST.Name State,OCRY.Name Country
      , NNM1.SeriesName [Series], OINV.DocNum
      ,OLCT.TinNo [BTinNo],OLCT.CstNo [BCstNo],OLCT.CeRegNo [BCeRegNo],OLCT.PanNo [BPanNo],OLCT.CeRange [BCeRange]
      ,OLCT.CeComRate [BCeComRate],OLCT.CeDivision [BCeDivision],OLCT.EccNo [BEccNo]
      ,OBTN.U_InvType Type
      ,OINV.CardName,OINV.Address2[Delivery Addr]
      ,CE_CRD7.ECCNo,CE_CRD7.CERegNo,CE_CRD7.CERange,CE_CRD7.CEDivis,CE_CRD7.CEComRate
      ,CRD7.TaxId0[PAN],CRD7.TaxId1[CST],CRD7.TaxId11 [STN]
      ,OINV.U_Address [Deliver At]
      ,INV1.LineNum,INV1.ItemCode
      ,INV1.Dscription,OITM.SWW [HSNumber]
      ,INV1.Quantity,INV1.PriceBefDi Price,INV1.LineTotal,INV1.Price Rate,(INV1.PriceBefDi-INV1.Price)*INV1.Quantity Discount
      ,INV4.Vat
      ,INV4.Cess
      ,INV1.LineTotal+INV1.VatSum Total 
      ,OINV.DocTotal GTotal
      ,OINV.TotalExpns
      ,OBTN.U_MfgName MfgName
      ,convert(nvarchar(250),MFG_CRD1.Building) MFGBuilding,MFG_CRD1.Block MFGBlock,MFG_CRD1.Street MFGStreet,MFG_CRD1.City MFGCity,MFG_CRD1.ZipCode[MFGDistrict]
      ,OBTN.U_MCERegNo MCERegNo,OBTN.U_MCERange MCERange,OBTN.U_MCEDivis MCEDivis,OBTN.U_MCEComRate MCEComRate
      ,OBTN.U_MPAN MPAN,OBTN.U_MCST MCST,OBTN.U_MSTN MSTN
      ,OBTN.U_SupName SupName
      ,convert(nvarchar(250),SUP_CRD1.Building) SUPBuilding,SUP_CRD1.Block SUPBlock,SUP_CRD1.Street SUPStreet,SUP_CRD1.City SUPCity,SUP_CRD1.ZipCode[SUPDistrict]
      ,OBTN.U_SCERegNo SCERegNo,OBTN.U_SCERange SCERange,OBTN.U_SCEDivis SCEDivis,OBTN.U_SCEComRate SCEComRate
      ,OBTN.U_SPAN SPAN,OBTN.U_SCST SCST,OBTN.U_SSTN SSTN
    FROM
      OINV
      INNER JOIN INV1 ON OINV.DocEntry=INV1.DocEntry
      INNER JOIN OITM ON INV1.ItemCode=OITM.ItemCode
      INNER JOIN 
      select
      INV4.DocEntry,INV4.LineNum
      ,CASE WHEN INV4.staType IN (@sVAT,@sCST) THEN sum(INV4.TaxSum) ELSE 0 END Vat
      ,CASE WHEN INV4.staType=@sCess THEN sum(INV4.TaxSum) ELSE 0 END Cess
      from
      INV4
      where
      INV4.DocEntry={?DocKey@} and INV4.RelateType=1
      group by INV4.DocEntry,INV4.LineNum,INV4.staType
      )INV4 ON INV1.DocEntry=INV4.DocEntry AND INV1.LineNum=INV4.LineNum
      INNER JOIN OLCT ON INV1.LocCode=OLCT.Code
      INNER JOIN OCST ON OLCT.State=OCST.Code
      INNER JOIN OCRY ON OLCT.Country=OCRY.Code and OCST.Country=OCRY.Code
      INNER JOIN INV12 ON OINV.DocEntry=INV12.DocEntry
      INNER JOIN OITL ON INV1.BaseType=OITL.ApplyType AND INV1.BaseEntry=OITL.ApplyEntry AND INV1.BaseLine=OITL.ApplyLine
      INNER JOIN ITL1 ON OITL.LogEntry=ITL1.LogEntry
      INNER JOIN OBTN ON ITL1.MdAbsEntry=OBTN.AbsEntry and ITL1.SysNumber=OBTN.SysNumber and ITL1.ItemCode=OBTN.ItemCode
      LEFT JOIN OCRD MFG_OCRD ON MFG_OCRD.CardCode=OBTN.U_MfgCode
      LEFT JOIN CRD1 MFG_CRD1 ON MFG_OCRD.CardCode=MFG_CRD1.CardCode AND MFG_OCRD.BillToDef=MFG_CRD1.Address and MFG_CRD1.AdresType='B'
      LEFT JOIN OCRD SUP_OCRD ON SUP_OCRD.CardCode=OBTN.U_SupCode
      LEFT JOIN CRD1 SUP_CRD1 ON SUP_OCRD.CardCode=SUP_CRD1.CardCode AND SUP_OCRD.BillToDef=SUP_CRD1.Address and SUP_CRD1.AdresType='B'
      LEFT JOIN NNM1 ON OINV.Series=NNM1.Series
      LEFT JOIN CRD7 ON OINV.CardCode=CRD7.CardCode AND CRD7.Address='' AND CRD7.AddrType='S' --Tax Details
      LEFT JOIN CRD7 CE_CRD7 ON OINV.CardCode=CE_CRD7.CardCode AND OINV.ShipToCode=CE_CRD7.Address AND CE_CRD7.AddrType='S' -- Central Excise Details
      WHERE
      INV1.DocEntry={?DocKey@}
    )INVOICE
    GROUP BY
      DocEntry
      ,DocDate,VehicleNo,Driver,NumAtCard
      ,Building,Block,Street,City,District,State,Country
      ,Series,DocNum
      ,BTinNo,BCstNo,BCeRegNo,BPanNo,BCeRange,BCeComRate,BCeDivision,BEccNo
      ,Type
      ,CardName,[Delivery Addr]
      ,ECCNo,CERange,CERegNo,CEDivis,CEComRate
      ,PAN,CST,STN
      ,[Deliver At]
      ,LineNum
      ,Dscription,HSNumber,Quantity,Rate,LineTotal,Discount,Vat,Cess,Total,GTotal
      ,TotalExpns
      ,MfgName
      ,MFGBuilding,MFGBlock,MFGStreet,MFGDistrict,MFGCity
      ,MCERegNo,MCERange,MCEDivis,MCEComRate,MPAN,MCST,MSTN
      ,SupName
      ,SUPBuilding,SUPBlock,SUPStreet,SUPDistrict,SUPCity
      ,SCERegNo,SCERange,SCEDivis,SCEComRate,SPAN,SCST,SSTN

    You're double posting ( how to change join condition in this query ) , stop doing that, since you'll only be distracting and diverting by doing so.
    Take the time to read the SQL and PL/SQL FAQ @ https://forums.oracle.com/forums/ann.jspa?annID=1535, since you're not even mentioning a database version, while 9i {noformat} != {noformat} 10g {noformat} != {noformat}11g...
    Have your DBA trace/tkprof the query, and so on, if you cannot do that yourself.
    And then provide the feedback the volunteers, including Ace (Directors)' s need ( and you were very lucky, from that point of view, I think, from looking at both your posts ;) )

  • How to include variable in the text column in report painter?

    Dear Expert,
    Would like to seek for your help to include How to include variable in the text column in report painter?Please advice.
    Thank you.
    Regards,
    Karen
    Edited by: Karen Swee Ping Ho on Jun 17, 2011 2:48 AM

    Hi,
    Thank you for the promt reply.
    1) How I include the variable in the column header to display fiscal year which I have selected from the selection screen?
    which variable should i use?
    2) Where can i find more information about the characteristic and which variable to be use base on the characteristic?
    For example: I would like to display the fiscal year from the selection screen/input screen when execute the report which also will reflected to the element definition and will display the fiscal year also in the column text?
    3) Kindly advise base on question 2, the variable that i use in element definition it will also display  in selection screen?
    4) When execute the report the first selection screen input parameter it obtain from where it is from element definition?
    5) Please advice how to be done when report execute with first screen input selection will also reflect the element definition of column and rom with the selection of the fiscal year?
    Please help.
    many thanks
    Edited by: KH on Jun 18, 2011 7:18 AM

  • How to include a signature block in a form

    how to include a signature block in a form.
    Please advise...

    duplicate thread????
    which user password you want to change..... and refer to your old thread... dont keep creating new threads for the same problem....

  • How use integer variable as object in query

    sir how use integer variable as object in query
    see my code
    Integer currentssgg = new Integer(tt.getValue().toString()); no error
    //yy.setValue(currentss); no error
    //yy.setValue(new Integer(tt.getValue().toString())); no eror
    getSessionBean1().getTripRowSet().setObject(1,currentssgg); giv error
    tripDataProvider.refresh();
    and how use string variable same as method
    please give me idea how use integer variable as object in query
    thank's
    aamir

    >> var mnu = 'menu1';
    this[mnu].onRollOver = function(){
    <<
    Close, but it needs to be like this:
    var mnu = 1;
    this["menu" + mnu].onRollOver = function(){
    Dave -
    www.offroadfire.com
    Head Developer
    http://www.blurredistinction.com
    Adobe Community Expert
    http://www.adobe.com/communities/experts/

  • How to put variable selection and the query result the same screen

    Dear all,
       how can I put the variable selection and the query result in the same screen? Please advise. Thanks.
    Jin Ming

    Not sure if you are saying you want the prompts on the same page as the results... however in 7.0 with BEx Analyzer, you can insert a text object from the design toolbar and assign it to the variable.... this way, lets say you run query for period 6, then the text object will display "6" on the same area where the query results are.

  • Discoverer Plus - How to include variable text in the Title

    Hi,
    I need to include a variable text in the report like the user information or another information i woul like to obtain from a query that is not the standars date,time,... oracle discoverer plus improves us.
    I tried with calculations associates to a parameters, but is not possible.
    I hope i explained correctly.
    Thanks,

    This can be done by creating a parameter, then a calculation, then a condition. Then under "Edit Header" or Page Setup, choose "Header" or "Footer"as needed and choose to insert the Parameter.
    Step by step Example instruction:
    1-Create a parameter as follows:
    --Item = NONE
    --Name = "Workbook run by" (This will appear in the heading or title when workbook run)
    --Prompt = "Please enter UserID in all capital letters"
    --Description and Default value left blank
    2-Create a Calculation
    --In New Calculation choose "Function" then choose the function "USER" from Database. (This is all that the calculation will need.)
    --Name Calculation  = i.e.: "DB_USERID" 
    3-Create a condition as follows:
    --Name = Request_UserID
    --Item = DB_USERID
    Condition = IN
    Value = Choose parameter: Workbook run by
    -Double click on worksheet title, choose Insert, then choose Parameter (This can be done the same way under Page Setup for Header and Footer
    -The calculation will create an extra column which I put at the top as a Page Item
    -This will force the user to enter the UserID they are logged in to Discoverer with.
    -This is case sensative. Therefore, since all Databe IDs are stored on the Database in all-caps, then the user will have to enter in all caps as well.
    Thanks,
    Sutirtha

  • How to pass variable to jump to query !

    hello Experts !
    i have a query with variable "Month". so when i run that , user enters the Month/year and it gives the results for "Employee ID" for that month/year.
    i have also creted another query on dso, in order to get detail line item information abt " Employee ID" and join this query with the main one thru RRI.
    in RRI , i have selected "Employee ID" as single value field for both the query. the problem is when i do GOTO from the first query , it does work and gives me the result, but it gives records corresponds to that "Employee id"for all the months and year.
    How do i also pass "Month" - variable value along with that "Employee id" so that the second query only shows line item for that employee id for that selected month.
    thanx

    Hi,
    The use of jump query is to get the detailed level information, for the key figure values which appears in main query.
    This mainly happen when in your cube design you do not details information.
    For example:
    In your main query output you have :
    division , company code , variable amount
    Rec1)10, 1012,4000
    Rec2)20,1001,5000
    Now you want to know what are the document numbers involved to get the variable amount:
    So now , you jump query output will be for record no 1.
    Document number , variable amount
    100001,500
    100002,1000
    100003,2000
    100004,500
    So now you can see that jump query is giving you the documents numbers which are total of 4000.
    Once you have variable in main query , the jump will give details of those keyfigur values only.
    In case of jump query you need not to have any variable , it will automatically take from parant query.
    Though you can define varaible for jump also.
    I hope it clear your doubt
    Thanks
    Mayank

  • How to Include 0GLACCEXT characteristic (FSV) into Query?

    I am trying to produce a Balance Sheet, I have the data coming in from GL and I have used Z cubes but I have copied all the data from Standard BI Content Cubes,  I have also created a Z Multi Provider based on the 0FIGL_VC1 virtual cube.
    In the query designer, I can see all the chars but the 0GLACCEXT (which is the FSV), I have uploaded the master data to this CHAR and I was going to include it in the rows section, but when I look through all the dimentions of the InfoProvider on the left hand pane ( of the BI7 Query designer) I can not find this CHAR, any clues or ideas as to what has happened?
    Please let me know if you have come accross it and how you resolved it... thanks

    0GLACCEXT does not exists in 0FIGL_C01, but exists in 0FIGL_VC1. There is a function module (someting like this /xxxxx/BCT_FIGL_DATA_GET_VC01) between these two, that has the logic to feed data for 0GLACCEXT from 0FIGL_C01.
    I have used Z cubes but I have copied all the data from Standard BI Content Cubes, I have also created a Z Multi Provider based on the 0FIGL_VC1 virtual cube.
    Looks like u have ...  Z cube --> 0FIGL_VC1 --> Z Multi Provider 
    In that case, u have to copy that function module between Z cube & 0FIGL_VC1, so that 0GLACCEXT (0FIGL_VC1) gets filled.
    To see that function module..
    Double click on 0FIGL_VC1 --> goto change mode --> click on Information (blue ' i ' ) icon --> click on "Type/Namespace" tab --> click "details" tab
    Here u can see function module ( someting like this /xxxxx/BCT_FIGL_DATA_GET_VC01).
    If u check standard queries... all the queries related to balance sheet, defined on virtual provider (0FIGL_VC1, 0FIGL_VC2 & 0FIGL_VC10), but not on the cubes. The reason behind this is, only the virtual provider consists of 0GLACCEXT

  • How to pass variable into lov sql query using like operator

    hi.
    i want to use a lov where i want to pass a variable using like operator.
    my query is
    select empno,name from table where empno like ':ed%';
    my empno is A001 TO A199 AND B001 TO B199 so i want show either A% or B% empno
    how can i do this ?
    reagrds

    kindly press Shift+F1 at a time you face this error to see the exact Oracle error message.
    and provide us with that detail
    and its better if you start new topic for that error... because that will be new error,,,
    -- Aamir Arif
    Edited by: Aamiz on Apr 7, 2010 12:27 PM

  • How to bind variables to a LOV query

    Hi,
    I have a page with a messageLOVInput field. I have attached an external LOV with it. The query attached to the LOVregion has a bind parameter which should be replaced by the logged in Person's Business Group ID.
    I have done all the required LOV Mappings etc for a normal LOV.
    If I hardcode the business group ID and then run the page, its working fine. But if I want to bind the businessgroup id at runtime, I am getting an error saying "all variables not bound"
    I tried the usual method of calling some initMethod in AM from the CO of the external LOV region, and then calling some initQuery in the VO to set the bind parameter, but this doesn't work.
    How do I bind variables at runtime with the LOV VO ?
    Thanks, in advance !!
    -Debojyoty

    Hi Deb,
    Heres what you gotta do.
    By default the query is going to be executed in the EO . In case of a query without any bind variables this works fine. This is because for LOV EO's one doenst' have to explicitly call the the executequery method. In your case, there is one bind variable that needs to be set, before any query is fired, either implicitly or explicitly else you are going to get Bind variable not set exception.
    1. Define an init query method in your EOImpl.
    public void initQuery(String p_param)
    setWhereClause(null);
    setWhereClauseParams(null);
    setWhereClauseParam(0,p_param);
    2. Define a method for initializing the query. In your AM IMPL for the LOV, recieve the EOIMPL and call the initquery method and pass the parameter that you would to base the query upon.
    3. In the CO for the LOV, call the AMimpl Method defined in step 2.
    Let me know if this works ? If you still have problems, I will post some sample code.
    Rgds,
    Venkatesh
    Message was edited by:
    Venkatesh

  • How to transfer variable value from one query to another query?

    I create two queries which contain the same variable "Year" and "Month".
    In the wad,Query1 is used to be a table and Query2 is used to show the chart in the condition with the same variable value of Query1
    So I want to transfer the variable  value from query1 to query2.
    Can anyone help me ?

    Let me explain the issue in detail.
    In Query Designer, both the year and  month variables are defined by user exit function to read current year and month and can be modified  during the query runtime.
    In WAD, Query1 is  used  to be a table with a table interface to hyperlink a chart which is defined by Query2 with the same variable value of Query1.
    During the runtime of template, if I change the variable value of Query1 , I want the variable of Query2 to be changed automatically with the same new value.
    So in the table interface of Query1 , I write the ABAP code in "SE24" and related source code to the variable is following:
    concatenate
    'function fire_urlJGSP_Col(filter) {'
    Cl_rsr_www_renderer=>c_lf
    'chart_url="' url '" + "&CMD=LDOC'
    '&TEMPLATE_ID=GCCHART_9' "WEB ID of the work book
    '&PAGEID=Graphics'       "Name of the view
    '&CMD=PROCESS_VARIABLES&SUBCMD=VAR_SUBMIT&VAR_NAME=Z2MYEAR&VAR_VALUE_EXT=" + filter'
    Cl_rsr_www_renderer=>c_lf
    'openWindow(chart_url,"chart_window","dependent=yes","600",'
    '"450","true")'
    Cl_rsr_www_renderer=>c_lf
    into l_coding.
    In this way , I can only transfer the year variable value from Query1 to Query2 and not two variables .
    So , how  shall I do to transer the two variable value in the same?

  • How to include variable inside XML Fragment in assign ?

    HI..how are you today.
    i need to assign an XML Fragment...like this into a variable:
    <tns:pCmds>put @Encoded_Filename@</tns:pCmds>
    <tns:pCmds>bye</tns:pCmds>
    that Encoded_Filename is a variable..but of course..it is taking the whole put ...as a string...how can i tell bpel that the @@ is a variable?
    i remember having some escape char to do so, but can figure out now..
    Thanks in advance
    P.

    ok, i got what you were saying about CDATA, but i think my problem is the opposite..i WANT my string to be parsed..
    when i assign <tag> put @filename@ </tag> i need that variable to be replaced..and right now, it is taken all as a simple string...

  • How to include variable "assigned to" values in quick search

    Hi!
    The values available in field "assigned to" (agent inbox), vary depending on settings in PPOMA_CRM.
    I can see different teams or even nothing.
    When I try to define a quick search (TX: CRMC_IC_AUI_QUICKS), the field "assigned to" has two values: Me and My groups. Looks like this values are fixed, as they do not vary if I change my assignments in PPOMA_CRM.
    Does that mean that we cannot define any other values in quick search, and that we have to manually choose them in inbox?
    Thanks,
    Borut

    No one encountered this requirment?

  • Oracle POC - how to include variable in data source and reference it

    from style sheet? We need to automatically print Supplier name on Oracle Contract Terms Template signatures section. Presently it needs to be entered by hand and it is not optimal because Supplier name exists on a purchasing document.
    Thanks in advance!

    It's not very intuitive to do this sort of thing in a batch file. If you have the option to use PowerShell instead, I'd highly recommend it. It's the new way for performing command-line tasks in Windows, and there's no need to struggle with the old command
    prompt anymore.
    Here are PowerShell and batch examples of doing this type of string parsing:
    # PowerShell:
    $dataDirectory = Get-Content .\test.txt |
    ForEach-Object {
    if ($_ -match '^\s*data directory\.*:\s*(.+?)\s*$')
    $matches[1]
    break
    $dataDirectory
    # Batch file:
    @echo off
    setlocal EnableDelayedExpansion
    set DATA_DIRECTORY=
    for /F "tokens=1,* delims=:" %%a in (test.txt) do (
    set PROPERTY=%%a
    set PROPERTY=!PROPERTY:~0,14!
    if /I "!PROPERTY!" equ "data directory" (
    set DATA_DIRECTORY=%%b
    :RemovingSpaces
    if "%DATA_DIRECTORY:~0,1%" neq " " goto :SpacesRemoved
    set DATA_DIRECTORY=%DATA_DIRECTORY:~1%
    goto :RemovingSpaces
    :SpacesRemoved
    echo %DATA_DIRECTORY%
    endlocal

Maybe you are looking for

  • Unable to run BDC due to start-of-selection

    Hi Experts, I am running BDC for ROH type. The data is in the excel file so I am performing the below operation. In the BDC recording before perform open group there is "START-OF-SELECTION" and I also have a START-OF-SELECTION for excel uploading now

  • Automatic scheduling of the automatic payment programme

    Hi All, My client would like to set up different ways of running the automatic payment programme. They have different payment methods which mean different things. First option: They would like payment method P1 for example to run every Mondays and th

  • Please help with timout code. I'm under deadline.

    I have a timeline that stops on a frame full of flv playback components. I need the frame to listen for mouse clicks and after no mouse clicks for 2-3 minutes I need it to gotoAndPlay frame 1. As long as the viewer keeps clicking on the video control

  • Migration Assistant - Windows to Mac

    After installing Migration Assistant on a Windows laptop and a new MacBook, the two machines have been searching for each other for an hour without success.

  • Bex Structure Headings

    Hi Is it possible to add headings to the structure in Bex query, I tried using selection but it is showing the values...I just want to add descriptions with no values as below in bold: Example Plan ---Values Actual ---Values Please advice