Table control in scripts

hi experts,
  How to handle table control in scripts pls suggest me in this regard.
regards,
k.rajesh.

Hi,
Refer to:
SAP Script - Tables creation & displaying data in right place in table?
creating tables in sapscript
Regards,
Priyanka.

Similar Messages

  • How to create table control in script

    hi expects,
      how can i create table control in script?

    Hi,
      It is not possible to create Table Control in Sap-Scripts n u can create it by using se51 that is screen painter only...
    if useful reward with points,
    regards,
    Madhuri.

  • How to handle table control in BDC while uploading item details for anorder

    How to handle table control in BDC while uploading item details for an order?
    What is the use of CTU_PARAMS structure in BDC?
    In Finance I have done some changes to the layout set by coping to a zscript(duning letter) and how can assign the print program?
    What is the process to test the finance script?
    How can I see the print preview whether it is coming correctly or not?
    Thanks in advance.
    Regards.
    Abhilash.

    hi,
    for the bdc control refer the following link:
    http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
    ctu_params:
    refer to the link
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/dataTransfers-LSMW%2CALE%2C+BDC
    reward if useful,
    thanks and regards

  • Long text in table control

    Hi SDN, Rich Please respond ..! <b>ITS VERY URGENT</b>
    i need a longtext in one of the table contol of my customised screen. the purpose of the screen is to create RFQ's where in user can enter LT ( just like the transaction IW32 - > Operations Tab - > LT Column. actually the LT in that table control is a button, pressing on which will take the user to an editor like SAP Script editor )
    <b>how do i save this into my customised tables so taht i display the LT in the display screen for RFQ's</b>
    This same LT created in RFQ Creation screen should be displayed to the users in another customised screens of RFQ Display / Change where the same functionality is needed.
    Please help me in achieving this, i have been struggling from past few days, and this is very urgent.
    i have been tryin the same with the fm's edit_text and read_text, but am not clear on these fm's related to HEADER in the importing parameters of the fm.
    is this wrong? or is there any other way to achieve my requirement?
    Please HELP
    Pratyusha

    Hi,
    Check this code..To display the text in a text editor control..
    First you have to create a custom control in your screen painter and name it as CONTAINER1..
      Then apply this code..
    TYPES: BEGIN OF type_text,
             line(70),
           END OF type_text.
    DATA: t_texttable1 TYPE STANDARD TABLE OF type_text.
    DATA: custom_container TYPE REF TO cl_gui_custom_container,
          editor TYPE REF TO cl_gui_textedit,
          repid LIKE sy-repid.
    repid = sy-repid.
    CALL SCREEN '0100'.
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE status_0100 OUTPUT.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
      PERFORM delete_container.
    *- Container franchise codes
      IF editor IS INITIAL.
        repid = sy-repid.
        CREATE OBJECT custom_container
           EXPORTING
              container_name = 'CONTAINER1'
           EXCEPTIONS
            cntl_error                  = 1
            cntl_system_error           = 2
            create_error                = 3
            lifetime_error              = 4
            lifetime_dynpro_dynpro_link = 5
            others                      = 6.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
        CREATE OBJECT editor
             EXPORTING
                parent = custom_container
              wordwrap_mode = cl_gui_textedit=>wordwrap_at_fixed_position
               wordwrap_mode = cl_gui_textedit=>wordwrap_at_windowborder
                wordwrap_position = '38'
                wordwrap_to_linebreak_mode = cl_gui_textedit=>true.
    *- Eliminate toolbar
        PERFORM toolbar.
      ENDIF.
      PERFORM load_data.
    Load TextEdit control with texts
      CALL METHOD editor->set_text_as_r3table
        EXPORTING table = t_texttable1.
      IF sy-subrc > 0.
      Display an error message
        EXIT.
      ENDIF.
      CALL METHOD cl_gui_cfw=>flush.
    ENDMODULE.                 " STATUS_0100  OUTPUT
          FORM delete_container                                         *
    FORM delete_container.
      IF NOT editor IS INITIAL.
        CALL METHOD editor->delete_text.
        CALL METHOD cl_gui_cfw=>flush
              EXCEPTIONS
                OTHERS = 1.
        IF sy-subrc > 0.
    Errormessage: Error in flush
        ENDIF.
      ENDIF.
    ENDFORM.                    " delete_container
          FORM toolbar                                                  *
    FORM toolbar.
      DATA: lv_toolbar_mode TYPE i VALUE 0.
      CALL METHOD editor->set_toolbar_mode
        EXPORTING
          toolbar_mode = lv_toolbar_mode.
      CALL METHOD cl_gui_cfw=>flush.
      IF sy-subrc > 0.
    Errormessage: Error in flush
      ENDIF.
    ENDFORM.                    " toolbar
    *&      Form  LOAD_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM load_data.
      DATA: gwa_line TYPE type_text.
    gwa_line-line = 'HELLO HOW ARE YOU!!!!!'.
    APPEND gwa_line TO t_texttable1.
    ENDFORM.                    " LOAD_DATA
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE user_command_0100 INPUT.
      DATA: T_SAVE_TEXT TYPE STANDARD TABLE OF TLINE.
      DATA: S_SAVE_tEXT TYPE TLINE.
      DATA: S_TEXT TYPE TYPE_TEXT.
    Load TextEdit control with texts
      CALL METHOD editor->get_text_as_r3table
        IMPORTING table = t_texttable1.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    Hope this helps...
    Thanks,
    Naren

  • In BDC we need to read screen value of table control

    Dear All,
    I was doing a feasibility analysis. One BDC is there where we will have to insert records in table control based on some records of 1st column of table control already populated. We are unable to find a way for reading table control. The BDC is generating batch input session. Can you please suggest on this?
    Best wishes,
    Atanu

    Hi Atanu,
    with BDC, the only possibility is to do as Klaus suggested: you must replicate the SAP's logic in your program, you must know in advance how SAP fills this field. This is a very well known drawback of BDC. You may use the SQL trace to help you to know which tables are read. Ask functional people to help you.
    You may also use SAP GUI scripting, that's another technology (slower I think, and it can only work in dialog). It allows to do different actions between 2 screens. You must program it using OLE, or using external software (VBA for example).
    Sandra

  • Page down functionality in table control BDC-CJ02 tcode

    Hi Friends,
    I am doing a BDC with Table control for Tcode CJ02.
    When I reach certain number of records, say 13, the page down functionality doesnt work.I tried different ways like using the BDC_OKCODE as "=P" and "=P+".Also, I tried doing a recording by pressing the down key in the table contral, in SHDB, but none of them worked.
    Refered a post in SDN as well, but it doesnt hold any solution.
    Do throw some light on the same to achieve page down functionality for the bdc tcode CJ02.
    Thanks in advance.
    Shri.

    Hi,
    I already posted an answer to that here Re: BDC scroll down with OK_CODE '=P+':
    P+ (=P+ in the BDC) is not a universal function code, but only one which is defined in ABAP lists . So, 99% of time, it doesn't work for all others situations (like yours).
    Scrolling a table control is not so easy to do. When you record a page down on a table control in SHDB, you'll get probably a /00 which corresponds to Enter. When you play the recording, it won't scroll. The issue is that "page down" is processed in 2 parts, it changes the "top line" of the table control, and executes Enter. But it's not possible to record/play the "top line" information.
    The solution is that the program usually implements a function code:
    either "add new line"
    or "position at line"
    Sometimes, the function code is hidden so you must look at inside the program (or search SAP notes, like here: [SAP note 187946 (No positioning on PRT overview in routing)|https://service.sap.com/sap/support/notes/187946 ])
    And sometimes, there's no function code at all, and then you're stuck ! (or use SAP GUI scripting, but it may only work in dialog).
    For CJ02, I can't tell how to scroll through BDC, but anyway, there is a BAPI (don't remember the name, search the forum, it will be easy to find it), so you should always prefer them over BDC.
    Sandra

  • CEWB - add Columns to standard Table control using enhancement

    hi,
    there is a table control in CEWB where i want to add a field from table STPO. Is this possible to add fields to standard tble control. If yes, what is the method? Enhncement or i read somewhere GUIXT. Whats that?
    Any help will be really appreciated.
    I hv got some list of BADIs, but none of them re triggering in the "Component assignment" screen:
    EWB_SELECTION
    CEWB_TSK_MENU_INTERN
    CEWB_TSK_MENU_EXTERN
    CEWB_OPR_MENU_INTERN
    CEWB_OPR_MENU_EXTERN
    CEWB_COM_MENU_INTERN
    CEWB_COM_MENU_EXTERN
    CEWB_CHA_MENU_INTERN
    CEWB_CHA_MENU_EXTERN
    CEWB_MST_MENU_INTERN
    CEWB_MST_MENU_EXTERN
    CEWB_GEN_MENU_INTERN
    CEWB_TSK_UPDATE
    CEWB_TSK_SCREENS
    ags.
    Edited by: ags on Jan 20, 2012 7:11 PM

    hi,
    I am able to do this using SAP GUIXT scripts. But since I am new to this Script would like to get some advice on it like is it best practice to use this technique in such situations? Also how do i make this change universl, like how should i deliver this develoipment to the customer nd other users? what kind of settings need to be done.
    Any hint will be really helpul.
    Thanks in advance.
    Ags.

  • How to increase row height in table control?

    Hi experts,
    We have a push button in table control created using screen painter. Since this is a touch screen transaction, the default height is very small for the worker in the plant to click on a specific row, i would like to know if there is any way to increase the row height in the table control. There is no attribute in Screen painter for increasing row height in table control. I did try "import dynpro", hoping to increase the row height and export the dynpro, but that doesn't seem to have row height attributes. Any help in this regard is highly appreciated. Thanks,
    Raj

    Using a new technology means you have to recreate your screen: you may create an HTML using CL_DD_* classes (that's called "Dynamic Documents"). See [SAP Library - DD programming guide|http://help.sap.com/saphelp_nw2004s/helpdata/en/13/12284b019511d4a73e0000e83dd863/frameset.htm]. Demos are provided in SDYNAMICDOCUMENTS package. Or I think you may create web dynpro and define a CSS style to enlarge objects.
    If you don't want to create everything, maybe you can find out a workaround with GuiXT, for example creating a big button in each row (for example, with BUTTONSIZE, but don't know if it changes the height of rows but that's worth trying).
    Well, [Synactive documentation about table controls|http://www.synactive.com/docu_e/specials/tables.html] does not seem to allow that.
    Maybe you can move your question to the "scripting" forum and ask about how to do it with GuiXT...

  • Add Columns to MB26 Table Control Output

    Hi All...I need to add additional fields to the MB26 (Pick List) Output which is a table control. The table control display is done by Screen 580 of Standard Function Group COWB (done by the FM CO_WB_MAINTAIN_GOODS_MOVEMENT). I wanted to know a way out to add the additional fields in the layout without modifying (without modification Key) the standard Screen layout.

    hi,
    I am able to do this using SAP GUIXT scripts. But since I am new to this Script would like to get some advice on it like is it best practice to use this technique in such situations? Also how do i make this change universl, like how should i deliver this develoipment to the customer nd other users? what kind of settings need to be done.
    Any hint will be really helpul.
    Thanks in advance.
    Ags.

  • Reg:How to delete the column in table control also from database table.

    Hi Experts,
    Once again thank u all for giving the responses.
    one more doubt is how to delete the columns of table control and also the record shold delete from ztable.
    With Regards,
    Saroja.P.

    Hi,
    If you want to delete the rows in the table control and simultaneously delete it from the database table, then you can implement a 'DELETE' functionality specific to your table control. Have a MARK field (you will find that in the screen attributes of the table control -> give a name for the MARK field, you will find an additional MARK column at the beginning of your table control). You can check whatever rows you want to delete from the table control, call the delete module.
    "This portion of code inside the LOOP...ENDLOOP.
    IF sy-ucomm eq 'F_DELETE'.
       gt_itab2-check = mark.  " Store the MARK field status into your internal table's correspoding field 'check'
      MODIFY gt_itab INDEX tabcontrol-current_line.
    ENDIF.
    iF sy-ucomm eq 'DELETE1'.
      DELETE gt_itab WHERE check eq 'X'. "Your internal table does not have rows that you want to delete
    ENDIF.
    Now you can modify your database table using the MODIFY statement.
    MODIFY ZDB FROM TABLE gt_itab.

  • 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.

  • ISSUE IN THE TABLE CONTROL

    HAI FRIENDS,
    I HAVE DISPLAYED THE VALUES IN THE TABLE CONTROL
    I HAVE DEFINED 'CHECK'  FOR  SELECTING  THE FIELDS OF TABLE CONTROL
    THE ISSUE STARTS HERE
    WHEN I CHECK TOP FIELDS OF TABLE CONTROL
    THEN SCROLLED  VERTICALLY, THE TABLE CONTROL TO SELECT I.E CHECK THE
    BOTTOM FIELDS OF TABLE CONTROL.
    THE TOP FIELDS WATEVER  CHECK  WHERE CHECKS DISPAPEARS FOR TOP FIELDS  .
    BY THIS  I UNABLE TO SELECT THE FIELDS OF TABLE.
    PLZ HELP ME URGENTLY NEEDED.
    MY MONDAY I NEEDED

    You use an internal table for values in table control..
    One of the fields( very first field) in that itab is used for check - uncheck..
    u have make it 'X' when u click any row...
    I think this might be the problem in ur case.. when u scroll PAI starts... in that PAI check the value of check box for that particular field...
    Regards
    Prax

  • How to populate data in table control  .

    hi all,
    i put matnr no. in screen no. 103
    validation is done at that screen only.
    now when i want to modify dat record
    when i put matnr no. at screen 103
    so how i will get all  data of dat number to table control screen.

    Hi Darshan,
       Here is a detailed description of how to update data in table controll.
      Updating data in table control
    The ABAP language provides two mechanisms for loading the table control with data from the internal table and then storing the altered rows of the table control back to the internal table.
    Method 1: Read the internal table into the Table Control in the screenu2019s flow logic.  Used when the names of the Table Control fields are based on fields of the internal table.
    Method 2: Read the internal table into the Table Control in the module pool code. Used when the names of the Table Control fields are based on fields of the database table.
    Method 1 (table control fields = itab fields)
    In the flow logic we can read an internal table using the LOOP statement. Define the reference to the relevant able control by specifying WITH CONTROL <ctrl>
    Determine which table entry is to be read by specifying CURSOR <ctrl>-CURRENT_LINE.
    After the read operation the field contents are placed in the header line of the internal table. If the fields in the table control have the same name as the internal they will be filled automatically. Otherwise we need to write a module to transfer the internal table fields to the screen fields.
    We must reflect any changes the user makes to the fields of the table control in the internal table otherwise they will not appear when the screen is redisplayed after PBO processing, (eg, after the user presses Enter or scrolls) However, this processing should be performed only if changes have actually been made to the screen fields of the table control (hence the use of the ON REQUEST)
    PROCESS BEFORE OUTPUT.
    LOOP AT ITAB_REG WITH CONTROL TCREG
    CURSOR TCREG-CURRENT_LINE.
    ENDLOOP.
    PROCESS AFTER INPUT.
    LOOP AT ITAB_REG.
    MODULE MODIFY_ITAB_REG.
    ENDLOOP.
    MODULE MODIFY_ITAB_REG INPUT.
    MODIFY ITAB_REG INDEX TCREG-CURRENT_LINE.
    ENDMODULE.
    Method 2 (table control fields = dict. fields)
    If using a LOOP statement without an internal table in the flow logic, we must read the data in a PBO module which is called each time the loop is processed.
    Since, in this case, the system cannot determine the number of internal table entries itself, we must use the EXIT FROM STEP-LOOP statement to ensure that no blank lines are displayed in the table control if there are no more corresponding entries in the internal table.
    PROCESS BEFORE OUTPUT.
    LOOP WITH CONTROL TCREG.
    MODULE READ_ITAB_REG.
    ENDLOOP.
    PROCESS AFTER INPUT.
    LOOP WITH CONTROL TCREG.
    CHAIN.
    FIELD: ITAB_REG-REG,
    ITAB_REG-DESC.
    MODULE MODIFY_ITAB_REG
    ON CHAIN-REQUEST.
    ENDCHAIN.
    ENDLOOP.
    MODULE READ_ITAB_REG OUTPUT.
    READ TABLE ITAB_REG INDEX TCREG-CURRENT_LINE.
    IF SY-SUBRC EQ 0.
    MOVE-CORRESPONDING ITAB_REREG TO TCREG.
    ELSE.
    EXIT FROM STEP-LOOP.
    ENDIF.
    ENDMODULE.
    MODULE MODIFY_ITAB_REG INPUT.
    MOVE-CORRESPONDING TCREG TO ITAB_REG.
    MODIFY ITAB_REG INDEX
    TCREG-CURRENT_LINE.
    ENDMODULE.
    Updating the internal table
    Method 1
    PROCESS AFTER INPUT.
    LOOP AT ITAB_REG.
    CHAIN.
    FIELD: ITAB_REG-REG,
    ITAB_REG-DESC.
    MODULE MODIFY_ITAB_REG ON CHAIN-REQUEST.
    ENDCHAIN.
    ENDLOOP.
    MODULE MODIFY_ITAB_REG INPUT.
    ITAB_REG-MARK = u2018Xu2019.
    MODIFY ITAB_REG INDEX TCREG-CURRENT_LINE.
    ENDMODULE.
    Method 2
    PROCESS AFTER INPUT.
    LOOP WITH CONTROL TCREG.
    CHAIN.
    FIELD: TCREG-REG,
    TCREG-DESC.
    MODULE MODIFY_ITAB_REG ON CHAIN-REQUEST.
    ENDCHAIN.
    ENDLOOP.
    MODULE MODIFY_ITAB_REG INPUT.
    MOVE-CORRESPONDING TCREG TO ITAB_REG.
    ITAB_REG-MARK = u2018Xu2019.
    MODIFY ITAB_REG INDEX TCREG-CURRENT_LINE.
    ENDMODULE.
    Updating the database
    MODULE USER_COMMAND_100.
    CASE OK_CODE.
    WHEN u2018SAVEu2019.
    LOOP AT ITAB-REG.
    CHECK ITAB_REG-MARK = u2018Xu2019.
    MOVE-CORRESPONDING ITAB_REG TO TCREG.
    UPDATE TCREG.
    ENDLOOP.
    WHEN u2026
    u2026
    ENDCASE.
    ENDMODULE.
    Hope this will solve your problem.
    Regards,
    Pavan.
    Edited by: PAVAN CHANDRASEKHAR GANTI on Aug 3, 2009 12:48 PM

  • Update internal table data from table control

    Hi GURUS,
    I need help regarding one of my requirement.
    I need to display data from the internal table on the screen and when the user selects a record/multiple records from screen and clicks on approve button i need to update one of the field from N to Y in the corresponding Ztable. Once the record is updated from Ztable , that should no longer be visible for the user on the screen.
    I am using table control wizard to display data. I am able to update the Ztable, but that record is not refreshing from the user screen. Any suggestions would be approved.
    Also please let me know if table control is the best way to do this/ alv grid control??

    hi
       REFRESH CONTROL Control-Name FROM SCREEN '0100'  -> use this command to refresh the table control
    to know more, read into
    https://forums.sdn.sap.com/click.jspa?searchID=2934287&messageID=673474
    Re: URGENT HELP REQ IN TABLE CONTROL WIZARD
    if helpful, reward
    Sathish. R

  • Validação de campos em um Table Control

    Boa tarde.
    Gostaria de pedir um auxilio .
    Tenho uma duvida, na seguinte situação. Estou construindo um programa de Module Pool
    Neste programa vai ter um tabstrip, para atualizar duas tabelas Z
    Na primeira u201CABAu201D, serão  inseridos os registros da tabela pai e na segunda u201CABAu201D, os registros da tabela
    Filho a relação será de 1 para N.
    Na tabela filho os campos  chaves serão um identificador próprio , mais o registro chave da tabela pai.
    Na segunda a aba para inserir os registros da tabela filho, terei que usar um table Control.
    O meu problema é que ao inserir os registros na tabela filho, terei que de forma automática preencher o campo que corresponde a chave da tabela pai. Ou seja o usuário na primeira u201Cabau201D digamos digite o código da tabela pai como 10 ao inserir na table Control um registro o campo correspondente a chave  da tabela pai devera ser preenchido com o valor 10 e não permitir ao usuário efetuar qualquer manutenção neste campo.
    Como eu faço isso???
    Alguém tem algum exemplo????
    Obrigado a todos

    Olá, bom dia!
    Este é um dessenvolvimento bem específico, talvez por isso ninguem lhe respondeu ainda. Voce já deu uma olhada na seção de Wiki, buscando algum código de exemplo?
    Vai alguns links que encontrei:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/1499ec90-0201-0010-769f-860989655f7e?QuickLink=index&overridelayout=true
    http://wiki.sdn.sap.com/wiki/display/sandbox/ModulePoolProgramming
    O primeiro link traz um exemplo de como torna um campo ineditavel via codigo. Espero que possa ajudar.
    Abraços,
    Rodrigo Paisante

Maybe you are looking for

  • Free Goods -Sales tax

    Hi, I am working on Free Goods determination. The ultimate aim is to capture excise duty and sales tax for materials which is sold as free to customer. I could able to capture excise duties,whereas it is not charged on customer. I could able to sales

  • How to add Airport Time Capsule to an existing AT&T U-Verse Network?

    Hello, and please bear with me as I am not very tech savvy I just purchased a 2TB Airport Time Capsule (5th Gen) because I'd like to backup my Macbook Pro wirelessly. I've tried customer service with my ISP without luck, AT&T U-Verse. I currently con

  • Connecting ipod to TV/projector via av cable

    I was just wondering if anyone has tried connecting their ipod to a TV or a projector and seen if the quality is reduced because the screen is so much bigger. Can you only watch video in good quality on the ipod itself at 320X240, or can it expand cl

  • Upgrading from 1.4.2_04 to 1.4.2_06, 1.4.2_07 or 1.4.2_08 ?

    I am in need to upgrade my JMV from 1.4.2_04 due to known JVM issues solved in 1.4.2_06 and newer. I seek the most stable version and therefore need to pick between 06, 07 or the latest 08. Which version is considered the less risky more used and mor

  • Human Resources - Training and Events

    Hello, We are using SAP T&E systems Enterprise. Is it possible to move "business events type" and "business event" to other folders? Thanks