Table ctrl

Hi all,
I have a problem while displaying table ctrl.
i have a transaction where the input for the table ctrl is given(subscreen a)
i see the output in a table ctrl (subscreen b).
If i execute the transaction for the first time with a n entry which has 3 records in the dbase table it is shown correctly. I have a option in subscreen b to go back to subscreen a , now if i make another entry removing the first one which has 15 records in dbase table only 3 of them are shown in the table ctrl of subscreen b.
if i make an entry which has 15 records in dbase table after restarting the transaction i can see all the 15 records in table ctrl of subscreen b. if i nce again go back and overwrite the entry which has 3 entries in the dbase table i can see all the 3 entries and also scroll bar to drag down upto 15  entries.
the code is 
LOOP AT IT_COMPCTRL WITH CONTROL COMPCTRL
                 CURSOR COMPCTRL-CURRENT_LINE.
  ENDLOOP.
Please help me in this issue.
tks & reg
-Pavan

Hi
i have a situtaion where i need to populate the table ctrl in a subscreen.
if i execute the transaction for the first time with an entry for whoch 3 rec are fetched from dbase, they were populated correctly in tabctrl, if i go back and enter another value for which it fetches 15 rec from the dbase, unfortunately only 3 of them are shown in tab ctrl.
if i once again restart the transaction with an entry that has 15 rec in dbase, they were displayed correctly in tabctrl, if i go back and overwrite the entry with another entry that has only 3 recs in dbase , 3 recs are shown but with a scroll bar that can be dragged up to 15 rows in tabctrl.
code is simple
loop at itab with  control tabctrl
                            cursor tabctrl- current_line.
      endloop.
in the above code itab is filled with correct records for their respective entries in the selscreen. but it is not looped for all the records in the tabctrl tab(itab).
case 1:  entry 1 : recs->3  tabctrl disp-> 3  itab has 3 records
             entry 2 : recs->15 tabctrl disp->3 itab has 15 recs
case 2: entry 1: recs->15 tabctrl disp ->15  itab has 15 recs
            entry 2: recs-> 3 tabctrl disp -> 3  itab has 3 recs
            but we can see scroll bar that can be dragged upto   15 lines.
in both cases sy-loopc is 14.
Hope this is clear
tks & regs
Pavan

