SDO_NN - Nearest neighbour geometry based on condition

Hi All,
I have two spatial tables SPL_ROADS and SPL_VILLAGES which stores the road and village information respectively. There are 4 categories of roads – NH, SH, MDR and VR. These are stored in same table (SPL_ROAD). Now I need a query to get nearest NH, nearest SH, nearest MDR and nearest VR and distance for selected villages or for all the villages.
I am using below query to get nearest road for all the villages.
SELECT /*+ LEADING(sv) */
sv.name, sr.name, trunc(SDO_NN_DISTANCE(1),2) dist
FROM spl_roads sr,
spl_villages sv
WHERE
SDO_NN(sr.geom, sv.geom,'sdo_num_res=1 unit=KM', 1) = 'TRUE'
But if I query for nearest NH using below query, it returns null.
SELECT /*+ LEADING(sv) */
sv.name, sr.name, trunc(SDO_NN_DISTANCE(1),2) dist
FROM spl_roads sr,
spl_villages sv
WHERE sr.category = 'NH'
SDO_NN(sr.geom, sv.geom,'sdo_num_res=1 unit=KM', 1) = 'TRUE' ORDER BY 1;
Please suggest me to get nearest road based on categories. I am expecting results in below format.
ROAD_ID | NAME | Nearest NH | distance from NH| Nearest SH | distance from SH | Nearest MDR |distance from MDR| Nearest VR| distance from VR
Thanks,
Sujnan

