Dialog Prog to Display fields of Table or Structure in screen dynamically.

Hello Experts ,
       I am working on a dialog programming I wish to display any given table/structure on the screen - to be very clear.
1st screen -
    One input box which can take any SAP standard or custom tableor structure as input <-- Press enter
2 nd screen -
    I wish to see the fields of the structure in column format dsiplayed in the screen ( Like ALV Grid in the page).
Please tell me the logic or similar example so i can refer thanks in advance.
Thanks,
Sriram.

Hello Srinivas,
  Your program looks really looks and simple but the porb is we have 4.6c here. So the syntax lines
CREATE DATA gv_dref TYPE TABLE OF (p_table).
   is not accepted by the system if we enter as it is (error - unable to interpret table - possible cause of error or spelling) 
but it accepts
CREATE DATA gv_dref TYPE p_table.
but at the time of select query its not talking it has a internal table to show data , finalltyit dumps.
[ASSIGN gv_dref->* TO <fs_itab>.
  "Select the data
  SELECT * FROM (p_table) INTO TABLE <fs_itab> UP TO 100 ROWS.
So my problem is to find a way to dynamically display a table or view .
Please guide.
Regards,
Sriram.

Similar Messages

  • How to display fields in IT0002 to PA30 overview screen for IT0024(Qualifi)

    Hi,
    I have a requirement where I want to display two fields NACHN and VORNA on PA30 overview screen for IT0024(Qualifcations).
    How can I achieve this?
    Thanks,
    Ameet

    Hi,
    There is no harm in enhancing IT0024 using PM01. However, these two fields added to P0024 using Customizing Include, happen to be display only fields over the overview screen of PA30 for IT0024.
    Now to write a query in PBO of generated module pools after clicking on the button labled Generate Objects, how to take care of delimited records in both infotypes.
    Thanks,
    Ameet

  • Assigning 2 fields of same table in Module pool screen

    Hi,
    I want to assign similar fields of table in module pool screen.
    In one case i directly use the tablename-fieldname and in other case when i try doing the same i get error. I know that this is not possible.
    Is there any way to get around this. The field i am referring to is attached to a custom domain which is having defined fields. In the second assignment i need to retreive the values of the domain and display it in dropdown mode so that the users are able to select it.
    Regards,
    Imran

    The domain only attached with this field?check the same domain attached to any other field and insert that field in the screen.
    shibu
    reward if helpful

  • Display read only field in table / form from another vo

    i came across couple of scenarios where i had to bring a field in a table / from from other vo than on which most fields in table / form were based. in all cases i had to display the field from another vo as read only and there was only one record in other vo which was related to previous vo in table / form. for this i created a view accessor and created a soc with model driven lov. the problem with this is that first element alwasy shows blank in soc. how can i display the filled soc with first element populated and read only in this scenario. i tried alternatively with groovy expressions but other people in team said it is not good practice to use groovy expressions to fill fields in one VO from other VO. how can i acheive this requirement with soc component / lov / view accessors. is there any other alternative as well. jdev 11 1 1 5

    1) in the attribute of the VO select the 'List of values' node and edit the list attribute you see there; in the dialog select the UI Hints tad and make sure the checkmark for the 'Include "no Selection Item' is off.
    2) you can base a VO on to EO which are then joined via one or more attributes (association)
    Timo

  • Displaying fields from a Z Table on CRM UI

    Hello Experts
    I am trying to display fields from a custom table onto a CRM UI form view.
    1. I created a custom GENIL root object & Search object ie. ZCUSTOMER. & ZCUSTSEARCH
    2. Tested this in the GENIL BROWSER to ensure that I could enter update values to the table and retrieve it via the search object.
    3. Created a custom component ZCUSTOMER
    4. Created a view with this component ZCUSTOMER using the wizard -
         Model Name - CUSTINFO
         BOL Entity - ZCUSTOMER
         No links to the custom controller or higher level objects.(as I do not want to tie this to any standard components)
    Type of view - Form view
    7. Created a Context node for the component controller with the same info as I did for the view.
    8. Performed the binding of the view context node with the component controller context node.
    9. Configured 1 field CUST_NAME to be displayed on the view.
    10. Configured the run time repository to display the view.
    Now the issue is..
    When the view gets displayed, the field is displayed with the error "CUST_NAME not bound"
    What am i missing?
    Thanks
    RLX

    Hi Swati,
    Thanks for the feedback. I re-viewed the WD_CREATE_CONTEXT method of the view controller implementation class and I see the following code in there already-
    method WD_CREATE_CONTEXT.
      create the context
        context = cl_bsp_wd_context=>get_instance(
              iv_controller = me
              iv_type = 'ZL_ZCUSTOMER_BSPWDCOMPONEN_CTXT' ).
        typed_context ?= context.
    endmethod.
    Does that look right or do I need to modify it?
    Thanks once again for the help.
    RLX

  • Dynamic display of fields of table in ALV report.

    To display the records of a table in ALV report dynamically such that first 10 fields of the table should only be displayed excluding 'mandt' field .
    That is field no 2nd to 11th should be displayed.

    parameters: p_vari type slis_vari.
    at selection-screen on value-request for p_vari.
      perform alv_variant_f4 changing p_vari.
    form alv_variant_f4 changing l_vari type slis_vari.
    On F4 for layout selection - Get laouts created to this report.
      data: l_variant type disvariant.
      l_variant-report   = sy-repid.
      l_variant-username = sy-uname.
      call function 'REUSE_ALV_VARIANT_F4'
        exporting
          is_variant = l_variant
          i_save     = 'A'
        importing
          es_variant = l_variant
        exceptions
          others     = 1.
      if sy-subrc = 0.
        l_vari = l_variant-variant.
      endif.
    Create a structure
    data: wa_layout type disvariant.
    fill up the layout with selected fields.
    wa_layout-report = sy-repid.
    wa_layout-username = sy-uname " Choose this if you want user specific
    wa_layout-variant = p_vari.
    Assign the same to the REUSE_ALV_GRID_DISPLAY
    it is a import paramter  IS_VARIANT = wa_layout.
    All you have to do is first execute the report and save layouts what exactly you want
    and then next time you run the report you will get a chance to select the layout of your own.
    or
    You can get rid of MANDT field from fieldcatalog and internal table by creating a new
    structure. I mean, if you know you always want to display the field from 2 to 11 then simply
    delete the field from fieldcatalog.
    You can assign to different field catalog using Field symbols and change your internal
    table as well since you have created a dynamic internal table.
    Let me know if you need more.

  • Non-display fields in Qualified Table to be displayed in ItemDetail iView

    Hello expert,
    Is it possible to display a non display field in Qualified Table in ItemDetailed iView?
    It seems not possible by standard iView configuration.
    Is it possible to achieve by some minor coding? If possible, such code is appreciated.
    Thank you.
    Dale

    Hi Dale,
    Yes, it is possible , and no need to do any custome coding. You can configure non-Display field of Qualified table to be displayed in Standard item detail iview.
    You have to select Qualified look up field if you are creating Item iview on Main table and complete all steps.
    once you complete all steps, open Item iview , select Reletionship and qualified display field option .
    now you can see qualiied tables in table , click on Edit , now you can see all fields of qualified table.. you can select any field (dis/non-dis fields).
    Hopw this helps you.
    Thanks & Regards,
    Veera.

  • Table maintainance (restriction on displaying fields)

    hello
    i have created table maintainance generator.now my requirement is i dont want to display all table fields.just 2 fields want to display.all other should be in invisible.can anybody suggest me how to do it?
    regards
    soniya s.

    Hi Soniya ,
    To Hide one of the field from table into the Table Maintainance generator,
    Call one module Say :
    MODULE Hide in the PBO of the Module pool of table maintainance generator Program.
    Write the Following code in above module :
    MODULE Hide OUTPUT.
      LOOP AT SCREEN.
        IF screen-name = 'ZGIFT_DISPATCH-MAKTX'.
          screen-invisible  =  0.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    ENDMODULE.                 " Hide  OUTPUT
    Replace the name of field accordingly in IF condition.
    It will Work.
    Thanx and Regards,
    Nikhil Joshi

  • Mandatory Fields displaying in the table

    Hi
    In my create Page  , fields are present with input fields and DROP DOWN BY KEY AND rADIO GROUP.
    In that some of the fields are mandatory.
    If i enter values in that create page, it has to show fields in the table.
    But iam having only mandatory fields should come in the table.
    Our Abapers created table for the Mandatory fields only.
    Iam having doubt how the remaining fields(not showing in the table) will connect to the database.
    Will any one explain me on this.
    Please help me.
    Regards
    Sushma

    Iam trying to connect my web dynpro application to R3 Database.
    Iam having list screen consistts of Create and Export buttons and table.
    Table Fields :
    Allowance Code , sub code ,Type , Level , expense Type , amount
    After clicking Create button ,
    the screen consists of save and Cancel buttons.
    Allowance Code -- (Input Field)
    Sub Code -- (Input Field)
    Period Type -
    (Dropdown by key)
    Type -
    (Radio button Group)
    Level --- (Dropdown by key)
    Expense Type -(Dropdown by key)
    Trip - (Dropdown by key)
    Currency - (Dropdown by key)
    Amount --(Input Field)
    In the Create screen all these fields are present. But in the table in the List Screen it is taking only mandatory Fields.
    For this our Abapers created
    Fun Mod : Zup_Allowance_Input
    Table : ZMSTR_ALLOW
    Iam getting error in this code under IdataType in this "Save Button ".
    Can any one help me where i went wrong in this code.or else please provide the Code for this.
    public void onActionSave(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
    //@@begin onActionSave(ServerEvent)
    try{
    String str1=wdContext.currentStdAllowanceElement().getAllowanceCode();
    String str2=wdContext.currentStdAllowanceElement().getSubCode();
    IDataType dataType = wdContext.nodeStdAllowance().getNodeInfo().getAttribute("PeriodType").getDataType();
    String index=wdContext.currentStdAllowanceElement().getPeriodType();
    String str3=wdThis.getTextFromSimpleType(dataType,index);
    wdComponentAPI.getMessageManager().reportSuccess("wetreer "+str3);
    String arr[]={"Fixed","Actual"};
    for(int i=0;i<arr.length;i++)
    IPrivateEtrecStdCreateView.ICheckElement e=wdContext.nodeCheck().createCheckElement();
    wdContext.nodeCheck().addElement(e);
    e.setType(arr);
    IDataType dataType = wdContext.nodeStdAllowance().getNodeInfo().getAttribute("").getDataType();
    String index=wdContext.currentStdAllowanceElement().getLevel();
    String str5=wdThis.getTextFromSimpleType(dataType,index);
    wdComponentAPI.getMessageManager().reportSuccess("wetreer "+str5);
    IDataType dataType = wdContext.nodeStdAllowance().getNodeInfo().getAttribute("ExpenseType").getDataType();
    String index=wdContext.currentStdAllowanceElement().getExpenseType();
    String str6=wdThis.getTextFromSimpleType(dataType,index);
    wdComponentAPI.getMessageManager().reportSuccess("wetreer "+str6);
    IDataType dataType = wdContext.nodeStdAllowance().getNodeInfo().getAttribute("Trip").getDataType();
    String index=wdContext.currentStdAllowanceElement().getTrip();
    String str7=wdThis.getTextFromSimpleType(dataType,index);
    wdComponentAPI.getMessageManager().reportSuccess("wetreer "+str7);
    IDataType datatype = wdContext.nodeStdAllowance().getNodeInfo().getAttribute("Currency").getDataType();
    String index=wdContext.currentStdAllowanceElement().getCurrency();
    String str8=wdThis.getTextFromSimpleType(dataType,index);
    wdComponentAPI.getMessageManager().reportSuccess("wetreer "+str8);
    String str9=wdContext.currentStdAllowanceElement().getAmount();
    Zup_Allowance_Input input=new Zup_Allowance_Input();
    input.setAllow_Opt("C");
    input.setAllowance_Code(str1);
    input.setSubcode(str2);
    input.setType1(str3);
    input.setLevel1(str5);
    input.setExpense(str6);
    input.setCurr_Key(str8);
    wdContext.nodeZup_Allowance_Input().bind(input);
    wdContext.currentZup_Allowance_InputElement().modelObject().execute();
    String str10=wdContext.currentOutputElement().get();
    if(str10.equalsIgnoreCase("3"))
    String errorMessage = "Inserted Successfully !";
    IWDEventHandlerInfo windowHandler = wdControllerAPI.getViewInfo().getViewController().findInEventHandlers("OK");
    IWDConfirmationDialog windowDialog = wdComponentAPI.getWindowManager().createConfirmationWindow(errorMessage, windowHandler, "OK");
    windowDialog.open();
    windowDialog.setWindowPosition(300,250);
    }if(str10.equalsIgnoreCase("2"))
    String errorMessage = "Duplicate Value !";
    IWDEventHandlerInfo windowHandler = wdControllerAPI.getViewInfo().getViewController().findInEventHandlers("OK");
    IWDConfirmationDialog windowDialog = wdComponentAPI.getWindowManager().createConfirmationWindow(errorMessage, windowHandler, "OK");
    windowDialog.open();
    windowDialog.setWindowPosition(300,250);
    }catch(Exception e)
    wdComponentAPI.getMessageManager().reportSuccess(e.toString());
    //@@end
    //@@begin javadoc:onPlugFromEtrecStdView(ServerEvent)
    /** Declared validating event handler. */
    //@@end
    public void onPlugFromEtrecStdView(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
    //@@begin onPlugFromEtrecStdView(ServerEvent)
    wdContext.currentStdAllowanceElement().setAllowanceCode("");
    wdContext.currentStdAllowanceElement().setAmount("");
    wdContext.currentStdAllowanceElement().setSubCode("");
    //@@end

  • Table control in dialog prog

    how to pass data from first screen to table control in second screen.

    in the pbo
    loop at itab into wa_itab with control TC1 cursor TC1-current_line.
    endloop.
    in pai
    loop at itab.
    endloop.

  • Reg Dialog Prog..

    Hi,
       Any one can send me the sample dialog program..I created one DP it contains 2 text field and one push button, when i press the button it ll not work.

    Hi,
    plz go through the following example-----
    T A B L E D E C L E R A T I O N
    TABLES : Z8T024E.
    C O N S T A N T S
    DATA : ok_code_501(20).
    DATA : A1(20).
    DATA: D_FIRST VALUE 'Y'. " DECLEARING A FLAG
    data: dyname like d020s-prog value 'Z8VIJAY_T024E_RIV',
    dynumb like d020s-dnum value '0501'.
    data: begin of dynpfields occurs 3.
    include structure dynpread.
    data: end of dynpfields.
    C O N T R O L S
    CONTROLS : TAB_CONTROL TYPE TABLEVIEW USING SCREEN 501.
    I N T E R N A L T A B L E
    DATA : BEGIN OF I_TAB OCCURS 0,
    z8_ekorg TYPE z8ekorg, "purchasing organization
    z8_ekotx TYPE z8ekotx, "description
    z8_bukrs TYPE z8bukrs, "company code
    END OF I_TAB.
    *& Module USER_COMMAND_0501 INPUT
    text
    module USER_COMMAND_0501 input.
    OK_CODE_501 = SY-UCOMM.
    CASE OK_CODE_501.
    *-for save--
    WHEN 'SAV1'.
    LOOP AT I_TAB.
    SELECT SINGLE * FROM Z8T024E
    WHERE Z8_EKORG = I_TAB-Z8_EKORG
    AND Z8_BUKRS = I_TAB-Z8_BUKRS.
    ****IF DATA EXITS THEN UPDATE.....
    IF SY-SUBRC = 0.
    UPDATE Z8T024E SET Z8_EKOTX = I_TAB-Z8_EKOTX
    WHERE Z8_EKORG = I_TAB-Z8_EKORG AND Z8_BUKRS = I_TAB-Z8_BUKRS.
    ENDIF.
    ENDLOOP.
    D_FIRST = 'Y'.
    CLEAR OK_CODE_501.
    **-for exit-
    WHEN 'EX01'.
    SET SCREEN 0.
    LEAVE SCREEN.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_0501 INPUT
    *& Module STATUS_0501 OUTPUT
    text
    module STATUS_0501 output.
    SET PF-STATUS 'Z8VIJAY'.
    SET TITLEBAR 'TABLE CONTROL FOR Z8T024E'.
    IF D_FIRST = 'Y'.
    REFRESH I_TAB.
    SELECT
    z8_ekorg
    z8_ekotx
    z8_bukrs
    INTO CORRESPONDING FIELDS OF TABLE i_tab
    FROM z8t024e
    WHERE Z8_BUKRS = '5504'.
    D_FIRST = 'N'.
    ENDIF.
    TAB_CONTROL-LINES = 200.
    endmodule. " STATUS_0501 OUTPUT
    *& Module ADD_ENTRIES OUTPUT
    text
    module ADD_ENTRIES output.
    CLEAR I_TAB.
    READ TABLE I_TAB INDEX tab_control-current_line.
    TAB_CONTROL-V_SCROLL = 'X'.
    *TAB_CONTROL-H_GRID = 'X'.
    *TAB_CONTROL-V_GRID = 'X'.
    IF I_TAB-Z8_EKORG = '' OR I_TAB-Z8_BUKRS = ''.
    LOOP AT SCREEN.
    IF SCREEN-NAME = 'I_TAB-Z8_EKOTX'.
    SCREEN-OUTPUT = 1.
    SCREEN-INPUT = 0.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    ENDIF..
    endmodule. " ADD_ENTRIES OUTPUT
    *& Module READ_ENTRIES INPUT
    text
    module READ_ENTRIES input.
    MODIFY I_TAB INDEX tab_control-current_line.
    IF I_TAB-z8_bukrs IS INITIAL.
    ENDIF.
    endmodule. " READ_ENTRIES INPUT
    *& Module DISPLAY OUTPUT
    text
    module DISPLAY output.
    *when display-
    IF SY-UCOMM = 'DISP'.
    IF I_TAB-Z8_EKORG <> ''.
    LOOP AT SCREEN.
    SCREEN-INPUT = 0.
    SCREEN-OUTPUT = 1.
    MODIFY SCREEN.
    ENDLOOP.
    ENDIF.
    ENDIF.
    *when change-
    IF SY-UCOMM = 'CH01'.
    IF I_TAB-Z8_EKORG = '' OR I_TAB-Z8_BUKRS = ''.
    LOOP AT SCREEN.
    SCREEN-INPUT = 0.
    SCREEN-OUTPUT = 1.
    MODIFY SCREEN.
    ENDLOOP.
    ENDIF.
    ENDIF.
    *when create-
    IF SY-UCOMM = 'CR01'.
    LOOP AT SCREEN.
    CLEAR I_TAB.
    REFRESH I_TAB.
    SCREEN-INPUT = 1.
    SCREEN-OUTPUT = 1.
    MODIFY SCREEN.
    ENDLOOP.
    ENDIF.
    endmodule. " DISPLAY OUTPUT
    **& Module help INPUT
    text
    *module help input.
    *CALL FUNCTION 'HELP_OBJECT_SHOW_FOR_FIELD'
    EXPORTING
    DOKLANGU = SY-LANGU
    DOKTITLE = ' '
    CALLED_BY_TCODE =
    CALLED_BY_PROGRAM =
    CALLED_BY_DYNP =
    CALLED_FOR_TAB = 'Z8T024E'
    CALLED_FOR_FIELD = 'Z8_EKORG'
    CALLED_FOR_TAB_FLD_BTCH_INPUT =
    CALLED_BY_CUAPROG =
    CALLED_BY_CUASTAT =
    MERGE_DZ_IF_AVAILABLE =
    MEMORYID =
    EXPLICIT_MEMORYID = ' '
    TABLES
    LINKS =
    EXCLUDEFUN =
    EXCEPTIONS
    OBJECT_NOT_FOUND = 1
    SAPSCRIPT_ERROR = 2
    OTHERS = 3
    *IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *ENDIF.
    *endmodule. " help INPUT
    *& Module help INPUT
    text
    module help input.
    if sy-subrc = 0.
    endif.
    REFRESH dynpfields.
    move '0001' to dynpfields-fieldname.
    append dynpfields.
    CALL FUNCTION 'DYNP_VALUES_READ'
    EXPORTING
    dyname = dyname
    dynumb = dynumb
    TRANSLATE_TO_UPPER = ' '
    REQUEST = ' '
    PERFORM_CONVERSION_EXITS = ' '
    PERFORM_INPUT_CONVERSION = ' '
    DETERMINE_LOOP_INDEX = ' '
    tables
    dynpfields = dynpfields
    EXCEPTIONS
    INVALID_ABAPWORKAREA = 1
    INVALID_DYNPROFIELD = 2
    INVALID_DYNPRONAME = 3
    INVALID_DYNPRONUMMER = 4
    INVALID_REQUEST = 5
    NO_FIELDDESCRIPTION = 6
    INVALID_PARAMETER = 7
    UNDEFIND_ERROR = 8
    DOUBLE_CONVERSION = 9
    STEPL_NOT_FOUND = 10
    OTHERS = 11
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    endmodule. " help INPUT
    *& Module HELP1 INPUT
    text
    module HELP1 input.
    endmodule. " HELP1 INPUT
    *& Module HELP2 INPUT
    text
    module HELP2 input.
    endmodule. " HELP2 INPUT
    What is Dialog Progrmming.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb2d40358411d1829f0000e829fbfe/content.htm
    This link Give you all details about Modulepool
    http://sap.mis.cmich.edu/sap-abap/abap09/index.htm
    Regards,
    Priyanka.

  • How to populate both key and text in drop down list in dialog prog screen

    Hi, Can anyone please advice how to display both key and text in the drop down list in dialog prog screen. I tried with below code. keys and texts are getting populated in values table but only text is appearing when click on drop down. need to display both key and text in the drop down. Thanks in advance.
    TABLES: ZRPP_MODELS, ZRPP_FFLSTRATEGY.
    TYPE-POOLS : VRM.
    DATA : field_id TYPE VRM_ID ,
           values   TYPE VRM_VALUES,
           value    LIKE LINE OF values.
    FORM fill_model_list .
      select MODEL MODEL_DESC from ZRPP_MODELS into value.
        APPEND value TO VALUES.
      endselect.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id     = 'ZRPP_MODELS-MODEL'
          values = values.
    ENDFORM.

    You need to concatenate KEY & VALUES
      wa_values-key = '1'.
      wa_values-text = '1 - One'.
      append wa_values to i_values.
      wa_values-key = '2'.
      wa_values-text = '2 - Two'.
      append wa_values to i_values.
      wa_values-key = '3'.
      wa_values-text = '3 - Three'.
      append wa_values to i_values.
      call function 'VRM_SET_VALUES'
        exporting
          id              = 'LIST_BOX'
          values          = i_values
        exceptions
          id_illegal_name = 1
          others          = 2.

  • Prob in Dialog Prog.

    Hi All
    I am facing prob in Dialog Prog Report.
    Created 1 Sel-screen, when the options are given after executing, it runs well.
    But when coming back to sel-screen & giving new options, its giving previous records also.
    (I have cleared IT).
    Regards.

    Hi,
    CLEAR wa_itab.     " Clears work area
         REFRESH it_itab.  "  Clears contents of internal table
         SELECT * FROM <table> INTO TABLE it_itab WHERE field IN s_sel.

  • How to provide F4 help for a field in table control

    Hi Friends,
    I have requirement like below.
    1.Create one custom transaction code with header and item information.
    2.In item level, we will be designed table control to enter/display the data.
    3.Table control’s first field will be material number and next DOT number (Material may have many DOT numbers) and so on.
    4.First user will enter material number in the table control’s first row’s first field and go to DOT number field.
    5.DOT number has drop down option. If user selects drop down box of DOT number, he gets all the DOT numbers available in database. User selects one DOT number and double clicks on it then it will be populated in DOT number field box.
    But for point number 5,  business wants like when ever user enters material number in table control first field then select DOT number’s drop down then they want to see the particular material’s DOT numbers only in the drop down list for selection. Not all DOT numbers available in data base. Same thing should happen for all item lines in table control.
    Please see below example. 
    Assume data base table has 10 DOT numbers. But material number has only 2 DOT numbers. When ever user enters material number in item level table control and selects DOT number’s drop down then it should show only 2 DOT numbers which are related to particular material number. Not all 10 DOT numbers.
    Could you please suggest me, how can we achieve this?

    Hello,
    Check this :-
    For POV
    Input Help in Dialog Modules
    You can call dialog modules in the POV event using the event keyword PROCESS ON VALUE-REQUEST.
    PROCESS ON VALUE-REQUEST.
    FIELD <f> MODULE <mod>.
    After the PROCESS ON VALUE-REQUEST statement, you can only use the MODULE statement together with the FIELD statement. When the user chooses F4 for a field <f>, the system calls the module <mod> belonging to the FIELD <f> statement. If there is more than one FIELD statement for the same field <f>, only the first is executed. The module <mod> is defined in the ABAP program like a normal PAI module. However, the contents of the screen field <f> are not available, since it is not transported by the FIELD statement during the PROCESS ON HELP-REQUEST event. You can now program your own value lists in the module. However, this procedure is only recommended if it really is not possible to use a search help. Defining search helps is much easier than PROCESS ON VALUE-REQUEST, since the system takes over some of the standard operations, such as getting field contents from the screen. It also ensures that the F4 help has a uniform look and feel throughout the system. Furthermore, it means that you do not have to reassign input help to fields on each screen.
    Despite the introduction of search helps (and search help exits), there are still cases in which you need to use parts of the standard F4 functions directly. In this case, there are some standard function modules that you can use in the POV event. They support search helps, as well as all other kinds of input help, and are responsible for data transport between the screen and the input help. These all have the prefix F4IF_. The most important are:
    F4IF_FIELD_VALUE_REQUEST
    Calls the input help of the ABAP Dictionary dynamically. You can pass the component names of a structure or database table of the ABAP Dictionary to the function module in the import parameters TABNAME and FIELDNAME. The function module starts the ABAP Dictionary input help for this component. All of the relevant screen fields are read. If you specify the import parameters DYNPPROG, DYNPNR, and DYNPROFIELD, the user’s selection is returned to the corresponding field on the screen. If you specify the table parameter RETURN_TAB, the selection is returned into the table instead.
    F4IF_INT_TABLE_VALUE_REQUEST
    This function module displays a value list that you created in an ABAP program. The value list is passed to the function module as the table parameter VALUE_TAB. If you specify the import parameters DYNPPROG, DYNPNR, and DYNPROFIELD, the user’s selection is returned to the corresponding field on the screen. If you specify the table parameter RETURN_TAB, the selection is returned into the table instead.
    There are also two function modules - DYNP_VALUES_READ and DYNP_VALUES_UPDATE - that can read the values of screen fields and return values to them during the POV event. For further information, refer to the relevant function module documentation.
    Input help in dialog modules
    REPORT DEMO_DYNPRO_F4_HELP_MODULE.
    TYPES: BEGIN OF VALUES,
    CARRID TYPE SPFLI-CARRID,
    CONNID TYPE SPFLI-CONNID,
    END OF VALUES.
    DATA: CARRIER(3) TYPE C,
    CONNECTION(4) TYPE C.
    DATA: PROGNAME LIKE SY-REPID,
    DYNNUM LIKE SY-DYNNR,
    DYNPRO_VALUES TYPE TABLE OF DYNPREAD,
    FIELD_VALUE LIKE LINE OF DYNPRO_VALUES,
    VALUES_TAB TYPE TABLE OF VALUES.
    CALL SCREEN 100.
    MODULE INIT OUTPUT.
    PROGNAME = SY-REPID.
    DYNNUM = SY-DYNNR.
    CLEAR: FIELD_VALUE, DYNPRO_VALUES.
    FIELD_VALUE-FIELDNAME = 'CARRIER'.
    APPEND FIELD_VALUE TO DYNPRO_VALUES.
    ENDMODULE.
    MODULE CANCEL INPUT.
    LEAVE PROGRAM.
    ENDMODULE.
    MODULE VALUE_CARRIER INPUT.
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
    EXPORTING
    TABNAME = 'DEMOF4HELP'
    FIELDNAME = 'CARRIER1'
    DYNPPROG = PROGNAME
    DYNPNR = DYNNUM
    DYNPROFIELD = 'CARRIER'.
    ENDMODULE.
    MODULE VALUE_CONNECTION INPUT.
    CALL FUNCTION 'DYNP_VALUES_READ'
    EXPORTING
    DYNAME = PROGNAME
    DYNUMB = DYNNUM
    TRANSLATE_TO_UPPER = 'X'
    TABLES
    DYNPFIELDS = DYNPRO_VALUES.
    READ TABLE DYNPRO_VALUES INDEX 1 INTO FIELD_VALUE.
    SELECT CARRID CONNID
    FROM SPFLI
    INTO CORRESPONDING FIELDS OF TABLE VALUES_TAB
    WHERE CARRID = FIELD_VALUE-FIELDVALUE.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    RETFIELD = 'CONNID'
    DYNPPROG = PROGNAME
    DYNPNR = DYNNUM
    DYNPROFIELD = 'CONNECTION'
    VALUE_ORG = 'S'
    TABLES
    VALUE_TAB = VALUES_TAB.
    ENDMODULE.
    The next screen (statically defined) for screen 100 is itself. It has the following layout:
    The input fields have been adopted from the program fields CARRIER and CONNECTION. The pushbutton has the function code CANCEL with function type E.
    The screen flow logic is as follows:
    PROCESS BEFORE OUTPUT.
    MODULE INIT.
    PROCESS AFTER INPUT.
    MODULE CANCEL AT EXIT-COMMAND.
    PROCESS ON VALUE-REQUEST.
    FIELD CARRIER MODULE VALUE_CARRIER.
    FIELD CONNECTION MODULE VALUE_CONNECTION.
    When the user chooses input help for the individual fields, the following is displayed:
    For the Airline field, the POV module VALUE_CARRIER is called. The function module F4IF_FIELD_VALUE_REQUEST displays the input help for the component CARRIER1 of the structure DEMOF4HELP from the ABAP Dictionary, namely the search help DEMOF4DE. The user’s selection is returned to the screen field CARRIER.
    For the Flight number field, the POV module VALUE_CONNECTION is called. The function module DYNP_VALUE_READ transports the value of the screen field CARRIER into the program. The program then reads the corresponding values from the database table SPFLI into the internal table VALUES_TAB using a SELECT statement, and passes the internal table to F4IF_INT_TABLE_VALUE_REQUEST. This displays the internal table as input help, and places the user’s selection into the screen field CONNECTION.
    For POH------------
    Field Help
    There are three ways of displaying field help for screen elements:
    Data Element Documentation
    If you place a field on the screen in the Screen Painter by copying a ABAP Dictionary field, the corresponding data element documentation from the ABAP Dictionary is automatically displayed when the user chooses field help (as long as the help has not been overridden in the screen flow logic).
    For further information about creating data element documentation, refer to data elements.
    Data Element Supplement Documentation
    If the data element documentation is insufficient, you can expand it by writing a data element supplement
    Data element supplement documentation contains the heading Definition, as well as the following others:
    Use
    Procedure
    Examples
    Dependencies
    To create data element supplement documentation for a screen, choose Goto ® Documentation ® DE supplement doc. from the element list of the screen. A dialog box appears in which the system proposes a number as the identified for the data element supplement. You can then enter help texts for the above headings using the SAPscript editor.
    Data element supplement documentation created in this way is program- and screen-specific. Any data element supplement documentation created in the ABAP Dictionary with the same number is overridden by the screen-specific documentation. You can link existing data element supplement documentation created in the ABAP Dictionary with a screen field by using the table THLPF. To do this, crate a new row in THLPF containing the following data: Program name, screen name, field name, and number of the data element supplement documentation.
    To display data element supplement documentation, you must code the following screen flow logic in the POH event:
    PROCESS ON HELP-REQUEST.
    FIELD <f> [MODULE <mod>] WITH <num>.
    After PROCESS ON HELP-REQUEST, you can only use FIELD statements. If there is no PROCESS ON HELP-REQUEST keyword in the flow logic of the screen, the data element documentation for the current field, or no help at all is displayed when the user chooses F1. Otherwise, the next FIELD statement containing the current field <f> is executed.
    If there is screen-specific data element supplement documentation for the field <f>, you can display it by specifying its number <num>. The number <num> can be a literal or a variable. The variable must be declared and filled in the corresponding ABAP program.
    You can fill the variables, for example, by calling the module <mod> before the help is displayed. However, the FIELD statement does not transport the contents of the screen field <f> to the ABAP program in the PROCESS ON HELP-REQUEST event.
    For further information about data element supplement documentation, refer to Data Element Supplements.
    Calling Help Texts from Dialog Modules
    If data element supplement documentation is insufficient for your requirements, or you want to display help for program fields that you have not copied from the ABAP Dictionary, you can call dialog modules in the POH event:
    PROCESS ON HELP-REQUEST.
    FIELD <f> MODULE <mod>.
    After the PROCESS ON HELP-REQUEST statement, you can only use the MODULE statement together with the FIELD statement. When the user chooses F1 for a field <f>, the system calls the module <mod> belonging to the FIELD <f> statement. If there is more than one FIELD statement for the same field <f>, only the first is executed. However, the contents of the screen field <f> are not available in the module <mod>, since it is not transported by the FIELD statement during the PROCESS ON HELP-REQUEST event. The field help should not be dependent on the user input.
    The module <mod> is defined in the ABAP program like a normal PAI module. The processing logic of the module must ensure that adequate help is displayed for the field in question. Instead of calling an extra screen with text fields, you should use one of the following function modules to display a suitable SAPscript document:
    HELP_OBJECT_SHOW_FOR_FIELD
    This function module displays the data element documentation for components of any structure or database table from the ABAP Dictionary. You pass the name of the component and structure or table to the import parameters FIELD and TABLE.
    HELP_OBJECT_SHOW
    Use this function module to display any SAPscript document. You must pass the document class (for example, TX for general texts, DE for data element documentation) and the name of the document to the import parameters DOKCLASS and DOKNAME. For technical reasons, you must also pass an empty internal table with the line type TLINE to the tables parameter of the function module.
    For further information about how to create SAPscript documents, refer to the Documentation of System Objects documentation.
    Field help on screens.
    REPORT DEMO_DYNPRO_F1_HELP.
    DATA: TEXT(30),
    VAR(4),
    INT TYPE I,
    LINKS TYPE TABLE OF TLINE,
    FIELD3, FIELD4.
    TABLES DEMOF1HELP.
    TEXT = TEXT-001.
    CALL SCREEN 100.
    MODULE CANCEL INPUT.
    LEAVE PROGRAM.
    ENDMODULE.
    MODULE F1_HELP_FIELD2 INPUT.
    INT = INT + 1.
    CASE INT.
    WHEN 1.
    VAR = '0100'.
    WHEN 2.
    VAR = '0200'.
    INT = 0.
    ENDCASE.
    ENDMODULE.
    MODULE F1_HELP_FIELD3 INPUT.
    CALL FUNCTION 'HELP_OBJECT_SHOW_FOR_FIELD'
    EXPORTING
    DOKLANGU = SY-LANGU
    DOKTITLE = TEXT-002
    CALLED_FOR_TAB = 'DEMOF1HELP'
    CALLED_FOR_FIELD = 'FIELD1'.
    ENDMODULE.
    MODULE F1_HELP_FIELD4 INPUT.
    CALL FUNCTION 'HELP_OBJECT_SHOW'
    EXPORTING
    DOKCLASS = 'TX'
    DOKLANGU = SY-LANGU
    DOKNAME = 'DEMO_FOR_F1_HELP'
    DOKTITLE = TEXT-003
    TABLES
    LINKS = LINKS.
    ENDMODULE.
    The next screen (statically defined) for screen 100 is 100. It has the following layout:
    The screen fields DEMOf1HELP-FIELD1 and DEMOF1HELP-FIELD2 from the ABAP Dictionary and the program fields FIELD3 and FIELD4 are assigned to the input fields. The pushbutton has the function code CANCEL with function type E.
    The screen flow logic is as follows:
    PROCESS BEFORE OUTPUT.
    PROCESS AFTER INPUT.
    MODULE CANCEL AT EXIT-COMMAND.
    PROCESS ON HELP-REQUEST.
    FIELD DEMOF1HELP-FIELD2 MODULE F1_HELP_FIELD2 WITH VAR.
    FIELD FIELD3 MODULE F1_HELP_FIELD3.
    FIELD FIELD4 MODULE F1_HELP_FIELD4.
    The components FIELD1 and FIELD2 of structure DEMOF1HELP both refer to the data element DEMOF1TYPE. This data element is documented, and also has two supplements with numbers 0100 and 0200.
    The following field help is displayed:
    When the user chooses F1 on the input field for DEMOF1HELP-FIELD1, the data element documentation for DEMOF1TYPE is displayed, since the field does not occur in the PROCESS ON HELP-REQUEST event.
    If the user chooses F1 repeatedly for the input field DEMOF1HELP-FIELD2, the data element documentation is displayed, along with the supplement documentation for either 0100 or 0200 alternately. The variable VAR is filled in the dialog module F1_HELP_FIELD2.
    When the user chooses F1 on the input field for FIELD3, the data element documentation for DEMOF1TYPE is displayed, since this is called in the dialog module F1_HELP_FIELD3 by the function module HELP_OBJECT_SHOW_FOR_FIELD.
    When the user chooses F1 on the input field for FIELD4, the SAPscript documentation DEMO_FOR_F1_HELP is displayed, since this is called in the dialog module F1_HELP_FIELD4 by the function module HELP_OBJECT.
    Regards,
    Deepu.K

  • Dialog prog. doubt

    hi alll,
    i've created one dialog prog. in that prog. i created inserted table control. in that control i placed two TXTNAME and TXTAGE (input/output field). BUT I activated, the folllowing error occurs during runtime :
    The txtname is not assigned to a loop "LOOP ... ENDLOOP" muthu appear in "PBO" and "PAI".
    pls solove my problem

    Hi,
    While defining a table control on a screen, the following statements are mandatory :
    1. CONTROLS : <TABLECONTROL> TYPE TABLEVIEW USING SCREEN <SCREENNO.>
    2. In the Flow Logic,
      a. In the PBO.
        Loop at itab with <tablecontrol>.
        endloop.
      b. In the PAI,
        loop at itab.
        endloop.
    In your case, ensure that the Statement 2 is present.
    Reward if helpful.
    Regards

Maybe you are looking for