How to populate multiple entries to Bapi Table

Hi all,
  How to populate multiple entries to Bapi Table.....
Here is the code(in component controller)
  Z_Recr_Apply_Point_Input request = new Z_Recr_Apply_Point_Input(WDModelScopeType.TASK_SCOPE);
       int  size = wdContext.nodeApplicants().size();
            for(int i = 0 ; i < size ; i++)
                String isselected = wdThis.wdGetContext().nodeApplicants().getElementAt(i).getAttributeAsText("Appl_Number");
                 if(isselected == "true")
                           com.models.veteranpoint.Zrecr_Aplno appid = new
                                com.models.veteranpoint.Zrecr_Aplno();                                        
                                appid.setAppl_Number(wdContext.nodeApplicants().
                                    getApplicantsElementAt(i).getAppl_Number());
                           request.addApplicants(appid);
I want to pass the selected input field to bapi..
Please tel me where i pass the input field...
Please correct my code...
Thanks & regards
Mathi s

Hi,
Steps to insert multiple entries to BAPI table.
1.Create an instance for BAPI input
2.Bind the instance to the Node of the BAPI input
3.Create instance of the Structure(BAPI table) to which input has to be added.
4.Set the input values to the Structure instance.
5.Add the instance to the BAPI input.
6.Execute
From the given example,I assume Z_Recr_Apply_Point_Input  is the BAPI Input and com.epiuse.us.recruitment.models.veteranpoint.Zrecr_Aplno as Structure
Step 1:
Z_Recr_Apply_Point_Input request = new Z_Recr_Apply_Point_Input(WDModelScopeType.TASK_SCOPE);
Step 2:
<b>wdContext.nodeZ_Recr_Apply_Point_Input.bind(request);</b>
Steps 3 & 4:
int size = wdContext.nodeApplicants().size();
for(int i = 0 ; i < size ; i++)
String isselected = wdThis.wdGetContext().nodeApplicants().getElementAt(i).getAttributeAsText("Appl_Number");
if(isselected == "true")
com.epiuse.us.recruitment.models.veteranpoint.Zrecr_Aplno appid = new
com.epiuse.us.recruitment.models.veteranpoint.Zrecr_Aplno();
appid.setAppl_Number(wdContext.nodeApplicants().
getApplicantsElementAt(i).getAppl_Number());
<b>wdContext.currentZ_Recr_Apply_Point_InputElement().modelObject().addRecr_Aplno(appid);</b>
Step 5:
<b>wdContext.currentZ_Recr_Apply_Point_InputElement().modelObject().execute();</b>
Regards,
Viji Priya

