WDR_SELECT_OPTION  F4 help

Hi Experts,
I'm now using WDR_SELECT_OPTION to create some search fields.
But I found it's difficult to assign " a little complex " search help.
e.g.  A user search help.  there's an input field for user name and next to it there's a user id text view.
If I'm not using WDR_SELECT_OPTION it's very easy to implement . But with WDR_SELECT_OPTION ,
I can't make the input filed the user name, coz it must receive the value of user ID.  Then it's not so userfriendly .
Coz from user perspective, they expect to see users' name more than some meaningless user id.
Looking forward your solution to solve the problem above.
Regards,
Aaron

Is there any possiblity to make inputfield display some text description, but actual the real value received is the key of this value pair.
Just like the dropdown list. you can see a list:
key       text
1           abc
2           def
3           ghi
If  you select ( 3 , ghi ), "ghi " will be displayed on the screen, but the real value received is 3.
the important thing is I'm using  WDR_SELECT_OPTIONS  to make these inputfield( coz I want to use the extension ).
Looking forward to your quality replies.
Regards,
Aaron
Edited by: Aaron Shen on Sep 30, 2010 4:34 AM
Edited by: Aaron Shen on Sep 30, 2010 4:35 AM
Edited by: Aaron Shen on Sep 30, 2010 4:36 AM

