How to focus new Entry in Table?

Hi Brothers,
in my application there is a Table UI Element and a "New" button. The New button creates a new element at the end of the table.
The problem is, if there are 20 or more rows in that table, the user cannot see the new row. he would have to scroll to the end of the table first.
Is there a way to "focus" that new row? What I mean is an action or something that goes to the end of tha table and shows the new row?
Thanks, Johannes

Hi,
As Lakshmi Narayana said you can do like the above.
But there is a small Modification to it.
Instead of this Line
wdContext.node<TableNode>().setLeadSelection(wdContext.node<TableNode>().size()+1);
you write the below Line
wdContext.node<TableNode>().setLeadSelection(wdContext.node<TableNode>().size()-1);
With Regards,
Roop Kumar.
Edited by: Roop kumar Annavarapu on Sep 2, 2008 4:25 PM

Similar Messages

  • How to add new entry, in table on button click.

    i have 2 input ,witch i am taking from numeric controls. this 2 input are use to calculat my output.
    on button click i want these 4 things should go in the table.
    now my problem is when i click the button previous entry in the table get lost...
    plz help me to slove this problem.

    When you want to preserve the existing values in a table or array, you need to use "Array -> Build Array". Wire the local variable of the table or array to top entry, and wire your new entry to the bottom. Depends on the dimension of the array and the postion you want to add. You might need to some array manupilations. Try out some of the array VIs to see how they work.
    Joe

  • Unable to create new entry in table that has no primary key

    Hi
       I have a table which is required to have no primary key (except mandt). After i generate table maintanance, when I go to create new entries, the table control to enter the new values does not appear. When I click on edit->new entries, it goes back to the fields tab of the table. Same when i check through SM30.
    If i maintain atleast one primary key, I am able to get the table control in new entries screen. However the requirement permits no primary keys except mandt. How can this be resolved?
    Thanks
    NM

    Hi,
    THE PROBLEM WITH UR TABLE IS
    YOU HAD DECLARED MANDT AS THE PRIMARY KEY AND THERE IS NO OTHER KEY IN UR TABLE
    iT'S NOT ALLOWING YOU TO ADD NEW ENTRIES BECAUSE MANDT IS THE ONLY PRIMARY KEY IN YOUR TABLE AND IT WILL HAVE A DEFAULT VALUE BASED ON THE CLIENT. SO  IT'S NOT SHOWING YOU THE CREATE NEW ENTRIES OPTION.
    SO TRY TO PUT ONE MORE FIELD AS THE PRIMARY KEY SO THAT YOUR PROBLEM WILL SOLVE VERY EASILY  ALSO MAKE SURE THAT TABLE IS ACTIVATED.
    REVERT IF U NEED SOME MORE HELP
    Thanks &Regards.
    Pavan.

  • Impact of new entries in Table T005

    Hi All,
    Can anyone please guide me that adding new entries in table T005 will have critical impact at which all places?
    I understand that this is the master table for countries, but I am not too sure that where all it can impact critically.
    Thanks.

    Hi,
    Please use the following SPRO node to add new country codes:
    SAP Netweaver - General Settings - Set countries.
    Here after you add the new country code using "Define countries", you should check rest of the steps to make sure that all the relevant places in the system are configured for the newly added country code.
    One more point: Make sure that you are using ISO standard .
    Regards,
    Dilek

  • How to pre-populate fields for new entry in table maintenance

    Hey everyone,
    I have a table maintenance set up that I would like to pre-populate two date fields when the user creates a new entry or copies an existing entry.
    I can do this by adding a PBO module for the maintenance screen but then if the screens are regenerated my changes are lost so this is not ideal.
    I've also found that I can use the events (05 and 21 I believe) to set the dates but using these events I can not fill in the values in the screen so this is also not ideal.
    Is there an event that can be used to pre-populate fields in a table maintenance screen? If not, what is your suggested method for accomplishing this?
    Thanks in advance! I appreciate any help!

    Hi,
    Please use the below links...
    [Table maintenance Field Validations;
    [http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=93454609]
    Thanks,
    Manish

  • How to Create new entry, while keeping CoS and nsRoles in tact...

    Hi,
    Here's the short version:
    How can one create a new entry/context in DS, copy the attributes from an existing entry (using JNDI) and save them in the new entry/context WITHOUT duplicating CoS or nsRole/DN info.
    Long version of the question:
    We are using DS 5.2 and Portal 6 (and messenger/calendar etc). We have our employees saved in DS. What I want to do is change a user's name/uid by copying the user's attributes (in JNDI) and create a New entry with the New uid, with all the other attributes the same. Then deleting the original entry.
    This is what I have done...
    1. Get all the employee's attributes... (abriviated)(ctx is the DirContext)
    NamingEnumeration answer = ctx.search(searchBase, filter, ctls);
    SearchResult sr = (SearchResult)answer.next();
    Attributes attrs = sr.getAttributes();
    2. Create a new employee with the same attributes (assume I use a different uid in the dn)
    ctx.createSubcontext(dn, attrs);
    This works...it copies all the attributes to the new entry -BUT- when you look at the LDIF file, it ADDS several more attributes to the new entry.
    Example: it adds the following...
    sunPortalNetletRules
    sunPortalGatewayEnableSSO
    sunPortalDesktopDpDocument
    sunPortalDesktopDpLastModifiedUser
    iplanet-am-user-auth-modules
    And about 20 others...
    Now if I am not mistaken, these are the CoS and roles that the DS uses and propagates down to the entry. But when I copy the attributes over, (using JNDI) I get these attributes too but I want to copy only the attributes that are unique and have DS handle the roles and CoS like it does for the original entry.
    Is there a way to tell the DS to just use the CoS or roles instead of duplicating all these attributes in this individual entry??? (and do it using JNDI)
    (sorry this question is sooooo long.)
    Thanks!
    Eric

    Hello Viji,
    I am extremely thank ful for the document.
    Kindly help me with below points of possible
    1)     if it is standard table (LFBK) , even then shall we will need to do the generate program 
    step in SCDO ?
    2)     does it generate Z-function module ?
    3)     do we need to call this function module at appropriate places to update the CDPOS and CDHDR 
    for changes in the standard table ?
    4)     I have already created custom business object for LFBK so that Iu2019ll be able to create entry 
    in SWEC (fyi)
    5)     how and when are the method used in the table maintenance generator called ?
    6)     Page 14 point 3 says that "Add a new entry to link the Change Document Object ZPRPS_CD and 
    table ZPRPS so that changes are recorded when table entries change."
    Does this mean that once we create SCDO and generate program, these two steps are  enough 
    for the SWED entry to create change log in CDPOS and CDHDR ?
    7)     It is understood that it is necessary that the change object in SWEC should be logged in 
    CDPOS and CDHDR only then the event would be created for the SWEC entry. is this correct ?
    in order to create change log for the change object in CDHDR and CDPOS, is the SCDO entry 
    and generate program steps enough or the methods of table  maintenance generator are also 
    required ?
    thank you very much for your time
    B

  • How to create Infotype entry in table T777D

    Hi All,
    We have undergone Upgrade from 4.6C to ECC 6.0.
    Now we get an error while maintaining certain data infotype 0122 does not exists.
    I looked at the entries in table T777D in both the system. In older system the entry is there but not in the new system.
    When i tried creating the entry in this table the error comes 'Module pool program MP012200 is not present'. This program was there in 4.6C but is not there in ECC 6.0.
    How do we genrate this program or how do we create the entry for this infotype to correct the error.
    Is there any customizing settings that is required?
    Please advice.
    Regards,
    Vidya.

    Look at OSS [Note 546167 - Termination in PA10: Infotype 0122 does not exist|https://service.sap.com/sap/support/notes/546167]
    >Symptom
    >
    >When you edit the master data (transaction PA10) after you upgrade Release 4.6C to Release 4.70 or higher, a termination occurs and an error message is issued informing you that infotype 0122 does not exist.
    >
    >Other terms
    >
    >No entry in table T777D
    >
    >Solution
    >
    >In the 'Infotype attributes (Customizing)' view (extended table maintenance for view V_T582A), delete the entry for infotype 0122.
    >In the 'Infotypes - country-specific settings' view (extended table maintenance for view V_T582L), delete the entry for infotype 0122.
    Regards

  • How can i  add entry in table BSP_DL_XMLSTRX2 for creating a copy of a view

    hi
    i want to copy in a CRM_UI component view the configuration of the view and want to save the copy with a
    different object type. But F4 value help only provides ( in crm_ui component workbench) me the value <DEFAULT> as for that view there is only one entry in table
    BSP_DL_XMLSTRX2 and for object type = <DEFAULT> and when i enter something different i get the error that this object type does not exist.
    (call method CL_BSP_DLC_XML_STORAGE2=>GET_EXISTENCE_FOR_VIEW
        exporting
          IV_COMPONENT       = ME->CURRENT_CONFIG_KEY-COMPONENT
          IV_VIEWNAME        = ME->CURRENT_CONFIG_KEY-VIEWNAME
        importing
          ET_CONTEXT_SEM_KEY = LT_CONTEXT
          ET_CONFIG_INFO     = LT_CONF_INFO.
    ---> result in only one line but i want to add another
    *so my questioin:
    where can i enter a new object type for a existing crm_ui view configuration

    Hello Britta,
    Its useful program to copy a view configuration.
    Best Regards,
    zafer,
    Edited by: Zafer Kuru on Dec 5, 2011 3:51 PM
    REPORT  z_copy.
    TABLES bsp_dcls_conf_semantic_key.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS     fr_comp  TYPE bsp_wd_component_name OBLIGATORY.
    PARAMETERS     fr_view  TYPE o2pageext OBLIGATORY.
    PARAMETERS     fr_role  TYPE bsp_dlc_role_key OBLIGATORY.
    PARAMETERS     fr_couse TYPE bsp_dlc_component_usage OBLIGATORY.
    PARAMETERS     fr_obty  TYPE bsp_dlc_object_type OBLIGATORY.
    PARAMETERS     fr_obsty TYPE bsp_dlc_object_sub_type OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    PARAMETERS     to_comp  TYPE bsp_wd_component_name OBLIGATORY.
    PARAMETERS     to_view  TYPE o2pageext OBLIGATORY.
    PARAMETERS     to_role  TYPE bsp_dlc_role_key OBLIGATORY.
    PARAMETERS     to_couse TYPE bsp_dlc_component_usage OBLIGATORY.
    PARAMETERS     to_obty  TYPE bsp_dlc_object_type OBLIGATORY.
    PARAMETERS     to_obsty TYPE bsp_dlc_object_sub_type OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
    PARAMETERS     request   TYPE trkorr OBLIGATORY.
    PARAMETERS     d_mode    TYPE flag.
    SELECTION-SCREEN END OF BLOCK b3.
    DATA :  iv_from_component         TYPE  bsp_wd_component_name,
            iv_from_viewname          TYPE  o2pageext,
            iv_from_role_key          TYPE  bsp_dlc_role_key,
            iv_from_component_usage   TYPE  bsp_dlc_component_usage,
            iv_from_object_type       TYPE  bsp_dlc_object_type,
            iv_from_object_sub_type   TYPE  bsp_dlc_object_sub_type,
            iv_to_component           TYPE  bsp_wd_component_name,
            iv_to_viewname            TYPE  o2pageext,
            iv_to_role_key            TYPE  bsp_dlc_role_key,
            iv_to_component_usage     TYPE  bsp_dlc_component_usage,
            iv_to_object_type         TYPE  bsp_dlc_object_type,
            iv_to_object_sub_type     TYPE  bsp_dlc_object_sub_type,
            is_transport_data         TYPE  bsp_dlc_config_transport_data.
    DATA:
      ls_from_config_data   TYPE bsp_dlcs_conf_data,
      lr_from_text_rep      TYPE REF TO cl_bsp_dlc_stext_repository2,
      lr_to_text_rep        TYPE REF TO cl_bsp_dlc_stext_repository2,
      lt_from_text          TYPE bsp_dlt_stxtrep2,
      ls_from_text          TYPE bsp_dl_stxtrep2,
      lv_to_context_id      TYPE bsp_dlc_context_id,
      lv_config_data_origin TYPE bsp_dlc_config_data_origin.
    DATA lt_xmlconf TYPE TABLE OF bspc_dl_xmlstrx2.
    DATA ls_xmlconf TYPE bspc_dl_xmlstrx2.
    DATA ls_xmlconf_check TYPE bspc_dl_xmlstrx2.
    is_transport_data-request = request.
    is_transport_data-display_mode = d_mode.
    SELECT SINGLE * FROM bspc_dl_xmlstrx2 INTO ls_xmlconf_check
                                          WHERE component = fr_comp
                                            AND viewname = fr_view
                                            AND role_key = fr_role
                                            AND component_usage = fr_couse
                                            AND object_type = fr_obty
                                            AND object_sub_type = fr_obsty.
    CHECK sy-subrc EQ 0.
    TRY.
        CALL METHOD cl_bsp_dlc_xml_storage2=>get_config_data
          EXPORTING
            iv_component           = fr_comp
            iv_viewname            = fr_view
            iv_role_key            = fr_role
            iv_component_usage     = fr_couse
            iv_object_type         = fr_obty
            iv_object_sub_type     = fr_obsty
            iv_only_spec_parameter = abap_true
          IMPORTING
            es_config_data         = ls_from_config_data
            ev_config_data_origin  = lv_config_data_origin.
      CATCH cx_bsp_dlc_config_not_found.
        RAISE config_not_found.
    ENDTRY.
    lr_from_text_rep = cl_bsp_dlc_stext_repository2=>get_instance(
                                             iv_component = fr_comp
                                             iv_viewname  = fr_view
                                             iv_role_key        = fr_role
                                             iv_component_usage = fr_couse
                                             iv_object_type     = fr_obty
                                             iv_object_sub_type = fr_obsty
    CASE lv_config_data_origin.
      WHEN cl_bsp_dlc_xml_storage2=>config_data_origin_c.
        CALL METHOD lr_from_text_rep->get_texts_c_for_context_id
          EXPORTING
            iv_all_langu = 'X'
          IMPORTING
            et_text      = lt_from_text.
      WHEN cl_bsp_dlc_xml_storage2=>config_data_origin_s.
        CALL METHOD lr_from_text_rep->get_texts_s_for_context_id
          EXPORTING
            iv_all_langu = 'X'
          IMPORTING
            et_text      = lt_from_text.
    ENDCASE.
    Edited by: Zafer Kuru on Dec 5, 2011 3:54 PM

  • SRM-EBP:  How to delete multiple entries in table BBP_DOCUMENT_TAB easier?

    We are running SRM 4.0 EBP on classic scenario.  I want to delete entries in table BBP_DOCUMENT_TAB easier and faster using FM BBP_DELETE_FROM_DOCUMENT_TAB.  Is there a standard program that calls this FM so that inputting the entries will be faster?  I see only CLEAN_REQREQ_UP but does not serve the purpose.  If none, how can I develop a program to achieve this?  Please help SRM Consultants.

    Hi,
    Please check note 535765, in it there is a special report that deletes entries from this table.
    I hope this helps,
    Kind Regards,
    Lisa

  • New entries in table TSTC not capturing in scu3 change logs

    Hi ,
    We have TSTC table log enabled.
    New Entries which comes through transport in the table TSTC are not capturing in change logs.
    We have created a new Z T-code and transported it to Quality and then to Production.
    But in the change logs of the tbale TSTC it is not captured both in quality and Production.
    In the table TSTC t-code is present.
    But the change log for the table doesnot show any new entry created.
    In development change log of TSTC, the change is present but in Quality and Production it is not present.
    Development client : 400
    Quality Client         : 600
    Production Client    : 600
    Can any one spill some beans on it...
    Thanks & Regards
    Kiran

    You need to add "recclient = ALL" (or same client value as "rec/client" profile parameter in RZ10) to the transport profile as well in the STMS.
    Search SAP notes and the forum here for "recclient" (without "/")
    Cheers,
    Julius

  • Adding new entry in table J_1INEXCGRP

    Hi,
    I am MM functional,  due to some system error , for the excsie group I required to manitain the entry in table J_1INEXCGRP,  as that customization part is not included in request,  now I want to confirm which methode to be use
    SE12->Utilities -> Table content -> create entry   or  with SE16N
    can you please give the stpes for adding a new entry in this table it has only two fileds
    MANDT
    J_1IEXCGRP
    regards,
    zafar
    Moderator Message: Spoon-feeding is not entertained here.
    Edited by: kishan P on Jan 25, 2011 4:58 PM

    Hi Alok,
    Hope this steps - code will help you to resolve this issue.
    1. Create A Group for your table control. In Screen Painter.
    2. Write Screen modification routine for the same
    it can be like this..
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'SCREEN_100'.
      LOOP AT SCREEN.
        IF screen-group1 = 'MOD'.
          IF flag = ' '.
            screen-input = '0'.
          ELSEIF flag = 'X'.
            screen-input = '1'.
          ENDIF.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    ENDMODULE.
    3. This will disable the display of the Fields in TABLE Control.
    4. in the PBO loop of the table control. Identify the lines which u want to keep active.
    Hope this will help
    <i><b>** Reward points to helpful answer</b></i>

  • How to move the entries of table BNKAIN between systems

    Hi,
    Is there any way to export the entries of table BNKAIN from one SAP system (development) to another manually? This is the table which is not transported via a transport...even in development system the "transport entries" option is not active. IN SM30 the maintenance view is not created.
    Can you advice how to move the entries somehow manually?
    Thanks for any assistance!
    br,Slawek

    Hi, thanks for reply.
    In fact I checked the table BNKA and the entries there are not helpful for me in the target system.
    We are using there some user exit which is using the table BNKAIN and the following entries are there:
    Client Bank Country Bank Key        Internal bank
    790            CA           IHC6            1
    790            DE           IHC1            1
    790             FI             IHC             1
    790            FR           IHC3            1
    790            GB           IHC4            1
    790            US           IHC5            1
    I checked the properties of that table in SE11 and it is maintainable only with restrictions..thus I need to ask some other basis expert which will help me to inlcude those entries into a transport.
    Anyway thansk for your hints!
    Bye

  • How  to maintain the entries using table maintanance??

    Hi,
    I have created a Ztable. and I have created table maintanance generator, then attached the table to a
    Tcode. but I am unable to maintain the entries in table maintanance??
    Can anyone help me out
    Regards
    Devi

    Hi this will help u.
    Hi,
    Go to SE11 enter table name ->change
    Utilities-> Table Maintenance Generator
    delete the Table maintenance by pressing delete button on menu,
    then start creating it again.
    Enter Auth.Group as &NC&
    Enter function group < some name>
    Maintenance Type -> One step
    Overview screen -> some Number (1 or 2)
    Press create
    enter dev class and save, activate.
    Go to SM 30 and check again.
    Reward if useful
    Regards,
    Hema Sundara.

  • How to insert multiple entries in table control

    Hi All,
    I want to insert multiple entries in table control in BDC program.Can any body help in this regard.
    Thanks,
    Satish.

    Hi,
    Go through the following 2 example programs:
    THis is example to upload the Bank details of the Vendor which has the TC.
    REPORT zprataptable2
           NO STANDARD PAGE HEADING LINE-SIZE 255.
    DATA : BEGIN OF itab OCCURS 0,
            i1 TYPE i,
            lifnr LIKE   rf02k-lifnr,
            bukrs LIKE   rf02k-bukrs,
            ekorg LIKE   rf02k-ekorg,
            ktokk LIKE   rf02k-ktokk,
            anred LIKE lfa1-anred,
            name1 LIKE lfa1-name1,
            sortl LIKE lfa1-sortl,
            land1 LIKE lfa1-land1,
            akont LIKE lfb1-akont,
            fdgrv LIKE lfb1-fdgrv,
             waers LIKE lfm1-waers,
            END OF itab.
    DATA : BEGIN OF jtab OCCURS 0,
            j1 TYPE i,
            banks LIKE lfbk-banks,
            bankl LIKE lfbk-bankl,
            bankn LIKE lfbk-bankn,
             END OF jtab.
    DATA : cnt(4) TYPE n.
    DATA : fdt(20) TYPE c.
    DATA : c TYPE i.
    INCLUDE bdcrecx1.
    START-OF-SELECTION.
      CALL FUNCTION 'WS_UPLOAD'
        EXPORTING
          filename = 'C:\first1.txt'
          filetype = 'DAT'
        TABLES
          data_tab = itab.
      CALL FUNCTION 'WS_UPLOAD'
       EXPORTING
         filename                      = 'C:\second.txt'
         filetype                      = 'DAT'
        TABLES
          data_tab                      = jtab.
      LOOP AT itab.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0100'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RF02K-KTOKK'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'RF02K-LIFNR'
                                      itab-lifnr.
        PERFORM bdc_field       USING 'RF02K-BUKRS'
                                      itab-bukrs.
        PERFORM bdc_field       USING 'RF02K-EKORG'
                                       itab-ekorg.
        PERFORM bdc_field       USING 'RF02K-KTOKK'
                                       itab-ktokk.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0110'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'LFA1-LAND1'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'LFA1-ANRED'
                                      itab-anred.
        PERFORM bdc_field       USING 'LFA1-NAME1'
                                      itab-name1.
        PERFORM bdc_field       USING 'LFA1-SORTL'
                                      itab-sortl.
        PERFORM bdc_field       USING 'LFA1-LAND1'
                                      itab-land1.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0120'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'LFA1-KUNNR'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0130'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'LFBK-BANKN(01)'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=ENTR'.
        cnt = 0.
        LOOP AT jtab WHERE j1 = itab-i1.
          cnt = cnt + 1.
          CONCATENATE 'LFBK-BANKS(' cnt ')' INTO fdt.
          PERFORM bdc_field  USING fdt jtab-banks.
          CONCATENATE 'LFBK-BANKL(' cnt ')' INTO fdt.
          PERFORM bdc_field USING fdt jtab-bankl.
          CONCATENATE 'LFBK-BANKN(' cnt ')' INTO fdt.
          PERFORM bdc_field   USING fdt jtab-bankn.
          IF cnt = 5.
            cnt = 0.
            PERFORM bdc_dynpro      USING 'SAPMF02K' '0130'.
            PERFORM bdc_field       USING 'BDC_CURSOR'
                                          'LFBK-BANKS(01)'.
            PERFORM bdc_field       USING 'BDC_OKCODE'
                                          '=P+'.
            PERFORM bdc_dynpro      USING 'SAPMF02K' '0130'.
            PERFORM bdc_field       USING 'BDC_CURSOR'
                                          'LFBK-BANKN(02)'.
            PERFORM bdc_field       USING 'BDC_OKCODE'
                                          '=ENTR'.
          ENDIF.
        ENDLOOP.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0130'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'LFBK-BANKS(01)'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=ENTR'.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0210'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'LFB1-FDGRV'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'LFB1-AKONT'
                                      itab-akont.
        PERFORM bdc_field       USING 'LFB1-FDGRV'
                                      itab-fdgrv.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0215'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'LFB1-ZTERM'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0220'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'LFB5-MAHNA'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0310'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'LFM1-WAERS'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'LFM1-WAERS'
                                      itab-waers.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0320'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RF02K-LIFNR'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=ENTR'.
        PERFORM bdc_dynpro      USING 'SAPLSPO1' '0300'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=YES'.
        PERFORM bdc_transaction USING 'XK01'.
      ENDLOOP.
      PERFORM close_group.
    ABAP Name   :   ZMM_PR_UPLOAD_MAT
    Description :   PR Upload BDC Program(With Material)
    Created by  :   Anji Reddy V
    Created on  :   04/11/2004
    Description :   This Program is used to Upload the Purchase
                     Requisition data Using the Transaction ME51N.
      Modification Log:
      Date         Programmer          Correction    Description
      04/11/2004   Anji Reddy          Initial
    REPORT zmm_pr_upload_mat
           NO STANDARD PAGE HEADING
           LINE-SIZE 255.
    Standard Include for Selection Screen
    INCLUDE bdcrecx1.
    Internal Table for Upload Data
    DATA: BEGIN OF i_pr OCCURS 0,
    Header Screen
            sno(3),               " SNo
            bsart(004),           " PR Type
            epstp(001),           " Item Category
            knttp(001),           " Account Assignment
            eeind(010),           " Delivery Date
           lpein(001),          " Category of Del Date
            werks(004),           " Plant
            lgort(004),           " Storage Location
            ekgrp(003),           " Purchasing Group
            matkl(009),           " Material Group
            bednr(010),           " Tracking No
            afnam(012),            " Requisitioner
    Item Details
            matnr(018),           " Material No
            menge(017),           " Quantity
           badat(010),
           frgdt(010),
            preis(014),           " Valuation Price
           waers(005),           " Currency
           peinh(005),
           wepos(001),
           repos(001),
            sakto(010),           " GL Account
            kostl(010),           " Cost Center
           bnfpo(005),
          END OF i_pr.
    Internal Table for header Data
    DATA: BEGIN OF it_header OCCURS 0,
            sno(3),               " SNo
            bsart(004),           " PR Type
            epstp(001),           " Item Category
            knttp(001),           " Account Assignment
            eeind(010),           " Delivery Date
            werks(004),           " Plant
            lgort(004),           " Storage Location
            ekgrp(003),           " Purchasing Group
            matkl(009),           " Material Group
            bednr(010),           " Tracking No
            afnam(012),            " Requisitioner
          END OF it_header.
    Internal Table for Item Data
    DATA: BEGIN OF it_item OCCURS 0,
            sno(3),               " SNo
            matnr(018),           " Material No
            menge(017),           " Quantity
            preis(014),           " Valuation Price
            sakto(010),           " GL Account
            kostl(010),           " Cost Center
          END OF it_item.
    Data Variables & Constants
    CONSTANTS : c_x             VALUE 'X'.  " Flag
    DATA : v_l(2),                          " Counter
           v_rowno(5),                      " Row No
           v_2(2),                          " Counter
           v_rows LIKE sy-srows,            " Rows in TC
           v_field(45).                     " String
    Parameters
    PARAMETERS: p_file LIKE ibipparms-path.  " Filename
    At selection-screen on Value Request for file Name
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    Get the F4 Values for the File
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          program_name  = syst-cprog
          dynpro_number = syst-dynnr
        IMPORTING
          file_name     = p_file.
    Start of Selection
    START-OF-SELECTION.
    Open the BDC Session
      PERFORM open_group.
    Upload the File into internal Table
      CALL FUNCTION 'UPLOAD'
        EXPORTING
          filename                = p_file
          filetype                = 'DAT'
        TABLES
          data_tab                = i_pr
        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.
      SORT i_pr BY sno.
      LOOP AT i_pr.
        MOVE-CORRESPONDING i_pr TO it_item.
        APPEND it_item.
        CLEAR it_item.
        AT END OF sno.
          READ TABLE i_pr INDEX sy-tabix.
          MOVE-CORRESPONDING i_pr TO it_header.
          APPEND it_header.
          CLEAR it_header.
        ENDAT.
      ENDLOOP.
      SORT it_header BY sno.
      SORT it_item BY sno.
      v_rows = sy-srows - 6.
    Upload the Data from Internal Table
      LOOP AT it_header.
    Header Data
        PERFORM bdc_dynpro      USING 'SAPMM06B' '0100'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'EBAN-BEDNR'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'EBAN-BSART'
                                      it_header-bsart.
        PERFORM bdc_field       USING 'RM06B-EPSTP'
                                      it_header-epstp.
        PERFORM bdc_field       USING 'EBAN-KNTTP'
                                      it_header-knttp.
        PERFORM bdc_field       USING 'RM06B-EEIND'
                                      it_header-eeind.
       PERFORM bdc_field       USING 'RM06B-LPEIN'
                                     it_header-lpein.
        PERFORM bdc_field       USING 'EBAN-WERKS'
                                      it_header-werks.
        PERFORM bdc_field       USING 'EBAN-LGORT'
                                      it_header-lgort.
        PERFORM bdc_field       USING 'EBAN-EKGRP'
                                      it_header-ekgrp.
        PERFORM bdc_field       USING 'EBAN-MATKL'
                                      it_header-matkl.
        PERFORM bdc_field       USING 'EBAN-BEDNR'
                                      it_header-bednr.
        PERFORM bdc_field       USING 'EBAN-AFNAM'
                                      it_header-afnam.
    Item Details
        v_l = 0.
    To add no. of rows
        v_2 = 0 .
    As the screen is showing 13 rows defaulted to 130
        v_rowno = 130 .
        LOOP AT it_item WHERE sno = it_header-sno.
          v_l = v_l + 1.
          IF v_l = 14 .
            IF v_2 = 12 .
              v_2 = 12 .
              v_l = 2 .
    From second time onwards it is displaying 12 rows only
              v_rowno = v_rowno + 120 .
              PERFORM bdc_dynpro      USING 'SAPMM06B' '0106'.
              PERFORM bdc_field       USING 'BDC_CURSOR'
                                            'RM06B-BNFPO'.
              PERFORM bdc_field       USING 'RM06B-BNFPO'
                                            v_rowno.
              PERFORM bdc_field       USING 'BDC_OKCODE'
                                            '/00'.
              PERFORM bdc_field       USING 'BDC_OKCODE'
                                                '/00'.
            ELSE.
    V_2 initialized to 12 for second screen purpose
              v_2 = 12 .
              v_l = 2 .
              PERFORM bdc_dynpro      USING 'SAPMM06B' '0106'.
              PERFORM bdc_field       USING 'BDC_CURSOR'
                                            'RM06B-BNFPO'.
              PERFORM bdc_field       USING 'RM06B-BNFPO'
                                            v_rowno .
              PERFORM bdc_field       USING 'BDC_OKCODE'
                                            '/00'.
              PERFORM bdc_field       USING 'BDC_OKCODE'
                                                '/00'.
            ENDIF.
          ENDIF.
          PERFORM bdc_dynpro      USING 'SAPMM06B' '0106'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '/00'.
          CLEAR v_field.
          CONCATENATE 'EBAN-MATNR(' v_l ')' INTO v_field.
          PERFORM bdc_field   USING v_field it_item-matnr.
          CLEAR v_field.
          CONCATENATE 'EBAN-MENGE(' v_l ')' INTO v_field.
          PERFORM bdc_field   USING v_field it_item-menge.
          PERFORM bdc_dynpro      USING 'SAPMM06B' '0102'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'EBAN-PREIS'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '/00'.
          PERFORM bdc_field       USING 'EBAN-PREIS'
                                      it_item-preis.
          PERFORM bdc_dynpro      USING 'SAPMM06B' '0505'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'EBKN-SAKTO'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=ENTE'.
          PERFORM bdc_field       USING 'EBKN-SAKTO'
                                      it_item-sakto.
    Cost Center
          PERFORM bdc_dynpro      USING 'SAPLKACB' '0002'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'COBL-KOSTL'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=ENTE'.
          PERFORM bdc_field       USING 'COBL-KOSTL'
                                        it_item-kostl.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=ENTE'.
        ENDLOOP.
        PERFORM bdc_dynpro      USING 'SAPMM06B' '0106'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RM06B-BNFPO'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=BU'.
    Call The Transaction
        PERFORM bdc_transaction USING 'ME51'.
      ENDLOOP.
    Close the BDC Session
      PERFORM close_group.
    reward for useful answers.
    Regards,
    Anji

  • How to delete duplicate entries in table for the object DNL_CUST_BASIS2

    Hi All,
    I am trying to download the object DNL_CUST_BASIS2.
    In the SMQ2 the status is SYSFAIL.
    I checked in the ST22 for dumps.It says about the error while accessing the table T006.
    While analysing this,i found some duplicate entries in the related tables of this object.
    Can somebody help me how to delete these duplicate entries?
    Thanks,
    Senthil.

    Delete them directly from the table using se16:
    select the entries in the classic view (not ALV or grid view).
    activate the debugger.
    press the view button. --> you'll enter in the debugger
    press F7
    locate the sy-ucomm variable & change it to "DELE".
    press F8
    delete the entries.
    Trick-shots
    but it works!
    Michael.

Maybe you are looking for