Similar Messages

  • Multiple entries in the table cabn

    Hello,
    Can Anyone tell me how is it possible to have multiple entries of the same "atnam" field in the table CABN.
    It has something to do with changing number.
    Because I used a wrong select-instruction e.g.
    select atnam in charact where .... IN ....
    So, I shoud used
    select DISTINCT atnam in charact where .... IN ....
    So, I'm gone need to try to put multiple entries in the table to check, if it's working well.
    Thanks a lot.
    Best Regards,
    Kais

    If I understand your Q - you mean there are two ATINN for the same ATNAM in your CABN table?
    I dont think that's possible. If you check CT04 and try to create a new characteristic with same name as an existing one - it will give you a warning and prevent creation.
    Since you say it's a standard characteristic - please mention the characteristic name (ATNAM)?

  • In  a SQL query whihc has join, How to reduce Multiple instance of a table

    in a SQL query which has join, How to reduce Multiple instance of a table
    Here is an example: I am using Oracle 9i
    is there a way to reduce no.of Person instances from the following query? or can I optimize this query further?
    TABLES:
    mail_table
    mail_id, from_person_id, to_person_id, cc_person_id, subject, body
    person_table
    person_id, name, email
    QUERY:
    SELECT p_from.name from, p_to.name to, p_cc.name cc, subject
    FROM mail, person p_from, person p_to, person p_cc
    WHERE from_person_id = p_from.person_id
    AND to_person_id = p_to.person_id
    AND cc_person_id = p_cc.person_id
    Thnanks in advance,
    Babu.

    SQL> select * from mail;
            ID          F          T         CC
             1          1          2          3
    SQL> select * from person;
           PID NAME
             1 a
             2 b
             3 c
    --Query with only ne Instance of PERSON Table
    SQL> select m.id,max(decode(m.f,p.pid,p.name)) frm_name,
      2         max(decode(m.t,p.pid,p.name)) to_name,
      3         max(decode(m.cc,p.pid,p.name)) cc_name
      4  from mail m,person p
      5  where m.f = p.pid
      6  or m.t = p.pid
      7  or m.cc = p.pid
      8  group by m.id;
            ID FRM_NAME   TO_NAME    CC_NAME
             1 a          b          c
    --Expalin plan for "One instance" Query
    SQL> explain plan for
      2  select m.id,max(decode(m.f,p.pid,p.name)) frm_name,
      3         max(decode(m.t,p.pid,p.name)) to_name,
      4         max(decode(m.cc,p.pid,p.name)) cc_name
      5  from mail m,person p
      6  where m.f = p.pid
      7  or m.t = p.pid
      8  or m.cc = p.pid
      9  group by m.id;
    Explained.
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 902563036
    | Id  | Operation           | Name   | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT    |        |     3 |   216 |     7  (15)| 00:00:01 |
    |   1 |  HASH GROUP BY      |        |     3 |   216 |     7  (15)| 00:00:01 |
    |   2 |   NESTED LOOPS      |        |     3 |   216 |     6   (0)| 00:00:01 |
    |   3 |    TABLE ACCESS FULL| MAIL   |     1 |    52 |     3   (0)| 00:00:01 |
    |*  4 |    TABLE ACCESS FULL| PERSON |     3 |    60 |     3   (0)| 00:00:01 |
    PLAN_TABLE_OUTPUT
    Predicate Information (identified by operation id):
       4 - filter("M"."F"="P"."PID" OR "M"."T"="P"."PID" OR
                  "M"."CC"="P"."PID")
    Note
       - dynamic sampling used for this statement
    --Explain plan for "Normal" query
    SQL> explain plan for
      2  select m.id,pf.name fname,pt.name tname,pcc.name ccname
      3  from mail m,person pf,person pt,person pcc
      4  where m.f = pf.pid
      5  and m.t = pt.pid
      6  and m.cc = pcc.pid;
    Explained.
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 4145845855
    | Id  | Operation            | Name   | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT     |        |     1 |   112 |    14  (15)| 00:00:01 |
    |*  1 |  HASH JOIN           |        |     1 |   112 |    14  (15)| 00:00:01 |
    |*  2 |   HASH JOIN          |        |     1 |    92 |    10  (10)| 00:00:01 |
    |*  3 |    HASH JOIN         |        |     1 |    72 |     7  (15)| 00:00:01 |
    |   4 |     TABLE ACCESS FULL| MAIL   |     1 |    52 |     3   (0)| 00:00:01 |
    |   5 |     TABLE ACCESS FULL| PERSON |     3 |    60 |     3   (0)| 00:00:01 |
    PLAN_TABLE_OUTPUT
    |   6 |    TABLE ACCESS FULL | PERSON |     3 |    60 |     3   (0)| 00:00:01 |
    |   7 |   TABLE ACCESS FULL  | PERSON |     3 |    60 |     3   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - access("M"."CC"="PCC"."PID")
       2 - access("M"."T"="PT"."PID")
       3 - access("M"."F"="PF"."PID")
    PLAN_TABLE_OUTPUT
    Note
       - dynamic sampling used for this statement
    25 rows selected.
    Message was edited by:
            jeneesh
    No indexes created...                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to Add multiple entry to the group policy security filtering

    How to Add multiple entry to the group policy security filtering
    Is there any way we can add multiple entry to the Domain group policy Security filtering tab.Currently its not allowing to add more then one entry at a time.
    Getting Error like "only one name can be entered,and the name cannot contain a semicolon.Enter a valid name"

    Hi
    Are you trying to add more users or groups through Group Policy Management Security Filtering tab?
    Try right clicking on the policy and then edit
    Then in Editor Right click on the name of the policy and Properties
    Security tab and add user or group from this tab. Just make sure if you are adding user or groups "Select this object type" has
    the correct option also "From this Location" is set to your entire directory not the local server.
    Update us with the above.
    Thanks

  • How to find latest entry in the table according to time

    how to find latest entry in the table according to the time
    is there any function module to do so
    \[removed by moderator\]
    Regards
    Shashi
    Edited by: Jan Stallkamp on Aug 25, 2008 4:39 PM

    Hi,
    If you want to read the entry from an internal table,
    sort the internal table in the descending order by the time and
    delete adjacent duplicates by comparing the fields other than time and the internal table will have the latest record.
    Suggestion: instead of only time try to have one more field called date with the time combination
    Regards,
    Ramesh

  • How to check duplicate entries in internal table??

    Dear Friends,
    How to check duplicate entries in internal table??
    Exp: In my internal table if I am having the same records more then ones then I need to print the error message, here I am using steploop for selecting the values from screen, and the values are coming into my internal table if user enter the same value more then ones I need to print the error message.
    Thanks,
    Sridhar

    Hi,
    After storing the data into internal table say ITAb, move the data into another internal table.
    t_dup[] = itab[].
    LOOP AT itab.
        count1 = count1 + 1.
        itab-count1 = count1.
        MODIFY itab.
    ENDLOOP.
    LOOP AT t_dup.
        count2 = count2 + 1.
        t_dup-count2 = count2.
        MODIFY t_dup.
    ENDLOOP.
      DELETE ADJACENT DUPLICATES FROM itab.
      LOOP AT t_dup.
        record_dup = 'N'.
        READ TABLE itab WITH KEY count1 = t_dup-count2.
        IF sy-subrc = 0.
          record_dup = 'Y'.
        ENDIF.
        IF record_dup NE 'Y'.
          t_dup-message = 'DUPLICATE ENTRY'.
          t_dup-flag = 1.
          MODIFY t_dup.
        ENDIF.
      ENDLOOP.
    Use this sample code.
    Reward pts if it is helpfull.
    Regards
    Srimanta

  • 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

  • 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

  • URGENT : How to save multiple entries in a T list at one go

    If I have a T list that contains the colours availiable at a paint shop (just an example), e.g. white, green, red. I want to save the multiple entries in the t-list at any moment to the database column at one go. how can i do it.
    Also the table doesn't contain a column for the colour_code, but instead it has the shop_id and the colour_id corresponding to that shop_id. So i need to insert into the database the colour_id for a particular colour_code as the t-list is just a control item in the data block.
    Please help.
    Abhishek.

    if you use multi-selection Tlist item or create your own Tlist looking form, then you may loop thru these multi-selections and add your logic into this loop.

  • How to validate an entry in a table?

    I have a (single column) table view linked to an NSArrayController that has a custom class definition as its 'Class Name'. I also have KVC compliant methods to populate the array controller within my 'model'. I can see the 'countOf...' and 'objectIn...AtIndex' methods being called and the table contains the correct data.
    I have the 'Validates Immediately' option set on both the table column binding and the controller content array binding.
    My problems come when I alter the contents of an entry in the table. Firstly, the only 'validate...:error:' method that is called is on the custom class for the field that is updated.
    Secondly, the 'insertObject:in...:AtIndex' and similar (especially the 'replaceObjectIn...AtIndex:withObject:') methods are not called.
    I have checked and rechecked that the KVC names include the correctly capitalised name of the class.
    How can I get the validation (and other) routines to be called?
    Thanks
    Susan

    Abandoned!!

  • How to populate data in the same table based on different links/buttons

    Hi
    I'm using jdeveloper 11.1.4. I have a use case in which i need to populate data in the same table based on click of different links.
    Can anyone please suggest how can this be achieved.
    Thanks

    I have a use case in which i need to populate data in the same table based on click of different linksDo you mean that you need to edit existing rows ?
    What format do you have the date in - table / form ?

  • How to delete the entries in CDCLS table

    Hi All,
    There is a potential issue with the size of table CDCLS on production system. We need to reduce or manage the amount of data in this table. CDCLS is a cluster table and cannot be reduced directly,
    So first we were reduced the entries in CDHDR and then from CDPOS tables.
    After that we tried to reduce the entries from CDCLS table through the program - RSSCD7RE, We are facing the error as - no data available and No active archive key was selected.
    Please help me out, how to proceed further in this task. Thanks in advance.

    Go to DB15 and see the archiving object.
    You can also use the archiving object CHANGEDOCU, please refer SAP documents for that.
    Transaction is
    SARA -> Archive object CHANGEDOCU
    Message was edited by:
            ANIRUDDHA DAS

  • How to delete multiple rows from ADF table

    How to delete multiple rows from ADF table

    Hi,
    best practices when deleting multiple rows is to do this on the business service, not the view layer for performance reasons. When you selected the rows to delete and press submit, then in a managed bean you access thetable instance (put a reference to a managed bean from the table "binding" property") and call getSeletedRowKeys. In JDeveloper 11g, ADF Faces returns the RowKeySet as a Set of List, where each list conatins the server side row key (e.g. oracle.jbo.Key) if you use ADF BC. Then you create a List (ArrayList) with this keys in it and call a method exposed on the business service (through a method activity in ADF) and pass the list as an argument. On the server side you then access the View Object that holds the data and find the row to delte by the keys in the list
    Example 134 here: http://blogs.oracle.com/smuenchadf/examples/#134 provides you with the code
    Frank

  • How to populate List Item from the table in a form builder

    I want to know how to populate the List Item (pop up menu and combo box) from a table.
    Supposing I have a table Customer(cust_id,cust_name)
    and now I want to populate it in such a manner that I can update the data back to the database and also access the list on the form.

    This is the method i am using to populate a list.
    1- First of all you need to create a non-database list item for customer_name.
    2-create this procedure
    PROCEDURE populate_list_with_query
    --Populates the given list item with the specified query.
    (p_list_item in VARCHAR2
    ,p_query in VARCHAR2)
    IS
    /* Name the record group after the list item (no
    block prefix). */
    cst_rg_name constant VARCHAR2(30) :=
    GET_ITEM_PROPERTY(p_list_item,item_name);
    v_rg_id RECORDGROUP;
    BEGIN
    v_rg_id := FIND_GROUP(cst_rg_name);
    IF ID_NULL(v_rg_id) THEN
    v_rg_id := CREATE_GROUP_FROM_QUERY(cst_rg_name,p_query);
    END IF;
    IF POPULATE_GROUP(v_rg_id) = 0 THEN
    POPULATE_LIST(p_list_item,v_rg_id);
    /* Force display of first list element label
    in the list item. */
    COPY(GET_LIST_ELEMENT_VALUE(p_list_item,1),p_list_item);
    END IF;
    END populate_list_with_query;
    3- Create When-Create-Record on the block level and write this code
    BEGIN
    POPULATE_LIST_WITH_QUERY('bk1.customer_name',
    'SELECT customer_name, to_char(customer_id) FROM customer');
    END;
    In this example, the customer name is the (visible) list label and the customer ID is the (actual) list value
    i hope this will solve your problem ...

  • How to populate Tree structure from BAPI while tree grows or shrinks

    Hi All
    Currently I am populating the tree structure from BAPI based on the HLevel (Hierarchy  Level) parameter, but when ever insertion and deletion happens in the tree at any level in the UI and at the same time i am updating these tree node values with HLevel value(example : 1 is first level , 2 is second level, 3 is third level etc)  updating successfully& correctly  into the BAPI, no issues.
    Once it is updated into the BAPI, next time when i refreshed the UI then i am not populating the tree structure correctly from BAPI with updated new nodes based on the HLevel. when tree struture grows or shrinks in the BAPI after updating into BAPI from UI then i am not populating the tree sturcture correctly based on the HLevel value from the BAPI.
    Please let me know any sample code how to populate tree structure correctly when tree structure grows or shrinks based on the HLevel value ( Hierarchy Level , for example : 1 is level , 2 is 2nd level , 3 is third level nodes etc)
    anybody helps in this regard with sample code on the populating tree tructure then it would be great help to me.
    Thanks in advance
    Regards
    Kalki Reddy
    Edited by: KalkiReddy on Nov 29, 2009 3:48 PM

    Bapi output node:
    Value     | Text     | HLevel
    01     | A     | 1               
    0101     | AA       | 2
    010101     | AAA     | 3
    01010B     | AAB     | 3
    0102     | AB     | 2
    02     | B     | 1
    0201     | BA        | 2
    This code is used to build the tree in wdDoInit method
         IE_T_CatalogueNode catalogueNode = wdContext.nodeE_T_Catalogue();
         int size = catalogueNode.size();
         ICatalogoElement level1elem = null;
         for (int i = 0; i < size; i ++)
              IE_T_CatalogueElement catalogueElem = catalogueNode.getE_T_CatalogueElementAt(i);
              if (catalogueElem.getLevel().equals("1"))
                   // 1 Livello
                   level1elem = wdContext.createCatalogoElement();
                   level1elem.setKATALOGART_CODE(catalogueElem.getKatalogart());
                   level1elem.setCODEGRUPPE_CODE(catalogueElem.getCodegruppe());
                   level1elem.setCODE(catalogueElem.getCode());
                   level1elem.setCODE_DESCR(catalogueElem.getKatalogart_Descr());
                   level1elem.setDESCR(catalogueElem.getKatalogart_Descr());
                   wdContext.nodeCatalogo().addElement(level1elem);
                   for (int j = i + 1; j < size; j ++)
                        IE_T_CatalogueElement catalogueElem2level =
                                                 catalogueNode.getE_T_CatalogueElementAt( j );
                        String level2 = catalogueElem2level.getLevel();
                        if (level2.equals("2"))
                             ICatalogoElement level2elem = level1elem.nodeChild().createCatalogoElement();
                             level2elem.setKATALOGART_CODE(catalogueElem2level.getKatalogart());
                             level2elem.setCODEGRUPPE_CODE(catalogueElem2level.getCodegruppe());
                             level2elem.setCODE(catalogueElem2level.getCode());
                             level2elem.setCODE_DESCR(catalogueElem2level.getCodegruppe_Descr());
                             level2elem.setDESCR(catalogueElem2level.getCodegruppe_Descr());
                             level1elem.nodeChild().addElement(level2elem);
                             for (int k = j + 1; k < size; k ++)
                                  IE_T_CatalogueElement catalogueElem3level =
                                                           catalogueNode.getE_T_CatalogueElementAt( k );
                                  String level3 = catalogueElem3level.getLevel();
                                  if (level3.equals("3"))
                                       ICatalogoElement level3elem = level2elem.nodeChild().createCatalogoElement();
                                       level3elem.setKATALOGART_CODE(catalogueElem3level.getKatalogart());
                                       level3elem.setCODEGRUPPE_CODE(catalogueElem3level.getCodegruppe());
                                       level3elem.setCODE(catalogueElem3level.getCode());
                                       level3elem.setCODE_DESCR(catalogueElem3level.getCode_Descr());
                                       level3elem.setDESCR(catalogueElem3level.getCode_Descr());
                                       level2elem.nodeChild().addElement(level3elem);
    Damiano

Maybe you are looking for

  • Failure to Connect

    My old Airport Extreme base station quit, and I replaced it with a new one. I configured it with a Power Mac G5, using the same setup and passwords that I used before. Now I can access wi-fi using the base station with my Power Mac G5 and with an iBo

  • SOLUTION for "corrupt file/directory" unable to install FLASH

    How many of you have run into trouble trying to install or update Flash Player and got the message about a corrupt file/folder at "C:/windows/system32/macromedia/flash"?  If you are like me, when you got it you first tried to install again.  Didn't w

  • KDE 4.6 Oxygen corruption with i965 driver

    Does anyone suffer from graphics corruption when using oxygen with intel drivers ? Here is the screenshot: This is only a problem when using oxygen window decorations, with dekorator there are no problems of this sort. I can't be sure if this is oxyg

  • How about some help Apple?

    I can't use my CD Burner since I downloaded the new i-Tunes version 6.0 and I'm getting frustrated like so many other people on this forum. How about some help Apple? Dell 4600 Dimension   Windows XP   Pentium 4

  • Can't activate Adobe Flash

    Recently I had added Adblock Plus. Prior to this, I'd had no problems playing videos on any webpage. I have my system set up so that it has to ask me to activate Adobe Flash in order to play a video (I was tired of the autoplay videos). After adding