Similar Messages

  • F4 Help with OVS in WDR_SELECT_OPTIONS

    Hi
    I realized an OVS-F4-Help in WDR_SELECT_OPTIONS.
    The Event on_ovs is raised and if I use table_multi_select = abap_false
          i_ovs_data-m_ovs_callback_object->set_configuration(
                    label_texts  = lt_label_texts
                    column_texts = lt_column_texts
                    group_header = lv_group_header
                    window_title = lv_window_title
                    table_header = lv_table_header
                    col_count    = 2
                    row_count    = 20
                    table_multi_select = abap_false ).
    I get the correct value in the select-option with the following code
        WHEN if_wd_ovs=>co_phase_3.
    *   apply result
          IF i_ovs_data-m_ovs_callback_object->selection IS NOT BOUND.
    ******** TODO exception handling
          ENDIF.
          ASSIGN i_ovs_data-m_ovs_callback_object->selection->* TO <ls_selection>.
          IF <ls_selection> IS ASSIGNED.
              i_ovs_data-m_ovs_callback_object->context_element->set_attribute(
                                     name  = i_ovs_data-m_ovs_callback_object->context_attribute
                                     value = <ls_selection>-kostl ).       
          ENDIF.
    I tried to use table_multi_select = abap_true, but then I have no idea how the code for     <b>WHEN if_wd_ovs=>co_phase_3.</b> must look like.
    If anyone know the answer,give me the solution.
    thanks in advance,
    Marcus

    Hi Marcus,
    You can find a copy&paste example in WDR_TEST_SELECT_OPTIONS in the method ON_OVS of the view MAIN_VIEW.
    There you can find for SCARR in called method do_ovs_scarr:
    method do_ovs_scarr.
      data:
        lt_scarr type cl_wd_flight_model=>tt_scarr,
        scarr    type scarr.
      field-symbols:
        <lt_ovs_result>     type cl_wd_flight_model=>tt_scarr,
        <scarr>             like line of <lt_ovs_result>,
        <lt_sel_opt_result> type standard table.
      case i_ovs_data-m_ovs_callback_object->phase_indicator.
        when if_wd_ovs=>co_phase_0.
          i_ovs_data-m_ovs_callback_object->set_configuration( TABLE_MULTI_SELECT = abap_true ).
        when if_wd_ovs=>co_phase_1.
          i_ovs_data-m_ovs_callback_object->set_input_structure( input  = scarr ).
        when if_wd_ovs=>co_phase_2.
          cl_wd_flight_model=>get_scarr( importing et_scarr = lt_scarr ).
          i_ovs_data-m_ovs_callback_object->set_output_table( output = lt_scarr ).
        when  if_wd_ovs=>co_phase_3.
          assign i_ovs_data-m_ovs_callback_object->selection->* to <lt_ovs_result>.
          assign i_ovs_data-mt_selected_values->* to <lt_sel_opt_result>.
          loop at <lt_ovs_result> assigning <scarr>.
            insert <scarr>-carrid into table <lt_sel_opt_result>.
          endloop.
      endcase.
    endmethod.
    Best regards,
    Thomas

  • Integrate Freely Programmed Value Help in Select option WDR_SELECT_OPTION

    Hello All,
    I have created Freely Programmed Value Help name (ZVALUE_HELP) by using IWD_VALUE_HELP.I have develop an application(ZSELECT_OPTION) which uses the resubale component WDR_SELECT_OPTION for select option.i want search help for one of my select option input field .
    i wrote the following code.
    *initalise the used component
    data lo_cmp_usage type ref to if_wd_component_usage.
    lo_cmp_usage =   wd_this->wd_cpuse_ci_serach_help( ).
    if lo_cmp_usage->has_active_component( ) is initial.
      lo_cmp_usage->create_component( ).
    endif.
    * add a new field to the selection
      WD_THIS->M_HANDLER->ADD_SELECTION_FIELD(
      I_ID = 'ZCI_STATUS'
      IT_RESULT = LT_RANGE_TABLE
      I_READ_ONLY = READ_ONLY
      I_OBLIGATORY = ABAP_FALSE
      I_VALUE_HELP_TYPE = IF_WD_VALUE_HELP_HANDLER=>CO_PREFIX_APPLDEV
      I_VALUE_HELP_ID   = 'ZVALUE_HELP'
    when i execute the select option application n click on search help button i got error "Component usage ZVALUE_HELP does not exist.
    Edited by: Abhilasha Dahare on Aug 3, 2011 11:10 AM

    hi Abhsilasha,
    I think your code is some thing wrong.
    you have to assign free value help like below method.
    in the attribute( the select option field ) properties, you will find input help mode property, in that select 'freely  programmed'.
    then you willl get some more fields, there you have to provide ZVALUE_HELP
    of follow reema suggestion in below link
    How to integrate a Search Help in a dynamically created Select-Option?
    Regards
    Srinivas
    Edited by: sanasrinivas on Aug 3, 2011 12:06 PM
    Edited by: sanasrinivas on Aug 3, 2011 12:10 PM

  • Search help is not coming while using select-options?

    Hi All,
    I am using select options in my selection screen, i used wdr_select_options, also i coded some parameter values also
    ( non select-options ). For that field i am not getting search help. If i create as normal i am getting? Suggestions pelase?
    Thanks,
    Venkat.

    HI
    what kind of search help is associated with the field.
    ADD_SELECTION_FIELD method has some specific parametrs for value_help
    give the input there and try again.
    these parameters are
    I_VALUE_HELP_TYPE
    I_VALUE_HELP_ID
    I_VALUE_HELP_MODE
    I_VALUE_HELP_STRUCTURE
    thanks
    sarbjeet dingh

  • Change Button text during component use of WDR_SELECT_OPTIONS

    Hello,
    I have implemented a WD component (WD for ABAP) by making use of component WDR_SELECT_OPTIONS. The selection screen is getting displayed. But the selection screen contains the button Copy, Check, Cancel and Reset.
    I want to rename the button tex "Copy" to "Search". Is it possible to do so?
    Please help!
    Thanks and Besd Regards,
    Maya

    Hi Maya,
    Unfortunately, this is not possible. There is also a translation bug while translating it from German into English. The button should have been translated into "Apply" instead of "Copy". This is issue is being addressed and should be fixed within one of the upcoming service packs.
    Nonetheless, there is a solution to your problem. Just hide the button (or the whole row) by calling method SET_GLOBAL_OPTIONS and add your own buttons below or above where you embed the SelectOptions component. The handler interface contains methods to reset the selection screen as well as for input validation.
    Kind regards,
    Thomas

  • Example for Using WDR_SELECT_OPTIONS and SALV_WD_TABLE in one View

    Hello,
    I need an Example for Using the WD-Components WDR_SELECT_OPTIONS and SALV_WD_TABLE
    in one view. Can anybody help me?
    Thanks
    Toto

    Hello,
    Please see these:
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3439404a-0801-0010-dda5-8c14514d690d]
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/21706b4b-0901-0010-7d93-c93b6394bc1d]
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/39c54fe7-0b01-0010-0eb6-d63ac2bdd637]
    [/people/rich.heilman2/blog/2005/12/20/using-select-options-in-a-web-dynproabap-application]
    [/people/thomas.jung3/blog/2005/12/21/webdynpro-abap-alv]
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3133474a-0801-0010-d692-81827814a5a1]
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/bd28494a-0801-0010-45a3-fc359d82d3e8]
    Regards.

  • Event Handling for free programmed search help bond dynamically in SO

    Dear Expert,
    I met a problem of how to handle an event raised by a free programmed search help - (F4), and this F4 is invoked
    by a field defined in a Selection Option component (WDR_SELECT_OPTIONS) - SO. 
    The scenario is that I would like to update the SO after the user multiple select some entries in the F4. I could tranfer
    back all the value chosen in the F4 to the consumer SO, but I can not update the icon in the SO(e.g  in SO, multiple values will be
    displayed with a green arrow icon), because I could not define a handler in SAP standard component SO, and it looks like there is no chance to catch the event triggered at the end of selection in F4.  (this event belonged to this F4)
    Welcome any suggestions or ideas, Thanks very very much. 
    In Addition, I use this way to enable the F4 for SO
    lo_so_component->create_cmp_usage_group(
         name = 'F4_TRANSPORT'
         used_component = 'ZTRANSPORT').

    thanks all

  • Serach help in Select-option in WD ABAP

    Hi Folks,
    I am using WDR_SELECT_OPTIONS reusable component in my Component.  I want to attach customized search help particular fild while creating select-option using
    wd_this->m_handler->add_selection_field(
                 i_id        = 'IWERK'
                 it_result   = lt_range_table
                 i_read_only = read_only ).
    Can anyone explian how can I attach search help here.
    Regards,
    Vishal.

    Hi Vishal,
    If its a search help, use the following code:
    lt_range_table = wd_this->m_handler->create_range_table( i_typename = 'S_PLANETYE' ).
    wd_this->m_handler->add_selection_field(
    i_id = 'S_PLANETYE'
    it_result = lt_range_table
    i_read_only = read_only
    I_VALUE_HELP_TYPE = 'SEARCHHELP'
    i_value_help_id = 'Z_SAPLANE' ).
    In this example, 'Z_SAPLANE' is the dictionary search help.
    This will solve your problem
    For further details, goto interface IF_WD_VALUE_HELP_HANDLER to get a list of values you can supply to parameter I_VALUE_HELP_TYPE.
    This is similar to what you do with a context, similar to the options you get in the dropdown for Input Help property.
    Regards,
    Chitrali

  • Problem in Select Option Freely programmed F4 Help

    Hi All,
    I had a Component 'A'  where i used select option. I used Freely programmed search help for the select option field.
    If i click F4 in the select option field it will call one component in which i have one more select option in component B.
    In component B select option field if i manually entering value and search and click apply values button the values are comming in the select option field in component A.
    But if i pressing the F4 in Component B and search and click apply values the value are not comming in the Component 'A'.
    If i open again component B and closing it without any action the value is coming in component A.
    If i debugged and see the WDDOMODIFYVIEW of tHE WDR_SELECT_OPTION is not getting called for component A.In which it has Rendering delta method of CL_WDR_SELECT_OPTION.
    Any idea about this.
    Regards,
    Ganesh.

    hi Ganesh,
    i have read your post several time and i am still not able to get hold on your problem. Probably it is to do with your complex approach of nested select_option, i can not judge why you did this way. I would advice you to step back and see it for yourself
    1)if it is need to have nested select_option
    2)check component initialization and destroy
    2)check event subscriptions

  • F4 ( Search Help ) for date field  on the selection screen

    Hi Freinds,
    i have used WDR_SELECT_OPTIONS In my component, i have one date field on selection screen(BUDAT), for this date field i want seach help 
    this is my code
    create a range table for Posting Date
    lt_range_table = wd_this->m_handler->create_range_table(
                                                              i_typename = 'BUDAT' ).
    add Posting Date  to the selection
    wd_this->m_handler->add_selection_field( i_id = 'BUDAT'
         i_value_help_type = if_wd_value_help_handler=>CO_PREFIX_SEARCHHELP
                                               I_VALUE_HELP_ID = '??????'
                                               I_DESCRIPTION = 'Posting Date'
                                               it_result = lt_range_table ).
    can any one help me
    Thanks
    Srini

    hi sarbjeet 
    i created search help in dictionary and i used that search help in my program, but still its now working , any other ideas
    Thnx
    srini

  • Search Help in Select - Options

    Dear experts,
    i use three select options and they work fine.
    In the node of the view i declared the attributes i need and bound a search help (F4 help) to them.
    here is the problem.
    One attribute has the help visible when i start the application, the other two not.
    Can you give me a hint how to solve this ?
    Thanks and best regards
    René

    Hi Rene,
    I had the similar question earlier, later what i have found is like this:
    1. I have a WDC with three Select options to it.
    2. First Select options relates to the first attribute in my context node which takes the Data element as the Data type. For Ex: take BUKRS as the DE. This has pre-defined search help to the DE C_T001.
    3. Second select options relates to the second attribute in my context node which takes the string as the data type. I manually assigned the Search help to that attribute 'C_T001'.
    4. Thirs Select options relate to the third attribute inmy context node which takes the string as the data type. I manually assigned a Search help to it 'H_T002'.
    5. In the WDDOINIT of my view, I have written the code as follows in the bottom of the post.
    6. The observation is the search help assigned to the first attribute will be opened with out any problem or additional code to it.
    7. The search help assigned to the second one at the context level wont be picked in the select-options.
    8. The search help assigned to the third one will be picked if and only if there is manual assignment of the search help at the time of creating a selection field.
    Conclusion: So, the search help assignment assigned to the attribute at context level is ignored. It will be considered only if the DE has that search help in the case of select-options.
    Hope it is clear and appreciate your feebback.
    Regards,
    Shashikanth. D
    First Select option.
    Instantiating the Used component WDR_SELECT_OPTIONS
      DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
      lo_cmp_usage =   wd_this->wd_cpuse_select_options( ).
      IF lo_cmp_usage->has_active_component( ) IS INITIAL.
        lo_cmp_usage->create_component( ).
      ENDIF.
      wd_this->m_wd_select_options = wd_this->wd_cpifc_select_options( ).
    init the select screen
      wd_this->m_handler = wd_this->m_wd_select_options->init_selection_screen( ).
      wd_this->m_handler->set_global_options(
                                  i_display_btn_cancel  = abap_false
                                  i_display_btn_check   = abap_false
                                  i_display_btn_reset   = abap_false
                                  i_display_btn_execute = abap_false ).
    create a range table that consists of this new data element
      lt_range_table = wd_this->m_handler->create_range_table( i_typename = 'BUKRS' ).
    add a new field to the selection
      wd_this->m_handler->add_selection_field( i_id = 'BUKRS'
      it_result = lt_range_table i_read_only = read_only ).
    Second select option.
    Instantiating the Used component WDR_SELECT_OPTIONS
      DATA lo_cmp_usage1 TYPE REF TO if_wd_component_usage.
      lo_cmp_usage1 =   wd_this->wd_cpuse_use_select1( ).
      IF lo_cmp_usage1->has_active_component( ) IS INITIAL.
        lo_cmp_usage1->create_component( ).
      ENDIF.
      wd_this->m_wd_select_options1 = wd_this->wd_cpifc_use_select1( ).
    init the select screen
      wd_this->m_handler1 = wd_this->m_wd_select_options1->init_selection_screen(  ).
      wd_this->m_handler1->set_global_options(
                                  i_display_btn_cancel  = abap_false
                                  i_display_btn_check   = abap_false
                                  i_display_btn_reset   = abap_false
                                  i_display_btn_execute = abap_false ).
    create a range table that consists of this new data element
      lt_range_table = wd_this->m_handler1->create_range_table( i_typename = 'STRING' ).
    add a new field to the selection
      wd_this->m_handler1->add_selection_field( i_id = 'IF1'
      it_result = lt_range_table i_read_only = read_only ).
    Third Select options:
    Instantiating the Used component WDR_SELECT_OPTIONS
    DATA lo_cmp_usage2 TYPE REF TO if_wd_component_usage.
    lo_cmp_usage2 =   wd_this->wd_cpuse_use_select2( ).
    IF lo_cmp_usage2->has_active_component( ) IS INITIAL.
      lo_cmp_usage2->create_component( ).
    ENDIF.
    wd_this->m_wd_select_options2 = wd_this->wd_cpifc_use_select1( ).
    init the select screen
      wd_this->m_handler2 = wd_this->m_wd_select_options2->init_selection_screen(  ).
      wd_this->m_handler2->set_global_options(
                                  i_display_btn_cancel  = abap_false
                                  i_display_btn_check   = abap_false
                                  i_display_btn_reset   = abap_false
                                  i_display_btn_execute = abap_false ).
    create a range table that consists of this new data element
      lt_range_table = wd_this->m_handler2->create_range_table( i_typename = 'STRING' ).
    add a new field to the selection
    CALL METHOD wd_this->m_handler2->add_selection_field
      EXPORTING
        i_id                         = 'IF2'
        it_result                    = lt_range_table
        i_value_help_type            = IF_WD_VALUE_HELP_HANDLER=>CO_PREFIX_SEARCHHELP
        i_value_help_id              = 'H_T002'.

  • Input Help for TIME type field

    I saw below discussion regarding a dropdown for a "TIME" type field.
    Re: Time Search Help
    It's a resuable component (that Thomas Jung created) and find it very slick.
    I just couldn't make it to work. I'm getting a dump when I pressed the dropdown on the "TIME" field.
    I was wondering, has anyone used this in conjunction with select-options (WDR_SELECT_OPTIONS) ?
    I'm getting a system-dump, "Component usage VALUE_HELP does not exist". I double checked the name that I used on the "USED COMPONENT" tab and it is VALUE_HELP.
    During method ADD_SELECTION_FIELD (for IF_WD_SELECT_OPTIONS) I'm using two parameters I_VALUE_HELP_TYPE = 'APPLDEV' and I_VALUE_HELP_ID = 'VALUE_HELP'.
    Maybe I'm not using the right parameters ?
    Anyway, I would appreciate if anyone could give me directions to correct the problem.Or maybe there is another and better way of having an input help for a "TIME" type field on select-option.
    Thanks.
    Vic

    That is because the TIME is a freely programmed value help and freely programmed value helps are not supported by the Select-Options component.  That limited is listed in the online help:
    Type of input help specified as type IF_WD_VALUE_HELP_HANDLER.
    Note that only ABAP Dictionary-based input help and OVS input help are supported; freely programmable input help is not supported.
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/45/bf07361248003de10000000a11466f/frameset.htm
    The reason for this is that the freely programmed value help is accessed via a component usage.  The Select-Options however are a separate component. They have no declaration to your components, component usages.  Therefore they produce the error that the component usage doesn't exist - which is correct.  It doesn't exist in the Select-Options Component.

  • Freely Programed Help for select-option field

    Hi,
    how can i set freely programmed help for select option field, i mean while adding selection field what are the parameters that are important for freely programmed help.
    i have implemented iwd_value_help in one component comp1 and declared the usage of comp1 in comp2 where i actually defined the usage of select-option component.
    i used parameter   i_value_help_type = if_wd_value_help_handler=>co_prefix_appldev while adding selection field, however when i presss F4 icon, the following message is coming
    View WD_VALUE_HELP does not exist within the component WDR_SELECT_OPTIONS
    Please suggest where i am doing wrong??
    Edited by: kranthi kumar on Dec 29, 2010 6:19 PM

    >
    kranthi kumar wrote:
    > Hi,
    >
    > how can i set freely programmed help for select option field, i mean while adding selection field what are the parameters that are important for freely programmed help.
    >
    > i have implemented iwd_value_help in one component comp1 and declared the usage of comp1 in comp2 where i actually defined the usage of select-option component.
    >
    > i used parameter   i_value_help_type = if_wd_value_help_handler=>co_prefix_appldev while adding selection field, however when i presss F4 icon, the following message is coming
    >
    > View WD_VALUE_HELP does not exist within the component WDR_SELECT_OPTIONS
    >
    > Please suggest where i am doing wrong??
    >
    > Edited by: kranthi kumar on Dec 29, 2010 6:19 PM
    Hi Kranthi,
    Please help me to understand your design.
    Why would you like to create a Freely programmed value help for select-option?. why not use wdr_select_option directly ?

  • Problem with threads and simulation: please help

    please help me figure this out..
    i have something like this:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class DrawShapes extends JApplet{
         private JButton choices[];
         private String names[]={"line", "square", "oval"};
         private JPanel buttonPanel;
         private DrawPanel drawingArea;
         private int width=300, height=200;
         public void init(){
              drawingArea=new DrawPanel(width, height);
              choices=new JButton[names.length];
              buttonPanel=new JPanel();
              buttonPanel.setLayout(new GridLayout(1, choices.length));
              ButtonHandler handler=new ButtonHandler();
              for(int i=0; i<choices.length; i++){
                   choices=new JButton(names[i]);
                   buttonPanel.add(choices[i]);
                   choices[i].addActionListener(handler);
              Container c=getContentPane();
              c.add(buttonPanel, BorderLayout.NORTH);
              c.add(drawingArea, BorderLayout.CENTER);
         }//end init
         public void setWidth(int w){
              width=(w>=0 ? w : 300);
         public void setHeight(int h){
              height=(h>=0 ? h : 200);
         /*public static void main(String args[]){
              int width, height;
              if(args.length!=2){
                   height=200; width=300;
              else{
                        width=Integer.parseInt(args[0]);
                        height=Integer.parseInt(args[1]);
              JFrame appWindow=new JFrame("An applet running as an application");
              appWindow.addWindowListener(
                   new WindowAdapter(){
                        public void windowClosing(WindowEvent e){
                             System.exit(0);
              DrawShapes appObj=new DrawShapes();
              appObj.setWidth(width);
              appObj.setHeight(height);
              appObj.init();          
              appObj.start();
              appWindow.getContentPane().add(appObj);
              appWindow.setSize(width, height);
              appWindow.show();
         }//end main*/
         private class ButtonHandler implements ActionListener{
              public void actionPerformed(ActionEvent e){
                   for(int i=0; i<choices.length; i++){
                        if(e.getSource()==choices[i]){
                             drawingArea.setCurrentChoice(i);
                             break;
    }//end class DrawShapes
    class DrawPanel extends JPanel{
         private int currentChoice=-1;
         private int width=100, height=100;
         public DrawPanel(int w, int h){
              width=(w>=0 ? w : 100);
              height=(h>=0 ? h : 100);
         public void paintComponent(Graphics g){
              super.paintComponent(g);
              switch(currentChoice){
                   case 0:     g.drawLine(randomX(), randomY(), randomX(), randomY());
                             break;
                   case 1: g.drawRect(randomX(), randomY(), randomX(), randomY());
                             break;
                   case 2: g.drawOval(randomX(), randomY(), randomX(), randomY());
                             break;
         public void setCurrentChoice(int c){
              currentChoice=c;
              repaint();          
         private int randomX(){
              return (int) (Math.random()*width);
         private int randomY(){
              return (int) (Math.random()*height);
    }//end class drawPanel
    That one's from a book. I used that code to start with my applet. Mine calls different merthod from the switch cases. Say I have:
    case 0: drawStart(g); break;
    public void drawStart(Graphics g){
      /* something here */
    drawMain(g);
    public void drawMain(graphics g){
    g.drawString("test", x, y);
    //here's where i'm trying to pause
    //i've tried placing Thread.sleep between these lines
    g.drawLine(x, y, a, b);
    //Thread.sleep here
    g.drawRect(x, y, 50, 70);
    }I also need to put delays between method calls but I need to synchronize them. Am I doing it all wrong? The application pauses or sleeps but afterwards, it still drew everything all at once. Thanks a lot!

    It is. Sorry about that. Just answer any if you want to. I'd appreciate your help. Sorry again if it caused you anything or whatever. .n_n.

  • Query Help

    Table1:
    ou store point
    LS LIB1 50
    LS LIB1 200
    LS LIB1 100
    LS LIB1 79
    I have to insert table1 to table2 by splitting into every 143point and assing serial number for every 143 from parameter.
    in aboce example we can split 3 time 143 like below table2 sample.
    Table2
    ou store point serial_number
    LS LIB1 50 101
    LS LIB1 93 101
    LS LIB1 107 102
    LS LIB1 36 102
    LS LIB1 64 103
    LS LIB1 79 103
    i tried below procedure its not working.
    table may have any order like below.
    Table1:
    ou store point
    LS LIB1 200
    LS LIB1 50
    LS LIB1 100
    LS LIB1 79
    then table2
    ou store point serial_number
    LS LIB1 143 101
    LS LIB1 57 102
    LS LIB1 50 102
    LS LIB1 36 102
    LS LIB1 64 103
    LS LIB1 79 103
    create or replace procedure assign_serial(from_num number,to_num number) is
    bal number(10);
    begin
    bal := 0;
    for c1 in(select * from table1)
    loop
    if c1.point <=143 then
    if bal=0 then
    bal=143-used;
    insert int0 table2 values(c1.ou,c1.store,used);
    elsif used > 0 then
    used=used-bal;
    insert int0 table2 values(c1.ou,c1.store,bal);
    bal=0;
    if used > 0 then
    insert int0 table2 values(c1.ou,c1.store,used);
    end if;
    bal:=143-used;
    end if;
    end loop;
    end;
    How to split and assign serial number,please hELP.

    .after giving serial num i have to change points in table1 to 0.The problem for SUm and split for every 143 is ,different OU and store is there.we have to know for which store points we earned serial number.
    i hope this below logic little satisfy except assign cardnum,please........ check and currect the logic
    LS LIB1 50
    LS LIB1 200
    LS LIB1 100
    LS LIB1 79
    --variable used and bal
    for c1 in(select * from table1)
    loop
    used := c1.points;
    if c1.point <=143 then
    if bal=0 then
    bal=143-used;
    insert int0 table2 values(c1.ou,c1.store,used);
    elsif used > 0 then
    used=used-bal;
    insert int0 table2 values(c1.ou,c1.store,bal);
    bal=0;
    if used > 0 then
    insert int0 table2 values(c1.ou,c1.store,used);
    end if;
    bal:=143-used;
    end if;
    end loop;

Maybe you are looking for

  • Listening to my favorite podcast just got harder

    I love to listen to "Coast to Coast AM." If you don't know it's a late night AM radio show that focuses on the weird, conspiratorial, supernatural, and offbeat. I'm a paid subscriber. There is a C2C app for the iPhone that is horribly designed but wo

  • Not send mail for external domains

    Hi, I have installed OCS 10g(10.1.2) in linux. All components ok, but i not send mail for external domain. Att, Mesti

  • On Windows 2012,WMIPRVSE.EXE WMI service leaks memory

    Hello all, In my Windows 2012 9700 server,I have installed LSI provider and I am running associator queries to LSI Provider which further interacts with WMI service which acts as a CIM Object Manager(CIMOM).When I run these queries,I am seeing huge m

  • How do I delete templates I made in the new Pages?

    I accidentally created a new template in the new Pages I want to remove it from My Templates.  How do I do that?

  • Update termination occurs while using EDIT method of BUS2038

    Hi, I am getting update termination issue whenever workflow dialog item calls transaction IW32 and do status update and save.This is happening only in case of calling IW32 from workflow but the same is not happening when I do directly using IW32. I h