Bdc MB02 page down after 7items

I am doing the mb02 change
I have 15 items for the  material document number1 and 5 items for material document nmber 2 etc and 13 items for material document 3, I have recorded the page down in shdb.
In mbo2 only 7 items are there per page.
Now i am looping at the finaltable.
Now how to tell to the system that material doc1 is having 15 items , ie how to handle page down after 7th item for material doc1.
For material doc 2 only 5items so we need to bypass page down , please tell how to handle this in this loop and endloop of bdc.
Loop at itab.
Pagedown logic please.
call transaction tcode MB02.
ENDLOOp.

Hi,
No need of page down.
There is one option in EDIT-> POSITIOn CURSOR menu. It will ask for ITEM number. Whatever item number you have provided that will come in the first line.So reord only first line everytime.
then you can select and chenage them. this will be easier instead of page down where you need to know when you have to page down.
Regards,
Shanmugavel chandrasekaran.

Similar Messages

  • BDC(va02) page down condition

    hi all!
    i done bdc for va02.
    In this when i press page down (=p+)only 9 line item will display  and again press page down next  9 line item will be shown .(in my pgm 11 line items showing)
    Is it possible to give a spacific conditio for page down ? how ?
    thanks

    Hi,
    The system field SY-LOOPC Contains the total number of rows visible in the TC and SY-STEPL contains the row number of current row.
    Then use P+ to page down p- for page up as the values of sy-ucomm
    Hope this will serve your purpose.
    Cheers
    Ramchander Rao.K
    Edited by: Ramchander Krishnamraju on Aug 13, 2009 6:41 AM

  • BDC table page down

    I searched forum but did not get clear answer so posting.
    I am working on a BDC. Screen has Table. How can I find out how many  rows there will be during BDC and when I need to do page down.
    Thanks,
    AP

    Hi,
    The system field SY-LOOPC Contains the total number of rows visible in the TC and SY-STEPL contains the row number of current row.
    Then use P+ to page down p- for page up as the values of sy-ucomm
    Hope this will serve your purpose.
    Cheers
    Ramchander Rao.K
    Edited by: Ramchander Krishnamraju on Aug 13, 2009 6:41 AM

  • PROBLEM IN BDC F-04 --NO PAGE DOWN

    HI
    Experts,
    Getting problem in bdc for f-04 , The data is split on basis of
    business area (gsber) , and for one business area there are more
    then 2000 document number, till the screen of doc.no the data is
    coming into fields but i have to put all the doc number for that
    b.area. And only i can enter 16 doc.no as there is no page down i
    have to enter so that it takes another 16 doc.no .
    but i tried it by at new command and then i tried it by on chage of
    but it picks only first doc.no its not piclking all doc.no.
    LOOP AT i_final.
        MOVE i_final TO wa_itab.
        ON CHANGE OF wa_itab-gsber  .
          CLEAR w_count.
          PERFORM bdc_dynpro      USING 'SAPMF05A' '0122'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'RF05A-NEWKO'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '/00'.
          PERFORM bdc_field       USING 'BKPF-BLDAT'
                                         wa_itab-bldat .                       "'27.07.2006'.
          PERFORM bdc_field       USING 'BKPF-BLART'
                                         wa_itab-blart.                        "'SA'.
          PERFORM bdc_field       USING 'BKPF-BUKRS'
                                         wa_itab-bukrs.                         "'NPIL'.
          PERFORM bdc_field       USING 'BKPF-BUDAT'
                                         wa_itab-budat.                         "'27.07.2006'.
          PERFORM bdc_field       USING 'BKPF-WAERS'
                                         wa_itab-waers.                          "'INR'.
          PERFORM bdc_field       USING 'BKPF-XBLNR'
                                         wa_itab-xblnr.                         "'INR'.
          PERFORM bdc_field       USING 'BKPF-BKTXT'
                                        wa_itab-bktxt.                          "'INR'.
          PERFORM bdc_field       USING 'RF05A-XPOS1(04)'
                                         wa_itab-xpos1.
          PERFORM bdc_field       USING 'RF05A-NEWBS'
                                         wa_itab-newbs.         "'50'.
          PERFORM bdc_field       USING 'RF05A-NEWKO'
                                        wa_itab-newko.          "'9991010'.
          PERFORM bdc_dynpro      USING 'SAPMF05A' '0300'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'BSEG-WRBTR'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=PA'.
          PERFORM bdc_field       USING 'BSEG-WRBTR'
                                        wa_itab-wrbtr.                            "'826532.58'.
          PERFORM bdc_dynpro      USING 'SAPLKACB' '0002'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'COBL-FIPOS'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=ENTE'.
          PERFORM bdc_field       USING 'COBL-GSBER'
                                         wa_itab-gsber.         "'1101'.
          PERFORM bdc_field       USING 'COBL-PRCTR'
                                         wa_itab-prctr.         "'2000'.
          PERFORM bdc_dynpro      USING 'SAPMF05A' '0710'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'RF05A-XPOS1(03)'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=PA'.
          PERFORM bdc_field       USING 'RF05A-AGKON'
                                         wa_itab-agkon.         "'2810200'.
          PERFORM bdc_field       USING 'RF05A-XPOS1(03)'
                                         'X'.
        ENDON.
        PERFORM bdc_dynpro      USING 'SAPMF05A' '0731'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RF05A-SEL01(06)'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=PA'.
        w_count = w_count + 1.
        CONCATENATE 'RF05A-SEL01(' w_count ')' INTO w_bdc.
        PERFORM bdc_field       USING   w_bdc
                                        wa_itab-sel01.
        IF w_count >= 16.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '/00'.
          w_count = 0.
        ENDIF.
       ENDON.
       AT END OF gsber.
    *IF W_FLAG = 'X'.
          PERFORM bdc_dynpro      USING 'SAPDF05X' '3100'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=BU'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'RF05A-ABPOS'.
          PERFORM bdc_field       USING 'RF05A-ABPOS'
                                        '1'.
          PERFORM bdc_transaction USING 'F-04'.
       ENDAT. "At end of
    *ENDIF.
      ENDLOOP.
      PERFORM close_group.

    Iam doing a bdc for F-04 (post with clearing header date)
    i got a file in which the data is splited on business area wise,
    and when i enter the details on first screen
    with post key 40 and enter after entering the details here like
    busines area profit cenrter i have to click
    process open item .
    here i have to select the doc.no and enter acct no and again
    have to process the open item .. where exactly my problem is
    when i process it i will get ascreen in which
    the doc.no are
    from to
    and i can enter only 16 doc no here but where as there are more
    then 50 doc number for one businees area in file ..there is
    HOPE U GOT MY POINT NOW .
    REGARDS

  • BDC (F-04 ) No Page down

    Hi
    experts ..
    Iam doing a bdc for F-04 (post with clearing header date)
    i got a file in which the data is splited on business area wise,
    and when i enter the details on first screen
    with post key 40 and enter after entering the details here like
    busines area profit cenrter i have to click 
    process open item .
    here i have to select the doc.no and enter acct no and again
    have to process the open item .. where exactly my problem is
    when i process it i will get ascreen in which
    the doc.no are
    from    to
    and i can enter only 16 doc no here but where as there are more
    then 50 doc number for one businees area in file ..there is
    no page down working .
    what to do ?
    regards
    farukh

    HI farukh,
    if it is a table control then one option is that you use the 'INSERT' button to add a line in first place and fill that first line. and again use command 'INSERT' to insert a line at first place.
    you have to record insert button.
    Regards,
    Wasim Ahmed

  • In BDC Page down command is not working for MB1C T. Code

    Dear Experts,
    I am writing BDC for MB1C, in this to enter serial number for material, when exceeds the limit, the page down command not woking.
    i wrote the below
             IF sn_count = 20.
                PERFORM bdc_dynpro      USING 'SAPLIPW1' '0200'.
                PERFORM bdc_field       USING 'BDC_CURSOR'
                                                     'RIPW0-SERNR(01)'.
                PERFORM bdc_field       USING 'BDC_OKCODE'
                                              '=RWS'.
                sn_count = 2.
              ENDIF.
    in my recording i got below
    perform bdc_dynpro      using 'SAPLIPW1' '0200'.
    perform bdc_field       using 'BDC_CURSOR'
                                       'RIPW0-SERNR(07)'.
    perform bdc_field       using 'BDC_OKCODE'
                                       '=RWS'.
    please help me.

    sorry I missed this part with the serial numbers, I thought you were in the item overview.

  • Page down functionality in table control BDC-CJ02 tcode

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

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

  • What is ok-code for page down in bdc (reward)

    hiiii
    What is ok-code for page down in bdc...

    HI..
    here is the list..
    P-  : Back
    P-- : Scroll to previous page
    P+ : Scroll to next page
    P++ Scroll to last page
    PL- : Scroll to first line in page
    PL-n :  Scroll back n lines
    PL+ : Scroll to last line in page
    PL+n Scroll forward n lines
    PP- : Scroll back one page
    PP-n Scroll back n pages
    PP+ scroll forward one page
    PP+n : scroll forward n page
    PPn : Scroll to start of page n
    Ps- : Scroll to first column
    PS++ Scroll to last column
    Reward if useful
    Regards
    Prax

  • After a few minutes, the page down won't work without clicking the mouse pointer on the page I am reading to activate page down again. Is there a way to go back to page down working every time without having to click the page first?

    Question
    After a few minutes, the page down won't work without clicking the mouse pointer on the page I am reading to activate page down again. Is there a way to go back to page down working every time without having to click the page first?

    Today, two other users reported issues with the back-forward history list dropping down if they hovered the mouse pointer over the back or forward button -- without clicking -- and then moved the pointer downwards. One user was on a touchpad, I don't know about the other user. Are you experiencing anything like that?

  • Page down issue in f-28 BDC

    Hi all,
       I am not able to page down in one of the screens in the transaction F-28 while doing BDC.
      Pls find the code that i had used when the items are more than 17,
    Loop
    IF l_cnt = 17.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                                 '=P+'.
         PERFORM bdc_dynpro      USING 'SAPDF05X' '4201'.
          perform bdc_field       using 'BDC_CURSOR'
                                        'DF05B-TREST(01)'.
       cnt = 0.
    e ndif.
    Endloop.
    Pls help in this matter.

    Hi Vinod,
      i used the above logic. I enter 4 values in one line ie amount, reason code , reference1 and reference2. The reference1 is unmatched document number.
    Now what happens is all the amounts get added up as 1 line item and no document number is displayed in the next screen. But i need all that to be different line items. I am attaching the code that used.
    Please help me.
    LOOP AT t_820_payadv_tmp WHERE chect EQ st_checks-chect
                                     AND kukey EQ st_checks-kukey
                                     AND esnum EQ st_checks-esnum
                                     AND sgtxt(3) NE 'INV'.
          l_cnt = 1.
          perform bdc_dynpro      using 'SAPDF05X' '4201'.
          perform bdc_field       using 'BDC_CURSOR'
                                        'DF05B-XREF1(01)'.
          perform bdc_field       using 'BDC_OKCODE'
                                        '/00'.
       -Fill amount
            CLEAR : l_fld.
            concatenate :  'DF05B-TREST(' l_cnt ')' INTO l_fld.
            condense : l_fld.
            clear l_amt.
            l_amt = t_820_payadv_tmp-WRBTR.
            condense : l_amt.
            PERFORM bdc_field       USING l_fld l_amt.
       -Fill reason code
            CLEAR : l_fld.
            concatenate :  'DF05B-RSTGR(' l_cnt ')' INTO l_fld.
            condense : l_fld.
            PERFORM bdc_field       USING l_fld
                                          t_820_payadv_tmp-rstgn.
       -Fill reference numbers
            CLEAR : l_fld.
            concatenate :  'DF05B-XREF1(' l_cnt ')' INTO l_fld.
            condense : l_fld.
            PERFORM bdc_field       USING l_fld
                                          t_820_payadv_tmp-xref1.
            CLEAR : l_fld.
            concatenate :  'DF05B-XREF2(' l_cnt ')' INTO l_fld.
            condense : l_fld.
            PERFORM bdc_field       USING l_fld
                                          t_820_payadv_tmp-xref2.
    Endloop.
    perform bdc_dynpro      using 'SAPDF05X' '4201'.
    perform bdc_field       using 'BDC_CURSOR'
                                        'DF05B-XREF1(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                        '=PA'.

  • BDC PROGRAM WITH PAGE DOWN FUNCTIONALITY

    Hi,
      Can anyone provide me BDC program with page down functionality.
    Regards,
    SP

    Hi ,
    There is ok code i.e P+, which is the page down ,
    For example if you have 5 slots in the screen and from the BDC u have to fill more than the 5 slots so we will send the FVAL to BDCDATA like 'P+' it will increse the one more page ssay like 5 more slots.
    Regards,
    Bharani

  • I have a 2007 macbook that is stuck on the loading page and after a while it shuts down by itself. I don't know what to do anymore please help!!!

    I have a 2007 macbook that is stuck on the loading page and after a while it shuts down by itself. I don't know what to do anymore please help!!!

    Hello Sebas4224
    Start with the article below to troubleshoot issues with your MacBook starting up and staying on. Let me know how it goes in case it does not help and I or others can assist you further.
    Mac OS X: Gray screen appears during startup
    http://support.apple.com/kb/TS2570
    Regards,
    -Norm G.

  • Page down not working for BDC

    Hi all,
    I have written a BDC to call transaction OASV. I have to fill a table control which has initial 10 lines in display. I will have more than 10 items to fill in the table control. But while recording through SHDB i dont get the recording for the page down. However I tried to write the code my self with the OK_CODE as =P++. Still it is not working. It is over writing the lines again when the next set is added. Pls guide me in this.
    Thanks and Regards,
    Anu.

    REPORT zbdc_fi_oasv
           NO STANDARD PAGE HEADING LINE-SIZE 255.
    INCLUDE bdcrecx1.
    DATA : g_filename TYPE  string.
    DATA : BEGIN OF itab OCCURS 0,
           bldat(10) TYPE c,
           budat(10) TYPE c,
           monat(2) TYPE c,
           bukrs(4) TYPE c,
           blart(2) TYPE c,
           ldgrp(4) TYPE c,
           hkont(10) TYPE c,
           shkzg(1) TYPE c,
           dmbtr(13) TYPE c,
           prctr(10) TYPE c,
           END OF itab.
    DATA : BEGIN OF itab_tc OCCURS 0,
           bukrs(4) TYPE c,
           hkont(10) TYPE c,
           shkzg(1) TYPE c,
           dmbtr(13) TYPE c,
           prctr(10) TYPE c,
           END OF itab_tc.
    DATA : counter(2) TYPE n,
           counter1(5) TYPE n,
           ihkont(15) TYPE c,
           ishkzg(15) TYPE c,
           idmbtr(15) TYPE c,
           iprctr(15) TYPE c.
    PARAMETERS: p_fname LIKE rlgrap-filename OBLIGATORY.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname.
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          program_name  = syst-cprog
          dynpro_number = syst-dynnr
        IMPORTING
          file_name     = p_fname.
      g_filename = p_fname.
    START-OF-SELECTION.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename            = g_filename
          filetype            = 'ASC'
          has_field_separator = 'X'
        TABLES
          data_tab            = itab.
      LOOP AT itab.
        MOVE-CORRESPONDING itab TO itab_tc.
        APPEND itab_tc.
        CLEAR itab.
      ENDLOOP.
      PERFORM open_group.
      SORT itab.
      SORT itab_tc.
      DELETE ADJACENT DUPLICATES FROM itab COMPARING bukrs.
      LOOP AT itab.
        PERFORM bdc_dynpro      USING 'SAPMA03B' '0100'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RA01B-LDGRP'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'RA01B-BLDAT' itab-bldat.
        " '01.04.2008'.
        PERFORM bdc_field       USING 'RA01B-BUDAT' itab-budat.
        " '01.04.2008'.
        PERFORM bdc_field       USING 'RA01B-MONAT' itab-monat.
                                                                " '1'.
        PERFORM bdc_field       USING 'RA01B-BUKRS' itab-bukrs.
                                                                " '1111'.
        PERFORM bdc_field       USING 'RA01B-BLART' itab-blart.
        " 'aa'.
        PERFORM bdc_field       USING 'RA01B-LDGRP' itab-ldgrp.
                                                                " '0L'.
        PERFORM bdc_dynpro      USING 'SAPMA03B' '0110'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RA01B-PRCTR(01)'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
       PERFORM bdc_dynpro      USING 'SAPMA03B' '0110'.
       PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        counter = '01'.
        LOOP AT itab_tc WHERE bukrs EQ itab-bukrs.
          CONCATENATE 'RA01B-SHKZG(' counter ')' INTO ishkzg.
          PERFORM bdc_field       USING ishkzg itab_tc-shkzg.
          CONCATENATE 'RA01B-PRCTR(' counter ')' INTO iprctr.
          PERFORM bdc_field       USING iprctr itab_tc-prctr.
          CONCATENATE 'RA01B-HKONT(' counter ')' INTO ihkont.
          PERFORM bdc_field       USING ihkont
                                        itab_tc-hkont.
          CONCATENATE 'RA01B-DMBTR(' counter ')' INTO idmbtr.
          PERFORM bdc_field       USING idmbtr
                                        itab_tc-dmbtr.
          IF counter = '10'.
            PERFORM bdc_dynpro      USING 'SAPMA03B' '0110'.
            PERFORM bdc_field       USING 'BDC_CURSOR'
                                          'RA01B-PRCTR(01)'.
            PERFORM bdc_field       USING 'BDC_OKCODE' '=P++'.
            CLEAR : counter.
          ENDIF.
          CLEAR : ishkzg, iprctr, ihkont, idmbtr.
          counter = counter + 1.
        ENDLOOP.
        PERFORM bdc_dynpro      USING 'SAPMA03B' '0110'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RA01B-HKONT(03)'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=UPDA'.
        PERFORM bdc_transaction USING 'OASV'.
      ENDLOOP.
      PERFORM close_group.

  • BDC F-03 (page down loading problem)

    Sir,
      I'm trying BDC for tcode ( clear G/L account.). With following code  ..but I'm getting error
      on screen number 0731 while page down loading. Please help me ...
    REPORT  CLEAR_ITEM.
    TABLES :BKPF,RF05A.
    DATA : BEGIN OF RECORD OCCURS 0,
           index(001),
           AGKON(16),
           BUDAT(10),
           MONAT(2),
           BUKRS(4),
           WAERS(3),
           END OF RECORD.
    DATA : BEGIN OF RECORD1 OCCURS 0,
           index(002),
           SEL01 LIKE  RF05A-SEL01,
           END OF RECORD1.
    data dat like sy-datum.
    data ibdc like bdcdata occurs 0 with header line.
    dat = sy-datum - 1.
    CALL FUNCTION 'UPLOAD'
    EXPORTING
    *   CODEPAGE                     = ' '
       FILENAME                      = 'C:\'
       FILETYPE                      = 'DAT'
    *   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                      = RECORD.
    * 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.
    CALL FUNCTION 'UPLOAD'
    EXPORTING
    *   CODEPAGE                      = ' '
       FILENAME                      = 'C:\'
       FILETYPE                      = 'DAT'
    *   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                      = RECORD1.
    * 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.
    *start-of-selection.
    CALL FUNCTION 'BDC_OPEN_GROUP'
    EXPORTING
       CLIENT                    = SY-MANDT
    *   DEST                      = FILLER8
       GROUP                     = 'F-03'
       HOLDDATE                  = DAT
       KEEP                      = 'X'
       USER                      = SY-UNAME.
    *   RECORD                    = FILLER1
    *   PROG                      = SY-CPROG
    * IMPORTING
    *   QID                       =
    * EXCEPTIONS
    *   CLIENT_INVALID            = 1
    *   DESTINATION_INVALID       = 2
    *   GROUP_INVALID             = 3
    *   GROUP_IS_LOCKED           = 4
    *   HOLDDATE_INVALID          = 5
    *   INTERNAL_ERROR            = 6
    *   QUEUE_ERROR               = 7
    *   RUNNING                   = 8
    *   SYSTEM_LOCK_ERROR         = 9
    *   USER_INVALID              = 10
    *   OTHERS                    = 11
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    loop at record.
        perform mapping.
      CALL FUNCTION 'BDC_INSERT'
       EXPORTING
         TCODE                  = 'F-03'
    *     POST_LOCAL             = NOVBLOCAL
    *     PRINTING               = NOPRINT
    *     SIMUBATCH              = ' '
    *     CTUPARAMS              = ' '
        TABLES
          DYNPROTAB              = IBDC.
    *   EXCEPTIONS
    *     INTERNAL_ERROR         = 1
    *     NOT_OPEN               = 2
    *     QUEUE_ERROR            = 3
    *     TCODE_INVALID          = 4
    *     PRINTING_INVALID       = 5
    *     POSTING_INVALID        = 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.
    REFRESH IBDC.
    ENDLOOP.
    CALL FUNCTION 'BDC_CLOSE_GROUP'
    * EXCEPTIONS
    *   NOT_OPEN          = 1
    *   QUEUE_ERROR       = 2
    *   OTHERS            = 3
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    form mapping.
    perform bdc_dynpro      using 'SAPMF05A' '0131'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RF05A-XPOS1(03)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RF05A-AGKON'
                                  RECORD-AGKON.
    perform bdc_field       using 'BKPF-BUDAT'
                                  RECORD-BUDAT.
    perform bdc_field       using 'BKPF-MONAT'
                                  RECORD-MONAT.
    perform bdc_field       using 'BKPF-BUKRS'
                                  RECORD-BUKRS.
    perform bdc_field       using 'BKPF-WAERS'
                                  RECORD-WAERS.
    perform bdc_field       using 'RF05A-XPOS1(01)'
    perform bdc_field       using 'RF05A-XPOS1(03)'
                                  'X'.
    perform bdc_dynpro      using 'SAPMF05A' '0731'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RF05A-SEL01(02)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=PA'.
    data : A(20) type c,
           IDX(2) TYPE C.
       ADD 1 TO IDX.
    LOOP AT RECORD1 WHERE INDEX = RECORD-index.
    IF IDX > 10 .
    perform bdc_dynpro      using 'SAPMF05A' '0731'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RF05A-SEL01(02)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=P+'.
      IDX = 1.
    ENDIF.
    CONCATENATE 'RF05A-SEL01(' IDX ')' INTO A.
    ibdc-fnam = A .
    IBDC-fval  =  RECORD1-SEL01.
    append ibdc.
    CLEAR IBDC.
    CLEAR A.
    IDX = IDX + 1.
    ENDLOOP.
    perform bdc_dynpro      using 'SAPDF05X' '3100'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=BS'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RF05A-ABPOS'.
    perform bdc_field       using 'RF05A-ABPOS'
                                  '1'.
    perform bdc_dynpro      using 'SAPMF05A' '0700'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RF05A-NEWBS'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=BU'.
    endform.
    *&      Form  bdc_dynpro
    *       text
    *      -->P_0137   text
    *      -->P_0138   text
    FORM bdc_dynpro using program type string screen type string.
    ibdc-program = program.
    ibdc-dynpro  = screen.
    ibdc-dynbegin = 'X'.
    append ibdc.
    clear ibdc.
    ENDFORM.                    " bdc_dynpro
    *&      Form  bdc_field
    *       text
    *      -->P_0142   text
    *      -->P_0143   text
    FORM bdc_field  USING  fname type string fvale.
    ibdc-fnam = fname.
    ibdc-fval = fvale.
    append ibdc.
    clear ibdc.
    ENDFORM.                    " bdc_field
    Thanking you..
    Manoj.

    Ramesh ,
    I'll advise you, not to use a bdc-programm for ta's like fb50 - What woud you do, when SAP in future changes the table control to an alv grid control ??
    So i advise you , to use Bapis or the standard interface
    <b>RFBIBL00</b> to post fi-documents.
    Andreas

  • Capturing Ok Code for Page Down Button

    Hi,
    In Infotype O568 I have to update a table for Leave records. For that I am using BDC recording. While doing BDC recording the page down button ok Code is not being recorded. Can any one tell me how to capture the Ok Code for page down button. I have Tried with ' P+ ' and ' P++ ' but it does not work.
    Thanks!!!

    Hi Abhay,
    For which transaction you are using your BDC , i am not getting.
    I must say that for all transaction , page down(P+) option don't work,
    for that transaction you need to follow the below steps.
    go to menu bar->edit-> enter lines.
    after recording you will get BDC_OKCODE = NP.
    Try with this.
    Regards,
    Tutun

Maybe you are looking for

  • Preview - Set view Thumbnails as default

    Is it possible to open a document in Preview and have it open to show thumbnails as the default instead of Content Only?

  • Sync iphone 4s and Outlook contacts

    i often get new contacts on my phone, and sometimes i get them on my desktop.  I would like to sync the 2 platforms so that new contacts created on my phone will be updated on my desktop and vica-versa? For example, i just created a new contact on my

  • Fin Reports - Error when trying to run a report via Workspace - 11.1.1.3

    I can run the report via the client. But when any user tries and runs it via workspace we get: <?xml version="1.0" encoding="UTF-8"?> <BpmResponse action="" type="error"> <code>0</code> <desc>; nested exception is: java.rmi.UnmarshalException: error

  • Are there brightness/contrast controls in Flash Player?

    Dear Anyone. I use Flash Player to watch streaming content on a bunch of websites. It's great when the video's been well made but on some of the websites it's VERY dark. Are there TV-style brightness/contrast controls anywhere within any of the Flash

  • Unexpected end of SIP message

    Hi, In WLSS 2.2.0, we are getting this error "unexpected end of SIP message". What I have to do? Please clarify the same. Regards, Janakiraman. N