Hi,
Yes. The query takes very long time. I have written PL/SQL function to do this. Here I have to return multiple values from function. For this I have created user type called VILL_NN_ROAD_OBJ. The function will return this user type.
Here is user type and pl/sql function script.
CREATE OR REPLACE TYPE VILL_NN_ROAD_OBJ is object (
nh_road_id varchar2(50),
nh_dist number(10,2),
nh_road_name varchar2(250),
nh_road_num varchar2(50),
sh_road_id varchar2(50),
sh_dist number(10,2),
sh_road_name varchar2(250),
sh_road_num varchar2(50),
mdr_road_id varchar2(50),
mdr_dist number(10,2),
mdr_road_name varchar2(250),
mdr_road_num varchar2(50),
odr_road_id varchar2(50),
odr_dist number(10,2),
odr_road_name varchar2(250),
odr_road_num varchar2(50)
REATE OR REPLACE FUNCTION WEBRISNEW.GETNNROAD(inGeom SDO_GEOMETRY, in_year_id VARCHAR2) RETURN VILL_NN_ROAD_OBJ
IS
nnobj VILL_NN_ROAD_OBJ;
--nntab VILL_NN_ROAD_TAB;
BEGIN
nnobj:=VILL_NN_ROAD_OBJ(null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null);
SELECT /*+ INDEX(a SPL_ROAD_TEMP_GEOM_IDX) */
rd.kpwd_road_id, rd.kpwd_road_name, rd.kpwd_road_num, SDO_NN_DISTANCE(1) INTO
nnobj.nh_road_id, nnobj.nh_road_name, nnobj.nh_road_num, nnobj.nh_dist
FROM spl_roads sr inner join road_link_year_assoc rlya on sr.mslink = rlya.mslink
inner join kpwd_ns_road_details rd on rd.kpwd_road_id = rlya.kpwd_road_id and
rd.year_id = rlya.year_id and rlya.year_id=in_year_id and
rd.kpwd_road_category=1
WHERE SDO_NN(sr.geom, inGeom, 'sdo_batch_size=10 unit=km',1)='TRUE'
and ROWNUM <2;
SELECT /*+ INDEX(a SPL_ROAD_TEMP_GEOM_IDX) */
rd.kpwd_road_id, rd.kpwd_road_name, rd.kpwd_road_num, SDO_NN_DISTANCE(1) INTO
nnobj.sh_road_id, nnobj.sh_road_name, nnobj.sh_road_num, nnobj.sh_dist
FROM spl_roads sr inner join road_link_year_assoc rlya on sr.mslink = rlya.mslink
inner join kpwd_ns_road_details rd on rd.kpwd_road_id = rlya.kpwd_road_id and
rd.year_id = rlya.year_id and rlya.year_id=in_year_id and
rd.kpwd_road_category=2
WHERE SDO_NN(sr.geom, inGeom, 'sdo_batch_size=10 unit=km',1)='TRUE'
and ROWNUM <2;
SELECT /*+ INDEX(a SPL_ROAD_TEMP_GEOM_IDX) */
rd.kpwd_road_id, rd.kpwd_road_name, rd.kpwd_road_num, SDO_NN_DISTANCE(1) INTO
nnobj.mdr_road_id, nnobj.mdr_road_name, nnobj.mdr_road_num, nnobj.mdr_dist
FROM spl_roads sr inner join road_link_year_assoc rlya on sr.mslink = rlya.mslink
inner join kpwd_ns_road_details rd on rd.kpwd_road_id = rlya.kpwd_road_id and
rd.year_id = rlya.year_id and rlya.year_id=in_year_id and
rd.kpwd_road_category=2
WHERE SDO_NN(sr.geom, inGeom, 'sdo_batch_size=10 unit=km',1)='TRUE'
and ROWNUM <2;
SELECT /*+ INDEX(a SPL_ROAD_TEMP_GEOM_IDX) */
rd.kpwd_road_id, rd.kpwd_road_name, rd.kpwd_road_num, SDO_NN_DISTANCE(1) INTO
nnobj.odr_road_id, nnobj.odr_road_name, nnobj.odr_road_num, nnobj.odr_dist
FROM spl_roads sr inner join road_link_year_assoc rlya on sr.mslink = rlya.mslink
inner join kpwd_ns_road_details rd on rd.kpwd_road_id = rlya.kpwd_road_id and
rd.year_id = rlya.year_id and rlya.year_id=in_year_id and
rd.kpwd_road_category=2
WHERE SDO_NN(sr.geom, inGeom, 'sdo_batch_size=10 unit=km',1)='TRUE'
and ROWNUM <2;
-- dbms_output.put_line(dist || '--' || local_gid);
--insert into temp_vill_roads(vill_mslink, road_name)
--values (local_gid, item.mslink);
-- nntab:=VILL_NN_ROAD_TAB(nnobj);
return nnobj;
END;
Here queries inside function selects nearest road of different road categories and distance from and village.
select getnnroad(geom, '1999-2000') from spl_major_villages where rownum<3
If I run above query I get below results.
GETNNROAD(GEOM,'1999-2000')
(BJP3, 59.24, NH218 Bijapur Hubli Road, NH218, AFZ1, 166.67, SH22 Gulbarga Hosur upto State Border Road, SH22, AFZ1, 166.67, SH22 Gulbarga Hosur upto State Border Road, SH22, ATN1, 2.46, SH12 Jevaragi Chikkodi Sankeshwar Road, SH12)
(HUK1, 62.84, NH4 Madras Bangalore Poona Road (Bangalore Section), NH4, AFZ1, 195.44, SH22 Gulbarga Hosur upto State Border Road, SH22, AFZ1, 195.44, SH22 Gulbarga Hosur upto State Border Road, SH22, AFZ1, 194.54, SH22 Gulbarga Hosur upto State Border Road, SH22)
But I need these values as individual columns. I can run below query to do this but I think it is not efficient method.
select getnnroad(geom, '1999-2000').NH_ROAD_ID, getnnroad(geom, '1999-2000').NH_ROAD_NAME,
getnnroad(geom, '1999-2000').NH_ROAD_NUM from spl_major_villages where rownum<3
If I run below query, it says invalid identifier.
select t.NH_ROAD_ID from (
select getnnroad(geom, '1999-2000') t from spl_major_villages where rownum<3)
Please suggest me an efficient solution to do this.
Thanks,
Sujnan

Similar Messages

  • Bugy nearest neighbour spatial query?

    Hi,
    I have the following problem. The last query below returns the bad number of rows and I suspect some RDBMS bug behinde this, but am not really shure. Could some one please have a look?
    -- Preparation steps:
    -- Create 'Varos' Table
    CREATE TABLE VAROS (
    GMIPRIMARYKEY NUMBER (10) NOT NULL,
    TNEV VARCHAR2 (50),
    NEV VARCHAR2 (50),
    GEOMETRY MDSYS.SDO_GEOMETRY,
    PRIMARY KEY ( GMIPRIMARYKEY ));
    -- Insert 5 records
    --           2 have no name (nev attribute contains 'nincs neve')
    --          3 have meaningful name
    insert into varos values (615484,'Kisszentmarton','58131',MDSYS.SDO_GEOMETRY(2002,NULL,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,2,1),MDSYS.SDO_ORDINATE_ARRAY(18.04725,45.788384,18.04698,45.786578)));
    insert into varos values (617351,'Czn','nincs neve',MDSYS.SDO_GEOMETRY(2002,NULL,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,2,1),MDSYS.SDO_ORDINATE_ARRAY(18.060483,45.785141,18.060615,45.784949,18.06079,45.783938,18.061508,45.782226,18.061641,45.781539,18.061686,45.780696,18.061677,45.780531)));
    insert into varos values (617352,'Czn','nincs neve',MDSYS.SDO_GEOMETRY(2002,NULL,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,2,1),MDSYS.SDO_ORDINATE_ARRAY(18.061677,45.780531,18.061638,45.779749,18.061463,45.778458,18.061103,45.777196,18.060708,45.776133,18.060355,45.775182)));
    insert into varos values (622732,'Vejti','Tancsics Mihaly utca',MDSYS.SDO_GEOMETRY(2002,NULL,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,2,1),MDSYS.SDO_ORDINATE_ARRAY(17.964469,45.809845,17.964149,45.809448,17.9641,45.809356,17.964009,45.809186,17.964004,45.808933,17.964007,45.808886,17.964169,45.808335,17.964781,45.807061,17.965233,45.806119,17.965492,45.805637,17.965682,45.805283,17.965802,45.805063,17.965932,45.804825,17.966221,45.804298)));
    insert into varos values (629498,'Pisks','5821',MDSYS.SDO_GEOMETRY(2002,NULL,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,2,1),MDSYS.SDO_ORDINATE_ARRAY(17.912804,45.80585,17.913105,45.805645,17.922503,45.803835,17.935384,45.803584)));
    -- Insert metadata record
    insert into USER_SDO_GEOM_METADATA values('VAROS','GEOMETRY',MDSYS.SDO_DIM_ARRAY( MDSYS.SDO_DIM_ELEMENT('Lon',16,23,0.00000001),MDSYS.SDO_DIM_ELEMENT('Lat',45.5,48.8,0.00000001)),NULL);
    -- Commit
    commit;
    -- Create spatial index
    CREATE INDEX VAROS_INDEX ON VAROS(GEOMETRY) INDEXTYPE IS MDSYS.SPATIAL_INDEX PARAMETERS('SDO_LEVEL=10 SDO_NUMTILES=8');
    -- Test steps:
    -- Select records with not 'nincs neve'
    select gmiprimarykey,tnev,nev
         from varos
         where nev <> 'nincs neve';
    -- It fetches 3 records     
    -- 615484,Kisszentmarton,58131
    -- 622732,Vejti,Tancsics Mihaly utca
    -- 629498,Pisks,5821
    -- Right.
    -- Embed the above select statement as a subselect to a nearest-neighbour spatial query.
    -- It is requested to return the 3 nearest records ('sdo_num_res=3').
    select gmiprimarykey,tnev,nev
         from ( select gmiprimarykey,tnev,nev,geometry
                   from varos
                   where nev <> 'nincs neve'
              ) y
         where mdsys.SDO_NN(y.geometry,mdsys.sdo_geometry(2001,NULL,mdsys.sdo_point_type(18,45.5,0),NULL,NULL),'sdo_num_res=3')='TRUE';
    -- It is expected to return 3 records (the same ones as above), but it returns only 1 single record
    -- 615484,Kisszentmarton,58131
    -- Wrong.
    It seems that Oracle executes the neaest neighbour spatial query BEFORE evaluating the inline view.
    Regards,
    Tamas Szecsy
    [email protected]

    Hi,
    The nearest neighbor query has to use the spatial index, and there is no way to filter the results and
    use the spatial index.
    So, in Oracle9i the SDO_NN tuning parameter SDO_BATCH_SIZE was introduced - what this does is
    keep streaming results from the SDO_NN query until some other condition is met.
    Rewriting your query to use SDO_BATCH_SIZE:
    select gmiprimarykey,tnev,nev
    from varos y
    where mdsys.SDO_NN(y.geometry,
    mdsys.sdo_geometry(2001,NULL,mdsys.sdo_point_type(18,45.5,0),NULL,NULL),
    'sdo_batch_size=5')='TRUE'
    and nev <> 'nincs neve'
    and rownum < 4;
    Two things about SDO_BATCH_SIZE:
    Cannot be used with SDO_NUM_RES
    Requires an R-tree index
    Also, you are using hybrid quadtree indexes. At this point in time, there are almost no situations where
    Oracle recommends using hybrid quadtree indexes (this is true in all versions of Oracle Spatial).
    As of Oracle9i, the recommendation is to use R-tree indexes (which work as well or better than
    quadtree indexes most of the time). Certainly if you require the incremental nearest neighbor functionality
    described above then you need to use an R-tree index.
    If you must use a quadtree index, then you will still have to use sdo_num_res, but you should try to set the
    number large enough so that any filtering leaves enough in the result set.

  • Oracle Spatial function to find nearest line string based on lat/long

    Hi,
    Here is my scenario. I have a table that contains geometries of type line strings (the roadway network). The line geomteries are of type Ohio state plane south (SRID 41104).
    I have a requirement - given a lat/long, find the line string that snaps to that lat/long or the nearest set of line strings within a distance of 0.02 miles.
    This is a typical example of trying to identify a crash location on our roadway network. The crashes being reported to us in lat/long thru the GPS system.
    How can i acheive this through any spatial functions?
    Thanks for the help in advance.
    thanx,
    L.

    Hi L,
    That is not the way I would do it. I would convert my road segments to LRS data, then you can do all queries on the same data.
    Or, if you do not want to modify your original data, create a copy of your road segments with the same ID's and convert the copy into LRS data. If you keep the ID's identical, you can easily use geometry from one and LRS data from the other - as long as you are sure the ID is the same.
    Which will make the workflow a bit easier:
    1. Use SDO_NN to get the closest segments
    2. Use SDO_LRS.PROJECT_PT to get the projected point
    3. Use SDO_LRS.GET_MEASURE to get the measure
    And most of these you can incorporate into one single query. Now I am writing this of the top of my head (It's been a while since I played with LRS). so this has not been tested, but something like this should work (but could probably be greatly improved - it's getting late for me :-) ):
    SELECT
    SDO_LRS.FIND_MEASURE  --//find_measure needs an LRS segment and a point
        SELECT            --//here we select the LRS segment
          r.geometry 
        FROM
          roadsegments r
        WHERE SDO_NN(r.geometry,    --//based on the given GPS point
                     sdo_geometry(2001, 41104, sdo_point_type(lat,lon,NULL), NULL, NULL), 
                     'sdo_num_res=2 distance=0.02 unit=mile') = 'TRUE'
      SDO_LRS.PROJECT_PT  --//We project the point on the LRS segment
          SELECT         --//here we select the LRS segment (again, which could probably be improved!!)
            r.geometry 
          FROM
            roadsegments r
          WHERE SDO_NN(r.geometry,
                       sdo_geometry(2001, 41104, sdo_point_type(lat,lon,NULL), NULL, NULL), 
                       'sdo_num_res=2 distance=0.02 unit=mile') = 'TRUE'
        sdo_geometry(2001, 41104, sdo_point_type(lat,lon,NULL), NULL, NULL) --//The GPS point again
    AS milemarker from dual;So it is not as complicated as you think, it can easily be done with just one query (SQL can do a lot more than you think ;-) ).
    Good luck,
    Stefan

  • K nearest neighbours

    Hi there,
    Could anyone tell me how do I get the K nearest neighbours in Oracle 8.1.5 (Spatial)?
    I tried using SDO_WITHIN_DISTANCE but it returns me more than K results and I can't order them in distance.
    As a related question, could anyone tell me how do I compute the shortest distance between any two SDO_GEOMETRY?
    Thanks
    Lee

    Hi Lee,
    There are easy ways to find the nearest neighbors as well as getting the minimum distance between two geometries, but it involves upgrading to Oracle Spatial 8.1.6.
    In 8.1.6 there is a new operator (SDO_NN) that returns n nearest neighbors where n is specified in the query.
    Similarly, there is a function sdo_geom.sdo_distance that returns the distance between the closest points or segments of two geometries.
    This upgrade would be your best bet regarding the functionality you are looking for. There are also other improvements in the product you could look for in 8.1.6.
    Hope this helps, and regards,
    Dan
    null

  • How to blink TreeView Nodes based on condition c#

    suppose i am populating my tree view with data from database and i want to blink those nodes which has a specific data. now guide me with code how can i efficiently blink multiple tree view nodes  based on condition in winform application.

    Hi Mou_kolkata,
    >> anyone can give me small working code for tree node blinking
    Thank Armin for the details about blinking TreeView Nodes.
    For a simple demo to blink TreeView nodes, you could refer the link below:
    # Treeview control - How to make a node blink?
    https://social.msdn.microsoft.com/Forums/en-US/64e7a4d7-3098-4370-990f-390cb3a640a1/treeview-control-how-to-make-a-node-blink
    If you have issues when you blink Treeview nodes, please feel free to post a new thread in this forum, then you would get more help.
    Best Regards,
    Edward
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to create additional Line in file based on condition available as part of ZINVOIC02 Idoc segment

    Scenario Details:
    Receiving Zinvoic02 Idoc in PI. Idoc to file translation creates comma separated file with .csv extn
    The logic was kept in such a way that how many E1EDP01 (items) are available in IDoc that many no of records will be created in csv file.
    The file logic for some the fields is as below:
    No of records
    InvNumber
    InvDate
    CusNumber
    LineitemDesc
    Tax1Type
    Tax1%
    for 1st E1EDP01
    E1EDK01-BELNR
    E1EDK03-DATUM
    E1EDK01-PARTN
    Populate when E1EDP04/MSKWZ=O2 or O4 with E1EDP19/KTEXT
    Hardcode when E1EDP04/MSKWZ=O2 or O4
    Sum all E1EDP04 /MSATZ when E1EDP04/MSKWZ=O2 or O4
    for 2nd E1EDP01
    E1EDK01-BELNR
    E1EDK01-DATUM
    E1EDK01-PARTN
    same as above
    same as above
    same as above
    for 3rd E1EDP01
    E1EDK01-BELNR
    E1EDK03-DATUM
    E1EDK01-PARTN
    same as above
    same as above
    same as above
    Additional Line to be created when one or more of E1EDP01 is having E1EDP04/MSKWZ = O3
    same as above
    same as above
    same as above
    Hardcode "REIM for USE TAX"
    Hardcode ""
    Hardcode ""
    Now we have got addition requirement to add a new lineitem when tax code is equal to O3 for any of the E1EDP01.
    Is it possible to create additional lineitem based on condition. If yes, please share what should be the approach.
    How we can create the additional lineitem?
    Currently we are using E1EDP01 to do context handling.
    The target structure is :
    MT_FILE
         INVOICE     0..unbounded
              InvNumber     0..1
              InvDate          0..1
              CusNumber     0..1
              LineitemDesc     0..1
              Tax1Type          0..1
              Tax1%               0..1

    Hello,
    Please add one extra field in the data structure of the target mapping and let its occurrence be 0..unbounded under the root node 'MT_ADP_Invoice'.
    Apply the condition, if tax code MSKWZ (with its context changed to E1EDP01) equalsS to '03', then map it to the newly created target field whose occurrence is 0..unbounded.
    This will then create an additional field which is your requirement.
    The above is one way.
    But if you want to have the same target field name as ADP_File appended for tax field being '03'.
    Then in that case you can you two message mapping for one common operational mapping / interface.
    In the first message mapping you need to have one target data structure created with the source data structure remaining the same as the one shown by you in scrn shot. Now this target data structure will be similar to the source, except that you need to add one more field at the end(name different from other fields) in target (whose occurrence should be 0..unbounded), and it needs to be mapped to E1EDP01 provided the tax code field MSKWZ(its context changed to E1EDP01) equalsS to constant '03'.
    In the second message mapping you need to map the target structure of previous message mapping to the actual required structure. The newly added field should be mapped to ADP_File of your final target structure.
    This will then create the same structure as required.
    Note : Please change the occurence of ADP_File to 0..unbounded.
    Regards,
    Souvik

  • How to give color to the display of keyfigure based on condition using exception.

    Dear Friends.
       I am trying to color "BAD3" in exception based on condition but my problem is in exception I can have only formula variable to compare the value, How to assign a value to formula variable in BEx Query designer.
    What I am trying to do is :
       in Query designer :
       I have PO Quantity and Delivered Quantity. 
      if PO Qnantity > Delivered Quantity
        then Delivered Quantity field should be colored as "BAD3" in exception.
    but here proble is in exception
      I have alert level , operator, and  value fields for Delivered Quantity keyfigure ( Under definition tab - Exception is defined on = Delivered Quantity ).
    but for value field I dont have PO Quantity for that I have to supply one formula variable,
    When I created a forumula  and did this way
    FV_PO_QUANTITY = PO_QUANTITY formula editor throws errors. I dont understand How to assign a value of key figure to formula variable and use it in EXceptions.
    Please help me How I can solve my problem
    I will greatly appreciate your any help.
    Thanking you
    Regards
    Naim

    Thank you so much for your replies,
      I did following way and it helped me to solve my issues.
      I created one formula and under formula I use boolean < funtion to compare the values.
    like following way.
    ( 'PO Quantity' > 'Delivered Quantity' ) * ( FV_PO_QNT + PO_QUANTITY')
    here fv_po_qnt is formula variable I supply that variable to exception and since I have the value in it.. it compares with Delievered Quantity value and colored the perticular cell.
    Thanks again for your replies
    Regards
    Naim

  • How to stop workitem complete or how to keep work item in inbox based on conditions even if it completed

    Hi,
    my requirement is to call webdyn pro screen from workflow..
    i am calling webdynpro screen by using FM :CALL_BROWSER from workflow.
    when webdyn pro screen is called user will enter some values . if user closed webdyn pro screen with out entering any values we need show this workitem in his inbox. so that user can again open it and enter values in the webdyn pro screen.
    Please help how to stop work item complete based on conditions.
    Thanks,
    phani

    Hi,
    As per my understanding, this is not a proper approach toy call web dynpro using FM CALL_BROWSER. is the web dynpro screen being called when user clicks on the work item from portal UWL OR from SAP SBWP ?
    if you are calling web dynpro screen from portal UWL when user clicks on work item link, better you achieve it using SWFVISU tcode. in SWFVISU tcode you can maintain which web dynpro. application to call when particualr work item task come in user's inbox. in your web dynpro code, then you can write your buisiness logic when user clicks for example SUBMIT/SAVE button. on action submit/save button you can use FM SAP_WAPI_WORKITEM_COMPLETE to complete the worktiem once the user clicks on final submit/save button. in this way the workitem will get removed from user inbox only upon clicking on submit/save button.
    You can refer below link for web dynpro for workitem:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70648e99-4cc1-2c10-879d-9c61003c69d6?QuickLink=index&…

  • Table Control - Input Enabling/Diabling of Rows based on Condition.

    Hi,
    In the TC, I want to Input Enable/Disable the rows based on Conditions. The First row is input enabled always. But the other rows, (2nd onwards) need to be Input Enabled/Disabled based on some conditions. It is possible to make this working. Can you please provide me a suitable solution for this?
    Appreciate Your Help.
    Thanks,
    Kannan

    Hi Kannan...
    If we are talking about "Rows"...
    then identify based on some conditions the row numbers and in PBO...loop at screen with screen name..set thier input properties and modify screen (make them input only)
    If we are taking into consideration "columns"
    There is an internal structure COLS where we can identify column number of screen name ...or we can take except for one particular column..
    if some condition satisfied....
    loop at screen where screen-name <> "Column which is input'.
    Loop at screen...and make other columns display only.
    modify screen
    endif.
    Regards
    Byju

  • Need to send notification to a specific person based on condition

    Please help.
    I need to send notification to a specific person based on condition. When a specific hold is placed on an invoice, send a notification to the Buyer who is referenced on the Purchase Order that is associated with that invoice. It will be an FYI notification.
    I'm looking at APINVHDN AP Hold Maiin Process. I thought possibly adding a notification into the "No" condition after the GET_APPROVER function since there would not be an approver on the invoice since it's on hold.
    Any ideas would be very much appreciated.

    Try the LiveCycle Designer forum.

  • Calling different pages in a single sap script based on conditions?

    Hi All,
             Can anyone please give me an example of how to call different pages in a single sap script based on condition. Eg., i need to call 5 differnet pages from a single sap script based on 5 company codes.
    Please help
    Regards
    Priya

    This approach to make call from SAPscript. Its concept is similar to make call to a subroutine in another program. I would presume you understand how to use USING and CHANGING parameter. =)
    SAPscript -
    /: Perform get_date in program z_at_date
    /:    using &p_year&
    /:    changing &new_date&
    /: endperform.
    program z_at_date -
    form get_date TABLES rec_in  STRUCTURE itcsy
                                    rec_out STRUCTURE itcsy..
    DATA:
       v_year type char10.
    sap script and subroutine uses itcsy structure to transmit parameters
    first parameter is incoming while second parameter is out going
    their function is like an internal table with header line
    all data types between SAPscript and subroutine are string.
    so, you might need additional conversion.
    read incoming parameter with exact name from SAPscript
      READ TABLE rec_in WITH KEY name = 'P_YEAR'.
      IF sy-subrc EQ 0.
        v_year = rec_in-value.
      ENDIF.
    to return value, use the exact name on the second structure
        CONCATENATE v_year v_year INTO v_year.
        READ TABLE rec_out WITH KEY name = 'NEW_DATE'.
        IF sy-subrc EQ 0.
          rec_out-value = v_year.
          MODIFY rec_out TRANSPORTING value WHERE name = 'NEW_DATE'.
        ENDIF.
    endform.
    Hope this helps =)

  • Suppress Target structure based on condition

    Hi
    How to suppress target structure based on condition
    Example:
    Source is like:
    <Details>
    <Name>abdc</Name>
    <ID>234</ID>
    <Address>US</Address>
    </Details>
    I have two target structures
    1:
    <Details>
    <Name>abdc</Name>
    <ID>234</ID>
    <Address>US</Address>
    </Details>
    2:
    <Error>
        <ErrorID>
    </Error>
    if Any of the source filed is null then i dont want to map it to source structure. instead I want to assign an error id to ErrrorID node of the target.
    example
    abc,123,US
    abc
    in above case second record has two null values
    so my target structure should be
    <Details>
    <Name>abc</Name>
    <ID>123</ID>
    <Address>US</Address>
    </Details>
    <Error>
        <ErrorID>2nd record has erro</ErrorID>
    </Error>
    How to acheive this..
    Please help us
    Regards
    Sowmya

    hi ,
    plz try the following mapping
    Name-->exist-->if than else-> tuue----->Name
                                                        false---(constant)--
    error
    ID-->exist-->if than else-> tuue----->ID
                                                     false---(constant)--
    error
    adress-->exist-->if than else-> tuue----->address
                                                          false---(constant)--
    error
    regards,
    navneet

  • Spliting files based on condition using multi mapping with BPM

    Hi All,
    Can any one please let me know How to <b>Splite the outbound records based on condition using multi mapping with Integration Process in BPM</b>?
    Thanks
    Govindu.

    Hi All,
    Sorry for mistake this question for Exchange infrastructure guys.
    Thanks,
    Govindu

  • Executing OIM Process task based on Condition

    Hi Experts ,
    I have the following requirement :
    when a OIM user field - X is updated with a value A i have to call task T1, generate a random number on this task and have to trigger CREATE user Task within in the same process definition of an IT resource
    when the same OIM user field - X is updated with a value B i have to call task T1 again, generate a random number on this task and have to trigger DISABLE user Task.
    Im taking the approach of OIM lookup triggers which will kickoff the task T1 when user field X is updated
    My question is how can i add the conditional logic to a task(T1) to trigger the only one dependent task, either create user or disable user when a condition satisfies.
    currently i have added create user task and disable task as the dependent tasks of the task T1.
    If i am triggering create user task how can i get all the attribute mapping values of createuserAdp. since few are referring the process form, userdata and IT resource
    Im confused and not sure as how to implement such Work flow based on conditions. hope some one can help me!!
    Thanks in advance
    Edited by: user8942439 on Aug 24, 2012 11:58 PM

    Use the responses returned by task T1. Lets say for create user, Task T1 returns a response "CREATE". So in the responses tab add this response, select it and in the tasks to generate section add "Create user" task to this response. In the same way task T1 returns response "DISABLE", so on DISABLE response select task to generate Disable user.
    regards,
    GP

  • How can i render one facet in panel splitter based on conditions?

    Jdeveloper Version - 11.1.1.5
    How can i render one facet in panel splitter based on conditions?
    Ex : In horizontal Panel splitter first facet - af table
    second facet - af table
    if any one table estimated row count is zero i nedd to render the respective facet?
    is it possible?
    Please help..
    Thanks
    sk

    Yes you can do it but not on facet you can apply rendered attribute to the any of the child component of the facet.
    Thanks
    Raghav