Similar Messages

  • JDev 11g-Multiple Row Selection Table-Ctrl+A error

    Hello All,
    Jdeveloper : Studio Edition Version 11.1.1.2.0, Build JDEVADF_11.1.1.2.0_GENERIC_091029.2229.5536
    ADF Business Components : 11.1.1.55.36
    Java(TM) Platform : 1.6.0_11
    Oracle IDE: 11.1.1.2.36.55.36
    SOA Composite Editor: 11.1.1.2.0.12.16
    Versioning Support: 11.1.1.2.36.55.36
    I am trying to remove the selected rows from the table with RowSelection property set to Multiple. I am able to select the rows using by holding key board Ctrl key and click on the rows. The following code in backing bean successfully deletes the rows selected using this step.
    public void removeGeoSpecs(ActionEvent actionEvent)
    RowKeySet rowKeySet = getGmemTbl().getSelectedRowKeys();
    CollectionModel collectionModel =
    (CollectionModel) getGmemTbl().getValue();
    for (Object facesTreeRowKey: rowKeySet)
    collectionModel.setRowKey(facesTreeRowKey);
    JUCtrlHierNodeBinding rowData =
    (JUCtrlHierNodeBinding) collectionModel.getRowData();
    rowData.getRow().remove();
    But when i select all the rows in the table using Ctrl+A, all the rows got selected. I hit the Remove button, then after deleting the first row, getting the following error.
    javax.servlet.ServletException: ADFv: Could not find row: USA 548 with key: oracle.jbo.Key[] inside parent: GeoSpecTVOIterator with key: null.
    Caused by: java.lang.IllegalStateException: ADFv: Could not find row: USA 548 with key: oracle.jbo.Key[] inside parent: GeoSpecTVOIterator with key: null.
    Here USA 548 is my first row's data. Please let me know if you want complete error stack.
    During design time, While drag and drop the table i have not selected Row Selection check box as it sets property for single row selection. Table is inside the <af:panelCollection> . Here is the table source.
    <af:table value="#{bindings.GeoSpecTVO.collectionModel}" var="row"
    rows="#{bindings.GeoSpecTVO.rangeSize}"
    emptyText="#{bindings.GeoSpecTVO.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.GeoSpecTVO.rangeSize}"
    rowBandingInterval="0" id="GmemTbl"
    partialTriggers=":::AddRowsBtn :::AddRangeBtn ::RemoveBtn :::SaveBtn"
    rowSelection="multiple"
    binding="#{backingBeanScope.GeoGrpSpecBean.gmemTbl}">
    Here GeoSpecTVO is a transient view object which is not having query and not attached with EO.
    I tried to fix this issue by myself and also searched for similar issues in the FORUM and google. But no luck... I very much appreciate all your inputs/pointers. Kindly let me know if you need additional information.
    Thanks
    Annadurai.

    Hi Annadurai
    I tried the same work around but still i am facing the issue, could you please help me.
    public void deleteRec(ActionEvent actionEvent) {
    // Add event code here...
    RowKeySet rowKeySet = (RowKeySet)this.embossTB.getSelectedRowKeys();
    CollectionModel cm = (CollectionModel)this.embossTB.getValue();
    Row specRow = null;
    ArrayList rowList = new ArrayList();
    int listLength = 0;
    ArrayList<Number> printReqLST=new ArrayList<Number>();
    ViewObject vo1=null;
    boolean flag=false;
    for (Object facesTreeRowKey : rowKeySet) {
    cm.setRowKey(facesTreeRowKey);
    JUCtrlHierNodeBinding rowData = (JUCtrlHierNodeBinding)cm.getRowData();
    specRow = rowData.getRow();
    rowList.add(specRow);
    listLength++;
    for (int index = 0; index < listLength; index++){
    specRow = (Row)rowList.get(index);
    Number printReqID = (Number)specRow.getAttribute("PrintRequestId");
    String PrintState = specRow.getAttribute("PrintState").toString();
    if (PrintState.equalsIgnoreCase("PRINTED")) {
    System.out.println("cann't delete");
    FacesContext fctx = FacesContext.getCurrentInstance();
    FacesMessage message =
    new FacesMessage("Cann't Delete the selected row:" + printReqID);
    message.setSeverity(FacesMessage.SEVERITY_ERROR);
    fctx.addMessage(null, message);
    } else {
    System.out.println("delete");
    flag=true;
    specRow.remove();
    if(flag){
    System.out.println("before commit");
    commitRows();
    }

  • Table ctrl - no screen-name - hav groupid but not visible in Loop at screen

    Hi...
    In pa30, for a pernr, of infotype 0008, we have a table control.
    In that table control, i hav to hide a field. ex: bet01
    it has value..by default it will appear on the screen...
    Now I want this value not to appear on the screen.
    in loop at screen, i am not able to find the sceen-name(Q0008-bet01 or no Q fields...)
    It loops for all the p fields..and exits the loop.
    How can I hide the q fields..
    I have tried with groupids...but, in loop at screen unable to find the groupids...so no use..
    screen name and groupid are there for this field...
    Any solution???????????

    Hi...thanks for ur reply...
    Not that helpful...
    I hav the groupID..screen-name...
    But the problem is, the loop at screen is not going through this groupid or screen-name...
    And if u have any sample code, plz share it..
    I cant modify the data coming to table control...access problem...
    If u have anyother solution, please give it..Anyways thanks once again for ur reply!
    Experts, no solution??? No alternative???
    Edited by: Veeranji Reddy on Nov 13, 2008 3:22 PM
    Edited by: Veeranji Reddy on Nov 14, 2008 5:49 AM

  • In badi ME_PROCESS_PO_CUST how to get preivious row value from table ctrl?

    hi Friends,
    I am Using ME_PROCESS_PO_CUST badi for validation in Purchase oreder (ME21N),
    For that I implementaed PROCESS_ITEM method which fires during each row now i want to add another validation in same implimentation for that i need privious row's value so how to get that value ?
    following is my current validation code. 
    method IF_EX_ME_PROCESS_PO_CUST~PROCESS_ITEM.
      DATA:ls_poitem TYPE mepoitem.
      DATA:ls_poheader TYPE MEPOHEADER.
      DATA:lm_poheader TYPE ref to IF_PURCHASE_ORDER_MM.
      DATA:w_mara TYPE mara.
      DATA:IT_ZMMTBL039 TYPE STANDARD TABLE OF ZMMTBL039 ,
           WA_ZMMTBL039 TYPE ZMMTBL039 .
      DATA:ls_poitem1 TYPE mepoitem.
      DATA:V_KUNNR1 TYPE KNA1-KUNNR.
      DATA:V_KUNNR2 TYPE KNA1-KUNNR.
      ls_poitem = im_item->get_data( ).
      lm_poheader = im_item->GET_HEADER( ).
      ls_poheader = lm_poheader->GET_DATA( ).
      CLEAR: WA_ZMMTBL039,w_mara.
      REFRESH:IT_ZMMTBL039[] .
      SELECT *
        INTO  TABLE  IT_ZMMTBL039
        FROM ZMMTBL039
       WHERE bsart EQ ls_poheader-bsart.
      IF sy-subrc EQ 0.
        CLEAR: WA_ZMMTBL039,w_mara.
        SELECT SINGLE *
          INTO w_mara
          FROM mara
         WHERE matnr EQ ls_poitem-MATNR.
        IF SY-SUBRC EQ 0.
          READ TABLE IT_ZMMTBL039 INTO WA_ZMMTBL039 WITH KEY  bsart = ls_poheader-bsart
                                                              mtart = w_mara-mtart
                                                              spart = w_mara-spart.

    Hello
    If you had searched the SDN forums you would have found plenty of answers to your question.
    Following is some sample coding:
    method IF_EX_ME_PROCESS_PO_CUST~POST.
    DATA:
        ls_header TYPE mepoheader,
      lt_items   TYPE purchase_order_items,
      ls_item   TYPE purchase_order_item,
      ls_item TYPE mepoitem.
      ls_header = im_header->get_data( ).
      lt_items = im_header->get_items( ).
      LOOP AT items INTO ls_item.
        ls_item = line_item-item->getdata( ).
        " process item data...
      ENDLOOP.
    ENDMETHOD.
    Regards,
      Uwe
    PS: Do not use such kind of pseudonyms instead of your real name. Because my impression is that a nobody (in term of ABAP development competence) tries to claim to be a somebody who fills his knowledge gaps via SDN. Using pseudonyms significantly decreases your changes to get any answers at the SDN forums.

  • How to insert values in table control & how to place listbox in table ctrl

    Dear all,
                I have created table control in Module pool program.  My requirement is first
                   1)How to place list box in table control
                   2)Based on listbox selection i have to enter values in table control row..
    With Regards,
    Baskaran

    Hi Baskaran,
    For displaing list box, use FM: VRM_SET_VALUES.
    Code like that:
    TYPE-POOLS: vrm.
    DATA: name TYPE vrm_id,
    list TYPE vrm_values,
    value LIKE LINE OF list.
    PARAMETERS: ps_parm(10) AS LISTBOX VISIBLE LENGTH 15.
    Instead of parameter for module pool , you declare data:
    AT SELECTION-SCREEN OUTPUT.
      name = 'PS_PARM'.
      value-key = '3500000002'.
      value-text = '3500000002'.
      APPEND value TO list.
      value-key = '3500000003'.
      value-text = '3500000003'.
      APPEND value TO list.
      name = 'PS_PARM'.
      value-key = '3500000004'.
      value-text = '3500000004'.
      APPEND value TO list.
      name = 'PS_PARM'.
      value-key = '3000000007'.
      value-text = '3000000007'.
      APPEND value TO list.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id     = name
          values = list.
    make the necesary change for module pool.
    Hope this can solve your problems.
    Regards,
    Tutun

  • How to edit a particular row in the table ctrl when a push button is clickd

    Hi Experts,
    How to edit a particular row (except the Primary keys) after selecting it in the TABLE CONTROL when a
    push button is clicked in the table control.
    For Eg. If you have a push button say "Modify", the particular row what we select in the table control should be in a
    editable mode after clicking "Modify" Push button.
    Please help me out.
    Thanks in advance.

    Hey Ram,
    Thanks a ton.
    Its working fine...sorry for the late reply.
    The reason behind the delay is because i had modified my code as per your logic it worked fine but the thing is that the whole column was in editable mode but not a single row.
    For E.g  If i want to edit a particular row, first i select the row and then  click on "Modify" button. After i click on the button, the whole column gets in a editable mode including the one which i intentionally selected.
    Here, the solution is that you have to set a flag in PBO so that once it is done with PBO then it need not come back again after we click on "Modify" button.
    And one more query is that after you modify a particular row in the table control ( When it is in editable mode) and click on the "Save" button, it is not getting updated to database.
    To update the database, we need to select the row once again after modifying it and click on the "Save" button.
    Here, database is updating only when it is selected again. If it is not selected, it is not getting updated.
    If you have any alternative solution, then please help me out.( I hope i am clear with the question.)
    Thanks,
    Ananth.

  • In Table ctrl, based on i/p given in first col, populate data in other cols

    Hi All,
    Please help me in achieving the following requirement.
    In a table control, if a value is entered in the first column, all the remaining columns should be filled automatically with relevant data based on the input in the first column.
    The table control is built using the wizard with the option 'from internal table from the program'.
    Thanks in advance.
    Kalyani

    Hi Kalyani,
    You can achieve the following requirement but you have to trigger a user action like ( Pressing Enter, Checking or Unchecking a Checkbox) which will again trigger the PAI Event and which will load the same. So, you can repopulate the table control with the new data according to your logic and hence can again display it.
    Hope you got my point. Have a look at the demo programs which will tell you about the flow of control and which you can use to control the data. But you need an User event to achieve your requirement.
    Report                                                   Description
    DEMO_DYNPRO_TABCONT_LOOP          Table Control with LOOP - ENDLOOP
    DEMO_DYNPRO_TABCONT_LOOP_AT    Table Control with LOOP AT ITAB
    DEMO_DYNPRO_TABLE_CONTROL_1     Table Control with LOOP Statement
    DEMO_DYNPRO_TABLE_CONTROL_2     Table Control with LOOP AT ITAB
    Hope this will help.
    Thanks,
    Samantak.

  • Table ctrl issue

    Hi,
    I've to  upload data from a flat file into XK01 application so that there're around 1000 records to get uploaded.
    Could any post solution for how to deal with the Table Control in XK01 regarding the uploading logic.
    Thanks,
    Reshmi G.

    hi....
    you can go in following way.
    1) enter a ine item ( whether you are doing it programatically or recording)
    2) go for incrementing the line.
    3) enter another line item.
    4) again increment the line.
      repeat the steps.
    for first  line item you willnot find the difference. but for next line items you will always get table control value  as (02).
    this is the way which has solved all my issue of TABLE CONTROL.
    regards

  • Adding a single column to mulitple tables

    I have to add a single column to 664 tables.
    I can copy the column from the table it is originally created in.
    Is there a way to paste the column in all the remaining tables?
    It doesn't work by selecting all the tables in the design ('Ctrl + a', right click 'paste').
    It does work if I click each individual table ('Ctrl', left click) but i do not want to have to click each of the 664 tables.
    Thanks,
    Nic

    You can create script for this purpose for all 664 tables.
    And if you use MS Excel to create that script, you will feel a bit relieved. Its not too much difficult, just simple steps to create the script.
    In MS Excel
    1- In first column Write >>Alter table [Drag this cell for 664 times]
    2- In second table Paste >>Table_Name [Select all tables Ctrl+a, and copy table names in this column 664 Tables will come there]
    3- In third column Write >>Add (COLUMN_NAME  VARCHAR2(50)); [Drag this cell for 664 times]
    Now Script is Ready, You can select all three columns now and paste them in notepad file.
    And execute this script in Database;
    Hope this will resolve your problem.

  • In BDC table control

    hi
    In BDC how to transfer the data to table control

    hi
    what ever the data that u want to trnasfer to table ctrl, put it in a flat file.
    create an internal able that can occupy those datas.
    then transfer from internal table to table control.
    ex: for me41/.
    REPORT YELS_ME41_BDC_V  NO STANDARD PAGE HEADING LINE-SIZE 255.
    INCLUDE BDCRECX1.
    INTERNAL TABLE DECLARATION.
    DATA : BEGIN OF ITAB OCCURS 0,
           V_NUM(3) TYPE  C,"SERIAL NUMBER
           EMATN LIKE EKPO-EMATN,
           TXZ01 LIKE EKPO-TXZ01,
           ANMNG(13) TYPE C,
           MEINS(3) TYPE C,
           LPEIN LIKE RM06E-LPEIN,
           EEIND LIKE RM06E-EEIND,
           MATKL LIKE EKPO-MATKL,
           END OF ITAB.
    VARIABLE DECLARATION
    DATA : V_LASTNUM(3) TYPE C,
           V_TEMPVAR(15),
           V_PAGES(3) TYPE C VALUE '10',
           V_COUNT TYPE I,
           V_CTR TYPE I,
           V_TCTR(2) TYPE C,
           V_TEST TYPE C VALUE 0,
           ITEM LIKE RM06E-EBELP.
    *DATA: BDCDATA TYPE BDCDATA OCCURS 0 WITH HEADER LINE.
    BEGIN OF PROGRAM.
    START-OF-SELECTION.
      PERFORM GET-DATA.
      SORT ITAB BY NUM EEIND.
      PERFORM OPEN_GROUP.
    *DATA TRANSFERRED FROM INTERNAL TABLE TO IST 2ND SCREEN FIELDS(HEADER
    *DATA)
      LOOP AT ITAB.
        IF ITAB-V_NUM NE V_LASTNUM.
        " HEADER DATA EXECUTES FOR ONLY ONE TIME FOR ONE RFQ GENERATION
    WHEN SNO IS NOT EQUAL TO LASTNUMBER. THEN PROCEED.
          V_TEST = 0.
          PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0300'.
          PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                        'EKKO-ANGDT'.
          PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                        '/00'.
          PERFORM BDC_FIELD       USING 'RM06E-ASART'
                                        'AN'. "RFQ TYPE.
          PERFORM BDC_FIELD       USING 'EKKO-SPRAS'
                                        'EN'. " LANGUAGE KEY.
          PERFORM BDC_FIELD       USING 'RM06E-ANFDT'
                                        '19.07.2007'."RFQ DATE.
          PERFORM BDC_FIELD       USING 'EKKO-ANGDT'
                                        '29.07.2007'."QUOTATION DEAD LINE.
          PERFORM BDC_FIELD       USING 'EKKO-EKORG'
                                        '3000'."PURCHASE ORGANISATION.
          PERFORM BDC_FIELD       USING 'EKKO-EKGRP'
                                        '003'."PURCHASE GROUP.
          PERFORM BDC_FIELD       USING 'RM06E-LPEIN'
                                        'T'.
    IIND SCREEN.
          PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0301'.
          PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                        'EKKO-SUBMI'.
          PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                        'BU'.
          PERFORM BDC_FIELD       USING 'EKKO-EKGRP'
                                        '003'.
          PERFORM BDC_FIELD       USING 'EKKO-PINCR'
                                        '10'." ITEM INTERVAL.
          PERFORM BDC_FIELD       USING 'EKKO-SUBMI'
                                        '1'." COLL NO.
          PERFORM BDC_FIELD       USING 'EKKO-SPRAS'
                                        'EN'.
          PERFORM BDC_FIELD       USING 'EKKO-UPINC'
                                        '1'." SUB ITEM INTERVAL.
          PERFORM BDC_FIELD       USING 'EKKO-ANGDT'
                                        '29.07.2007'.
          PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0301'.
          PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                        'EKKO-EKGRP'.
          PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                        '/00'.
          PERFORM BDC_FIELD       USING 'EKKO-EKGRP'
                                        '003'.
          PERFORM BDC_FIELD       USING 'EKKO-PINCR'
                                        '10'.
          PERFORM BDC_FIELD       USING 'EKKO-SUBMI'
                                        '1'.
          PERFORM BDC_FIELD       USING 'EKKO-UPINC'
                                        '1'.
          PERFORM BDC_FIELD       USING 'EKKO-ANGDT'
                                        '29.07.2007'.
    **********tab ctrl*********************************************
    IIIRD SCREEN
          PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0320'.
          PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                'RM06E-EEIND(01)'.
          PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                        '/00'.
          PERFORM BDC_FIELD       USING 'EKKO-ANGDT'
                                        '29.07.2007'.
    DATA MOVED FROM INTERNAL TABLE TO TABLE CONTROL
          V_CTR = 0.
          "FOR ONE RFQ , MORE ITEMS WILL BE THERE. COUNT STARTS HERE.
          LOOP AT ITAB WHERE V_NUM = ITAB-V_NUM." CHECK THE SNO IS EQUAL .
            V_CTR = V_CTR + 1." COUNT IS INCREMENTED BY 1.
    MY TAB CTRL CAN HAVE ONLY 20 RECORDS.
    IF COUNT IS LESS THAN OR EQUAL TO 20 ASSIGN THIS VALUE TO TCTR VAR
            IF V_CTR <= 20.
            V_TCTR = V_CTR.
            ENDIF.
    *IF COUNT IS GREATER THAN  20 ASSIGN THIS VALUE TO TCTR VAR
            IF V_CTR > 20.
              V_TCTR = '20'.
            ENDIF.
    IF COUNT IS LESS THAN OR EQUAL TO 10 BLANK SPACE IS ALLOTTED TO TEST
    VAR.
            IF V_CTR >= 10.
              V_TEST = ''.
            ENDIF.
    WHEN COUNT IS LESS THAN 20 THEN ITEM (PAGES) WILL BE 10.
            IF V_CTR < 20.
              V_PAGES =  10.
              PERFORM BDC_FIELD       USING 'RM06E-EBELP'
                                 V_PAGES.
            ENDIF.
    WHEN COUNT IS GREATER THAN 20 THEN ITEM (PAGES) WILL BE INCREMENTED BY
    10 FOR EVERY ENTRY..
            IF V_CTR >= 20.
              V_PAGES = V_PAGES + 10.
              PERFORM BDC_FIELD       USING 'RM06E-EBELP'
                                 V_PAGES.
            ENDIF.
          CONCTAENATION IS DONE TO GET A PATTERN LIKE EKPO-EMATN(01).
          UPLOAD EMATN FIELD INTO TABLE CONTROL
            CONCATENATE  'ekpo-ematn(' V_TEST  V_TCTR ')' INTO V_TEMPVAR.
            CONDENSE V_TEMPVAR NO-GAPS.
            PERFORM BDC_FIELD    USING V_TEMPVAR ITAB-EMATN.
          UPLOAD SHORT TEXT FIELD INTO TABLE CONTROL
            CONCATENATE  'ekpo-txz01(' V_TEST  V_TCTR ')' INTO V_TEMPVAR.
            CONDENSE V_TEMPVAR NO-GAPS.
            PERFORM BDC_FIELD    USING V_TEMPVAR ITAB-TXZ01.
          UPLOAD QUANTITY FIELD INTO TABLE CONTROL
            CONCATENATE  'rm06e-anmng(' V_TEST  V_TCTR ')' INTO V_TEMPVAR.
            CONDENSE V_TEMPVAR NO-GAPS.
            PERFORM BDC_FIELD    USING V_TEMPVAR ITAB-ANMNG.
          UPLOAD UNIT OF MEASURE FIELD INTO TABLE CONTROL
            CONCATENATE  'ekpo-meins(' V_TEST  V_TCTR ')' INTO V_TEMPVAR.
            CONDENSE V_TEMPVAR NO-GAPS.
            PERFORM BDC_FIELD    USING V_TEMPVAR ITAB-MEINS.
          UPLOAD DATE FORMAT FIELD INTO TABLE CONTROL
            CONCATENATE  'rm06e-lpein(' V_TEST  V_TCTR ')' INTO V_TEMPVAR.
            CONDENSE V_TEMPVAR NO-GAPS.
            PERFORM BDC_FIELD    USING V_TEMPVAR ITAB-LPEIN.
          UPLOAD DATE FIELD INTO TABLE CONTROL
            CONCATENATE  'rm06e-eeind(' V_TEST  V_TCTR ')' INTO V_TEMPVAR.
            CONDENSE V_TEMPVAR NO-GAPS.
            PERFORM BDC_FIELD    USING V_TEMPVAR ITAB-EEIND.
          UPLOAD MATERIAL GROUP FIELD INTO TABLE CONTROL
            CONCATENATE 'EKPO-MATKL(' V_TEST  V_TCTR ')' INTO V_TEMPVAR.
            CONDENSE V_TEMPVAR NO-GAPS.
            PERFORM BDC_FIELD USING  V_TEMPVAR ITAB-MATKL.
            PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0320'.
            PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                          'EKKO-ANGDT'.
            PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                          '=LS'.
            PERFORM BDC_FIELD       USING 'EKKO-ANGDT'
                                          '29.07.2007'.
    *AFTER INSERTING ONE ROW OF DATA PRESS ENTER .CURSOR SHOULD BE AT DEAD
    *LINE DATE.
            CONCATENATE  'ekpo-ematn(' V_TEST V_TCTR ')' INTO V_TEMPVAR.
            CONDENSE V_TEMPVAR NO-GAPS.
            PERFORM BDC_FIELD    USING 'BDC_CURSOR' V_TEMPVAR.
            PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                        '/00'.
          ENDLOOP.
    *************************vendor addr*******************
          V_LASTNUM = ITAB-V_NUM.
    *******ENTER VENDOR NUMBER AND SAVE.
          PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                        '/00'.
          PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0140'.
          PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                        'EKKO-LIFNR'.
          PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                        '/00'.
          PERFORM BDC_FIELD       USING 'EKKO-LIFNR'
                                        '9054'." VENDOR NUMBER.
          PERFORM BDC_DYNPRO      USING 'SAPLMEXF' '0100'.
          PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                        '=ENTE'.
          PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                        'RM06E-SPRAS'.
          PERFORM BDC_FIELD       USING 'BUTTON_INIT'
                                        'X'.
          PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0140'.
          PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0140'.
          PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                        'EKKO-LIFNR'.
          PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                        '=BU'.
          PERFORM BDC_FIELD       USING 'EKKO-LIFNR'
                                        '9054'.
          PERFORM BDC_FIELD       USING 'ADDR1_DATA-NAME1'
                                        'tttt'.
          PERFORM BDC_FIELD       USING 'ADDR1_DATA-SORT1'
                                        'TT'.
          PERFORM BDC_FIELD       USING 'ADDR1_DATA-COUNTRY'
                                        'AZ'.
          PERFORM BDC_DYNPRO      USING 'SAPLSPO1' '0300'.
          PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                        '=YES'.
          PERFORM BDC_TRANSACTION USING 'ME41'.
          REFRESH BDCDATA.
        ENDIF.
      ENDLOOP.
      PERFORM CLOSE_GROUP.
    *&      Form  get-data
         UPLOAD FLAT FILES TO INTERNAL TABLE.
    FORM GET-DATA.
    *TRANSFER DATA FROM FLAT FILE TO INTERNAL TABLE.
      CALL FUNCTION 'UPLOAD'
       EXPORTING
        CODEPAGE                      = ' '
         FILENAME                      = ' '
         FILETYPE                      = ' '
      ITEM                          = ' '
      FILEMASK_MASK                 = ' '
      FILEMASK_TEXT                 = ' '
      FILETYPE_NO_CHANGE            = ' '
      FILEMASK_ALL                  = ' '
      FILETYPE_NO_SHOW              = ' '
      LINE_EXIT                     = ' '
      USER_FORM                     = ' '
      USER_PROG                     = ' '
      SILENT                        = 'S'
    IMPORTING
      FILESIZE                      =
      CANCEL                        =
      ACT_FILENAME                  =
      ACT_FILETYPE                  =
        TABLES
          DATA_TAB                      = ITAB
       EXCEPTIONS
         CONVERSION_ERROR              = 1
         INVALID_TABLE_WIDTH           = 2
         INVALID_TYPE                  = 3
         NO_BATCH                      = 4
         UNKNOWN_ERROR                 = 5
         GUI_REFUSE_FILETRANSFER       = 6
         OTHERS                        = 7
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    "get-data
    reward if useful

  • Help on Table control

    Hi,
    I cretaed my own Z table and i ve to insert new records as well update them when necessary..
    now i ve a table control for that..so how i can insert and update my ztable with table control..?
    In PBO and PAI. what should i mention in Loop at ........?
    Normally it allows only Itab which contains Ztable data. But here itab is empty. since i am not populating itab from Ztable,
    I need to populate the Ztable from Table ctrl datas.
    Is there any parameter which holds the number of rows entered in table Ctrl?
    help me in this regard.

    hello Ram
    im sending one table contro program it may use ful top u..
    REPORT zsiva_bdctable  .
    *include bdcrecx1.
    TYPES : BEGIN OF ty_head,
            auart(4),
            vkorg(4),  "Sales Organization
            vtweg(2),  "Distribution Channel
            spart(2),  "Division
            kunnr(10), "sold-to-party
            bstkd(10), "Customer purchase order number
            END OF ty_head.
    TYPES: BEGIN OF ty_item,
           matnr(18) TYPE c,  "Material
           kwmeng(13) TYPE c, "Quantity
           END OF ty_item.
    DATA: it_head TYPE TABLE OF ty_head.
    DATA: wa_head LIKE LINE OF it_head.
    DATA: it_item TYPE TABLE OF ty_item.
    DATA: wa_item LIKE LINE OF it_item.
    DATA :bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.
    DATA:v_kwmeng(30) TYPE c,
         v_mabnr(30) TYPE c.
    DATA: val(2) TYPE n VALUE 01.
    DATA : w_file2 TYPE string,
                   w_file1 TYPE string.
    PARAMETERS: filename LIKE rlgrap-filename.
    PARAMETERS: filenam1 LIKE rlgrap-filename.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR filename.
      CALL FUNCTION 'F4_FILENAME'
        IMPORTING
          file_name = filename.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR filenam1.
      CALL FUNCTION 'F4_FILENAME'
        IMPORTING
          file_name = filenam1.
    START-OF-SELECTION.
      w_file2 = filename.
      w_file1 = filenam1.
    HEADER ************************
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename            = w_file2
          filetype            = 'ASC'
          has_field_separator = 'X'
        TABLES
          data_tab            = it_head.
    ITEM *******************
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename            = w_file1
          filetype            = 'ASC'
          has_field_separator = 'X'
        TABLES
          data_tab            = it_item.
    **********CREATE SESSION***************
      CALL FUNCTION 'BDC_OPEN_GROUP'
        EXPORTING
          client = sy-mandt
          group  = 'TABLECONT'
          keep   = 'X'
          user   = sy-uname.
    ******POPULATE BDCDATABLE***************
    PERFORM open_group.
      LOOP AT it_head INTO wa_head.
        PERFORM bdc_dynpro      USING 'SAPMV45A' '0101'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                            'VBAK-AUART'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                              '/00'.
        PERFORM bdc_field       USING 'VBAK-AUART'
                                            wa_head-auart.
        PERFORM bdc_field       USING 'VBAK-VKORG'
                                     wa_head-vkorg.
        PERFORM bdc_field       USING 'VBAK-VTWEG'
                                            wa_head-vtweg.
        PERFORM bdc_field       USING 'VBAK-SPART'
                                            wa_head-spart.
        PERFORM bdc_dynpro      USING 'SAPMV45A' '4001'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                            '/00'.
        PERFORM bdc_field       USING 'VBKD-BSTKD'
                                            wa_head-bstkd.
        PERFORM bdc_field       USING 'VBKD-BSTDK'
                                           '30.01.2006'.
        PERFORM bdc_field       USING 'KUAGV-KUNNR'
                                           wa_head-kunnr.
        PERFORM bdc_field       USING 'RV45A-KETDAT'
                                            '30.01.2006'.
        PERFORM bdc_field       USING 'RV45A-KPRGBZ'
                                            'D'.
        PERFORM bdc_field       USING 'VBKD-ZTERM'
                                            '0001'.
        PERFORM bdc_field       USING 'VBKD-INCO1'
                                            'CIF'.
        PERFORM bdc_field       USING 'VBKD-INCO2'
                                            ' COST INSUSRABCE FRIEGHT'.
        LOOP AT it_item INTO wa_item .
          CONCATENATE 'RV45A-MABNR(' '0' val ')' INTO v_mabnr.
          CONCATENATE 'RV45A-KWMENG(' '0' val ')' INTO v_kwmeng.
         PERFORM bdc_field       USING 'BDC_CURSOR'
                                       v_kwmeng.
          PERFORM bdc_field       USING v_mabnr
                                       wa_item-matnr.
          PERFORM bdc_field       USING v_kwmeng
                                        wa_item-kwmeng.
          PERFORM bdc_dynpro      USING 'SAPMV45A' '4001'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '/00'.
          val = val + 1.          
          IF val >   5.
          val = 5.               
       ENDIF.
        ENDLOOP.
        val = 01.
        PERFORM bdc_dynpro      USING 'SAPMV45A' '4001'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                               '=SICH'.
        CALL FUNCTION 'BDC_INSERT'
          EXPORTING
            tcode     = 'VA01'
          TABLES
            dynprotab = bdcdata.
        REFRESH bdcdata.
    *PERFORM bdc_transaction USING 'VA01'.
      ENDLOOP.
    PERFORM close_group.
    CALL FUNCTION 'BDC_CLOSE_GROUP'.
           Start new screen                                              *
    FORM bdc_dynpro USING program dynpro.
      CLEAR bdcdata.
      bdcdata-program  = program.
      bdcdata-dynpro   = dynpro.
      bdcdata-dynbegin = 'X'.
      APPEND bdcdata.
    ENDFORM.                    "BDC_DYNPRO
           Insert field                                                  *
    FORM bdc_field USING fnam fval.
      CLEAR bdcdata.
      bdcdata-fnam = fnam.
      bdcdata-fval = fval.
      APPEND bdcdata.
    ENDFORM.                    "BDC_FIELD

  • Can't not display the table control in the report

    Hello frnds,
    I m create a module pool pgm using saptechnical  'Demo on using Table Control', 
    execute a report bush buttons are displayed but
    can't Dispaly the table ctrl in the report using screen paiter
    any help me, plz.
    Thanks in advance.

    Hi Kumar,
    Check thsi Program demo_sel_screen_with_tabstrip.
    and also a program on Subscreens in ABAPDOCU
    You need to combine both then only this is possible in Report PRograms
    Cheerz
    Ram

  • How to change the Data Base Relation in a universe?

    We are working with BO 6.5a.One universe in connected to a 'DB2/400 (iSeries)'  data base.
    All Objects in a universe are related to a defined library like <libraryname>.<tablename>.<fieldname>.
    We like to change the libraryname. Is there any chance to do this in the existing universe?
    Why?
    We like to have the same database two times in our System, only the data are different.
    Details:
    The universe of course points to a library (A) and connection is done with ODBC.
    Changing ODBC to another library (B) is no problem; and, of course we then can change the tables in the universe manually => a lot of work.
    But we like to change the pointer in the universe at once (each object shows to the library (A) and we want them to show at (B)).
    The 'refresh structure' - button won't do it.

    In the universe you can select all the tables Ctrl-A, right click and rename tables. Remove the reference to the library.

  • ALV-Grid - Get cursor position

    Hi,
    I replaced the table control in my dynpro with a custom container and placed an ALV-Grid in there.
    So, my problem is now to get the cursor position when the user double clicks at the text in a cell.
    It´s important for me to know at which position at the text he double clicked.
    e.g.:
    | Nr |Text   |
    |----|-------|
    |   1|Hello  |
    |   2|Test   |
    The user clicks double between the 'e' and 's' at line 2 ('Test').
    I need following information:
    line 2
    column 2
    offset 3 (position, where the user clicked)
    When I'm using the table control, it's no problem with
    the ABAP-statement 'GET CURSOR' and property 'OFFSET',
    but I didn't find a method with the same result for ALV-Grid.
    Maybe you know a possibility?
    Thank you.
    Regards from Germany

    hello,
    go through these links.these links will surely solve your problem.just have a luk.
    Get the cursor position row number in a table control.
    upper is for table-ctrl
    if you are working with alv.you can achieve it by.
    call method cl_gui_control=>set_focus
    exporting control = w_grid.
    w_grid is ur gid name.
    go through this link also
    Get cursor position from grid
    regards,
    Shweta
    Edited by: Shweta Joon on Aug 20, 2009 1:15 PM

  • Timeframe Default Value in Confirmation

    Hi,
    My requirement is that , In Confirm Goods/Services BBPCF02 under "Search for Purchase Order section" we have ("Item Description" "Name of Shopping Cart" " Timeframe" "Purchase Order Number" ) fieds.At present the TIMEFRAME value is always defaulted to "Last 7 Days".I need to chnage TIMEFRAME value dfault to "Last 90 Days" instead.
    Regards

    Hi,
    If you are using screen variant,you need to use the badi "BBP_SCREENVARIANT".
    Here is the documenation of the BADI.
    BBP_SCREENVARIANT
    Short Text
    Determine Screen Variants
    Use
    In this BAdI you can change the screen variant that controls the display of the item overviews and search results. As default, the following screen variants are called up:
    · Item data overview in the invoice without purchase order reference: Screen variant BBP_IV_NON_PO
    Method GET_SCREENVARIANT_INV
    · Item data overview in the invoice with purchase order reference: Screen variant BBP_IV
    Method GET_SCREENVARIANT_INV
    · Item data overview in the confirmation: Screen variant BBP_CF
    Method GET_SCREENVARIANT_CONF
    · Item data overview in the confirmation for time recording: Screen variant BBP_CF_TIMEREC
    Method GET_SCREENVARIANT_CONF
    · Item data overview in the purchase order: Screen variant BBP_PO
    Method GET_SCREENVARIANT_PO
    · Item overview for contracts: Screen variant BBP_CTR_ITEMLIST
    Method GET_SCREENVARIANT_CTR
    · Item overview for contract selection: Screen variant BBP_CTR_ITEM_SELLIST
    Method GET_SCREENVARIANT_CTR
    · Search results for creating an invoice and/or confirmation: Screen variant BBP_SEARCH_PO
    Method GET_SCREENVARIANT_SEARCH
    · Search results for creating a purchase order: Screen variant BBP_SEARCH_SC
    Method GET_SCREENVARIANT_SEARCH
    · Search results for displaying/changing an invoice: Screen variant BBP_CHANGE_IV
    Method GET_SCREENVARIANT_SEARCH
    · Search results for displaying/changing a confirmation: Screen variant BBP_CHANGE_CF
    Method GET_SCREENVARIANT_SEARCH
    · Item overview for creating/displaying/processing/status of a shopping cart: Screen variant BBP_SC
    Method GET_SCREENVARIANT_SC
    · Worklist for Sourcing: Screen variant BBP_SOCO_WL
    Method GET_SCREENVARIANT_SOCO
    · Work area in Sourcing: Screen variant BBP_SOCO_GA
    Method GET_SCREENVARIANT_SOCO
    Activities
    If you wish to hide or show fields, proceed as follows:
    1. Determine the screen variant, for example, BBP_IV, using the list above.
    2. Copy this screen variant, for example, in ZZ_BBP_IV_1, in Transaction SHD0.
    3. Change the new screen variant as required. Note that you can only change the display properties for fields of table controls. You can switch the display on and off (column Invisible in Transaction SHD0). You can recognize the fields of a table control because they have a 1 on the right side of the first column. In addition, the heading for this area contains (Table CTRL.
    4. Implement the appropriate method (see the list above). Fill the export parameter EV_SCVARIANT with the new screen variant.
    You can create multiple screen variants for a screen and then select these in the BAdI depending on the user or on other criteria.
    If you are not using screen variant,then you need to do the std code changes in Include LBBP_SC_UI_ITSF44 or the corresponding Confirmation screen include.
    Hope this clarifies your confusion.
    P.S. Do reward points if you find the answers helpful in solving your problem.
    BR,
    Disha.

Maybe you are looking for

  • SSIS 2005 Script task to process XMLA

    Hi, I am looking for a script (in script task SSIS 2005) to execute the XMLA command.This needs to be done through script only as my Analysis DDL task is having issue with connection.Please let me know,if any one can help me on this. Thanks, Ramesh

  • How do I fix a faulty I/O fan on my Mac Pro (2008)?

    My I/O: USB, Firewire  quit working reliably.  Took it to the Apple Store.  They informed me that the I/O fan was faulty.  I assume this led to high temperature in the I/O section.  They said that replacing the fan would probably fix the prob, but th

  • Encountered an error while getting the ORACLE user account for your concurrent request. Contact your system administrator

    Dear Techies, We have registered an Extra Information Type as self service OAF page and did some validations using user hook which are working fine. But for some requests EIT creation page is throwing below errors. 1. Encountered an error while getti

  • When does the free trial time period actually start?

    I went through the download process before the error message popped up that my system did not meet the OS requirement. Has my free trial already started, or is there another step before it begins? I will not be able to update my OS until the end of t

  • Code Assist in Management Studio - SQL Server 2012

    I'm just getting started with the MS SQL Server 2012 Management Studio. I have been writing SQL for years so the language is not an issue. I am used to an IDE that has a code assistant that offers a list of column names whenever I type a table alias