Custom code for LOV generation in Custom.pll

Hi All,
I am using the custom in my custom application, I am using the following procedure in Custom.pll for LOV generation. When I use the same procedure standalone then it's working fine, But when I use it in Custom.pll then it's giving me the Error "No-Data-Found", please let me know what to do. I am assuming that it can't find the appropriate backend table, I am logging in through sysadmin/sysadmin, Also I have fully followed the procedure for Table registration and Synoym creation and assiging it to apps but even then it's giving me the above mentioned error.
procedure event(event_name varchar2) is
rg_id RECORDGROUP;
query_string VARCHAR2(2000);
crnt_item VARCHAR2(60) := name_in('SYSTEM.CURSOR_ITEM');
crnt_type VARCHAR2(30) := GET_ITEM_PROPERTY(crnt_item, DATATYPE);
-- Omit crnt_hint if not context sensitizing the LOVs.
crnt_hint VARCHAR2(30) := SUBSTR(GET_ITEM_PROPERTY(crnt_item,
HINT_TEXT),
INSTR(GET_ITEM_PROPERTY(crnt_item,
HINT_TEXT), ':') + 2);
begin
IF event_name = 'WHEN-NEW-BLOCK-INSTANCE' THEN
IF (form_name = 'FRM_EXPATIENTMASTER' and block_name = 'REG_EXPATIENTMASTER' and item_name = 'DEFENCECODEFK')
then
crnt_item := SUBSTR(crnt_item, (INSTR(crnt_item, '.') + 1));
query_string := 'SELECT DISTINCT reg_defencecategory.defencecodepk'
|| ' AS holder_value '
|| ' FROM hms.reg_defencecategory'
|| ' ORDER BY 1';
IF NOT ID_NULL(FIND_GROUP('generic_lov_rg')) THEN
DELETE_GROUP('generic_lov_rg');
END IF;
rg_id := CREATE_GROUP_FROM_QUERY('generic_lov_rg', query_string);
SET_LOV_PROPERTY('generic_' || crnt_type || '_lov',
GROUP_NAME, rg_id);
IF FORM_SUCCESS THEN -- >From "IF" to "END IF" may be omitted
-- if not context sensitizing the LOVs.
SET_LOV_PROPERTY('generic_' || crnt_type || '_lov',
TITLE, 'Available ' || crnt_hint || ' values');
SET_LOV_COLUMN_PROPERTY('generic_' || crnt_type || '_lov',
1, TITLE, crnt_item);
END IF;
LIST_VALUES;
/* IF name_in('control.holder') IS NOT NULL THEN -- Holder is set to null in Lov_Btn WBP trigger
COPY(name_in('control.holder'), crnt_item); -- Depends upon implicit conversions for non character
-- datatype values (in this example, NUMBER and DATE). Create a 'holder' for/of each datatype
-- required to avoid implicit conversions.
END IF;*/
end if;
end if;
exception
when no_data_found then
message('No Data Found, try Again');
null;
end event;

Hi John,
I got the same issue. Is yours being resolve yet?
Can you share the solution.
Thanks.

