Barcode in module pool

Hi All,
My client requirment is to add new field for Barcode in Tcode AS01 and also display the barcode near by.
how to achive this issue.
Regards,
Arasukumar

Hello,
Please try the Function modules in Function Group ALINK_BARCODE_BDS
BDS_BARCODE_CREATE
BDS_BARCODE_CREATE_VIA_RFC
BDSBARIN
This program is used for Generating, Creating and inserting Barcode.
Normally take on lable in disable mode and move the barcode value to that label.

Similar Messages

  • Cursor position on screen data in module pool programming(urgent)

    Hi all,
    I developed a module pool  program which will save the data after  scanning the barcode data.
    In my program screen 100 is there which contains field  ‘2dbar’. scanned data is comming to 2dbar field.
    we r doing scan 4 times.once for vendor number,once for material no. like this.
    After 1st scan, vendor number will come to field ‘2dbar’.
    Then I developed logic to put comma after each scanned data come to this field ‘2dbar’.
    MODULE put_comma INPUT.
    CASE OK_CODE.
    when ''.
    move 2dbar to 2dbar1.
    clear 2dbar.
    concatenate 2dbar1 ',' into 2dbar2.
    *replace 2dbar with 2dbar2 into 2dbar.
    move 2dbar2 to 2dbar.
    *write 2dbar2 to 2dbar.
    condense 2dbar no-gaps.
    *move '' to 2dbar.
    *set cursor field 2dbar offset 5.
    *write
    ENDCASE.
    ENDMODULE.                 " put_comma  INPUT
    By above logic, comma  comes to the starting position of 2dbar after each scan. i.e cursor position is coming to the starting position of screen field ‘2dbar’.
    Now  I need to move the cursor position after the comma position on 2dbar after each scan.
    after 1st scan, 2dbar contains
    vmotorola
    then my logic puts a comma when u put enter on screen 100.
    now 2dbar contains
    vmotorola,
    i should get the cursor position after the comma.but i am getting cursor position before 'v'.so how to move this cursor position  beyond comma after each scan.
    I added set cursor  command but it is not working.plz
    What is the logic, I need to put in PAI  to move the cursor on selection screen.
    Already the logic I have mentioned.  with that logic, I can put comma.now I need to add cursor movement logic  to move the cursoron  on screen field ‘2dbar’.
    Plz reply me as it is urgent.
    Thanks in advance.
    Regards
    pabitra

    CASE OK_CODE.
    when ''.
    move 2dbar to 2dbar1.
    clear 2dbar.
    concatenate 2dbar1 ',' into 2dbar2.
    move 2dbar2 to 2dbar.
    condense 2dbar no-gaps.
    len = strlen ( 2dbar ).
    len = len - 1.
    set cursor field 2dbar offset len.
    ENDCASE.
    ENDMODULE. " put_comma INPUT

  • How to delete the row in table control with respect to one field in module pool programming?

    Hi,
    Can I know the way to delete the row in table control with respect to one field in module pool programming
    Regards
    Darshan MS

    HI,
    I want to delete the row after the display of table control. I have created push button as delete row. If I click on this push button, the selected row should get deleted.
    I have written this code,
    module USER_COMMAND_9000 input.
    DATA OK_CODE TYPE SY-UCOMM.
    OK_CODE = SY-UCOMM.
    CASE OK_CODE.
         WHEN 'DELETE'.
            LOOP AT lt_source INTO ls_source WHERE mark = 'X'.
                APPEND LS_SOURCE TO LT_RESTORE.
                DELETE TABLE LT_SOURCE FROM LS_SOURCE.
                SOURCE-LINES = SOURCE-LINES - 1.
            ENDLOOP.
    But I'm unable to delete the selected rows, It is getting deleted the last rows eventhough I select the other row.
    So I thought of doing with respect to the field.

  • How to use table maintenance view in module pool screen

    hi ,
    want to use table maintenance view in a module pool screen so that i can edit, insert, delete and update date in to the ztable.please help.

    You can simply call it via SM30.   Or you can call the table maintence view from any program(report or module pool) using a function module.
      call function 'VIEW_MAINTENANCE_CALL'
           exporting
                action                       = 'U'
                view_name                    = 'Z_Table_Name'
           exceptions
                client_reference             = 1
                foreign_lock                 = 2
                invalid_action               = 3
                no_clientindependent_auth    = 4
                no_database_function         = 5
                no_editor_function           = 6
                no_show_auth                 = 7
                no_tvdir_entry               = 8
                no_upd_auth                  = 9
                only_show_allowed            = 10
                system_failure               = 11
                unknown_field_in_dba_sellist = 12
                view_not_found               = 13
                others                       = 14.
    Regards,
    RIch Heilman

  • Error while transporting modification in module pool of a specific infotype

    HI experts,
    While transporting some modifications that have be done on the PAI of a module pool of a specific infotype, we have an error with code return = 8, the error is --> Original object R3TRPROGMP900730 must not be changed!!!
    Any suggestion .
    Tanhks a lot .

    Hi ,
    Nice to know that your problem is solved. If any of the replies were usefull please acknowledge their work.
    And it would be great if you can just put in your remarks about the best  solution you had in solving that problem.
    It might be useful to other users when they encoutner such problem.
    BR,
    Vijay.

  • Getting error while calling a subscreen in  module pool program

    HI  ALL,
                         ACTUALLY I'M GETTING A SYNTAX ERROR WHILE I'M CALLING A SUBSCREEN
                       IN A MODULE POOL PROGRAM IN PAI MODULE
                       THE ERROR IS AS FOLLOW
                           "." or "ID ... FIELD ..." expected after "SUBSCREEN"
                        CAN ANYBODY PLS HELP ME.
    REGARDS
    ANDREWS

    HI MAX ,
                      THE CODE IS AS FOLLOWS:
    *& Report  ZTABSTRIP_PS
    REPORT  ZTABSTRIP_PS.
    type-pools : vrm.
    DATA:number1 type I,
         number2 type I,
         result  type I,
         ok_code like SY-UCOMM,
         employee1 type c,
         ABAP(19)    type c,
         SALES(19)  type c,
         HR(19)      type c,
         MM(19)     type  c,
    employee type c.
        emp type c.
    CONTROLS  tabstrip TYPE TABSTRIP.
    CALL SCREEN 100.
    call screen 110.
    call screen 130.
    call screen 120.
    call screen  140.
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'STATUS'.
      SET TITLEBAR 'TITLE'.
      CASE OK_CODE.
        WHEN 'BACK' or 'EXIT' or 'DELETE'.
         leave program.
         WHEN 'SAVE'.
           MESSAGE 'please choose a valid function' TYPE 'I'.
       WHEN 'BACK'.
        leave PROGRAM.
    when  'EXIT' or 'DELETE'.
        leave to screen 0.
        WHEN 'SAVE'.
          MESSAGE 'please choose a valid function' TYPE 'I'.
    endcase.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE USER_COMMAND_0100 INPUT.
    CASE OK_CODE.
      when 'TAB1'.
    tabstrip-activetab = 'TAB1'.
       when 'TAB2'.
    tabstrip-activetab = 'TAB2'.
    result = number1 + number2.
       when 'TAB3'.
      tabstrip-activetab = 'TAB3'.
    SET TITLEBAR 'TITLE1'.
      when 'TAB4'.
        tabstrip-activetab = 'TAB4'.
       if employee = 'NEERAJ'.
         ABAP = 'NEERAJ'.
       elseif employee = 'UMESH'.
         SALES = 'UMESH'.
       ELSEIF employee = 'RAM'.
         HR = 'RAM'.
       elseif employee = 'ANIL'.
         MM = 'ANIL'.
         endif.
       employee = employee.
    WHEN 'BACK'.
        leave PROGRAM.
    when  'EXIT' or 'DELETE'.
        leave to screen 0.
        WHEN 'SAVE'.
          MESSAGE 'please choose a valid function' TYPE 'I'.
    ENDCASE.
       WHEN 'BACK' or 'EXIT' or 'DELETE'.
         leave program .
         WHEN 'SAVE'.
           MESSAGE 'please choose a valid function' TYPE 'I'.
    endcase.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Module  STATUS_0110  OUTPUT
          text
    **MODULE STATUS_0110 OUTPUT.
    SET PF-STATUS 'STATUS1'.
    SET TITLEBAR 'xxx'.
    **case ok_code.
    **WHEN 'back' or 'exit' or 'delete'.
        leave PROGRAM.
        WHEN 'save'.
          MESSAGE 'please choose a valid function ' TYPE 'W'.
    ENDCASE.
    **ENDMODULE.                 " STATUS_0110  OUTPUT
    *&      Module  USER_COMMAND_0110  INPUT
          text
    MODULE USER_COMMAND_0110 INPUT.
      number1 = number1.
      number2 = number2.
    CLEAR NUMBER1.
    CLEAR NUMBER2.
    REFRESH NUMBER1.
    REFRESH NUMBER2.
    ENDMODULE.                 " USER_COMMAND_0110  INPUT
    *&      Module  STATUS_0130  OUTPUT
          text
    MODULE STATUS_0130 OUTPUT.
    SET PF-STATUS 'STATUS2'.
    SET TITLEBAR 'xxx'.
    RESULT = number1 + number2.
    *CLEAR RESULT.
    REFRESH RESULT.
    ENDMODULE.                 " STATUS_0130  OUTPUT
    *&      Module  STATUS_0120  OUTPUT
          text
    MODULE STATUS_0120 OUTPUT.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
    DATA:  l_name TYPE vrm_id,
            li_list TYPE vrm_values,
            l_value LIKE LINE OF li_list.
      l_value-key = '1'.
      l_value-text = 'ANIL'.
      APPEND l_value TO li_list.
      CLEAR l_value.
    CLEAR li_list.
      l_value-key = '2'.
      l_value-text = 'RAM'.
      APPEND l_value TO li_list.
      CLEAR l_value.
    CLEAR li_list.
      l_value-key = '3'.
      l_value-text = 'NEERAJ'.
      APPEND l_value TO li_list.
      CLEAR l_value.
    CLEAR li_list.
      l_value-key = '4'.
      l_value-text = 'UMESH'.
      APPEND l_value TO li_list.
      CLEAR l_value.
    CLEAR li_list.
    l_name =  'employee'.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          ID                    =  l_name
          VALUES                =  li_list
       EXCEPTIONS
         ID_ILLEGAL_NAME       = 1
         OTHERS                = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CLEAR li_list.
    ENDMODULE.                 " STATUS_0120  OUTPUT
    *&      Module  USER_COMMAND_0120  INPUT
          text
    MODULE USER_COMMAND_0120 INPUT.
    INCLUDING sy-repid '140'.
    employee1 = employee.
    IF employee1 CS 'NEERAJ'.
      call SUBSCREEN    sub4  .
      ABAP = 'NEERAJ'.
      CLEAR ABAP.
    ELSEIF employee1 CS 'UMESH'.
       call SUBSCREEN  sub4  .
        SALES = 'UMESH'.
        CLEAR SALES.
    elseif employee1 CS 'RAM'.
      call SUBSCREEN sub4 .
       HR = 'RAM'.
       CLEAR  HR.
    ELSEIF employee1 CS 'ANIL'.
       call SUBSCREEN sub4 .
       MM = 'ANIL'.
       CLEAR MM.
       endif.
    ENDMODULE.                 " USER_COMMAND_0120  INPUT
    *&      Module  STATUS_0140  OUTPUT
          text
    MODULE STATUS_0140 OUTPUT.
    *CASE OK_CODE.
       WHEN employee1  'NEERAJ'.
         screen-active = 1.
         ABAP = 'NEERAJ'.
       WHEN employee1 = 'UMESH'.
         screen-active = 1.
         SALES = 'UMESH'.
       WHEN employee1 = 'RAM'.
         screen-active = 1.
         HR = 'RAM'.
       WHEN employee1 = 'ANIL'.
         screen-active = 1.
         MM = 'ANIL'.
         endif.
    *ENDCASE.
    ENDMODULE.                 " STATUS_0140  OUTPUT

  • Module pool - table control - update ztable

    hello , i doing a module pool that will have few screens , now i have one screen with a table control that fetch the data from a ztable when screen is call the table control is showing the data and is in grey and no editable i add a pf-status for change that mode i can delete the row from the table control but i don't figure out how update to the ztable when i press save , i wan't too another button for add a new row ( and remain the already in grey ) for add new entrie in the table and update the ztable
    pd: sorry for my bad english
    this is my code:
    TOP:
    PROGRAM  z_pp_lote_etiquetas MESSAGE-ID zz.
    TABLES:zc2p_lote_etique,
           zc2p_lider_modul.
    DATA: ok_code LIKE sy-ucomm.
    DATA save_ok LIKE sy-ucomm.
    * internal table
    DATA: it_zc2p_lote_etique LIKE STANDARD TABLE OF zc2p_lote_etique.
    DATA: it_zc2p_lider_modul TYPE STANDARD TABLE OF zc2p_lider_modul WITH HEADER LINE.
    DATA: it_zc2p_lider_modul_del TYPE STANDARD TABLE OF zc2p_lider_modul WITH HEADER LINE.
    **************Workarea
    DATA: wa_c2p_lote_etique TYPE zc2p_lote_etique.
    DATA: wa_c2p_lider_modul TYPE zc2p_lider_modul.
    DATA: wa_c2p_lider_modul_del TYPE zc2p_lider_modul.
    DATA: sel.
    DATA: MARK.
    DATA: init.
    DATA:  col TYPE scxtab_column.
    DATA: lines TYPE i.
    * Variable Declaration
    DATA : flg, "Flag to set the change mode
    ln TYPE i. "No. of records
    * Table Control Declartion.
    CONTROLS: zc2p_lider_crtl TYPE TABLEVIEW USING SCREEN '101'.
    **PROCESS BEFORE OUTPUT INCLUDE **
    *&  Include           Z_PP_LOTE_ETIQUETAS_O01
    *& Module set_status OUTPUT
    * Setting the GUI status
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'Z_PP_LOT_ETIQ_MENU'.
      SET TITLEBAR 'Z_PP_LOT_ETIQ'.
    ENDMODULE. " set_status OUTPUT screen 100
    *  MODULE status_0101 OUTPUT
    * Setting the GUI status
    MODULE status_0101 OUTPUT.
      SET PF-STATUS 'Z_PP_LOT_ETIQ_ME_101'.
      SET TITLEBAR 'Z_PP_LOT_ETIQ'.
    * Data retreving
      if init is INITIAL.
      select * from zc2p_lider_modul into CORRESPONDING FIELDS OF TABLE it_zc2p_lider_modul.
        DESCRIBE TABLE it_zc2p_lider_modul LINES ln.
        zc2p_lider_crtl-lines = ln + 10.
        init = 'X'.
    endif.
    ENDMODULE.                    "status_0101 OUTPUT
    module change_sdyn_conn output.
    * you can change the content of current table control line via
    * sdyn_conn
      READ TABLE it_zc2p_lider_modul INTO zc2p_lider_modul INDEX zc2p_lider_crtl-current_line.
    endmodule.                             " FILL_TABLE_CONTROL  OUTPUT
    MODULE set_screen_fields OUTPUT.
    LOOP AT SCREEN.
    IF flg IS INITIAL.
    screen-input = 0.
    ELSE.
    screen-input = 1.
    ENDIF.
    *ENDIF.
    * Modifying the screen after making changes
    MODIFY SCREEN.
    ENDLOOP.
    ENDMODULE. " set_screen_fields OUTPUT
    PROCESS AFTER INPUT INCLUDE.
    *  MODULE USER_COMMAND_0100 INPUT
    MODULE user_command_0100 INPUT.
      CASE ok_code.
        WHEN 'LIDM'.
          CALL SCREEN 101.
        WHEN 'CANC'.
          LEAVE PROGRAM.
        WHEN 'BACK'.
          LEAVE PROGRAM.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.                    "USER_COMMAND_0100 INPUT
    *  MODULE USER_COMMAND_0101 INPUT
    MODULE user_command_0101 INPUT.
      save_ok = ok_code.
      CLEAR ok_code.
      CASE save_ok.
        WHEN 'SORT'.
          DATA: fldname(100),help(100).
          READ TABLE zc2p_lider_crtl-cols INTO col WITH KEY selected = 'X'.
          SPLIT col-screen-name AT '-' INTO help fldname.
          SORT it_zc2p_lider_modul BY (fldname).
        WHEN 'CHANGE'.
    * Setting the flag to make the table control in editable mode[excluding
    * primary key].
          flg = 'Y'.
        WHEN 'BACK'.
          CALL SCREEN 100.
          LEAVE SCREEN.
        WHEN 'CANCEL'.
          LEAVE PROGRAM.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
        WHEN 'SAVE'.
          MODIFY  zc2p_lider_modul FROM it_zc2p_lider_modul.
          COMMIT WORK.
      ENDCASE.
    ENDMODULE.                    "USER_COMMAND_0101 INPUT
    *  MODULE read_table_control INPUT
    MODULE read_table_control INPUT.
    * Check input values
      IF mark = 'X' AND save_ok = 'DELETE'.
        DELETE TABLE it_zc2p_lider_modul FROM zc2p_lider_modul.
        DESCRIBE TABLE it_zc2p_lider_modul LINES zc2p_lider_crtl-lines.
      ENDIF.
    ENDMODULE.                             " READ_TABLE_CONTROL  INPUT
    Screen Flow Logic 100
    PROCESS BEFORE OUTPUT.
    MODULE status_0100.
    PROCESS AFTER INPUT.
    MODULE user_command_0100.
    Screen Flow Logic 101.
    PROCESS BEFORE OUTPUT.
      MODULE status_0101.
      LOOP AT it_zc2p_lider_modul INTO zc2p_lider_modul WITH CONTROL
    zc2p_lider_crtl.
    * Dynamic screen modifications
        MODULE set_screen_fields.
        MODULE change_sdyn_conn.
      ENDLOOP.
    PROCESS AFTER INPUT.
      MODULE user_command_0101.
      LOOP AT it_zc2p_lider_modul.
        MODULE read_table_control.
      ENDLOOP.
    i hope somebody can help for what i missing here  thanks

    >
    Sanjeev Kumar wrote:
    > Hello Edgar,
    >
    > Problem seems to be there in the flow logic of 101
    >
    >
    > PROCESS BEFORE OUTPUT.
    >   MODULE status_0101.
    >   LOOP AT it_zc2p_lider_modul INTO zc2p_lider_modul WITH CONTROL
    > zc2p_lider_crtl. " no need to have 'INTO zc2p_lider_modul' above
    > * Dynamic screen modifications
    >     MODULE set_screen_fields.
    >     MODULE change_sdyn_conn.
    >   ENDLOOP.
    > *
    > PROCESS AFTER INPUT.
    >   MODULE user_command_0101. "this should be shifted after the following LOOP...ENDLOOP.

    >   LOOP AT it_zc2p_lider_modul. "need to have 'WITH CONTROL zc2p_lider_crtl' here
    >     MODULE read_table_control.
    >   ENDLOOP.
    >
    >
    >
    > With MODULE user_command_0101 call before the LOOP calls the MODIFY statement (under case save_ok 'SAVE') first and Z-table is updated with the old values as the changes are transferred from screen into the internal table it_zc2p_lider_modul in the LOOP...ENDLOOP later.
    >
    > Try these changes and I hope it will work.
    >
    > Thanks
    > Sanjeev
    i do the firts advice but the second one i get syntax error :
    my code :
    PROCESS AFTER INPUT.
      LOOP  at it_zc2p_lider_modul WITH CONTROL zc2p_lider_crtl.
        MODULE read_table_control.
      ENDLOOP.
       MODULE user_command_0101.
    error :
    In the event PROCESS AFTER INPUT, no additions are allowed with "LOOP     
    AT".

  • Can we use Initilization event in module pool program?

    Hi All,
    Can we use Initialization event in module pool program? If not why?
    Thanks In Advance!!!!!!!!!

    The runtime environment creates the INITIALIZATION event and calls the corresponding event block (if it has been defined in the ABAP program).
    http://help.sap.com/saphelp_nw70/helpdata/EN/fc/eb2d67358411d1829f0000e829fbfe/content.htm
    SEE THE ABOVE LINK...THINK IT WILL SOLVE ALL YOUR DOUBTS
    REGARDS
    RACHEL

  • Module Pool - Table Control - Data not getting displayed in Control

    Hi,
    I have a table contol in my module pool program. In my processing I am filling an internal table & then in my PBO I am linking the internal table to table control. The issue is that even though the internal table is getting filled correctly (found through debugging), the data is not getting populated in table control. Nothing is populated on screen. I am writing part of code below
    Declaration:
    Types: begin of ty_control,
            SELECTED TYPE C,
            TEXT TYPE DPR_CAUSE_T-TEXT,
          end of ty_control.
    CONTROLS :  TBL_CONT TYPE TABLEVIEW USING SCREEN '9001'.
    DATA:       lt_table_cont type TABLE OF ty_control with header line.
    Fields in TBL_CONT:
       TBL_CONT-SELECTED
      TBL_CONT-TEXT
    PBO Flow Logic:
      MODULE STATUS_9001.
    MODULE fill_data.
      LOOP AT lt_table_cont WITH CONTROL TBL_CONT cursor TBL_CONT-top_line.
      ENDLOOP.
    PAI Flow Logic:
    Loop at lt_table_cont.
       MODULE UPDATE_DATA.
    endloop.
    MODULE USER_COMMAND_9001.
    PLZ let me know what might be the problem. I have been trying to figure out but cant.
    Thanks.

    Hi Sonali,
               When ever you need to do anything with the table control, i mean if u want to display data in table control or you want to validate the data entered in table control Should be done within Loop and Endloop.(PBO or PAI's which ever is appropriate)
    Here the data is not bieng displayed in ur table control because you have not used the MODULE fill_data  between
    LOOP AT lt_table_cont WITH CONTROL TBL_CONT cursor TBL_CONT-top_line.
    ENDLOOP.
    so do it like this
    LOOP AT lt_table_cont WITH CONTROL TBL_CONT cursor TBL_CONT-top_line.
    MODULE fill_data 
    ENDLOOP.
    this will solve your problem.
    Regards,
    Syed

  • Text elements in module pool

    Hi,
    How can we print Descriptions and other text as text lable in module pool????
    Thx,
    Shashi.

    Hi,
    IF you want text for box heading in moodule pool...
    than just double click on that box and write for lable in text part of attribute window.
    <REMOVED BY MODERATOR>
    Gaurav J.
    Edited by: Alvaro Tejada Galindo on Aug 15, 2008 3:46 PM

  • Edit a field in ALV tree in a subscreen of a module pool

    Hi
    I want to make a field editable in the ALV tree based on some condtions in a subscreen of a module pool.  I used the edit = 'X' field in the fieldcatalog still it  is showing the field as display and not edit.
    Please help me to get the field as editable and save it to the database table.
    Please not this is ALV TREE
    Regards,
    Mozila

    Hi Mayank,
    Thanks for the reply
    I am using oops method.
    I tried making the field which is to be made editable  as wa_fieldcatalog-edit = 'X'. But its not working. I didnt get you when you said  edit in layout object.
    I also went through the demo programs but these programs are not having editable fields.
    My code is as follows:
    IF tree4 IS INITIAL.
    * create container for alv-tree
      l_tree_container_name = 'TREE4'.
      CREATE OBJECT l_custom_container
        EXPORTING
          container_name              = l_tree_container_name
        EXCEPTIONS
          cntl_error                  = 1
          cntl_system_error           = 2
          create_error                = 3
          lifetime_error              = 4
          lifetime_dynpro_dynpro_link = 5.
    * create tree control
      CREATE OBJECT tree4
        EXPORTING
          i_parent                    = l_custom_container
          i_node_selection_mode       = cl_gui_column_tree=>node_sel_mode_multiple
          i_item_selection            = 'X'
          i_no_html_header            = 'X'
          i_no_toolbar                = 'X'
        EXCEPTIONS
          cntl_error                  = 1
          cntl_system_error           = 2
          create_error                = 3
          lifetime_error              = 4
          illegal_node_selection_mode = 5
          failed                      = 6
          illegal_column_name         = 7.
    * create hierarchy
      CALL METHOD tree4->set_table_for_first_display
        EXPORTING
          is_layout       = s_layo
        CHANGING
          it_sort         = it_sort
          it_outtab       = it_final
          it_fieldcatalog = it_fieldcat.
    ELSE.
      CALL METHOD tree4->refresh_table_display
        EXPORTING
          it_sort           = it_sort
        EXCEPTIONS
          program_error     = 1
          failed            = 2
          cntl_system_error = 3
          others            = 4
      IF sy-subrc <> 0.
       MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    endif.

  • Remove field in Alv grid module pool

    Hi Experts,
    I have a requirement where in I need to remove a field on the display screen for a particular record.
    In detail..
    I have a created a module pool program where in the final out put was shown using CL_gui_alv_grid on the new screen.The normal display will start with a check box(editable),kunnr,ktokd etc..The requirement is for a particular record the check box should either disappear or disable.Please help me out in achieving this.Thanks in advance.
    Initially I got very good response from Neha and Satya and felt very confident enough in the fix but I dont know where I am doing wrong the issue is not yet fixed.Satya or Neha can you tell me where am I doing wrong seeing the below code.
    types:BEGIN OF lty_final,
          chbox       TYPE char1,
          org_nam     TYPE name1_gp,
          vkorg       TYPE vkorg,
          parvw       TYPE parvw,
          ktokd       TYPE ktokd,
          kunnr       TYPE kunnr,
          pr_cnt      TYPE char3,
          fir_nam     TYPE name1_gp,
          las_nam     TYPE name1_gp,
          parau       TYPE parau,
          telf1       TYPE telf1,
          STYLE       TYPE lvc_t_styl,        " New field added in the structure
         END OF lty_final.
    data:lt_final type table of lty_final,
           ls_final type lty_final.
    DATA : ls_stylerow TYPE lvc_s_styl ,
           lt_styletab TYPE lvc_t_styl .
    loop at lt_final into ls_final.          """Final internal table
        if ls_final-pr_cnt = lc_yes.
          ls_stylerow-FIELDNAME = 'CHBOX'.
          ls_stylerow-STYLE     = cl_gui_alv_grid=>mc_style_disabled .
          APPEND ls_stylerow TO lt_styletab.
          CLEAR ls_stylerow.
          ls_final-STYLE = LT_STYLETAB.
          MODIFY lt_final INDEX sy-tabix FROM ls_final TRANSPORTING style.
        endif.
      endloop.
    gs_layout-zebra        = 'X'.
      gs_layout-edit         = ' '.
      gs_layout-no_rowmark   = 'X'.
      gs_layout-stylefname   = 'LT_STYLETAB'.
      CALL METHOD grid_display->set_table_for_first_display
        EXPORTING
          i_save                        = 'X'
          i_default                     = 'X'
          is_layout                     = gs_layout
        CHANGING
          it_outtab                     = lt_final
          it_fieldcatalog               = gt_fieldcat
        EXCEPTIONS
          invalid_parameter_combination = 1
          program_error                 = 2
          too_many_lines                = 3
          OTHERS                        = 4.
      IF sy-subrc NE 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    With Regards,
    Srini...

    Use the following codes in loop it will work.
    Loop at lt_final into ls_final. """Final internal table
    if ls_final-pr_cnt = lc_yes.
    ls_stylerow-FIELDNAME = 'CHBOX'.
    ls_stylerow-STYLE = cl_gui_alv_grid=>mc_style_disabled .
    INSERT ls_stylerow  INTO TABLE lt_final-STYLE.                         " use insert
    *APPEND ls_stylerow TO lt_styletab.
    *CLEAR ls_stylerow.
    *ls_final-STYLE = LT_STYLETAB.
    *MODIFY lt_final INDEX sy-tabix FROM ls_final TRANSPORTING style.
    endif.
    endloop.
    Regards,
    Gurpreet

  • Regarding selection-screen in module pool

    hi
    experts,
    i am having doubt in module pool programing...
      i want create selection screen(pop screen with field)  in modulepool., before the display screeen deatils
    ex :   if i want display the   record   details  for  that particular
    record number.......
    while  i am click on display..
      pop-up-selection screen will come  with record number field..
    i f enter the record no, display s the  details...
    Ananand

    Please see Rich's answer here:
    [Dialog programming - How to place a select-option field in a dialog screen;
    Rob

  • Input must bein module pool and the output should be in ALV report

    Dear Friends,
    Greetings.....................
    Please give me solution for my problem.
    Consider there is one module pool screen with the fields empno, edob, ecity.There is one search button.if the user clicks the search button.it should display the employee details based on empno and output must be in ALV reports.
    Thanks in advance
    Raj

    Hi,
    Try to use
    call function 'REUSE_ALV_POPUP_TO_SELECT'
           exporting
                i_title               = text-021
                i_zebra               = 'X'
                i_tabname             = 'P_YSIZE1'
                it_fieldcat           = p_fieldcat[]
                it_excluding          = p_excltab[]
                i_screen_start_column = 02
                i_screen_start_line   = 02
                i_screen_end_column   = 45
                i_screen_end_line     = 15
           importing
                e_exit                = p_exit
                es_selfield           = p_selfield
           tables
                t_outtab              = p_ysize1.

  • Icon display in Module pool screen not visible to some users

    Hi,
    I have added an icon in one of the module pool screen with dynamic quick info.  The page is rendered fine and the info is also displayed well for most users except some.  I can't figure out why the icon is not being displayed for some users.
    Do someone has any solution for this?
    Thanks,
    Sumith

    As I recall, the icons are actually stored in a file on each PC so some users may have a corrupted or out-of-date file with the icons.  You can look for posting on "how to add an icon" to see a discussion on this topic.
    I found some useful info at:
    Create and Add Icons to table ICON?
    Message was edited by: Charles Folwell

Maybe you are looking for