Maybe you are looking for

  • Mac OS 8.6 and Mac OS 7.6 - Older Game Software - Need Help!

    I am new owner of an iMac OS X 10.4.8 system and have children who are wanting some educational games software games for Christmas- I have found some on E-Bay (ie. Where In the World is Carmen San Diego) however, the requirements are OS 8.6–9.2, OS X

  • How do u fix and ipod touch when it wont open games to play

    how do u fix an ipod touch when it wont open games tp play

  • PROVIDE SYNTAX?

    Hi, If i take one infotype data we are taking like this... PROVIDE * FROM P0002 BETWEEN PN-BEGDA AND PN-ENDDA. WRITE: P0002-PERNR, P0002-NACHN, P0002-VORNA. ENDPROVIDE. But i want multiple infotypes data like 0000,0006,0008....?Give me the syntax of

  • 2 new page diffrences

    Hi All, I would like to ask you the different of 2 new page in smartforms, here they are. 1/ New page by data overflow in main window of page 1 and go next to page 2. 2/ New page by using command new page (with command form). How can I recognize that

  • Captivate Buttons with JavaScript

    At my place of employment, we use Adobe Captivate to create demonstrational tutorials for our software system. We are currently looking into adding a screen at the end of each of our tutorials that includes buttons to either watch the tutorial again