Similar Messages

  • Java custom component for image generation

    I want to create a custom service for image generation. I want to send the image in response stream.
    I want to service like below :
    <img src="http://localhost/ucm/idcplg?IdcService=getImageService"/>
    Thanks in advance!!

    Hi ,
    Thank you os much for reply . really appreciate.
    I want to create a Captcha component that will generate Captcha image in reponse. I do not want to generate image in file system. Just want to use Image Stream.
    I want achieve something like below in java servlet code :
    ServletOutputStream out = httpServletResponse.getOutputStream();
    ImageIO.write(bi, "jpg", out);
    Thanks

  • Custom code for Flat file reconciliation on LDAP

    Hello,
    I have to write a custom code for flat file reconciliation on LDAP as the GTC connector wasn't working entirely.
    Could someone help me out with this.. How do i do this ??
    Thanks

    flat file reconciliation on LDAPWhat do you mean by Flat File on LDAP ?
    If you want to create Flat File connector then search google for reading a flat file using Java.
    Define RO Fields and do mapping in Process Defintion. You can use Xellerate User RO for Trusted Recon.
    Make a map of CSV that and Recon Field
    Call the Reconciliation API

  • Custom Code for Scrambling

    Hi,
    How/where can I define the custom code for scrambling?
    The SAP Scrambling guide does not give any details where I can define these, it only gives code examples
    I did find transaction codes CNVMBTTWB and CNV_MBT_RULES but these are not working (kicking me out the transaction as soon as I try to create something). And these are TDMS 3.0 related.
    Anyone an idea how to do this? Is there a guide for TDMS 4 somewhere? Didn't found it so far.
    Kind regards,
    Johnny

    Hi all,
    I still got issues with the custom code for scrambling.
    Has anyone a good document about this and please do not refer to the SAP ones since for me they are not helpful in this case.
    I have created the custom program but when I test it via the scrambling rule, I receive a 'NULL' error (which is strange)
    Also, if I execute my scrambling flow, it gets stuck in phase 'Preparations for data scrambling' with error FORM xxxxx does not exist.
    The form was created in the Control system.
    What am I missing here?
    Cheers,
    Johnny

  • Custom code for Target Source Reconciliation from a flat file

    Hi Experts,
    I need help in writing a custom code for Target Source Reconciliation from a flat file to OIM. The flat file will contain account details for different application instances. I am working on 11gr2.
    Thanks,
    Subin

    All right, all right, not so quickly.
    I am at the stage of trying to put one dimension
    array. But I stuck in one place, this is the program:
    import java.io.*;
    public class FromFile {
    public static void main(String[] args) throws IOException {
    File inputFile = new File("mac.txt");
    FileReader in = new FileReader(inputFile);
    int c;
    for(int i = 0; i < 10; i++) {
         c = in.read();
    System.out.println(c);
    and I try to read: 1 2 3 4 from text file
    This is the result so far...
    49
    32
    50
    32
    51
    32
    52
    -1
    -1
    -1
    well,
    I think I know what's wrong. I must change ASCII numbers into
    ints. But I dont' know how to do it. Some nice book, or
    tutorial on streams would come in handy. Could you correct
    it?.

  • SSRS custom code for count in Report Footer

    Hi All,
    Please help me with the custom code used for below requirement
    Debtor Name     current    30+days   60+days    90+days
    aaa                       7000        0.00          0.00          10.00
    bbb                       5000        0.00         20.99         3.00
    ccc                        1000       0.00          0.00           0.00
    Expected result in report footer :                  
                                              0                1            
       2
    if  the value of  30+ , 60+ and 90+ columns  >=1 then i have to display the count in Report footer,for that i have tried using a custom code like below :
    Shared Dim OD As Integer=0
    Public Shared Function Test(ByVal OP As Decimal) As Integer
            If OP >= 1 Then
                OD = OD + 1
            Else
                OD = OD
            End If
            Return OD
       End Function
    and using below code to display
    Code.Test(Overdue)  
    but when i use this code in report footer is not displaying correct value.Please guide me where i am going wrong.
    Please let me know if you need any other details.
    Thanks in advance,
    Samhith.

    Hi Samhith,
    Per my understanding you what to count the rows which values >=1 and display them at the bottom of the table, you are trying to use the custom code to do this but failed, right?
    I have tested in my local environment and find the custom code is not correctly, and I have an alternative method which is more easy and can work in both table  and matrix.
    As Vaibhav Chaudhari also mentioned that we can use the CountDistinct function, but more correctly, we can use the count() function and the RunningValue() function, because CountDistict will not count the duplicated values if they >=1.
    Please find the expression as below:
    =Count(IIf(Fields!Yourfield.Value>=1 , Fields!Yourfield.Value, Nothing))
    OR:
    =RunningValue(IIf(Fields!Yourfield.Value>=1 , 1, Nothing),Sum,"DataSetName")
    If you still have any problem, please feel free to ask.
    Regards
    Vicky Liu

  • Function code for notification in a custom scenario

    Hi,
    Does anyone know the activity code or function code for a notification that needs to be sent to the organiser of a training event if the maximum capacity of the event is exceeded, i.e. the attendee goes on the waiting list.
    There seems to be no standard activity type which gets triggered the moment the max. capacity of the training event is exceeded.(unlike BOKP)
    Does anyone know the workaround for this ?
    As far as I know you cannot create your own activity based on your custom scenario.
    Hence how to handle this ?

    You can use CRM_ORDER_MAINTAIN and populate the parameter IT_SERVICE_OS
    or use BAPI_OPPORTUNITY_CHANGEMULTI and populate the parameter SERVICE_OS.
    BR,
    Florin

  • Custom code for Multi-org - Use x_all tables or views with set_client_info?

    Trying to determine what is normal for custom sql and plsql within 11i. I am trying to find out what other 11i installations are using in regards to custom code. Are you using the all tables or using the views utilizing setclient_info. Any feedback would be appreciated.
    Note: We have converted to multi-org and are setup as a single organization.
    Thanks, Ira

    Hi,
    Using views or table are depend upon the requirement of clinets and implementation.
    If one need to access multiple tables, its always good to have a view and access that... else its same to access view or table...
    Thanks
    Yogi

  • How to find T-CODES for maintenance view of custom tables?

    Hi,
    I have a list of custom tables for which maintenance view is generated. Also, many of them might have a T-Codes assigned to them.
    I need to know how to find out these T-codes?
    Is there some table which maintains these or a function module which can give the t-code name?
    Help will be appreciated.
    Thanks.
    Shreyas

    Hi shreyas,
    1. one way is
    2. goto se93
    3. Press Ctrl F
    4. Expand the search criteria (from button on toolbar)
    5. In program name enter SAPMSVMA (This program is for sm30)
    6. In transaction code enter Z*  or Y*
    regards,
    amit m.

  • Craeting Tx code for Import PO with Custom duty condition

    Hi,
    I want to know as for any excise vendor we hace one Tax code YF which is maintain in FTXP transaction in FTXP as per selected Tax type that all taxes are coming in PO  like if we select tax code YF in PO then in Taxes automatically 3 taxes JM01,  WITH 8%   JEC1,  with 2 %  and JA1S with 1% are coming in the PO  i want to know where those tax type are define JM01,  JEC1  and JA1S   i have checked in M/06  but those tax type are not there in the condition
    my actual requirement is that  for  import PO as we are adding three condtion in the condtion JCV1  , JECV,   J1CV  , those conditions are defien in M/06  i want to make a seperate Tax code with 0% for import but when we select the tax code for import those three condition should come in the condition or taxes as per there %  when I am trying to create a tax code  those 3 condin i am not getting in FTXP tax type.
    regards,
    zafar

    Hi
    Import tax calculation  happens in MM pricing procedure (M/08 ) and not FI pricing procedure( OBQ3) .Maintain the Import duty percentages in MEK1 and not in FV11 or FTXP
    Regards
    Sandeep

  • Delete codes for rejection reasons in customizing

    Hello,
    We had some rejection codes, that we used for our sales orders.
    Now we want to delete all these codes in customizing step, because we won't use them anymore.
    Will it cause any trouble for my SD documents, that the deleted rejection codes have already been used for?

    If you still have active documents with the deleted rejection reasons then you will almost certainly have problems trying to process them further.
    1. If the document has been rejected you probably will not need to process it further anyway.
    2. If you do encounter a problem, I expect you would be able to select a different rejection code.
    If you are worried, you should test in a sandpit client.
    Deleting reason codes which have been used is really not good practice, hence my suggestion that you change the descriptions.

  • Can I have a PL/SQL code for LOV

    Hi,
    I apologize for this dumb question. I have been so out of touch with dev (almost 8 years). Plus new to pl/sql.
    I am creating a status report application. On the dashboard, I currently have some metrics (horizontal charts). I wanted to expose these metrics based on filter.
    I had created 2 filters. The first one will identify the type (Week, Month, Qtr or Year) and the 2nd filter would be based on the type. For e.g. if I select Month as type, the 2nd filter should show May-12, April-12 etc. Once I select the 2nd filter, I should use them to show the appropriate metrics. The metric that I currently have would show all the projects that users have worked on during the week/month/qtr or year (depending on the 1st and 2nd filter).
    On the dashboard region, I added a condition to check if the value for both 1st and 2nd filter is not null. This allows me to show the dashboard only if the 2 filters have been selected.
    For the 2nd filter, I need to write a PL/SQL code to show the LOV.
    I am assuming that the pl/sql would return a SQL query. The SQL query will be based on week, month etc. Is that right?
    Thanks
    balaji
    Edited by: user644868 on May 17, 2012 11:29 AM

    rbalaji2026 wrote:
    For the 2nd filter, I need to write a PL/SQL code to show the LOV. Doesn't appear necessary. With filter 2 cascading from filter 1, why not:
    select
            /* Week query */
    from
    where
    and     :p1_filter_1 = 'WEEK'       
    union all
    select
            /* Month query */
    from
    where
    and     :p1_filter_1 = 'MONTH'       
    union all
    select
            /* Quarter query */
    from
    where
    and     :p1_filter_1 = 'QUARTER'       
    union all
    select
            /* Year query */
    from
    where
    and     :p1_filter_1 = 'YEAR'       

  • Sample code for a custom field added to LIS Communication structure for Del

    We appended a new custome field into extraction structure of the LO Cookpit datasource 2LIS_02_ITM through RSA6.  And then run CMOD to write the exit code to populate the value and it works fine.  But after we read Roberto's Weblog:
    /people/sap.user72/blog/2005/02/14/logistic-cockpit--when-you-need-more--first-option-enhance-it
    Find the enhancement we did can't make the Delta mechanism works if only this new field gets changed in a record, and the change cannot be reflected on BW.  I know we can run SMOD on the enhancement LEINS001 to write the code for LIS Communication structure customer exit.  But we have never writen such a code for LIS Communication Structure enhancement and also don't know on how to make the Delta mechanism works in the code.  We would be very appreciated if some expert here can provide the sample code!
    Thanks

    hi AHP,
    Have you tried Sanyam's code listed in this article you recommended?
    Now our R3 team has added a custom field called ZZZ to EKKO table and I modify the code to suit our need and the code would be as following:
    *& Include ZXM06U16 *
    DATA: i_t_ekko LIKE ekko OCCURS 1 WITH HEADER LINE.
    DATA: ebeln LIKE ekpo-ebeln,
    it_ekko TYPE TABLE OF ekko WITH HEADER LINE,
    old_val(50) TYPE c. "For storing the value from the Field Symbol
    FIELD-SYMBOLS <fs> TYPE ANY TABLE.
    CASE zeitp.
    WHEN 'MA'. "When creating a purchase order
    MOVE '(SAPLEINS)T_EKKO[]' TO old_val.
    ASSIGN (old_val) TO <fs>.
    i_t_ekko[] = <fs>.
    LOOP AT xmcekko.
    ebeln = xmcekko-ebeln.
    IF xmcekko-supkz = '1'. "Old Value ?
    SELECT SINGLE * FROM ekko INTO it_ekko WHERE ebeln = ebeln.
    xmcekko-ZZZ = it_ekko-ZZZ.
    ELSE. "New Value ?
    READ TABLE i_t_ekko WITH KEY ebeln = ebeln.
    xmcekko-ZZZ = i_t_ekko-ZZZ.
    ENDIF.
    MODIFY xmcekko.
    ENDLOOP.
    EndCase.
    The compile of the above code works fine and we activated everywhere including project level. Then we set debug points in this code, and run RSA3 on 2LIS_02_ITM, but find the extraction program never reaches this code or call this user exit function EXIT_SAPLEINS_001 of this enhancement LEINS001. Any reason?
    Thanks
    Kevin
    Message was edited by: Kevin Smith

  • How to get value in previous column and another row from Matrix with Custom Code?

    I want to calculate the value of tb_Open and tb_Close. I try to use custom code for calculate them. tb_close is correct but tb_Open is not correct that show value = 0 .
    This is example report:
    * I have 2 Dataset , Dataset1 is all data for show in my report. Dataset2 is only first Open for first month
    * First value of Open is item field in Dataset2 and this value only for first month (january). But for other month Open value get from Close in previous month.
    Detail for Red number:
    1. tb_Open -> tb_Close in previous month but first month from item field in Dataset2
    expression =FormatNumber(Code.GetOpening(Fields!month.Value,First(Fields!open.Value, "Dataset2")))
    2. tb_TOTAL1 group on item_part = 1
    expression =FormatNumber(Sum(CDbl(Fields!budget.Value)))
    3. tb_TOTAL2 group on item_part = 3 or item_part = 4
    expression =FormatNumber(Sum(CDbl(Fields!budget.Value)) + ReportItems!tb_TOTAL1.Value )
    4. tb_TOTAL3 group on item_part = 2
    expression =FormatNumber(Sum(CDbl(Fields!budget.Value)) - ReportItems!tb_TOTAL2 .Value)
    5. tb_Close -> calculate from tb_TOTAL3 - tb_Open
    expression =FormatNumber(Code.GetClosing(ReportItems!tb_TOTAL3.Value,ReportItems!tb_Open.Value))
    My custom code:
    Dim Shared prev_close As Double
    Dim Shared now_close As Double
    Dim Shared now_open As Double
    Public Function GetClosing(TOTAL3 as Double,NowOpening as Double)
        now_close = TOTAL3 + NowOpening
        prev_close = now_close
        Return now_close
    End Function
    Public Function GetOpening(Month as String,NowOpen as Double)
        If Month = "1" Then
            now_open = NowOpen
        Else    
            now_open = prev_close
        End If
        Return now_open
    End Function
    Thanks alot for your help!
    Regards
    Panda A

    Looks okay to me.
    Perhaps the variables should be declared as public (?)

  • Strange problem with NWDS - Custom code vanishes!

    Hi all:
    I am very much new to SAP NWDS world. I have got background in core Java coding and now trying to pick up the Java WebDynpro for which I am practising some examples in SAP NWDS.
    I have got a Java WebDynpro application with 2 views. In the implementation tab of one view I am trying to put in some custom code for the function  :
    public void wdDoInit()
        //@@begin wdDoInit()
        //@@end
    However after I hit the Save all metadata button, the custom code vanishes and the function wdDoInit() goes back to the initial form ( shown above ). As a result I cant save the custom code.
    Any help with this issue?
    Cheers!
    Thanks
    Anindya

    Yes that's what  I thought. But couldn't really find any forum on WebDynpro Java. So I put it in the NetWeaver Platform forum!
    Thanks and regards,
    Anindya

Maybe you are looking for

  • My itunes will not open cause it says itunes requires quicktime 7.5.5 or later but i have quicktime 7.2

    My itunes will not open cause it says itunes requires quicktume 7.5.5 or later but i have quicktime 7.2 installed already on my mac

  • No traffic in new maps?

    So far love ios 6 besides new maps and lack of you tube app.. I hate the new you tube app.. but whatever.. will get used to it.. Anyway.. So on the new maps.. horrible searches.. nothing is poping up.. however where the **** is traffic. I live in LA,

  • Running SEFAUtil remotely

    Hi, I have set up SEFAUtil on a computer where I am able to run it and it returns a correct output. Recently we developed an webservice that is running on a different server and needs to make some modification to Lync server using SEFAUtil. However,

  • Games/RAM on MacBook Pro 15"

    I have recently purchased a MBP 15" with the base graphics and specs. When I go to play a game, sometimes it really lags, almost to the point of unplayability. The game I'm playing when this happens is Minecraft. I don't know if Minecraft is a RAM ho

  • Domain configuration issue

    Hi All, I have installed weblogic 10.3 in linux box (32 bit). i have created two domains which are listening in two different port so that if i should be able start/stop admin server, access deployed application in of one domain without affecting the